MCE: Relay UCR MCE to guest
commit4b62fff1101a7ad77553147717a8bd3bf79df7ef
authorHuang Ying <ying.huang@intel.com>
Mon, 21 Sep 2009 02:43:25 +0000 (21 10:43 +0800)
committerAvi Kivity <avi@redhat.com>
Mon, 21 Sep 2009 09:21:31 +0000 (21 12:21 +0300)
tree069a2dd276c67e15ee02816a847001e868fcf67d
parentfffe4ed4d12f012b61f0ba00350446b9daa71e08
MCE: Relay UCR MCE to guest

UCR (uncorrected recovery) MCE is supported in recent Intel CPUs,
where some hardware error such as some memory error can be reported
without PCC (processor context corrupted). To recover from such MCE,
the corresponding memory will be unmapped, and all processes accessing
the memory will be killed via SIGBUS.

For KVM, if QEMU/KVM is killed, all guest processes will be killed
too. So we relay SIGBUS from host OS to guest system via a UCR MCE
injection. Then guest OS can isolate corresponding memory and kill
necessary guest processes only. SIGBUS sent to main thread (not VCPU
threads) will be broadcast to all VCPU threads as UCR MCE.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
cpu-common.h
exec.c
qemu-kvm.c
qemu-kvm.h
target-i386/cpu.h
target-i386/helper.c