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

[Xen-changelog] [xen master] x86/svm: Remove the pdpe fields from struct vmcb



commit 00b1b8ed737376aaa9cb842dd5bbf759e54fd86e
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Oct 5 17:02:15 2018 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Oct 17 17:50:14 2018 +0100

    x86/svm: Remove the pdpe fields from struct vmcb
    
    These fields have existed since the SVM code was first introduced.
    
    The earliest reference I can find is c/s d1bd157fbc9 which is unforunately a
    rebase & squash of a separate dev tree.  Looking a the commit message, I'm
    guessing it was introduced by:
    
      > user:        twoller@xxxxxxxxxxxxx
      > date:        Tue Dec 13 19:49:53 2005 -0500
      > files:       ... xen/include/asm-x86/svm_vmcb.h ...
      > description:
      > Add SVM base files to repository.
    
    Anyway, the AMD SDM has no mention of PDPE fields in the VMCB and marks this
    part of the VMCB as reserved.  The manual does explicitly say that 32bit PAE
    paging may read the PDPE fields from memory rather from the CPU registers.
    
    Chances are very good that this is a vestigial remnent of an early design.
    Xen doesn't use the fields at all, except to copy them on virtual
    vmentry/vmexit.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/nestedsvm.c   | 12 ------------
 xen/include/asm-x86/hvm/svm/vmcb.h |  7 ++-----
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 3f4f403901..78a1016e94 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -636,12 +636,6 @@ static int nsvm_vmcb_prepare4vmrun(struct vcpu *v, struct 
cpu_user_regs *regs)
      * sysenter_eip. These are handled via VMSAVE/VMLOAD emulation.
      */
 
-    /* Page tables */
-    n2vmcb->pdpe0 = ns_vmcb->pdpe0;
-    n2vmcb->pdpe1 = ns_vmcb->pdpe1;
-    n2vmcb->pdpe2 = ns_vmcb->pdpe2;
-    n2vmcb->pdpe3 = ns_vmcb->pdpe3;
-
     /* PAT */
     if (!vcleanbit_set(np)) {
         n2vmcb->_g_pat = ns_vmcb->_g_pat;
@@ -1177,12 +1171,6 @@ nsvm_vmcb_prepare4vmexit(struct vcpu *v, struct 
cpu_user_regs *regs)
     /* CR2 */
     ns_vmcb->_cr2 = n2vmcb->_cr2;
 
-    /* Page tables */
-    ns_vmcb->pdpe0 = n2vmcb->pdpe0;
-    ns_vmcb->pdpe1 = n2vmcb->pdpe1;
-    ns_vmcb->pdpe2 = n2vmcb->pdpe2;
-    ns_vmcb->pdpe3 = n2vmcb->pdpe3;
-
     /* PAT */
     ns_vmcb->_g_pat = n2vmcb->_g_pat;
 
diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h 
b/xen/include/asm-x86/hvm/svm/vmcb.h
index 3a514f8de2..48aed78292 100644
--- a/xen/include/asm-x86/hvm/svm/vmcb.h
+++ b/xen/include/asm-x86/hvm/svm/vmcb.h
@@ -479,17 +479,14 @@ struct vmcb_struct {
     u64 sysenter_esp;
     u64 sysenter_eip;
     u64 _cr2;                   /* cleanbit 9 */
-    u64 pdpe0;
-    u64 pdpe1;
-    u64 pdpe2;
-    u64 pdpe3;
+    u64 res16[4];
     u64 _g_pat;                 /* cleanbit 4 */
     u64 _debugctlmsr;           /* cleanbit 10 */
     u64 _lastbranchfromip;      /* cleanbit 10 */
     u64 _lastbranchtoip;        /* cleanbit 10 */
     u64 _lastintfromip;         /* cleanbit 10 */
     u64 _lastinttoip;           /* cleanbit 10 */
-    u64 res16[301];
+    u64 res17[301];
 };
 
 struct svm_domain {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.