From patchwork Fri Nov 24 08:41:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13467173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F17BC61D97 for ; Fri, 24 Nov 2023 08:41:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.640242.998213 (Exim 4.92) (envelope-from ) id 1r6RkL-00011u-DM; Fri, 24 Nov 2023 08:41:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 640242.998213; Fri, 24 Nov 2023 08:41:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6RkL-00011n-9S; Fri, 24 Nov 2023 08:41:09 +0000 Received: by outflank-mailman (input) for mailman id 640242; Fri, 24 Nov 2023 08:41:08 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6RkK-0000w7-7c for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 08:41:08 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2054.outbound.protection.outlook.com [40.107.7.54]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 35fd36c1-8aa5-11ee-98e2-6d05b1d4d9a1; Fri, 24 Nov 2023 09:41:07 +0100 (CET) Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by AS8PR04MB8326.eurprd04.prod.outlook.com (2603:10a6:20b:3ff::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.14; Fri, 24 Nov 2023 08:41:06 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::eb8e:fa24:44c1:5d44]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::eb8e:fa24:44c1:5d44%3]) with mapi id 15.20.7046.012; Fri, 24 Nov 2023 08:41:06 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 35fd36c1-8aa5-11ee-98e2-6d05b1d4d9a1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D+ouUBlKszdRgtU2ttY+EwDtXA8DUCwg6Bu6OXVFMQIWb2MWY5yjhBdCtGrlUt1ou+pymfw8GxmRv+XROVLbGwWtusXtq1vIfjgRNJg1S6Tsi68yjViohSolR/YWxOZLrTcwHVmL/KrNxhSbEmtmg4PzvJK1SKH6lag2kZnZGcLEfmqoqRUFjdWXltUkR1H2WVr7atX8NcD81S/pZEACBGkZkKT+5+ZiWIRWP5dbTO0q+z2qtUPcS85EBAiHVkETHSSRq40x9hGLM7E1cViI18koDJWKgfJX2Put6pq+6pQ0HxkZoNWd5XJY97es0CRRaB4fnnsCYzc3qkV9R4xSpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Kyyx5vIHThvSYKK02N9Y0rNPtrf3MAusP4heeqDrmco=; b=jky5A/+2rbuGTqAbXBKi+a2wviEMfLw1bAnXO5WdkOBKbyKPkt9Q+BmKidDIIPP8k/T7t+GoRiOmGvYVNleZiczjQbTinCUJ7wxwMdLq+pTptRMaiVE1F2FhnsHypOyofEvQhGoC4A0OASjnac2lssKjN+x+e2g64ZdJPDVmNF+JeRgASKB2xqfsjFjrX7W2dZggJu4KCtL1uIOeFvDC0j/2W+Wm0wX4RxTo0SxE5xhKOCc4K47NOi9Vn2xs5XOveTRAzE7pXG+KH1I6jdMQnA+EqxqzH1kiMALfM89nzAiHLJSNKtcC2FkE3eYllvLaIES4hcwn81qO6acx+uOeDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kyyx5vIHThvSYKK02N9Y0rNPtrf3MAusP4heeqDrmco=; b=WMfIQjOEeg+6m+YVy3EqCoKDFh9AiPahYEYtYTQRp3Rl0MjOPMw1Bum0mkOS9OE52bJevOeOR4DMcaegYDjAet1wySJzmMBBBBJY7W8Mn4OziiQ8AvzvNfgTB7PK5M14aCX9XwET0Pelz8s2d2xAZOXm//kfto8w4Qpw70oXKvxptRzXcAUtzGmDFnxZgQ9uxukxLxupnUVlaER6+cJzpp5fZuPjhtLgN51nA9UXFOic3FJQVxoBqzUK7Zji5yFU3s68vKl9yxY2nixblkJr9H/RRJ8RxaMoCh7wvnEO2HQJMHiSDYoPbMM57kULPVWq8sylsPgpOuyzkxHaYqEteA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Fri, 24 Nov 2023 09:41:05 +0100 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 08/15] VMX: convert vmx_basic_msr Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Kevin Tian , Jun Nakajima References: Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: X-ClientProxiedBy: FR4P281CA0408.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:d0::6) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|AS8PR04MB8326:EE_ X-MS-Office365-Filtering-Correlation-Id: 935eef31-ed9b-4576-38c7-08dbecc9196b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: enLxqzssjVJx/wQOZVANK5hv7Us8r2/7tkQir13eYb1/aiKsJpf/wU+Gs3Hffr5Qqg4Wnqpe4YDDQ53QDs67IDQ2upOUJB93s3dWCqiycO1lXrz6PjS4XXswpOaEyeAOvJwLLVP2niWS7liamwOGQNojBz5OFw4vQl/JH1867yXIz6ruZWBL6ADTHkKCmiG315Oc8ZuRhU1kdHECFxMinQIPRvbSsMs8WIVclkyKuWjYpKH+S8K7IiM75GH/Rp5yaBjAvHvEh+FEhgcvvGQaJa3pqSUr6a6r9HzEsZ0AfqGDUXcVtTB3+5lZtl2nG0zbTKybHfzcRSO4OpnLn/o25GCBjfKYtoPduGGPue3QUPfe1ptW8UqiNnJr7XYW5HuiA56ArObdLqYgG8RUvilMT3wVl7oR1L8odXLFN1hxjfEpYjb7GK8jbqb8HKHzrIg57kvl2PIY6ag8ZWHy5fzJa4+H2XOsawPqPTN5HqDdz8sbKuhb/NH3EwuReZkSPuvHw7wujFRN8x8C21WWENjTrtsJjHcmQR36UHgxa0spj7fAkE3pbFp1VfrEPL2rcR2XxvBvGfKbiiRC0zyLyr4b0Y7f86PwhA55AC2vXvqLhqXSqRMxJgnAS57ZWdYOEqagusKucbZwAfotSdqJTbOEJA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(396003)(376002)(39860400002)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799012)(31686004)(26005)(66946007)(6916009)(66476007)(66556008)(54906003)(38100700002)(36756003)(31696002)(86362001)(6486002)(83380400001)(2616005)(6512007)(6506007)(478600001)(4326008)(2906002)(316002)(8676002)(8936002)(5660300002)(41300700001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?l6r+DD9IwG2bjUZm7kyxoS/PAxyh?= =?utf-8?q?Q3bNwKngAeqHW714R4NOaLG+9Rz2adz34sPaqAa1JCkZCJXBvIcEGk/z3cwQmJwR3?= =?utf-8?q?IeAjq6qsOPrTxfPqiSxKlP4uq4LkKCZGxkuw+p/GqqiZOusL674yLnif7Oy3FjZP2?= =?utf-8?q?sik3MPwgcLtVe7dqneOlS2L41SFPhzTwXBGtDWxoyOnPlpYcablAuOdZ4YCYrbBnI?= =?utf-8?q?TZ481U+yHlZM3I/NHbH/g0Cy6t30ew6catfKFSblhOME/IlNeR7aO49pJqJYOiQX+?= =?utf-8?q?kUmRWUJaTBaCQ93pbNiveciQhI+mUPJid+B6p403v3kpi++cxvuVmB49VDBdaQmdt?= =?utf-8?q?2wcVZtlwmnqYKOoggzQVIiimsMcPuLNOkEnf194oyKIGNNV7SpZPn++iZc87YaB+Y?= =?utf-8?q?AlODjWRDQLQhT1Tgc1dD1QOgemWuGmaI+6oO4DKviaU8Sr/Zwv3cXCFFKr0BNzEmI?= =?utf-8?q?o2qUtojQYqVq/yBGsz4oMbaXjlWKXOSGa/bV7++1r3U5R20aI0xSIn9JEc9PO2IbI?= =?utf-8?q?nVPFvpw7sqgugEiXZKbtSo/WJdzMLfHYxVwjnDEtRTbnCiY6zbwGHyg9tik3a8ubp?= =?utf-8?q?5cXqNXc/9jdx3b3B9skLt4iy9qTGlrfnRGPOt1v2scZh7ksWxMMeviOLMlN4HJAtk?= =?utf-8?q?tCda+4YkkCrHQTw0DDf6dTHoP+QX16GcuC+J1+l1SXy0+rv7iJNjAaLZLWnC+TEXz?= =?utf-8?q?1uyskQpC9jpdsJlhyb9m1D0Jkoo25c1YdmKY5c7cdMpNdI2lwlHVeh8bUPohnskeQ?= =?utf-8?q?zHw7xJ2/F8/zofBDLpZn1ztcH6PGFrP7qhkqurJXWipXJ2OKNIa73uqeeT9rKXXil?= =?utf-8?q?C+QP3On51WtntPjAnKRLDJfR4qfgKPTP6MUqsh/4bCIXWRr+Qj1lt6Z3veW3YEV+A?= =?utf-8?q?qhDCTAtm9ev0l8VvQ4f4Iw2OrT6IHSlrG80h87ZncNm6+8JYm2w8EkfT/ldd0vQFZ?= =?utf-8?q?SMWaz74JmZsrF4OnxrnwQSYxoMoK3nArNNPn+Ye+gVdRcC25+71BCvFJWWNZ6bOr7?= =?utf-8?q?CWBlfapY31fWlEG3OVKayc1gMIt8g4gavp6OPtq06GfX+MXBJYA3Y5f3lBq9xJGVF?= =?utf-8?q?lssCniJZHepG8I+i+FkoiGXcFUhdPInMMt5Cx8GzxSOAlLe7F8iL1DdOQvgCBQbm0?= =?utf-8?q?V2uHv4cvr2KOBIuywg8vSA0fbSEzKx+fAYix6j2P8FtzoznpVjaUX/aOQoaM5UUA6?= =?utf-8?q?ldXKPCaIzVg98cv4u1VFdMCbZwqEnDDymb1Fd5cO3Ljn4afa2dKpxG/pPI5p+j3l2?= =?utf-8?q?NempSDzgdtFvti9AfwwPTqvZbDO1g17r/m+v38TFXaZPkU5VuPvOryPjuGORLM25E?= =?utf-8?q?30/gawQmMP1XzCK2jXRg04zi+LzCc3B6R/N2KQkUHbkgtZqENkZBCdrSb+HP7wB9P?= =?utf-8?q?SauQ7J+lo1vSCq76eywjGoB3CH/X/Nxx4GDfEvbEbNw0B9D3Kfze47XL2nb/TqYL9?= =?utf-8?q?YLjdgmXb7t8GxitdIf7S9KGcoPfLfIQVjUMIJWN7iMv/YZ/BM4xNRCtSsOuRStHiM?= =?utf-8?q?lpfcbTXYweHb?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 935eef31-ed9b-4576-38c7-08dbecc9196b X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2023 08:41:06.2992 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zuoUYtDUYONARDDkFzcZO71nEp6WmTSZYegvyIo6RvjLAid/V0N2oHo79gNFTNGqvVJ3bFNwrdH8P6ByiThxDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8326 ... to a struct field, which is then going to be accompanied by other capability/control data presently living in individual variables. As this structure isn't supposed to be altered post-boot, put it in .data.ro_after_init right away. Suggested-by: Roger Pau Monné Signed-off-by: Jan Beulich --- v2: New. --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -161,6 +161,7 @@ static int cf_check parse_ept_param_runt #endif /* Dynamic (run-time adjusted) execution control flags. */ +struct vmx_caps __ro_after_init vmx_caps; u32 vmx_pin_based_exec_control __read_mostly; u32 vmx_cpu_based_exec_control __read_mostly; u32 vmx_secondary_exec_control __read_mostly; @@ -174,8 +175,7 @@ static DEFINE_PER_CPU(paddr_t, current_v static DEFINE_PER_CPU(struct list_head, active_vmcs_list); DEFINE_PER_CPU(bool, vmxon); -#define vmcs_revision_id (vmx_basic_msr & VMX_BASIC_REVISION_MASK) -u64 __read_mostly vmx_basic_msr; +#define vmcs_revision_id (vmx_caps.basic_msr & VMX_BASIC_REVISION_MASK) static void __init vmx_display_features(void) { @@ -470,8 +470,8 @@ static int vmx_init_vmcs_config(bool bsp vmx_ept_vpid_cap = _vmx_ept_vpid_cap; vmx_vmexit_control = _vmx_vmexit_control; vmx_vmentry_control = _vmx_vmentry_control; - vmx_basic_msr = ((u64)vmx_basic_msr_high << 32) | - vmx_basic_msr_low; + vmx_caps.basic_msr = ((uint64_t)vmx_basic_msr_high << 32) | + vmx_basic_msr_low; vmx_vmfunc = _vmx_vmfunc; vmx_display_features(); @@ -522,7 +522,7 @@ static int vmx_init_vmcs_config(bool bsp mismatch = 1; } if ( (vmx_basic_msr_high & (VMX_BASIC_VMCS_SIZE_MASK >> 32)) != - ((vmx_basic_msr & VMX_BASIC_VMCS_SIZE_MASK) >> 32) ) + ((vmx_caps.basic_msr & VMX_BASIC_VMCS_SIZE_MASK) >> 32) ) { printk("VMX: CPU%d unexpected VMCS size %Lu\n", smp_processor_id(), @@ -2169,7 +2169,7 @@ int __init vmx_vmcs_init(void) * _vmx_vcpu_up() may have made it past feature identification. * Make sure all dependent features are off as well. */ - vmx_basic_msr = 0; + memset(&vmx_caps, 0, sizeof(vmx_caps)); vmx_pin_based_exec_control = 0; vmx_cpu_based_exec_control = 0; vmx_secondary_exec_control = 0; --- a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h +++ b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h @@ -283,6 +283,12 @@ extern u64 vmx_ept_vpid_cap; #define VMX_TSC_MULTIPLIER_MAX 0xffffffffffffffffULL +/* Capabilities and dynamic (run-time adjusted) execution control flags. */ +struct vmx_caps { + uint64_t basic_msr; +}; +extern struct vmx_caps vmx_caps; + #define cpu_has_wbinvd_exiting \ (vmx_secondary_exec_control & SECONDARY_EXEC_WBINVD_EXITING) #define cpu_has_vmx_virtualize_apic_accesses \ @@ -366,9 +372,8 @@ extern u64 vmx_ept_vpid_cap; */ #define VMX_BASIC_DEFAULT1_ZERO (1ULL << 55) -extern u64 vmx_basic_msr; #define cpu_has_vmx_ins_outs_instr_info \ - (!!(vmx_basic_msr & VMX_BASIC_INS_OUT_INFO)) + (!!(vmx_caps.basic_msr & VMX_BASIC_INS_OUT_INFO)) /* Guest interrupt status */ #define VMX_GUEST_INTR_STATUS_SUBFIELD_BITMASK 0x0FF --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1556,7 +1556,7 @@ static int nvmx_handle_vmxon(struct cpu_ rc = hvm_copy_from_guest_phys(&nvmcs_revid, gpa, sizeof(nvmcs_revid)); if ( rc != HVMTRANS_okay || (nvmcs_revid & ~VMX_BASIC_REVISION_MASK) || - ((nvmcs_revid ^ vmx_basic_msr) & VMX_BASIC_REVISION_MASK) ) + ((nvmcs_revid ^ vmx_caps.basic_msr) & VMX_BASIC_REVISION_MASK) ) { vmfail_invalid(regs); return X86EMUL_OKAY; @@ -1794,7 +1794,7 @@ static int nvmx_handle_vmptrld(struct cp { struct vmcs_struct *vvmcs = vvmcx; - if ( ((vvmcs->revision_id ^ vmx_basic_msr) & + if ( ((vvmcs->revision_id ^ vmx_caps.basic_msr) & VMX_BASIC_REVISION_MASK) || (!cpu_has_vmx_vmcs_shadowing && (vvmcs->revision_id & ~VMX_BASIC_REVISION_MASK)) ) @@ -2187,7 +2187,7 @@ int nvmx_msr_read_intercept(unsigned int case MSR_IA32_VMX_TRUE_PROCBASED_CTLS: case MSR_IA32_VMX_TRUE_EXIT_CTLS: case MSR_IA32_VMX_TRUE_ENTRY_CTLS: - if ( !(vmx_basic_msr & VMX_BASIC_DEFAULT1_ZERO) ) + if ( !(vmx_caps.basic_msr & VMX_BASIC_DEFAULT1_ZERO) ) return 0; break;