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

[Xen-changelog] [xen stable-4.3] x86/MCE: bypass uninitialized vcpu in vMCE injection



commit 84d7bd515e96f61b01e2e9092f2dce05b263d025
Author:     Kai Huang <kai.huang@xxxxxxxxxxxxxxx>
AuthorDate: Fri May 23 15:30:22 2014 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri May 23 15:30:22 2014 +0200

    x86/MCE: bypass uninitialized vcpu in vMCE injection
    
    Dom0 may bring up less number of vCPUs than xen hypervisor actually created 
for
    it, and in this case, on Intel platform, vMCE injection to dom0 will fail 
due to
    injecting vMCE to uninitialized vcpu, and cause dom0 crash.
    
    Signed-off-by: Kai Huang <kai.huang@xxxxxxxxxxxxxxx>
    Acked-by: Christoph Egger <chegger@xxxxxxxxx>
    master commit: a07084525c126c596326dc1442dd218f522f51b4
    master date: 2014-05-14 10:54:39 +0200
---
 xen/arch/x86/cpu/mcheck/vmce.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/vmce.c b/xen/arch/x86/cpu/mcheck/vmce.c
index af3b491..58afe28 100644
--- a/xen/arch/x86/cpu/mcheck/vmce.c
+++ b/xen/arch/x86/cpu/mcheck/vmce.c
@@ -357,6 +357,10 @@ int inject_vmce(struct domain *d, int vcpu)
         if ( vcpu != VMCE_INJECT_BROADCAST && vcpu != v->vcpu_id )
             continue;
 
+        /* Don't inject to uninitialized VCPU. */
+        if ( !v->is_initialised )
+            continue;
+
         if ( (is_hvm_domain(d) ||
               guest_has_trap_callback(d, v->vcpu_id, TRAP_machine_check)) &&
              !test_and_set_bool(v->mce_pending) )
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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