]> xenbits.xensource.com Git - xen.git/commitdiff
x86/spec-ctrl: adjust backport of b76ec3946b
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 Sep 2018 09:33:12 +0000 (11:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 14 Sep 2018 09:33:12 +0000 (11:33 +0200)
Refreshing XenServer's patchqueue has shown that I missed this adjustment in
the upstream backports of the final version of the XSA-273 fixes.

The code does work in 4.7 and earlier, but only because the eventual value of
(opt_pv_l1tf & OPT_PV_L1TF_DOMx) is within range of a char.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/asm-x86/shadow.h

index de09e8168d1ea90493c5c205f08cfd2b5dc64145..c7200084250a4ca7dfa0ef762c845e73233f675d 100644 (file)
@@ -215,8 +215,8 @@ void pv_l1tf_tasklet(unsigned long data);
 static inline void pv_l1tf_domain_init(struct domain *d)
 {
     d->arch.pv_domain.check_l1tf =
-        opt_pv_l1tf & (is_hardware_domain(d)
-                       ? OPT_PV_L1TF_DOM0 : OPT_PV_L1TF_DOMU);
+        !!(opt_pv_l1tf & (is_hardware_domain(d)
+                          ? OPT_PV_L1TF_DOM0 : OPT_PV_L1TF_DOMU));
 
 #ifdef CONFIG_SHADOW_PAGING
     tasklet_init(&d->arch.paging.shadow.pv_l1tf_tasklet,