[patch 3/3] test: vmexit: inl from pmtimer

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

 



Add inl(ACPI_PMTIMER_PORT) test.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: qemu-kvm-parallel-vmexit/kvm/user/test/x86/vmexit.c
===================================================================
--- qemu-kvm-parallel-vmexit.orig/kvm/user/test/x86/vmexit.c
+++ qemu-kvm-parallel-vmexit/kvm/user/test/x86/vmexit.c
@@ -17,6 +17,13 @@ static inline unsigned long long rdtsc()
 	return r;
 }
 
+static unsigned int inl(unsigned short port)
+{
+    unsigned int val;
+    asm volatile("inl %w1, %0" : "=a"(val) : "Nd"(port));
+    return val;
+}
+
 #define GOAL (1ull << 30)
 
 #ifdef __x86_64__
@@ -76,6 +83,11 @@ static void ipi_halt(void)
 		;
 }
 
+static void inl_pmtimer(void)
+{
+    inl(0xb008);
+}
+
 static struct test {
 	void (*func)(void);
 	const char *name;
@@ -86,6 +98,7 @@ static struct test {
 	{ vmcall, "vmcall", .parallel = 1, },
 	{ mov_from_cr8, "mov_from_cr8", .parallel = 1, },
 	{ mov_to_cr8, "mov_to_cr8" , .parallel = 1, },
+	{ 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