From nobody Mon Feb 9 12:10:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505833285259824.4253524486378; Tue, 19 Sep 2017 08:01:25 -0700 (PDT) Received: from localhost ([::1]:43408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duK1c-0005ii-1y for importer@patchew.org; Tue, 19 Sep 2017 11:01:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duJxT-0002Ca-S2 for qemu-devel@nongnu.org; Tue, 19 Sep 2017 10:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duJxO-0007Vj-1p for qemu-devel@nongnu.org; Tue, 19 Sep 2017 10:57:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3715) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duJxN-0007Uh-T6 for qemu-devel@nongnu.org; Tue, 19 Sep 2017 10:57:02 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFBE181E01; Tue, 19 Sep 2017 14:57:00 +0000 (UTC) Received: from localhost (unknown [10.36.117.0]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C912A5D980; Tue, 19 Sep 2017 14:56:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CFBE181E01 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com From: Cornelia Huck To: peter.maydell@linaro.org Date: Tue, 19 Sep 2017 16:56:02 +0200 Message-Id: <20170919145636.9389-5-cohuck@redhat.com> In-Reply-To: <20170919145636.9389-1-cohuck@redhat.com> References: <20170919145636.9389-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 19 Sep 2017 14:57:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/38] s390x/pci: fixup ind_offset of msix routing entry X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, Yi Min Zhao , david@redhat.com, Cornelia Huck , agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Yi Min Zhao The guest uses the mpcifc instruction to register the aibvo of a zpci device, which is the starting offset of indicators in the indicator area and thus remains constant. Each msix vector is an offset from the aibvo. When we map a msix route to an adapter route, we should not modify the starting offset, but instead add the vector to the starting offset to get the absolute offset in the specific route. Signed-off-by: Yi Min Zhao Message-Id: <1504606380-49341-3-git-send-email-zyimin@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck --- target/s390x/kvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 7478edeb70..cd2204baef 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -2436,14 +2436,12 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing= _entry *route, return -ENODEV; } =20 - pbdev->routes.adapter.ind_offset =3D vec; - route->type =3D KVM_IRQ_ROUTING_S390_ADAPTER; route->flags =3D 0; route->u.adapter.summary_addr =3D pbdev->routes.adapter.summary_addr; route->u.adapter.ind_addr =3D pbdev->routes.adapter.ind_addr; route->u.adapter.summary_offset =3D pbdev->routes.adapter.summary_offs= et; - route->u.adapter.ind_offset =3D pbdev->routes.adapter.ind_offset; + route->u.adapter.ind_offset =3D pbdev->routes.adapter.ind_offset + vec; route->u.adapter.adapter_id =3D pbdev->routes.adapter.adapter_id; return 0; } --=20 2.13.5