[kvm-unit-tests PATCH 1/4] x86: svm: clear CR4.DE on DR intercept test

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

 



DR4/DR5 can only be written when CR4.DE is clear, and otherwise trigger
a #GP exception. The BIOS might not clear CR4.DE so update the tests not
to make this assumption.

Signed-off-by: Nadav Amit <namit@xxxxxxxxxx>
---
 x86/svm_tests.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index d4d130f..9adee23 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -171,6 +171,7 @@ static void prepare_dr_intercept(struct svm_test *test)
     default_prepare(test);
     vmcb->control.intercept_dr_read = 0xff;
     vmcb->control.intercept_dr_write = 0xff;
+    vmcb->save.cr4 &= ~X86_CR4_DE;
 }
 
 static void test_dr_intercept(struct svm_test *test)
-- 
2.25.1




[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