From: Huang Ying <[email protected]> Enclose do_machine_check with #ifdef CONFIG_X86_MCE.
Reported-by: Marcelo Tosatti <[email protected]> Signed-off-by: Huang Ying <[email protected]> Signed-off-by: Avi Kivity <[email protected]> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 673bcb3..8c60db6 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2681,12 +2681,14 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu, */ static void kvm_machine_check(void) { +#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64) struct pt_regs regs = { .cs = 3, /* Fake ring 3 no matter what the guest ran on */ .flags = X86_EFLAGS_IF, }; do_machine_check(®s, 0); +#endif } static int handle_machine_check(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
