Message ID | 1521039163-138-2-git-send-email-juterry@microsoft.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 35ADC6038F for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 14 Mar 2018 14:54:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2535C289B9 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 14 Mar 2018 14:54:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 198E9289BF; Wed, 14 Mar 2018 14:54:29 +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 23C8C289B9 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 14 Mar 2018 14:54:26 +0000 (UTC) Received: from localhost ([::1]:46651 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 1ew7nO-00042u-2x for patchwork-qemu-devel@patchwork.kernel.org; Wed, 14 Mar 2018 10:54:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <juterry@microsoft.com>) id 1ew7mI-0002fS-L6 for qemu-devel@nongnu.org; Wed, 14 Mar 2018 10:53:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <juterry@microsoft.com>) id 1ew7mE-0001AC-1Z for qemu-devel@nongnu.org; Wed, 14 Mar 2018 10:53:18 -0400 Received: from mail-co1nam03on0105.outbound.protection.outlook.com ([104.47.40.105]:27552 helo=NAM03-CO1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <juterry@microsoft.com>) id 1ew7mD-00018f-QE for qemu-devel@nongnu.org; Wed, 14 Mar 2018 10:53:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9Ve4pkDYRRWgAhZRX5ArFSVuShaSgV06ikC6TGMQI/8=; b=SLtFx5/MAIYU4+KZ8ioWyBDImafql9Ospv4blaNjJRfEqUUfaA7oceeW6TZbfYlCL/dC3jdL6/0FKOLzJHlJroD6cRY4JI9nXj1J8uLOJtHL0atdZYi4VJ4Qnsbywoy3cLQYniO+Zcm7yUgtCmk9D1I52eVZaCf17inR2GGVemI= Received: from DESKTOP-CS4P60I.corp.microsoft.com (2001:4898:80e8:d::573) by DM5PR21MB0171.namprd21.prod.outlook.com (2603:10b6:3:a5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.2; Wed, 14 Mar 2018 14:53:09 +0000 To: qemu-devel@nongnu.org Date: Wed, 14 Mar 2018 07:52:41 -0700 Message-Id: <1521039163-138-2-git-send-email-juterry@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521039163-138-1-git-send-email-juterry@microsoft.com> References: <1521039163-138-1-git-send-email-juterry@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [2001:4898:80e8:d::573] X-ClientProxiedBy: SN2PR01CA0002.prod.exchangelabs.com (2603:10b6:804:2::12) To DM5PR21MB0171.namprd21.prod.outlook.com (2603:10b6:3:a5::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5cf0b63f-4f67-4dfd-0ca0-08d589bb4e0e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR21MB0171; X-Microsoft-Exchange-Diagnostics: 1; DM5PR21MB0171; 3:byKwoDC5I0imLwygwGD1BmqVrlmoREIs64m/M6g84j7vX8pfXaS5yglXOcbUpYjex420u2mlwqc03N1DDO3KLN7JSVvZjAiKGWnCfhXa29BL2MOHWWBxD+6zCPPGskd1/GSupnlNTh1+U24/eR8V8om3m6+47HLqcYXqIExiS6+ZU9/WWK8bmZ6cmmjQW0a+yaW4tU0m+HgiOjdgAONJ2u322ZJYPzZv/I+8HgxXp2p7kw0cNRLxY05FgumsoSe1; 25:GbCXFLRHtGknKJS4HmaTq7bRFhgHXFlB4tfGstqHtyueWuGUst7EmFYS0MUJgHGUdCcdm3V9xcjDEyzLlXvB0fYf0Flf0blmdsKKLTkSiqacDNAgsYP4d57NpZ+H08FQ683bARNMLQ6p8cKRXHc5opLl+1qsbdsjyao7h6WSpnU0JsvYHbJVaeWogfBsIA8tLrxe3U5B6eXG6IArKFK5FmM/NCE1l+XeBjnqvLzQaUX5K3goD16MN5/GQuqzAuPx1542DNHiPLsaroDtKZsC/AeZB96UyDm64nytUzNMA0uI0+gIhYl0Ikh6glHUkjAVl2pll1OcunTEHsfjJ+GFKg==; 31:qSDeeqpSj2rR+0mH9Yk/boGlrMp93uUF1ZWeHU0zDQ7qd+Dltly/cvfNQRUJ3tvp7GZjt/+2QkrH9gkuTMehNXMTrew8irFH4Sn23u/VMBykBcVSGAlyXkFTzQNL3a3wvMXTLE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PR21MB0171AFE0F6AA9AE4496BA118B6D10@DM5PR21MB0171.namprd21.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(28532068793085)(89211679590171); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231221)(944501260)(52105095)(6055026)(61426038)(61427038)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR21MB0171; BCL:0; PCL:0; RULEID:; SRVR:DM5PR21MB0171; X-Forefront-PRVS: 0611A21987 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6029001)(39860400002)(346002)(366004)(376002)(39380400002)(396003)(189003)(199004)(36756003)(2906002)(22452003)(59450400001)(25786009)(16526019)(46003)(52396003)(16586007)(316002)(86362001)(51416003)(6346003)(8676002)(6486002)(186003)(7696005)(8936002)(52116002)(50226002)(5660300001)(10090500001)(305945005)(386003)(53936002)(105586002)(76176011)(81156014)(81166006)(10290500003)(6116002)(7736002)(68736007)(2351001)(106356001)(2361001)(107886003)(47776003)(4326008)(2950100002)(6666003)(6916009)(478600001)(48376002)(86612001)(97736004)(50466002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR21MB0171; H:DESKTOP-CS4P60I.corp.microsoft.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=juterry@microsoft.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR21MB0171; 23:fuxZZKbUb57lbBPNvfzjoN9dYQDdZww/nlBfup3gV?= =?us-ascii?Q?eJEbaWOEHttsOALUmL2s9hktrilz+Nz+aFyciH+1PWhDKtnom2s2vDHa73V1?= =?us-ascii?Q?tkSxAPCD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ik8v6EL15nRVmF1Ln+hBh0srPtOxcxGczQ5BfM5naPHfYEf8c5agJUi084Nav3g0XMcWvYxzBXhg==; 5:OX3rXrXfg7w9PMmD94GcwFSjV1eR7GE8C+QdH5B1rOVkcS9cZJ5DlPH/FvIK6rHu14CurBECzUJr7I5cGDoOmjH1D/RKl+Lgt6Wrs6Bw4gE+xn8R7yta3GcRTGb6JaJpGt7TQcG4MLro+Aorbm0By0fXyF7W+2qSV+RUZ/gC6xo=; 24:VT355dyLqXmhgWbHZSkMm70iMeWFKhu8PVWa4pfcap1iVY1o0HP6ixNOX4pnW6gbspOr12+roqEVtrfqxHGD+hROdIvbBv3sK+vRAReDeYM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR21MB0171; 7:EhDL2uWrA9S0XgsX2Lo44oCVEqHLuihyH0a+PTtF4DTnGB2PzFQYQlM4RzqkwKNZ9r3C5ghDLmopghhHlZ+GhOm+lMQs28TK4Pest7VPLfaIc91o/Fc3GVzFdNvs5rubxYhvzvBiT435RjVt+FFY0AAod0KezJF6MaFuImniyj2NDvXnLnkLlKxxURkEEc3q3rdX2CfIUmyJAxDZIJ7DErtrM5ES8Duq5bFuGPNrqjS+pr6f/wrLcQ+4G4vykMGN; 20:hUuDsXErInvMh5U35qHTJqdYC4i0g9oCYhYBwZ1F+4dw/lTlQWpzIGV3oesIu2CgN4L5/+8krkFKtq7+ttMyZ1hc8Ou+tzUwFq/o/sHBzeNy9Fh16/3XoXQjHeZB7yQWZddXBOb9yZhY7knBYov2AMnA+/ppa/XMosXELfO0DQU= X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2018 14:53:09.8921 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5cf0b63f-4f67-4dfd-0ca0-08d589bb4e0e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR21MB0171 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.40.105 Subject: [Qemu-devel] [PATCH 1/3] WHPX fix WHvGetCapability out WrittenSizeInBytes 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> From: "Justin Terry \(VM\) via Qemu-devel" <qemu-devel@nongnu.org> Reply-To: "Justin Terry \(VM\)" <juterry@microsoft.com> Cc: pbonzini@redhat.com, "Justin Terry \(VM\)" <juterry@microsoft.com>, ehabkost@redhat.com, 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/configure b/configure index af72fc852e..1ad153cdfb 100755 --- a/configure +++ b/configure @@ -2491,7 +2491,9 @@ if test "$whpx" != "no" ; then #include <WinHvEmulation.h> int main(void) { WHV_CAPABILITY whpx_cap; - WHvGetCapability(WHvCapabilityCodeFeatures, &whpx_cap, sizeof(whpx_cap)); + UINT32 writtenSize; + WHvGetCapability(WHvCapabilityCodeFeatures, &whpx_cap, sizeof(whpx_cap), + &writtenSize); return 0; } EOF diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c index 940bbe590d..2080d58c4c 100644 --- a/target/i386/whpx-all.c +++ b/target/i386/whpx-all.c @@ -1254,6 +1254,7 @@ static int whpx_accel_init(MachineState *ms) int ret; HRESULT hr; WHV_CAPABILITY whpx_cap; + UINT32 whpx_cap_size; WHV_PARTITION_PROPERTY prop; whpx = &whpx_global; @@ -1262,7 +1263,7 @@ static int whpx_accel_init(MachineState *ms) whpx->mem_quota = ms->ram_size; hr = WHvGetCapability(WHvCapabilityCodeHypervisorPresent, &whpx_cap, - sizeof(whpx_cap)); + sizeof(whpx_cap), &whpx_cap_size); if (FAILED(hr) || !whpx_cap.HypervisorPresent) { error_report("WHPX: No accelerator found, hr=%08lx", hr); ret = -ENOSPC;
This fixes a breaking change to WHvGetCapability to include the 'out' WrittenSizeInBytes introduced in Windows Insider SDK 17110. This specifies on return the safe length to read into the WHV_CAPABILITY structure passed to the call. Signed-off-by: Justin Terry (VM) <juterry@microsoft.com> --- configure | 4 +++- target/i386/whpx-all.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)