* [PATCH kvm-unit-tests] x86: pcid: fix clearing of CR0.PG
@ 2014-08-05 10:32 Paolo Bonzini
0 siblings, 0 replies; only message in thread
From: Paolo Bonzini @ 2014-08-05 10:32 UTC (permalink / raw)
To: kvm; +Cc: chris.j.arges
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@canonical.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-05 10:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 10:32 [PATCH kvm-unit-tests] x86: pcid: fix clearing of CR0.PG Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).