[PATCH kvm-unit-tests] x86: pcid: fix clearing of CR0.PG

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

 



The test was trying to set CR0.PG, not clear it (and it was
already set, even).

Reported-by: Chris J Arges <chris.j.arges@xxxxxxxxxxxxx>
Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 x86/pcid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/pcid.c b/x86/pcid.c
index 164e9a1..e3ccfdb 100644
--- a/x86/pcid.c
+++ b/x86/pcid.c
@@ -53,7 +53,7 @@ void test_pcid_enabled(void)
         goto report;
 
     /* try clearing CR0.PG when CR4.PCIDE=1, #GP expected */
-    if (write_cr0_checking(cr0 | X86_CR0_PG) != GP_VECTOR)
+    if (write_cr0_checking(cr0 & ~X86_CR0_PG) != GP_VECTOR)
         goto report;
 
     write_cr4(cr4);
-- 
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