Message ID | 20180702165842.11423-6-rkagan@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BDEF360284 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 2 Jul 2018 17:15:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1A4C25EA6 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 2 Jul 2018 17:15:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9477E28C77; Mon, 2 Jul 2018 17:15:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F2CD325EA6 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 2 Jul 2018 17:15:45 +0000 (UTC) Received: from localhost ([::1]:34443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1fa2QS-0005dR-Mh for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Jul 2018 13:15:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <rkagan@virtuozzo.com>) id 1fa2AQ-0007xb-Qm for qemu-devel@nongnu.org; Mon, 02 Jul 2018 12:59:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rkagan@virtuozzo.com>) id 1fa2AM-00048c-VQ for qemu-devel@nongnu.org; Mon, 02 Jul 2018 12:59:10 -0400 Received: from mail-eopbgr80098.outbound.protection.outlook.com ([40.107.8.98]:13312 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <rkagan@virtuozzo.com>) id 1fa2AM-00047o-IS for qemu-devel@nongnu.org; Mon, 02 Jul 2018 12:59:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YaMqlj5x28q9zvO9ESgZHi5WvK0p3pWJbDefBw+EBOA=; b=Z5aURR3ssAf6tDAWsPJvEZe7NooPT5ngGsZUg/jrT/la0p+/8wLtx/lNkUmUL5hW3LhRgTLjAn0o6TaP4vxqeGYXnj9GQMRtD6ccXCL4h4t0CF8WV8AJAUcuiU9ynbVUQ/6xIQ/XZB7zTfjv0ZMcmUUMCQTCYTIn6eFkYi9KA6I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; Received: from rkaganb.sw.ru (185.231.240.5) by DB6PR0801MB1974.eurprd08.prod.outlook.com (2603:10a6:4:75::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.26; Mon, 2 Jul 2018 16:59:02 +0000 From: Roman Kagan <rkagan@virtuozzo.com> To: qemu-devel@nongnu.org Date: Mon, 2 Jul 2018 19:58:41 +0300 Message-Id: <20180702165842.11423-6-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180702165842.11423-1-rkagan@virtuozzo.com> References: <20180702165842.11423-1-rkagan@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1PR08CA0234.eurprd08.prod.outlook.com (2603:10a6:802:15::43) To DB6PR0801MB1974.eurprd08.prod.outlook.com (2603:10a6:4:75::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2da3e8b3-9686-42d4-7aa0-08d5e03d1dd1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB6PR0801MB1974; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1974; 3:0gKAkBlfuQHtZ//9C/HjiKdpzfjdUA4SfZAndSJ5eohFQ/OmL+GT/12Cb+aEyjUlaf1zxqLT65QCQtOJY4mh7ucwFHYa6HTUAEoQ2H3NMsSHetMm/XiBPYAqNgoFJTqRgbD3NtsoDjeLVOObLiQXurlfjWY4bfr87v6zgqzx2rHNsBCH8IYDswUCEJ7NZ427d1RSpoL9FO5GcZi2LHJjsm+MWaTP3jwYR67LAKDrIdDa54OOlWEBw4lm8+wgLj+H; 25:Yyz3ebBMdd+2+RW+caqQFYvtrRgXf3aiom7h8vT9mf9Kd5VFVJtsWSED8+W4C1/mf67J1GTOGizexl72jibaS97TDX/SmauYv0UZXXtOHlXaA6TRVwKkkLW9mWS2mOKLuPAGY3gS5WnXsr3/AO0jvw2TgKmJmgxDS/yvnSN7NW6HvhNTafiqBPX7aC86tGkLXFiDUYief7GPYtnnUPJRjUDGXYSKICLytiHBgYWd0Jw/PXh5oeBdViGe2aI6DJo+gvYdytdAU0So11+Pok7rQ7J1Gfm2G/cGP1WMyfposSRillzoGryvK5kAj8HQPtFbMHdFoo0OJKBkUCXhHb6+rA==; 31:X87w0CjR/vzU5CRTFGNoFidY9kwtaKvL0qK+nxL6DAtjNFa0kHggfD4VStzwkYUFoKX9+xEJW0TX4qDu3AzaO/0IVoV3yAakZ3HKkqlYcROxDMVc/JhKJG5StG873597JX6bxDgMEakMqGiSa+aciJx3yibJb1QWeL2BixlYLYWhBYulD7Wv7h5WCt/g3RsTJCzjsa5yZHECOuXeOJtAhCl0fSqBG0QdlUyHh57LxCw= X-MS-TrafficTypeDiagnostic: DB6PR0801MB1974: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB1974; 20:SHQp3ds/Rv28rpgUBnmNW9g/51JjKz9smwmh8yP1DgqVy8x+yAEvLTF86DEzCwDiWgFzp67lLgghy7QoTC5NgVMHuFfqC8KGAaMgoB29D7x19TNvQX4Jnaqp9LmR+7buhX9V/0SBneaSg1sNS/Bn1epRuOJybQrIxv9Po4ftPdH5uOiEuwFshpQ1sK9iOSFNq7RPmQDhBUwNT9qKj/v2NgnDapjkNlSsF6FQZFE73X2EEaQX81Xq3zVKo2S+JQ1cHpYO4g4F98Nmm3nmN2EJiR54b085RUY6zp2DIYbuSshFzyoJqF/i16M462c19r5QZE9ldA409e8wnyUKi0EKUCMS1ZJhQiScrukgIJKNsDDxP2oehugUeeQogaDDalUEv6gCEYzGNGITxkosQEd9aSXfBzvpL4pzk0uvJcUv0rv+dYHX4mW4jyCEzl761tdO9HDBS27VPWt+XVKl/e5GaA1ONfrFHndL9r/NkX/Pk4MXNvthMl5iIqOhbDk11T74; 4:qkAf2sV2CRh54zYJ427isISaDuNQDC2k3r5Kp5iY3iAkQshSkRYfExjSYFuBmGu2rrV5vLKpjU1ySNuk1PUPE1lrxmxLFqRZB+C7jYu0q62ssZHSR6Phl6wRD96d/FdjIlHcFKfHvuueHyPfzXwjiNchrsU8EnFD87oUheOvUPUrC7WflwDKAAL+ocfOry5ywlb2mtWbSsvbDR6LCWyr5szugcLzAam1BIHfbmR8HOfzlq9kvRp1LhmzGMky+5+c3aWLTSN1U2DOKWMsjY2A+A== X-Microsoft-Antispam-PRVS: <DB6PR0801MB19740E7EC96A0852A0FE5424C9430@DB6PR0801MB1974.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DB6PR0801MB1974; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0801MB1974; X-Forefront-PRVS: 07215D0470 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6029001)(39850400004)(136003)(396003)(376002)(366004)(346002)(189003)(199004)(7736002)(26005)(53936002)(305945005)(4326008)(50466002)(39060400002)(478600001)(6506007)(386003)(186003)(6512007)(51416003)(6486002)(66066001)(47776003)(25786009)(76176011)(97736004)(2906002)(2351001)(52116002)(16526019)(11346002)(105586002)(36756003)(8936002)(69596002)(53416004)(3846002)(6116002)(106356001)(81156014)(81166006)(446003)(2361001)(7416002)(86362001)(54906003)(2616005)(6666003)(16586007)(956004)(316002)(486006)(48376002)(68736007)(1076002)(50226002)(8676002)(476003)(5660300001)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB1974; H:rkaganb.sw.ru; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0801MB1974; 23:cYADXBBKlvnf0vdvWig1CHuPc+LuhN6ZDjYW5FS?= =?us-ascii?Q?L469i6VR40eaed/OZKFfbFuWYE1KZzWy+FjPhG6uhN/sooBwJuc+RvstHNXq?= =?us-ascii?Q?LrR4/U9ZQJsyZnOZdhU1VjPrpZcIIsnVP9+a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X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2018 16:59:02.3243 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2da3e8b3-9686-42d4-7aa0-08d5e03d1dd1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1974 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.8.98 Subject: [Qemu-devel] [PATCH 5/6] hyperv: address HvSintRoute by X86CPU pointer 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>, <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>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Vijayabhaskar Balakrishna <vijay.balakrishna@oracle.com>, Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Venu Busireddy <venu.busireddy@oracle.com>, Liran Alon <liran.alon@oracle.com>, Igor Mammedov <imammedo@redhat.com>, Si-Wei Liu <si-wei.liu@oracle.com>, Paolo Bonzini <pbonzini@redhat.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Karl Heubaum <karl.heubaum@oracle.com>, Richard Henderson <rth@twiddle.net> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index 11fd1add2c..0ce8a7aa2f 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -18,7 +18,7 @@ struct HvSintRoute { uint32_t sint; - uint32_t vp_index; + X86CPU *cpu; int gsi; EventNotifier sint_set_notifier; EventNotifier sint_ack_notifier; @@ -97,6 +97,12 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, HvSintRoute *sint_route; EventNotifier *ack_notifier; int r, gsi; + X86CPU *cpu; + + cpu = hyperv_find_vcpu(vp_index); + if (!cpu) { + return NULL; + } sint_route = g_new0(HvSintRoute, 1); r = event_notifier_init(&sint_route->sint_set_notifier, false); @@ -128,7 +134,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, sint_route->gsi = gsi; sint_route->sint_ack_clb = sint_ack_clb; sint_route->sint_ack_clb_data = sint_ack_clb_data; - sint_route->vp_index = vp_index; + sint_route->cpu = cpu; sint_route->sint = sint; return sint_route;
Use X86CPU pointer to refer to the respective HvSintRoute instead of vp_index. This is more convenient and also paves the way for future enhancements. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- target/i386/hyperv.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)