From patchwork Tue Jun 6 18:19:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9769583 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 27E0360364 for ; Tue, 6 Jun 2017 18:27:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 228BF27C05 for ; Tue, 6 Jun 2017 18:27:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1720628358; Tue, 6 Jun 2017 18:27:51 +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 808DF27C05 for ; Tue, 6 Jun 2017 18:27:50 +0000 (UTC) Received: from localhost ([::1]:39654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIJCn-0003h8-IX for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Jun 2017 14:27:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIJ5G-0005fe-N3 for qemu-devel@nongnu.org; Tue, 06 Jun 2017 14:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIJ5D-0007Cy-W5 for qemu-devel@nongnu.org; Tue, 06 Jun 2017 14:20:02 -0400 Received: from mail-eopbgr30133.outbound.protection.outlook.com ([40.107.3.133]:4192 helo=EUR03-AM5-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 1dIJ5D-00075V-KW for qemu-devel@nongnu.org; Tue, 06 Jun 2017 14:19:59 -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=RPjkrcJ3uXkSBSyDY5xdCG0B3lpMiOVjjPhjtVz9VLM=; b=T+eNZSmt+6We6ep9QrR5ZK9YF0pFJV79HQi+QNG90j0gtqQ+srnRGq3FjeJE8xGd/csASHBEUcGd3a3JuwL6vWpXyq60ICQT83G+/EvAhVszdznice1BsmIM7ezgimSdvlXVpgN44yRMDfvfSTCDuvvNRQDUIxR9He7eWrEPeTw= 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 VI1PR08MB0847.eurprd08.prod.outlook.com (2a01:111:e400:5a05::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Tue, 6 Jun 2017 18:19:57 +0000 From: Roman Kagan To: qemu-devel@nongnu.org Date: Tue, 6 Jun 2017 21:19:29 +0300 Message-Id: <20170606181948.16238-5-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170606181948.16238-1-rkagan@virtuozzo.com> References: <20170606181948.16238-1-rkagan@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR1001CA0042.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::28) To VI1PR08MB0847.eurprd08.prod.outlook.com (2a01:111:e400:5a05::17) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR08MB0847: X-MS-Office365-Filtering-Correlation-Id: 6eb0931b-5d7e-4552-dc6f-08d4ad08a35c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:VI1PR08MB0847; X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0847; 3:Z3plm9c+xoRdyeAczpX7d3VQs2iivI2qSFMHDstAlLwf75AtizgQcWurAdeUXKaPMgjHud+dlwDSnQiHYV/Ch7VhI5vo085isHXbWZ5An4H2ZBBCjpSrHQ1eu4+pi7Z9oV+/THy0v+uvZPJjTAHbAspVfZV5YOBcWb79bbsxCpMrOPfAj/UpvWjafwNag9Pdwwl26s0PwBsDGroyv9bFfsDEpCA3WeJfHe9xCLHgdPMGmHzGfNYuQbhG0HW1PAkywxybowwP2fF2Lq6ouDSuKau8AREKknYINviiG1EkW5VkabASwPH4KGFN98FaqJJww8ZaZeuBBohNmPrzcMksPw==; 25:8K/Q3mMFEaf0OV5W7l7Ki6nTlvcF/qDAysz7/x7qFPXsKcxLY6pXkZwS2t9v4KRQehdXxIKE4oI1o9czJ/BTBQQXyAIYxBQx5biT1cvIxtNWY9I4p8gtT6+1pJibXyQID2OoLV+g/gkeo2MK4AMMMdweKfrPEMyc+3qcyL4j9vfjMH1CNRWmakQIQUfOkNftZrrQFrIufp9ycX9W924kyYx1HmYrFJqJr/Pd9FSWfxUazJHYaYaS8PdiPsiHsa26A/IAbHzwAi2n3T9GNsi580rpLWIOgTJcVtSgrUIljV4RS6r95ISrM3hBdG3Jpg6ajQvjr8+pyXWXvAPNeKaS4I+t8eCoMT9WYwnSLdEsZvC0rb6nf/T7b+ptYMb5RItjfFlbMW/DFjsI1mBYCUnhfr1FjqcDueA2oJ52mc1jca6jwC/Tw2pcRiIIdaelbtis0YhOT8fm7M2JCeUqRqwzGv0sgX3ulbfJ7C9Y/G08k2Q= X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0847; 31:wBike9FQH2uHS9BSq728e++YYYdz4nu+8SHetZrcMpHQQwUryrrLKJu7aW2ng4yvrMC8bgp/LeFAJCWr3RXi1AEpKdnguUe14YsaabfJpspkRXUx6hQUl54SkcvbSy/x92NIjvhxipMOqZJVM88gq6F5hx+iRRILdijaQqio7rILQEOOWYIqsOSviCHLxny3YL9m6QXs6iBICKeUQoCzsBRgiiaFxL5E/rL50tVrrnE=; 20:ma4mjA0QoN2bPYMrkfyRtGGjiNhALpyj6saZ2Mjd7FyUrGV2n7uXxwwK1sA8EyNjNE5ukc0MzE4FNW6q7RAX1hwnBV9DOqwLLOa6HlTHc4bYA/7GyXdj6Q7J8klHknn/8wamuVuWVryYLbwOaf4CQgS4uDQx2hNE+u+ruZxxMiU7JaqcYJlr3owo2xc6ETjez3JAwXXYY7c0BEv6ADamaJfww0zjPpZw+yauvULnOPD9zCXEG41Hpy9qFt/lMAq0r96jqumLKET45c/qAb37X9HcDukhjgI11M0epthRap3LnTz4PcpenrLwCdGo5BXZ4b6AXDUWx1ne57pVkJRVCc7D/owg+Xn7KwiqP5zzY+wVwne7rK4m+vzD/Mo0mbk8K3UD2DgfzEkzuHRvDCUdcqCm4RuRbbn0EXXmVHZxG64= 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)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123555025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR08MB0847; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR08MB0847; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB0847; 4:LEVko5rsFEnOg90nEaeothhXRYSAyDkRycLtJcODi8?= =?us-ascii?Q?o1U5QInfugRGYf0ByZwS+J56Yl8Hsv27dMNe77tyNtdtikWz8m0hF7VlttXf?= =?us-ascii?Q?aJ39abpIGvjQXNXorSe17h3I+zq51Qzln0o9OwdZW7HVZtyKDDTSV6lPojAK?= =?us-ascii?Q?YPUW/HggaY7lZnlvsFkJ5oP6tBQw85CkvSTjYj6ZiU0+kOtyGiQcukHdmp3g?= =?us-ascii?Q?UhjUKgGabKQHi0gV78eNlVA/ekYs3b5kttpsinAW3mC5y7rqiHTDTYkO1sV8?= =?us-ascii?Q?9n2FJekniA6d4Bd/nb1EvK61EW+uAn+bGDKxq+XYmbsalEPxxIhgRE2YnSYj?= =?us-ascii?Q?2RKK/3yjFGMXLktC72GHIX2QNHkcbPaqr89Agn3vViE2gWmZCFJH7ow8L4xm?= =?us-ascii?Q?W7ZS60zsCXXfEbMBdVNqy1n/dmwg6TJufwMyf3+E5X6wuZwsO6oYZ+Wnqptr?= =?us-ascii?Q?3z6APgF6oon5g1gbEB2/35cVtKw2jV7BnFY6HxCLLUSqplyvQq0XhMXoElJF?= =?us-ascii?Q?qU4qNfFo7gIXRco7k9WYPh7kH2mkUoGAhLbecBNveL/nho6z06MPud4ZW8gY?= =?us-ascii?Q?kAjBw4Y7bDf5g/oWy/hcIQMUrZGcZz8TlZtkCWW0Nazf4n9o/FZ6XgI9x+94?= =?us-ascii?Q?mcQwCQfj+fSlqPg0UvqtHN4aLTv16BS4kidUPxiIKUQbuwOtXsmbiMapQMeI?= =?us-ascii?Q?OKAJG0yRfi1dMX/sbSHviGjQcUGl3eVIbks23dva4aCTQpGa3HnbkMR2ub1M?= =?us-ascii?Q?CXQv9sMaHuLSqw4FFsktX7RJLwDclje4NxXUPloGbw1CX6n762Xetms5Lnlx?= =?us-ascii?Q?dlaOYxAs8zUGa/fDRqDFwJRklm4OKc8KXP19+CcTNcQ4vyP5kF8q1pGUthaD?= =?us-ascii?Q?vGrSKFJ8BvNaULJ3PGDgNXibgpfn1kDTppdFieo93xyrqXulzs/psxYj1wJV?= =?us-ascii?Q?IMjPvr0/n6FWx8rjM7UxbA2Jf1YaRkZwliFtqOo6JmlGhdYSUwtqZAaajPl+?= =?us-ascii?Q?28QbA0dUB0/AW1OhlYjzYwavaocRyH9Z8iYibx4iuOc2Vne07UWSWRCEkTI/?= =?us-ascii?Q?Ma0iTAvU3c9fsAaAf8BfJOaJJEjdmjE6CvuMinU12gyuaNvoxgQppNzWmIkM?= =?us-ascii?Q?9Oou1CHdx3Q4EveCnGUMNXeY7IAOrt?= X-Forefront-PRVS: 033054F29A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39410400002)(39400400002)(39840400002)(39450400003)(48376002)(33646002)(36756003)(47776003)(6486002)(478600001)(66066001)(5003940100001)(2361001)(2906002)(5660300001)(2351001)(50226002)(81166006)(8676002)(25786009)(1076002)(6512007)(6916009)(53416004)(76176999)(42186005)(189998001)(38730400002)(53936002)(4326008)(50986999)(107886003)(7736002)(110136004)(6666003)(6116002)(3846002)(54906002)(2950100002)(86362001)(6506006)(305945005); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR08MB0847; H:rkaganb.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB0847; 23:U9Q2Wg05aF2JXZzMcuySWmybJ4CUOdQamGeaVlOt1?= =?us-ascii?Q?chSNxBHfy9nmp7peooAgq7qQ/Bs/AKCpj13HbTLqKIbZN3EbFHwqbAJBiXzl?= =?us-ascii?Q?O/iZDQA0BYFSSs6HkyLq8Gf44KxuK8vSvZfwUQ/L9g9tyJqXVw7/4BmlUsv7?= =?us-ascii?Q?OHasz2azApFHFGH4zyWh7/BUkFRGuYNu4t+3T++8LwlDoRlAlOFEou/hdc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QQFuKuTSSNzTkZv4axnHBwgjrwDmj0ksJJpSw5JAIrnnoej2RlR3EuzRKfMZs; 24:ToAsEGVrReV86DR0IvaTgJ63u70A2BsZ5lmPJbYYKPGmo7JXvkxEFQM+/NfdyuUzn5zmQoGA1zkWzxm78BS1lCJojtzys+UIQ9H4bcGNNxs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0847; 7:rJPZjDp6XNPedrAMQE6gwXs9mteGLqBTlAXKCezE4jzKcIWbztAWCbLoYtkvFZt/a84WFjwYteps+QF6P1OFis9L7Cw/nmLtb2IjlmxjYRYhO4LSQ43BzgNsGDBo0rNi4baMcFnuF2/rk5PaBrdBhztCq+Iz6XqrxtpLNjy3M+q5l3+ei45UXMW0iBuRjXBeUax9LeWfHFk5sFwlGL4ru3pulrcF/3BABZrHbNtMFqjMWYs/zkjwiPaEz8CIqz8nIXdfek9tem6d9UeHXsqgnFuyoGto+ISuvcTWwq21Y08VIi+h4x4/8yvVQj1DUyUKtWjtjCLIh9B2qvudd8EFVw==; 20:q1WlRAykltHsn+mhCgs8KXIx9/Q/X5yOXRX6+XcKpaEN/xwP/CIlNiVk2G1CQDZFVhAdxFQmJddkSvdaa/azFXLIMYdhuVKg7Lcg9My1ZQ8Y4Y6bh2Six+eTqDFNBNzhup5MOn5SPSvyKnpX2HZoVm3O2fxY6XYsDVCi+wUaj2E= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 18:19:57.1010 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0847 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.3.133 Subject: [Qemu-devel] [PATCH 04/23] hyperv: ensure msrs are inited properly 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: Paolo Bonzini , Evgeny Yakovlev , Eduardo Habkost , "Denis V . Lunev" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make sure HV_X64_MSR_SVERSION and HV_X64_MSR_SINTx are properly initialized at guest start. For that, move the field containing SVERSION value into the region in CPUX86State which is preserved across resets, and move the initialization of SINTx to kvm_arch_vcpu_reset(). Signed-off-by: Roman Kagan --- target/i386/cpu.h | 3 ++- target/i386/kvm.c | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 7af2cce..7c97bce 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1099,7 +1099,6 @@ typedef struct CPUX86State { uint64_t msr_hv_crash_params[HV_CRASH_PARAMS]; uint64_t msr_hv_runtime; uint64_t msr_hv_synic_control; - uint64_t msr_hv_synic_version; uint64_t msr_hv_synic_evt_page; uint64_t msr_hv_synic_msg_page; uint64_t msr_hv_synic_sint[HV_SINT_COUNT]; @@ -1159,6 +1158,8 @@ typedef struct CPUX86State { uint64_t mtrr_deftype; MTRRVar mtrr_var[MSR_MTRRcap_VCNT]; + uint64_t msr_hv_synic_version; + /* For KVM */ uint32_t mp_state; int32_t exception_injected; diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 3a80913..251aa95 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -646,8 +646,6 @@ static int hyperv_handle_properties(CPUState *cs) env->features[FEAT_HYPERV_EAX] |= HV_VP_RUNTIME_AVAILABLE; } if (cpu->hyperv_synic) { - int sint; - if (!has_msr_hv_synic || kvm_vcpu_enable_cap(cs, KVM_CAP_HYPERV_SYNIC, 0)) { fprintf(stderr, "Hyper-V SynIC is not supported by kernel\n"); @@ -656,9 +654,6 @@ static int hyperv_handle_properties(CPUState *cs) env->features[FEAT_HYPERV_EAX] |= HV_SYNIC_AVAILABLE; env->msr_hv_synic_version = HV_SYNIC_VERSION; - for (sint = 0; sint < ARRAY_SIZE(env->msr_hv_synic_sint); sint++) { - env->msr_hv_synic_sint[sint] = HV_SINT_MASKED; - } } if (cpu->hyperv_stimer) { if (!has_msr_hv_stimer) { @@ -1038,6 +1033,13 @@ void kvm_arch_reset_vcpu(X86CPU *cpu) } else { env->mp_state = KVM_MP_STATE_RUNNABLE; } + + if (cpu->hyperv_synic) { + int i; + for (i = 0; i < ARRAY_SIZE(env->msr_hv_synic_sint); i++) { + env->msr_hv_synic_sint[i] = HV_SINT_MASKED; + } + } } void kvm_arch_do_init_vcpu(X86CPU *cpu)