diff mbox

[kvm-unit-tests,v2,08/10] Do not check cr8 access when running in 32 bit

Message ID 20100826092215.1690.46419.stgit@FreeLancer (mailing list archive)
State New, archived
Headers show

Commit Message

Jason Wang Aug. 26, 2010, 9:22 a.m. UTC
None
diff mbox

Patch

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, },