From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: [PATCH kvm-unit-tests v2 08/10] Do not check cr8 access when running in 32 bit Date: Thu, 26 Aug 2010 17:22:15 +0800 Message-ID: <20100826092215.1690.46419.stgit@FreeLancer> References: <20100826091520.1690.44200.stgit@FreeLancer> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: mtosatti@redhat.com, avi@redhat.com, kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32446 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307Ab0HZJWS (ORCPT ); Thu, 26 Aug 2010 05:22:18 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7Q9MIBx008824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Aug 2010 05:22:18 -0400 In-Reply-To: <20100826091520.1690.44200.stgit@FreeLancer> Sender: kvm-owner@vger.kernel.org List-ID: CR8 is only available in long mode. Signed-off-by: Jason Wang --- x86/vmexit.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/x86/vmexit.c b/x86/vmexit.c index 819c24b..84c384d 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -49,6 +49,7 @@ static void vmcall(void) #define MSR_EFER 0xc0000080 #define EFER_NX_MASK (1ull << 11) +#ifdef __x86_64__ static void mov_from_cr8(void) { unsigned long cr8; @@ -62,6 +63,7 @@ static void mov_to_cr8(void) asm volatile ("mov %0, %%cr8" : : "r"(cr8)); } +#endif static int is_smp(void) { @@ -100,8 +102,10 @@ static struct test { } tests[] = { { cpuid_test, "cpuid", .parallel = 1, }, { vmcall, "vmcall", .parallel = 1, }, +#ifdef __x86_64__ { mov_from_cr8, "mov_from_cr8", .parallel = 1, }, { mov_to_cr8, "mov_to_cr8" , .parallel = 1, }, +#endif { inl_pmtimer, "inl_from_pmtimer", .parallel = 1, }, { ipi, "ipi", is_smp, .parallel = 0, }, { ipi_halt, "ipi+halt", is_smp, .parallel = 0, },