]> xenbits.xensource.com Git - xen.git/commitdiff
VMX: drop bogus gpa parameter from __invept()
authorJan Beulich <jbeulich@suse.com>
Fri, 15 Dec 2017 10:18:06 +0000 (11:18 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Dec 2017 10:18:06 +0000 (11:18 +0100)
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@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/hvm/vmx/vmx.h

index 73254bf5d413613c2ea258c61ecc643902130fd3..e526e886f906a5395dd2657e217b4857049e73e8 100644 (file)
@@ -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);
         }
     }
 
index 0a25aa2f33c180cea270fd6d792be41fb1833725..885eab372b198f8423d89af57972b2b3e10e866d 100644 (file)
@@ -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);
index 7341cb191ef28ef3139a24e35652c10bd117f12e..af1f82d244e6e04b5b7b1649245eff20d1c35ce8 100644 (file)
@@ -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);