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

[Xen-changelog] [xen stable-4.7] x86/spec-ctrl: adjust backport of b76ec3946b



commit 3f7b4ecfab99ed904e12083f60e80efa99db7770
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Sep 14 11:30:33 2018 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Sep 14 11:30:33 2018 +0200

    x86/spec-ctrl: adjust backport of b76ec3946b
    
    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@xxxxxxxxxx>
---
 xen/include/asm-x86/shadow.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h
index de09e8168d..c720008425 100644
--- a/xen/include/asm-x86/shadow.h
+++ b/xen/include/asm-x86/shadow.h
@@ -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,
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.7

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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