[PATCH kvm-unit-tests] vmexit: add mov-to-dr test

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

 



Currently each MOV to a debug register causes a debug exit.  Add a
testcase to track upcoming improvements.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 x86/vmexit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/x86/vmexit.c b/x86/vmexit.c
index 7e9af15..cc24738 100644
--- a/x86/vmexit.c
+++ b/x86/vmexit.c
@@ -130,6 +130,11 @@ static void outl_elcr_kernel(void)
     outb(0x4d0, 0);
 }
 
+static void mov_dr(void)
+{
+    asm volatile("mov %0, %%dr7" : : "r" (0x400L));
+}
+
 static void ple_round_robin(void)
 {
 	struct counter {
@@ -318,6 +323,7 @@ static struct test tests[] = {
 	{ inl_nop_qemu, "inl_from_qemu", .parallel = 1 },
 	{ inl_nop_kernel, "inl_from_kernel", .parallel = 1 },
 	{ outl_elcr_kernel, "outl_to_kernel", .parallel = 1 },
+	{ mov_dr, "mov_dr", .parallel = 1 },
 	{ ipi, "ipi", is_smp, .parallel = 0, },
 	{ ipi_halt, "ipi+halt", is_smp, .parallel = 0, },
 	{ ple_round_robin, "ple-round-robin", .parallel = 1 },
-- 
1.8.3.1

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