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

[Xen-changelog] [xen master] VMX: drop bogus gpa parameter from __invept()



commit 3c88e927b2d710dc7d4b5c107c46c74c1ff0e1bd
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Dec 15 11:18:06 2017 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Dec 15 11:18:06 2017 +0100

    VMX: drop bogus gpa parameter from __invept()
    
    Perhaps there once was a plan to have a flush type requiring this, but
    the current SDM has no mention of such and all callers pass zero anyway.
    
    Take the opportunity and also change involved types to uint64_t.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c        | 4 ++--
 xen/arch/x86/hvm/vmx/vvmx.c       | 2 +-
 xen/include/asm-x86/hvm/vmx/vmx.h | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 73254bf..e526e88 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -4276,9 +4276,9 @@ bool vmx_vmenter_helper(const struct cpu_user_regs *regs)
         {
             cpumask_clear_cpu(cpu, ept->invalidate);
             if ( nestedhvm_enabled(curr->domain) )
-                __invept(INVEPT_ALL_CONTEXT, 0, 0);
+                __invept(INVEPT_ALL_CONTEXT, 0);
             else
-                __invept(INVEPT_SINGLE_CONTEXT, ept->eptp, 0);
+                __invept(INVEPT_SINGLE_CONTEXT, ept->eptp);
         }
     }
 
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 0a25aa2..885eab3 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1941,7 +1941,7 @@ int nvmx_handle_invept(struct cpu_user_regs *regs)
     }
     case INVEPT_ALL_CONTEXT:
         p2m_flush_nestedp2m(current->domain);
-        __invept(INVEPT_ALL_CONTEXT, 0, 0);
+        __invept(INVEPT_ALL_CONTEXT, 0);
         break;
     default:
         vmfail_invalid(regs);
diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h 
b/xen/include/asm-x86/hvm/vmx/vmx.h
index 7341cb1..af1f82d 100644
--- a/xen/include/asm-x86/hvm/vmx/vmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h
@@ -452,11 +452,11 @@ static inline enum vmx_insn_errno vmwrite_safe(unsigned 
long field,
     return ret;
 }
 
-static always_inline void __invept(unsigned long type, u64 eptp, u64 gpa)
+static always_inline void __invept(unsigned long type, uint64_t eptp)
 {
     struct {
-        u64 eptp, gpa;
-    } operand = {eptp, gpa};
+        uint64_t eptp, rsvd;
+    } operand = { eptp };
 
     /*
      * If single context invalidation is not supported, we escalate to
@@ -519,7 +519,7 @@ static always_inline void __invvpid(unsigned long type, u16 
vpid, u64 gva)
 
 static inline void ept_sync_all(void)
 {
-    __invept(INVEPT_ALL_CONTEXT, 0, 0);
+    __invept(INVEPT_ALL_CONTEXT, 0);
 }
 
 void ept_sync_domain(struct p2m_domain *p2m);
--
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®.