[PATCH] Restore cr3 after tests on PCID

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

 



The INVPCID enabling test assumes cr3[11:0] is 0. But at present PCID enabling
test sets cr3[11:0] to 1 for its own purpose and doesn't restore the register,
which leads to a failure when INVPCID test tries to enable PCIDE.

This patch restores cr3 after PCID enabling test is done so that PCIDE can be
enabled normally in later tests.

Signed-off-by: Junjie Mao <junjie.mao@xxxxxxxxx>
---
 x86/pcid.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/x86/pcid.c b/x86/pcid.c
index de0f6fe..8bfeba2 100644
--- a/x86/pcid.c
+++ b/x86/pcid.c
@@ -79,6 +79,7 @@ void test_pcid_enabled(void)
     write_cr3(cr3 | 0x001);
     if (write_cr4_checking(cr4 | X86_CR4_PCIDE) != GP_VECTOR)
         goto report;
+    write_cr3(cr3);

     passed = 1;

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