diff mbox

[v1,03/14] x86/vvmx: use np2m_flush_base() for INVEPT_SINGLE_CONTEXT

Message ID 20170904081452.12960-4-sergey.dyasli@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sergey Dyasli Sept. 4, 2017, 8:14 a.m. UTC
nvmx_handle_invept() updates current's np2m just to flush it. Instead,
use the new np2m_flush_base() directly for this purpose.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
---
 xen/arch/x86/hvm/vmx/vvmx.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

George Dunlap Sept. 26, 2017, 4:05 p.m. UTC | #1
On 09/04/2017 09:14 AM, Sergey Dyasli wrote:
> nvmx_handle_invept() updates current's np2m just to flush it. Instead,
> use the new np2m_flush_base() directly for this purpose.

This one and the previous one look good, but it seems like it would be
better to have them as a single patch.

 -George
diff mbox

Patch

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index e2361a1394..3c5f560aec 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1910,12 +1910,7 @@  int nvmx_handle_invept(struct cpu_user_regs *regs)
     {
     case INVEPT_SINGLE_CONTEXT:
     {
-        struct p2m_domain *p2m = p2m_get_nestedp2m(current, eptp);
-        if ( p2m )
-        {
-            p2m_flush(current, p2m);
-            ept_sync_domain(p2m);
-        }
+        np2m_flush_base(current, eptp);
         break;
     }
     case INVEPT_ALL_CONTEXT: