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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CR8 is only available in long mode.

Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
---
 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, },

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux