[PATCH] xen/cpu-policy: Add an IBRS -> AUTO_IBRS dependency

Andrew Cooper posted 1 patch 10 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230531153028.1224147-1-andrew.cooper3@citrix.com
xen/tools/gen-cpuid.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] xen/cpu-policy: Add an IBRS -> AUTO_IBRS dependency
Posted by Andrew Cooper 10 months, 4 weeks ago
AUTO_IBRS is an extention over regular (AMD) IBRS, and needs hiding if IBRS is
levelled out for any reason.

Fixes: defaf651631a ("x86/hvm: Expose Automatic IBRS to guests")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
CC: Alejandro Vallejo <alejandro.vallejo@cloud.com>

This was an oversight of mine when reviewing the aformentioned patch.
---
 xen/tools/gen-cpuid.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py
index f28ff708a2fc..973fcc1c64e8 100755
--- a/xen/tools/gen-cpuid.py
+++ b/xen/tools/gen-cpuid.py
@@ -319,7 +319,7 @@ def crunch_numbers(state):
         # as dependent features simplifies Xen's logic, and prevents the guest
         # from seeing implausible configurations.
         IBRSB: [STIBP, SSBD, INTEL_PSFD],
-        IBRS: [AMD_STIBP, AMD_SSBD, PSFD,
+        IBRS: [AMD_STIBP, AMD_SSBD, PSFD, AUTO_IBRS,
                IBRS_ALWAYS, IBRS_FAST, IBRS_SAME_MODE],
         AMD_STIBP: [STIBP_ALWAYS],
 

base-commit: 465217b0f872602b4084a1b0fa2ef75377cb3589
-- 
2.30.2


Re: [PATCH] xen/cpu-policy: Add an IBRS -> AUTO_IBRS dependency
Posted by Jan Beulich 10 months, 4 weeks ago
On 31.05.2023 17:30, Andrew Cooper wrote:
> AUTO_IBRS is an extention over regular (AMD) IBRS, and needs hiding if IBRS is
> levelled out for any reason.
> 
> Fixes: defaf651631a ("x86/hvm: Expose Automatic IBRS to guests")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
Re: [PATCH] xen/cpu-policy: Add an IBRS -> AUTO_IBRS dependency
Posted by Alejandro Vallejo 10 months, 4 weeks ago
On Wed, May 31, 2023 at 04:30:28PM +0100, Andrew Cooper wrote:
> AUTO_IBRS is an extention over regular (AMD) IBRS, and needs hiding if IBRS is
> levelled out for any reason.
True that. My bad.

> ---
>  xen/tools/gen-cpuid.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py
> index f28ff708a2fc..973fcc1c64e8 100755
> --- a/xen/tools/gen-cpuid.py
> +++ b/xen/tools/gen-cpuid.py
> @@ -319,7 +319,7 @@ def crunch_numbers(state):
>          # as dependent features simplifies Xen's logic, and prevents the guest
>          # from seeing implausible configurations.
>          IBRSB: [STIBP, SSBD, INTEL_PSFD],
> -        IBRS: [AMD_STIBP, AMD_SSBD, PSFD,
> +        IBRS: [AMD_STIBP, AMD_SSBD, PSFD, AUTO_IBRS,
>                 IBRS_ALWAYS, IBRS_FAST, IBRS_SAME_MODE],
>          AMD_STIBP: [STIBP_ALWAYS],
>  
> 
> base-commit: 465217b0f872602b4084a1b0fa2ef75377cb3589
> -- 
> 2.30.2
> 

LGTM

Alejandro