From patchwork Wed Nov 22 18:14:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 10070729 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 1393860353 for ; Wed, 22 Nov 2017 18:17:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05EFB29B19 for ; Wed, 22 Nov 2017 18:17:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED21729E4E; Wed, 22 Nov 2017 18:17:32 +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 4D09929B19 for ; Wed, 22 Nov 2017 18:17:32 +0000 (UTC) Received: from localhost ([::1]:40794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHZaV-0002Vz-7u for patchwork-qemu-devel@patchwork.kernel.org; Wed, 22 Nov 2017 13:17:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHZXd-0000g0-Lq for qemu-devel@nongnu.org; Wed, 22 Nov 2017 13:14:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHZXc-0007c6-7L for qemu-devel@nongnu.org; Wed, 22 Nov 2017 13:14:33 -0500 Received: from mail-eopbgr20115.outbound.protection.outlook.com ([40.107.2.115]:44320 helo=EUR02-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 1eHZXc-0007aQ-0d for qemu-devel@nongnu.org; Wed, 22 Nov 2017 13:14:32 -0500 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=9KmdJdwDyy3aB8Z14r1GqxX3+W+/REhkJdhR3/TAD0I=; b=SURjRufgpGOg1Z3+AStl11qiJw7ZIgolbLed1d0dpNp5q+shU7mM1CaL85lupu4I8SK26FNOgrPYNbP3x23QVMT1zzgEcBejJYQGCtMQgoNNwHbU5nLLcw+xJJ0OsSQtRjjggVS26Ixln2PGsCIHhDfsFoBvqAhTEe0Eg9xsifU= Received: from rkaganb.sw.ru (195.214.232.6) by VI1PR08MB0846.eurprd08.prod.outlook.com (2a01:111:e400:5a05::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Wed, 22 Nov 2017 18:14:28 +0000 From: Roman Kagan To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Date: Wed, 22 Nov 2017 21:14:18 +0300 Message-Id: <20171122181418.14180-4-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171122181418.14180-1-rkagan@virtuozzo.com> References: <20171122181418.14180-1-rkagan@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1P18901CA0021.EURP189.PROD.OUTLOOK.COM (2603:10a6:3:8b::31) To VI1PR08MB0846.eurprd08.prod.outlook.com (2a01:111:e400:5a05::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0756a4b7-ff13-4d44-acb5-08d531d4df36 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(5600022)(4604075)(2017052603258); SRVR:VI1PR08MB0846; X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0846; 3:Ueba1HKAnOBWdEJmMZVaIIPnCYimqvpcc//SQ259txKXs+RmsPRTnIOcDMyE8bOU1vM4GirMm/XKYCwqJf04Y8IFgukbipOanLlcWZpYyxcA0/FZAJ8gEXIgqVYXfi7Uqde3PIigw8N0I+cT+aMP6D8I43i7m49Z55AnWqQaOFpjq56Lhsy5goMYBTggZkMLriivVM6+10qWr/MwqRF0zjrtv9XW354y0Ka8+in8xSQcn960OBD7Xv4m1lkA6aXi; 25:JT1Cnn6J29OyCNhrbRebcErHCMsWERkgwsnj9mdSNK3f4zLkAl+Udv4mc8Ueu4U5KwiD9JW0FArwgWWzDJkwWaooTYLk/MC3BDL29/FA5X4Nq/Er0x9YGG5qA4aexOQ/d4vTM9f5Bh5y1toFwdnRPD/+YCvCFWSQMq16yY2b6Wko4XNoSb9wU9SMqjpoo8afemuMyrOJLnUGYowZtPgsBR1/ynGllmnzDCodMxJ4BYqyK0+qYT3HCan79ZkYMZqjIamdnqxQvkQX1Yz/BPmB2dYiM3FcRe4DjJlgN+UNyVc5ysXIQ5vdIdeGsr/jBck1YwrnxcB9qU8Wl+B87wPSTg==; 31:TyKOrQCgloWRbTPh6fd5ojhonyodJB4qpITHYVuwez+16wKE33lr1Iv5ffS64AqqOiSdgBCpL/tG8Bx49G9HjrQTL5A7d9UjQu8W1DnKWtJ+FJ2cqq85O87iBezo/d+VZnOdVNwY6cdCBhIaFqSqrjcuZuagMZXWGi6N2U9SydM+CDxbxnYx1/9Ng+enJy1u46faCnW7RTXnAx3/5MdTXRyDiyf3oID031+Jzd/d+Dw= X-MS-TrafficTypeDiagnostic: VI1PR08MB0846: X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB0846; 20:D6zKKby8/3tfGlIE95c1LIhsJz99friKqhA+0pIcTQF7g+uUdxUlGoDA8Jnhkcg6QQYMQwB2yw4XA4T1CwP621LaiyZs1aipGK/+H+yGM1Rdr++3rIsAmZaszGREE/lB05Bvbgz8LL8YXVXsv4B+5nr3iWmOuEPpNQ7Q0zmvyf/zKD5yxqvJ/PSIk3neoAC9Dw6OM6CsE7sfaliDJB4l0IQEkOK8aqJn49Si2aGU7QOwTUL+0lxG+3EcOUeMcPsv5dGyK0faGZuKD83dKkIsZIL+gfMNsd6OkD3i01rQbvNtsutCYxjAcCRTGiK//QO2RVtF7NbASUBq9gdeBK9e0g0BCTPRxZq2hqeW5EcB00DxfE6NYIYQu8IJjqGXR6S2N66yE/6HGM24R3FgAvhvMJXMrxfbQViuCilnP3jvj2E=; 4:0u2WWlAjKy58BfbIDt3v3vf2KfuT84RiMd0AyWdduGcmlauYbvw6Y1R9HOy2xedga9dsCiCgfLbzY8vxzZxcu86Y41GpkHwdVva5kYEW3HSpT8oESxaltK/mMNQDGIfu0dz0JbWR1i0HhrGZfv9fNH88kyUYSqTzpaWp38LFhztlCmpqie5vJ0TGmSMoxXy2ePFozcKYe/CC+F8be41cUXY2mOwKiAfRpReyDI7l2cr6H3jTUxCkZXnwahqS+Ss4MnpPgGq8qy9b7xkZD5qQqA== 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)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3231022)(3002001)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR08MB0846; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR08MB0846; X-Forefront-PRVS: 0499DAF22A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(346002)(39830400002)(376002)(199003)(189002)(110136005)(50226002)(16586007)(66066001)(316002)(47776003)(8936002)(5003940100001)(2906002)(55236003)(53936002)(97736004)(86362001)(16526018)(2950100002)(76176999)(101416001)(6512007)(107886003)(50986999)(4326008)(6666003)(6486002)(5660300001)(1076002)(6506006)(305945005)(81156014)(81166006)(7736002)(53416004)(25786009)(48376002)(3846002)(6116002)(189998001)(68736007)(33646002)(69596002)(478600001)(105586002)(106356001)(8676002)(36756003)(50466002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR08MB0846; H:rkaganb.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB0846; 23:LWdULVS5Wc48FR6AZZcL9mmcxGIYjLKZ67KAUP9K9?= =?us-ascii?Q?UbZrrTFyReFytllAEp39v7esMBvzK+YZwAVfAaY2OEy+MFi/5BRYImwnj+f0?= =?us-ascii?Q?oMoOp3hCi2LOKF3epLmzYOAhXFElx1Dn+rQGvCDx7O6pfLgiBRpNj41cieLe?= =?us-ascii?Q?nlOF+2V4NaeefGDWV4mdpyJf+uWWBIKkLUcxjfW31hE4ZzPHYOIq1kIxM2oN?= =?us-ascii?Q?ZU6keTWbDPo8qbtpDefbmtebRIWCpTRM9k2sGPJvZtp2mH85xQ5k12cpXfcK?= =?us-ascii?Q?hXMeKlKk+WM/BSyoDvzoK84AUN9sfzje3nGbwxn3CYzOPhUxGUsg2ISn8Vdj?= =?us-ascii?Q?dZKONe0kaWC6LeVX7w9OMbD23N5xDpC/HeFm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ojBiSd17EdQa/f3lBP/ybGhrPXCEA846N3MhXi1lco6LK/g146v1eZby7BYoB3gjJZqctdk= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2017 18:14:28.6460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0756a4b7-ff13-4d44-acb5-08d531d4df36 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0846 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.2.115 Subject: [Qemu-devel] [PATCH 3/3] hyperv: make SynIC version msr constant 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" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The value of HV_X64_MSR_SVERSION is initialized once at vcpu init, and is reset to zero on vcpu reset, which is wrong. It is supposed to be a constant, so drop the field from X86CPU, set the msr with the constant value, and don't bother getting it. Signed-off-by: Roman Kagan --- target/i386/cpu.h | 1 - target/i386/kvm.c | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index ea9db80de5..b264419678 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1101,7 +1101,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]; diff --git a/target/i386/kvm.c b/target/i386/kvm.c index ea6e6e5f30..0479fa4e4a 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -669,7 +669,6 @@ static int hyperv_handle_properties(CPUState *cs) } env->features[FEAT_HYPERV_EAX] |= HV_SYNIC_AVAILABLE; - env->msr_hv_synic_version = HV_SYNIC_VERSION; } if (cpu->hyperv_stimer) { if (!has_msr_hv_stimer) { @@ -1715,10 +1714,10 @@ static int kvm_put_msrs(X86CPU *cpu, int level) if (cpu->hyperv_synic) { int j; + kvm_msr_entry_add(cpu, HV_X64_MSR_SVERSION, HV_SYNIC_VERSION); + kvm_msr_entry_add(cpu, HV_X64_MSR_SCONTROL, env->msr_hv_synic_control); - kvm_msr_entry_add(cpu, HV_X64_MSR_SVERSION, - env->msr_hv_synic_version); kvm_msr_entry_add(cpu, HV_X64_MSR_SIEFP, env->msr_hv_synic_evt_page); kvm_msr_entry_add(cpu, HV_X64_MSR_SIMP, @@ -2082,7 +2081,6 @@ static int kvm_get_msrs(X86CPU *cpu) uint32_t msr; kvm_msr_entry_add(cpu, HV_X64_MSR_SCONTROL, 0); - kvm_msr_entry_add(cpu, HV_X64_MSR_SVERSION, 0); kvm_msr_entry_add(cpu, HV_X64_MSR_SIEFP, 0); kvm_msr_entry_add(cpu, HV_X64_MSR_SIMP, 0); for (msr = HV_X64_MSR_SINT0; msr <= HV_X64_MSR_SINT15; msr++) { @@ -2286,9 +2284,6 @@ static int kvm_get_msrs(X86CPU *cpu) case HV_X64_MSR_SCONTROL: env->msr_hv_synic_control = msrs[i].data; break; - case HV_X64_MSR_SVERSION: - env->msr_hv_synic_version = msrs[i].data; - break; case HV_X64_MSR_SIEFP: env->msr_hv_synic_evt_page = msrs[i].data; break;