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

[Xen-changelog] [xen stable-4.7] x86/HVM: add guarding logic for VMX specific code



commit dbaf2c89d4083c26387ae34cde9c61464321cb30
Author:     Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
AuthorDate: Tue Sep 6 11:39:35 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Sep 6 11:39:35 2016 +0200

    x86/HVM: add guarding logic for VMX specific code
    
    The struct hvm_domain.vmx is defined in a union along with the svm.
    This can causes issue for SVM since this code is used in the common
    scheduling code for x86. The logic must check for cpu_has_vmx before
    accessing the hvm_domain.vmx sturcture.
    
    Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    master commit: 81caac0cd0f56b0052a7884e6bd99e3a652ddd59
    master date: 2016-08-29 16:05:31 +0200
---
 xen/include/asm-x86/hvm/hvm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index ddbcbe8..4ca62bd 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -611,7 +611,7 @@ unsigned long hvm_cr4_guest_reserved_bits(const struct vcpu 
*v, bool_t restore);
     struct vcpu *v_ = (v);                                      \
     struct domain *d_ = v_->domain;                             \
     if ( has_hvm_container_domain(d_) &&                        \
-         d_->arch.hvm_domain.vmx.vcpu_block )                   \
+         (cpu_has_vmx && d_->arch.hvm_domain.vmx.vcpu_block) )  \
         d_->arch.hvm_domain.vmx.vcpu_block(v_);                 \
 })
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.7

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.