[PATCH kvm-unit-tests] x86: clean up EFER definitions

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

 



The X86_EFER_LMA definition is wrong, while X86_IA32_EFER is unused.
There are also two useless WRMSRs that try to set EFER_LMA in
x86/pks.c and x86/pku.c.  Clean them all up.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 lib/x86/processor.h | 2 --
 x86/pks.c           | 1 -
 x86/pku.c           | 1 -
 3 files changed, 4 deletions(-)

diff --git a/lib/x86/processor.h b/lib/x86/processor.h
index 9f85fd2..dda57a1 100644
--- a/lib/x86/processor.h
+++ b/lib/x86/processor.h
@@ -72,8 +72,6 @@
 #define X86_EFLAGS_ALU (X86_EFLAGS_CF | X86_EFLAGS_PF | X86_EFLAGS_AF | \
 			X86_EFLAGS_ZF | X86_EFLAGS_SF | X86_EFLAGS_OF)
 
-#define X86_IA32_EFER          0xc0000080
-#define X86_EFER_LMA           (1UL << 8)
 
 /*
  * CPU features
diff --git a/x86/pks.c b/x86/pks.c
index a506622..ef95fb9 100644
--- a/x86/pks.c
+++ b/x86/pks.c
@@ -77,7 +77,6 @@ int main(int ac, char **av)
     setup_vm();
     setup_alt_stack();
     set_intr_alt_stack(14, pf_tss);
-    wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_LMA);
 
     if (reserve_pages(SUPER_BASE, SUPER_BASE >> 12))
         report_abort("Could not reserve memory");
diff --git a/x86/pku.c b/x86/pku.c
index 7e8247c..51ff412 100644
--- a/x86/pku.c
+++ b/x86/pku.c
@@ -76,7 +76,6 @@ int main(int ac, char **av)
     setup_vm();
     setup_alt_stack();
     set_intr_alt_stack(14, pf_tss);
-    wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_LMA);
 
     if (reserve_pages(USER_BASE, USER_BASE >> 12))
         report_abort("Could not reserve memory");
-- 
2.26.2




[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