KVM: Add VT-x machine check support v4
(replaces commit
a0861c02a981c943573478ea13b29b1fb958ee5b upstream in a
cleaner way for the 2.6.30 kernel tree)
VT-x needs an explicit MC vector intercept to handle machine checks in
the hypervisor.
It also has a special option to catch machine checks that happen
during VT entry.
Do these interceptions and forward them to the Linux machine check
handler. Make it always look like user space is interrupted because
the machine check handler treats kernel/user space differently.
Thanks to Huang Ying and Jiang Yunhong for help and testing.
Cc: ying.huang@intel.com
v2: Handle machine checks still in interrupt off context
to avoid problems on preemptible kernels.
v3: Handle old style 32bit and make fully standalone
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Acked-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>