From patchwork Tue Jun 9 01:37:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 28785 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n591bcH0015466 for ; Tue, 9 Jun 2009 01:37:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755417AbZFIBhY (ORCPT ); Mon, 8 Jun 2009 21:37:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754739AbZFIBhY (ORCPT ); Mon, 8 Jun 2009 21:37:24 -0400 Received: from mga01.intel.com ([192.55.52.88]:13848 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbZFIBhX (ORCPT ); Mon, 8 Jun 2009 21:37:23 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 08 Jun 2009 18:24:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.41,328,1241420400"; d="scan'208";a="464611023" Received: from yhuang-dev.sh.intel.com (HELO [10.239.13.137]) ([10.239.13.137]) by fmsmga002.fm.intel.com with ESMTP; 08 Jun 2009 18:31:26 -0700 Subject: [PATCH] KVM: MCE: Fix compiling without CONFIG_X86_MCE From: Huang Ying To: "avi@redhat.com" , Andi Kleen , Marcelo Tosatti Cc: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" Date: Tue, 09 Jun 2009 09:37:24 +0800 Message-Id: <1244511444.8361.605.camel@yhuang-dev.sh.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Enclose do_machine_check with #ifdef CONFIG_X86_MCE. Reported-by: Marcelo Tosatti Signed-off-by: Huang Ying --- arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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(®s, 0); +#endif } static int handle_machine_check(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)