mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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@linux.intel.com>
Acked-by: Christoph Egger <chegger@amazon.de>
master commit: a07084525c
master date: 2014-05-14 10:54:39 +0200
This commit is contained in:
1 parent
ecc692b21b
commit
84d7bd515e
1 file changed
+4
@@ -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) )
|
||||
|
||||