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

Re: [PATCH 2/2] x86/spec-ctrl: Enumerations for DDP controls


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Mar 2023 10:21:26 +0100
  • 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=dFdZLRtd+hJaLYLJDRWwBx81Jv0PYYIFppRf3w+um9A=; b=fTGiO5wGs94dTkoZ2bx9KJlxZvDE7N4Q6j1/5UUVYOM3k94+F6BNqJK1X9C4VQctYZQqVlLn5ruiFi9X+K+nApoG009j5QPuJzHQjR6gLlpk0joJOzgl8HSDwnFKyzB3qQLmQW9gSvrNmhRxlrZaLmHtCrDONKabAYNBemBS5jDCQ5ZEXBYEGrEBj/jkS7LdMrOxFFyhHCVF0jQjPikxYe2p5SHkHHtl4JO1suYJvgstgQaNMmNrV/TdKSekZWj5fE/9UW6Ou7aVGJntY4V2+kGfX+ARz0aQkKkSt18IoH2mVL2EuCK40TNyPsnFcHXB+FhEl7xNKYihTAFMLsv6Xg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FMLnTgXqr73ouykBMtShKIQidlZfk+G9LIAm8tWXQKy7QkmI3TerNLlI44Y5wbqmFd8FtkM0K9hB76fqxBgBjUm29ck9+1DD42TVFWB4cRDpUhRUUzoQfh4/NupDEVhmSExJeuR6Rs2TDAPXdcnKImXf7rjgX/Bmti54gCYM5DW7vBOj+S0z710YrnBvOCwuufkmMO5tZfaJLN8sZEk6jJXG99hdmO8OGIfvmujb3ZhZseolV7bid1Cg6m6S9Wzmtqpj19It2AGkw0GR0wekzaZtwVEgrA1yr5OiFlKqZX3AhdhS3+PQLLRw9rMo5x+t3Y59tuZkFacvl1pj8Mx6Ow==
  • 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: Mon, 13 Mar 2023 09:21:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.03.2023 17:02, Andrew Cooper wrote:
> https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/data-dependent-prefetcher.html
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

In the cover letter you mention that we should enable use of this by guests.
Perhaps also mention this here?

> --- a/xen/arch/x86/include/asm/msr-index.h
> +++ b/xen/arch/x86/include/asm/msr-index.h
> @@ -41,6 +41,7 @@
>  #define  SPEC_CTRL_RRSBA_DIS_U              (_AC(1, ULL) <<  5)
>  #define  SPEC_CTRL_RRSBA_DIS_S              (_AC(1, ULL) <<  6)
>  #define  SPEC_CTRL_PSFD                     (_AC(1, ULL) <<  7)
> +#define  SPEC_CTRL_DDPU_D                   (_AC(1, ULL) <<  8)

The doc calls this DDPD_U - typo, or do you happen to know that the doc has
it the wrong way round (and is going to be fixed)?

> --- a/xen/include/public/arch-x86/cpufeatureset.h
> +++ b/xen/include/public/arch-x86/cpufeatureset.h
> @@ -295,6 +295,7 @@ XEN_CPUFEATURE(INTEL_PSFD,         13*32+ 0) /*A  
> MSR_SPEC_CTRL.PSFD */
>  XEN_CPUFEATURE(IPRED_CTRL,         13*32+ 1) /*   MSR_SPEC_CTRL.IPRED_DIS_* 
> */
>  XEN_CPUFEATURE(RRSBA_CTRL,         13*32+ 2) /*   MSR_SPEC_CTRL.RRSBA_DIS_* 
> */
>  XEN_CPUFEATURE(BHI_CTRL,           13*32+ 4) /*   MSR_SPEC_CTRL.BHI_DIS_S */
> +XEN_CPUFEATURE(DDP_CTRL,           13*32+ 3) /*   MSR_SPEC_CTRL.DDPU_U */
>  XEN_CPUFEATURE(MCDT_NO,            13*32+ 5) /*A  MCDT_NO */

Looks like an off-by-1 in where you add the new line.

Suitably adjusted
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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