[kvm-unit-tests PATCH 7/7] x86/debug: Explicitly write DR6 in the H/W watchpoint + DR6.BS sub-test

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

 



Explicitly set DR6.BS for the sub-test that verifies DR6.BS isn't cleared
when a data breakpoint (a.k.a. H/W watchpoint) #DB occurs.  Relying on
the single-step #DB tests to leave DR6 is all kinds of mean.

Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
 x86/debug.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/x86/debug.c b/x86/debug.c
index 0165dc68..4fec241f 100644
--- a/x86/debug.c
+++ b/x86/debug.c
@@ -417,6 +417,7 @@ int main(int ac, char **av)
 
 	n = 0;
 	write_dr1((void *)&value);
+	write_dr6(DR6_BS);
 	write_dr7(0x00d0040a); // 4-byte write
 
 	extern unsigned char hw_wp1;
-- 
2.34.1.703.g22d0c6ccf7-goog




[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