From patchwork Wed Jun 21 16:24:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9802255 Return-Path: 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 5CA7960329 for ; Wed, 21 Jun 2017 16:32:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E2E422638 for ; Wed, 21 Jun 2017 16:32:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42A7F285F0; Wed, 21 Jun 2017 16:32:04 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, 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 854DC2862E for ; Wed, 21 Jun 2017 16:32:03 +0000 (UTC) Received: from localhost ([::1]:55059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiXx-0003eD-5T for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Jun 2017 12:32:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNiS3-00070j-8N for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:25:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNiS0-0004YR-KW for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:25:55 -0400 Received: from mail-ve1eur01on0107.outbound.protection.outlook.com ([104.47.1.107]:60724 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNiS0-0004Y1-7b for qemu-devel@nongnu.org; Wed, 21 Jun 2017 12:25:52 -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; bh=2IKJ1LRTngr3KknZjhjILC+ATguDnaqK226RYwivcBM=; b=D1IwDe8bTMIKCAFfRG6nWpNtcMD1tWpJF1e+ToAyVW8eDPtuCcdtMIKkS51674X9/VatpxWHiZxkgEtPtkR/tEUj36U8Tojr/Izi0mDOjJYi0iJYmRxvSE5oTZmTmtbYF5hx9O7XxfFfFjlXziqATFxz8gkie+bNUL1MUWAqU5g= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from rkaganb.sw.ru (195.214.232.6) by HE1PR08MB0842.eurprd08.prod.outlook.com (2a01:111:e400:59b2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Wed, 21 Jun 2017 16:25:45 +0000 From: Roman Kagan To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Date: Wed, 21 Jun 2017 19:24:12 +0300 Message-Id: <20170621162424.10462-12-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170621162424.10462-1-rkagan@virtuozzo.com> References: <20170621162424.10462-1-rkagan@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HK2P15301CA0022.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::32) To HE1PR08MB0842.eurprd08.prod.outlook.com (2a01:111:e400:59b2::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dbb96432-d17f-446e-e8d8-08d4b8c22dcf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:HE1PR08MB0842; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 3:uybfiAU1yzHa5LshRFhCxSq4xF0iL4LsF/tuT9s7uxDNZHuItwLU+/wJDlG7J3wGWRt4DWGngEdEz3zcMdf7xA4ZmVWWo5sEHh8Zu6i+Gz9FaUu7fwt5fpbffuBghQ2xULMCOuE9Z8DFgdCeRTmxr0hZCutvAnzNgcBcdG6iixxGBV2s+YLR7ziXLoHeoDIRsq7ClM5bk0tyKULb1HsK/t1Zj3++1WT4GfYZEkhR3Cd63V0sHGCTTrPFXZVtnVld6yUA6EjcGC8w6nJGYbqNyAZtAvpZpB/0i2/+ZARd46r/Vi296n9uSEDvn/98uWPX0MC5GWNAxy3qJZSkhHG0VA==; 25:XTUJkduRZi56ntoqijY0uexvppBdkU0QqnZlZjpPVC6gYk/mWkGOby7BWvA2pO7Yp3j2SwKxhaMZYZ/SYQQedSSpt8q3Jr486e69G43N0ilKWKA0/Gp01irpkfEB3hu1+e93GSkJW2iB3/+eeaiZpXv2THw0zf9JgTT9BNNouByKXHQLe9b+uw/QEC20em2+y/Xod7OcW35Cv8ez4cLrO6Fnwe0Rtl1J1K/QZuXui9qxgc8XWYVIIORVGTLyLVbf6kCaJPkeCUCn/17UbBFiVRfnZUlopbcZrsQ/rtlKrvm4XuYHRijMdeRKcTppxaXVHQsqysdHGUm+KaNRrSqTalH7yShoHwyu5z4hB7h7pn1//02E/Gc7St5kzGBUdSvHFAdshb22cAeUDOJgcln/VhnzBvIS2ytWptH7CGpdDaad0spScZU3lpZMvyE9dLzBseU2i14ckHX1XfB2uurtnUqogTmxROl6xTUESanEzyU= X-MS-TrafficTypeDiagnostic: HE1PR08MB0842: X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 31:LExdkJKFBTx31WojQIuL51Hvhrq0ZwRkU6SBYtiHK9Y4GtpB2WadRxAVnt32Uajqzaue9KhpBFEK2TXY50zOngjkBNoGQrKmy6K9us8tb0ir7+0lyolOPds26kff0PadvF9hQGBuAlowpV8LEATnlcQ1mJlq5GvF9E5DMWCbjtn7wbXy2VaqjMYyNPboeXnZFcWuE1+pIV2zrQj6FPdX389CbOEgI3VDkio0c6v4Ms4=; 20:+/XwCwRZI8wR/W9s4fzKd7IgdVE9s+r8KYLwiVnse59zLvTExHEnuT1P8NmYPr4A59KFfLw83i2NRWIEwp/HvjTbo+jSceK/XV0fXDvmmNRoKvR1GhY3XUmK11fWZ4v/sysKCuYYoOVC4Ijg9YJNXc+ZyEHPyjct44/iwTCf5zlLKHlK3N0e3n2t9kOTPvSmEbxf+Mvt0J60iAL2FjsbeoQer1chso56OvfDNfX3qim0VVsSfQ7XReiSzjTyraOmKwfUMZ3GHdXojtTUsO/LH3Bdyb9OdOhyrvO4Hz9k7SBljl9TRZCQswOnFm568npfSwKM358xGin8/zpjA42sua9r0KflAe8KnbJtVLn3qS9GRY3A7yHCYtB9a8nE0sXFwdF3D0k9ZZaVa1u2ZWhbVQUV3lrmlINA3s9TkOxx6QY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR08MB0842; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(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5FzDj22F?= =?us-ascii?Q?aUlZJNnhm2hVozGXacC6KaJ7kntKYdqjWYqUC2O5tQOaJkqDfO6KwDMu/clk?= =?us-ascii?Q?J5/2QoDbKN5UWjVWx9GBxsd9RTWxZmrSZoBiYg0xPRBwd1W47T6/zXCqRhnX?= =?us-ascii?Q?ym9p52bXSucDCqCBMES7fBMr+qh+NNpu19E4pq/PSjNdTd0rGdaeZEykGtI4?= =?us-ascii?Q?+1Oq6KwpqvpPCo0BcZl9SkrEB2S0Ao6ccvhU1Fe9ki/0gf4uyWJtGNRkMwUq?= =?us-ascii?Q?CUtoU9iFISkNEgHyl6r/b/8gkIzZbzp9ZFttTCGKdBGlUe5qn/CE93ElsyII?= =?us-ascii?Q?T/4p1KVX6P3Cyl5RiYU3LhY9kJgr+2?= X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(6666003)(4326008)(2950100002)(6512007)(6506006)(5003940100001)(42186005)(53416004)(54906002)(50466002)(86362001)(38730400002)(33646002)(478600001)(50986999)(76176999)(66066001)(53936002)(81166006)(7736002)(6486002)(189998001)(8676002)(50226002)(305945005)(36756003)(25786009)(5660300001)(1076002)(3846002)(6116002)(47776003)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR08MB0842; H:rkaganb.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0842; 23:oEl8BXLQJaQE2xZAfWRhvtOXtIiRfCVYY5okO0ELh?= =?us-ascii?Q?q/7zbSN1D7HLEUw3O3zeMJrGeYdqy46tq3xoMlfi7WHGZx5EZ6HuD4QyvmOQ?= =?us-ascii?Q?kGdz9+rwRnD6L4hlDtlMJoLJcN9aadUhTfy2QETAP2VpL2P16d0ccxx8radr?= =?us-ascii?Q?AxYzwzO6C8lLFwOyZtMc77AGn+SqmIbr4OMxi/aqPzi+Zqf8UubQzTRc/zEj?= =?us-ascii?Q?Ie9kCdmKvLEuoSItRx9P+TRKdcerovdKWfogWLpiwaiAurWItQrlyReXG3BG?= =?us-ascii?Q?bscL2RXq+pVXXlekDIL8bMMkJ9Alx2B18iULGxruysdZU++8ap1ZHqV0euOj?= =?us-ascii?Q?2qhY5GJP65ivy3ax3owkxjOaVJKDma2lIbP+YtshutvFt4rylzLVDi7rW7Y2?= =?us-ascii?Q?ZYudxwhFLDmG7pJQExlzNl6AYFEHtOGaZAS2wonZbneuV/vAGe+2pil4GRRx?= =?us-ascii?Q?nK3fnBt7VT6dGa20VgrSqzGO6ayVQaBNl4xfyTxlqurVx4ivEFe+rx46EKKF?= =?us-ascii?Q?WrV59J35FbhtKldoUuJs6Wl3EEG5q6LnJeho4tGs54nQPF4hSl8ljbSjSNjZ?= =?us-ascii?Q?F9y9iTkbEcM0YgBpz+FmfA0M5iq59PYcuVcJVWgDWo2PnqSoahASeo3DGcmb?= =?us-ascii?Q?H+vuS/HMwhm5djT16Ya1Dnvh/Eq4UvRleO+wMGjIaT9EcxHdvI+L05Xi8oHz?= =?us-ascii?Q?8apvg5FKJMUUDvZitQRWVk/gKolTjmvPedSX9JuQA92LltZCKeWgNIS6GFHC?= =?us-ascii?Q?dU5hT08XHSAOPVg1Rzf6MuANp8xw4AxteS7jPrFD7pN7Z0cdM71MG9C7ZVND?= =?us-ascii?Q?5lTlLCH41IA6yB2Coe5X+3e2E7Hz8FfyXHAe/J8HyKvMVmetpR+k0P2wsAmr?= =?us-ascii?Q?p/HsGfrR2m/DAFpcUl9hNTcF4T8FLS8iKUVl9rxCKSxaB8JhjqyELnFQ0Mxe?= =?us-ascii?Q?W1tAPZAjx2+/dnOnuYyiNErsPdhyWWXWxZIViykyfgduXy5WaBp8OSROxw2n?= =?us-ascii?Q?08=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0842; 6:QtLeR9ZFXlG3SFAvKxZl7054YVEjod5mvk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Y28hvDwe0unomJDwNsR1ih0sRV4fAVF7wd+emko68jSw5EiL3sKQxYlqIw6KFOZ2oUwmwSJak/HUuyfwKSY/Mwio423EO96liwgNCp8c6IRKXx9rxsvt91+CEwX0hrssp0m1+Pxm+VgpJQUUZL0mc+UUjTbZ6Bv2/Yxc/+8FDEmTl4v39rmTgiu2Cgxi9NK6H836CO4NOfWVo2GXYpLPg6ihmJJ/IQwCgMO17t0+Ll+9kBQ/t3gZxSPK2Hqghor2szZZmo+/bIdzTuejyChqvGm1xN49XWYWorFiG+2lFbc9ZCJ98PUKblFHeakbttYnkMi6b8rKRUJIZ48wr3pMJQULDd0PE5zOjuc1hvHap8UreK3mYH5+SgwjL9hW98CkahbnYTTnbXGp7P1+ysDQpRajkuFnZlTjBJluKmEi9fjtrxRVcaUku7vlnjQgC6ySjhRp3S+uuQfTcuByPGnHdRIFW6qj0PIcVDm/n87Mvb2322luMQvzeI/wh9k/t1HKKFz/feOrfbTjCb4lRuP8GZ9bMHM6icQ4iAP2MYPq3T1qRXXnVzHG/ieHCnG05But9CbBYV+g+XP73YBHB5XXZqhLMEjVtysctPSi8VmvrCb4= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0842; 20:2aRF3j1tervhkOo8/s1DQlHceCTN0ESvIZ32qf4a/a1F4ckwaTGpFGTpXPKTNcwSJlQbKhWe2PHG0iU8H25dVQ0FtiNy4sYe7UFqq34G8MVADgt1cP8+A6NXrVf7cfcAxyfuO0FMh5y6t2aiT8JVr1yo1qfPAUqi8OHXboRZvMk= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 16:25:45.3628 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB0842 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.107 Subject: [Qemu-devel] [PATCH v2 11/23] hyperv: allow passing arbitrary data to sint ack callback 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: "Denis V . Lunev" , Evgeny Yakovlev , Igor Mammedov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make sint ack callback accept an opaque pointer, that is stored on sint_route at creation time. This allows for more convenient interaction with the callback. Besides, nothing outside hyperv.c should need to know the layout of HvSintRoute fields any more so its declaration can be removed from the header. Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 14 +++----------- hw/misc/hyperv_testdev.c | 2 +- target/i386/hyperv.c | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h index 82f4757..93f7300 100644 --- a/target/i386/hyperv.h +++ b/target/i386/hyperv.h @@ -19,21 +19,13 @@ #include "qemu/event_notifier.h" typedef struct HvSintRoute HvSintRoute; -typedef void (*HvSintAckClb)(HvSintRoute *sint_route); - -struct HvSintRoute { - uint32_t sint; - uint32_t vcpu_id; - int gsi; - EventNotifier sint_set_notifier; - EventNotifier sint_ack_notifier; - HvSintAckClb sint_ack_clb; -}; +typedef void (*HvSintAckClb)(void *data); int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit); HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, - HvSintAckClb sint_ack_clb); + HvSintAckClb sint_ack_clb, + void *sint_ack_clb_data); void kvm_hv_sint_route_destroy(HvSintRoute *sint_route); diff --git a/hw/misc/hyperv_testdev.c b/hw/misc/hyperv_testdev.c index b47af47..827a8b1 100644 --- a/hw/misc/hyperv_testdev.c +++ b/hw/misc/hyperv_testdev.c @@ -55,7 +55,7 @@ static void sint_route_create(HypervTestDev *dev, uint8_t vpidx, uint8_t sint) sint_route->vpidx = vpidx; sint_route->sint = sint; - sint_route->sint_route = kvm_hv_sint_route_create(vpidx, sint, NULL); + sint_route->sint_route = kvm_hv_sint_route_create(vpidx, sint, NULL, NULL); assert(sint_route->sint_route); QLIST_INSERT_HEAD(&dev->sint_routes, sint_route, le); diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index 3594bd0..84ea228 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -16,6 +16,16 @@ #include "hyperv.h" #include "hyperv_proto.h" +struct HvSintRoute { + uint32_t sint; + uint32_t vcpu_id; + int gsi; + EventNotifier sint_set_notifier; + EventNotifier sint_ack_notifier; + HvSintAckClb sint_ack_clb; + void *sint_ack_clb_data; +}; + uint32_t hyperv_vp_index(X86CPU *cpu) { return CPU(cpu)->cpu_index; @@ -77,11 +87,12 @@ static void kvm_hv_sint_ack_handler(EventNotifier *notifier) HvSintRoute *sint_route = container_of(notifier, HvSintRoute, sint_ack_notifier); event_notifier_test_and_clear(notifier); - sint_route->sint_ack_clb(sint_route); + sint_route->sint_ack_clb(sint_route->sint_ack_clb_data); } HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint, - HvSintAckClb sint_ack_clb) + HvSintAckClb sint_ack_clb, + void *sint_ack_clb_data) { HvSintRoute *sint_route; EventNotifier *ack_notifier; @@ -116,6 +127,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->vcpu_id = vp_index; sint_route->sint = sint;