All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VMX: drop bogus gpa parameter from __invept()
@ 2017-12-06 16:28 Jan Beulich
  2017-12-06 16:45 ` Andrew Cooper
  2017-12-13  8:07 ` Tian, Kevin
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2017-12-06 16:28 UTC (permalink / raw)
  To: xen-devel; +Cc: Kevin Tian, Jun Nakajima

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>

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -4281,9 +4281,9 @@ bool vmx_vmenter_helper(const struct cpu
         {
             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);
         }
     }
 
--- 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_r
     }
     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);
--- 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 vmwrit
     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(unsi
 
 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);




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] VMX: drop bogus gpa parameter from __invept()
  2017-12-06 16:28 [PATCH] VMX: drop bogus gpa parameter from __invept() Jan Beulich
@ 2017-12-06 16:45 ` Andrew Cooper
  2017-12-13  8:07 ` Tian, Kevin
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2017-12-06 16:45 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Kevin Tian, Jun Nakajima

On 06/12/17 16:28, Jan Beulich wrote:
> 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>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] VMX: drop bogus gpa parameter from __invept()
  2017-12-06 16:28 [PATCH] VMX: drop bogus gpa parameter from __invept() Jan Beulich
  2017-12-06 16:45 ` Andrew Cooper
@ 2017-12-13  8:07 ` Tian, Kevin
  1 sibling, 0 replies; 3+ messages in thread
From: Tian, Kevin @ 2017-12-13  8:07 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Nakajima, Jun

> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Thursday, December 7, 2017 12:29 AM
> 
> 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>
> 

Acked-by: Kevin Tian <kevin.tian@intel.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-13  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 16:28 [PATCH] VMX: drop bogus gpa parameter from __invept() Jan Beulich
2017-12-06 16:45 ` Andrew Cooper
2017-12-13  8:07 ` Tian, Kevin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.