[{"id":1763131,"web_url":"http://patchwork.ozlabs.org/comment/1763131/","msgid":"<20170905112921.3e7c1a6c.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-05T09:29:21","subject":"Re: [Qemu-devel] [PATCH v2 2/3] s390x/pci: fixup ind_offset of msix\n\trouting entry","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Fri,  1 Sep 2017 06:22:57 +0200\nYi Min Zhao <zyimin@linux.vnet.ibm.com> wrote:\n\n> The guest uses the mpcifc instruction to register the aibvo of a zpci\n> device, which is the starting offset of indicators in the indicator\n> area and thus remains constant. Each msix vector is an offset from the\n> aibvo. When we map a msix route to an adapter route, we should not\n> modify the starting offset, but instead add the vector to the starting\n> offset to get the absolute offset in the specific route.\n> \n> Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>\n> ---\n>  target/s390x/kvm.c | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n> \n> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c\n> index 3d490c5e4b..21ce06966c 100644\n> --- a/target/s390x/kvm.c\n> +++ b/target/s390x/kvm.c\n> @@ -2545,14 +2545,12 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,\n>          return -ENODEV;\n>      }\n>  \n> -    pbdev->routes.adapter.ind_offset = vec;\n> -\n>      route->type = KVM_IRQ_ROUTING_S390_ADAPTER;\n>      route->flags = 0;\n>      route->u.adapter.summary_addr = pbdev->routes.adapter.summary_addr;\n>      route->u.adapter.ind_addr = pbdev->routes.adapter.ind_addr;\n>      route->u.adapter.summary_offset = pbdev->routes.adapter.summary_offset;\n> -    route->u.adapter.ind_offset = pbdev->routes.adapter.ind_offset;\n> +    route->u.adapter.ind_offset = pbdev->routes.adapter.ind_offset + vec;\n>      route->u.adapter.adapter_id = pbdev->routes.adapter.adapter_id;\n>      return 0;\n>  }\n\nLooks good. I assume you'll send a v3, so I'll hold off on applying for\nnow.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmhP75f04z9s0g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 19:34:03 +1000 (AEST)","from localhost ([::1]:57711 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dpAF7-0002DY-OI\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 05:34:01 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:45819)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dpAAq-0007Ip-9W\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:29:41 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dpAAg-0007Hi-Ku\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:29:36 -0400","from mx1.redhat.com ([209.132.183.28]:52542)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dpAAg-0007HG-Em\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:29:26 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7966DC04B328;\n\tTue,  5 Sep 2017 09:29:25 +0000 (UTC)","from gondolin (dhcp-192-215.str.redhat.com [10.33.192.215])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 23FE98C3B9;\n\tTue,  5 Sep 2017 09:29:24 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7966DC04B328","Date":"Tue, 5 Sep 2017 11:29:21 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Yi Min Zhao <zyimin@linux.vnet.ibm.com>","Message-ID":"<20170905112921.3e7c1a6c.cohuck@redhat.com>","In-Reply-To":"<1504239778-29893-3-git-send-email-zyimin@linux.vnet.ibm.com>","References":"<1504239778-29893-1-git-send-email-zyimin@linux.vnet.ibm.com>\n\t<1504239778-29893-3-git-send-email-zyimin@linux.vnet.ibm.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.31]);\n\tTue, 05 Sep 2017 09:29:25 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 2/3] s390x/pci: fixup ind_offset of msix\n\trouting entry","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"pasic@linux.vnet.ibm.com, pmorel@linux.vnet.ibm.com,\n\trichard.henderson@linaro.org, qemu-devel@nongnu.org,\n\tagraf@suse.de, borntraeger@de.ibm.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]