From: Marcelo Tosatti <mtosa...@redhat.com> Add inl(ACPI_PMTIMER_PORT) test.
Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com> Signed-off-by: Avi Kivity <a...@redhat.com> diff --git a/kvm/user/test/x86/vmexit.c b/kvm/user/test/x86/vmexit.c index 5455919..c3a01e0 100644 --- a/kvm/user/test/x86/vmexit.c +++ b/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-commits" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html