[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/6] x86/boot: Expose MSR_ARCH_CAPS data in guest max policies


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 16 May 2023 16:58:02 +0200
  • 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
  • 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=qOWyj1RNtyffmMO8fnLkKiE6NI7uYuHL2YVFcqmqZg4=; b=KItRshzB5Ltrn8BdBhABsQdqUVgb9o+OnlwWKEBCfle4UEq9Bt3EUwnWjimAjuuxA+XKe7Zfpq3iMLNCLuNIrWtX/BklKMUE4MWGm1aKvhUeKJ9kjZ3dd8smSdLGUOhDzeb4r5XB5Afo7hxvu85itIzJ7Cr9kNKBLWOhRACI7hNzSLUtbxVBnfgRt2QZR98s445QaWx4ToTbX/goxGssRSHF/Xd+rmMUZwTylo/2MtgGtTotCk6MKiOtsFfoLIQOkQLR9mhd8hxL8lpC6UioONTl6zFLYIR9nXnpZdOatQtjgoWFpDmo236jrJ441ZLiPflPETfWM8tkTBvSpyLkwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IPtBLE9yNVGUPbyDwZU0hHOv0ZQ5N5MczuoEMNlvF1uiX16JNFlQjbLQGfAcJMJuarba6HBknzsLIySPm/0FinOMqfwL/hdMcXEAlvcTc5ey0elqFzHBp91oEU3+kjVE2pnTYjYA2OVBESuHeQ6HNYs5cvMm0ghICLvOh97tXv3/HCncX6eMsaisnYbobL1j96RRTH1wKOxpJrq8Rippdj+X+L+6ObN5lQAVQY74P8zh0NbX+Z87LYbCwIhO/dW4UWfggtzThRz+8o04cmmSfro6r4cez1kqWV5uH5vYFco5IgH6OPcZrTMg3DWQnxFwTMk8d1XULTXH5zLin9ZFLA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 16 May 2023 14:58:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.05.2023 16:42, Andrew Cooper wrote:
> --- a/xen/arch/x86/cpu-policy.c
> +++ b/xen/arch/x86/cpu-policy.c
> @@ -408,6 +408,25 @@ static void __init calculate_host_policy(void)
>      p->platform_info.cpuid_faulting = cpu_has_cpuid_faulting;
>  }
>  
> +static void __init guest_common_max_feature_adjustments(uint32_t *fs)
> +{
> +    if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
> +    {
> +        /*
> +         * MSR_ARCH_CAPS is just feature data, and we can offer it to guests
> +         * unconditionally, although limit it to Intel systems as it is 
> highly
> +         * uarch-specific.
> +         *
> +         * In particular, the RSBA and RRSBA bits mean "you might migrate to 
> a
> +         * system where RSB underflow uses alternative predictors (a.k.a
> +         * Retpoline not safe)", so these need to be visible to a guest in 
> all
> +         * cases, even when it's only some other server in the pool which
> +         * suffers the identified behaviour.
> +         */
> +        __set_bit(X86_FEATURE_ARCH_CAPS, fs);
> +    }
> +}

Wouldn't this better be accompanied by marking the bit !a in the public header?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.