[PATCH 1/3] x86/spec-ctrl: Honour spec-ctrl=0 for unpriv-mmio sub-option

Andrew Cooper posted 3 patches 3 years, 7 months ago
[PATCH 1/3] x86/spec-ctrl: Honour spec-ctrl=0 for unpriv-mmio sub-option
Posted by Andrew Cooper 3 years, 7 months ago
This was an oversight from when unpriv-mmio was introduced.

Fixes: 8c24b70fedcb ("x86/spec-ctrl: Add spec-ctrl=unpriv-mmio")
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>
---
 xen/arch/x86/spec_ctrl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
index 7a4550db8318..ba64a09048be 100644
--- a/xen/arch/x86/spec_ctrl.c
+++ b/xen/arch/x86/spec_ctrl.c
@@ -122,6 +122,7 @@ static int __init cf_check parse_spec_ctrl(const char *s)
             opt_l1d_flush = 0;
             opt_branch_harden = false;
             opt_srb_lock = 0;
+            opt_unpriv_mmio = false;
         }
         else if ( val > 0 )
             rc = -EINVAL;
-- 
2.11.0


Re: [PATCH 1/3] x86/spec-ctrl: Honour spec-ctrl=0 for unpriv-mmio sub-option
Posted by Jan Beulich 3 years, 7 months ago
On 08.07.2022 18:19, Andrew Cooper wrote:
> This was an oversight from when unpriv-mmio was introduced.
> 
> Fixes: 8c24b70fedcb ("x86/spec-ctrl: Add spec-ctrl=unpriv-mmio")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

I'm not entirely certain in how far it wouldn't be useful to mention
that "spec-ctrl=no-xen" is similarly corrected by this change.

Jan