diff mbox series

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

Message ID 20230531153028.1224147-1-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series xen/cpu-policy: Add an IBRS -> AUTO_IBRS dependency | expand

Commit Message

Andrew Cooper May 31, 2023, 3:30 p.m. UTC
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(-)


base-commit: 465217b0f872602b4084a1b0fa2ef75377cb3589

Comments

Alejandro Vallejo May 31, 2023, 4:01 p.m. UTC | #1
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
Jan Beulich June 1, 2023, 8:30 a.m. UTC | #2
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>
diff mbox series

Patch

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],