mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: "avi@redhat.com" <avi@redhat.com>,
	Andi Kleen <andi@firstfloor.org>,
	Marcelo Tosatti <mtosatti@redhat.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: [PATCH] KVM: MCE: Fix compiling without CONFIG_X86_MCE
Date: Tue, 09 Jun 2009 09:37:24 +0800	[thread overview]
Message-ID: <1244511444.8361.605.camel@yhuang-dev.sh.intel.com> (raw)

Enclose do_machine_check with #ifdef CONFIG_X86_MCE.

Reported-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>

---
 arch/x86/kvm/vmx.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2623,12 +2623,14 @@ static int handle_rmode_exception(struct
  */
 static void kvm_machine_check(void)
 {
+#ifdef CONFIG_X86_MCE
 	struct pt_regs regs = {
 		.cs = 3, /* Fake ring 3 no matter what the guest ran on */
 		.flags = X86_EFLAGS_IF,
 	};
 
 	do_machine_check(&regs, 0);
+#endif
 }
 
 static int handle_machine_check(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)



             reply	other threads:[~2009-06-09  1:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09  1:37 Huang Ying [this message]
2009-06-10  9:08 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1244511444.8361.605.camel@yhuang-dev.sh.intel.com \
    --to=ying.huang@intel.com \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome