]> xenbits.xensource.com Git - xen.git/commit
x86/np2m: flush all np2m objects on nested INVEPT
authorSergey Dyasli <sergey.dyasli@citrix.com>
Tue, 3 Oct 2017 15:20:57 +0000 (16:20 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 6 Oct 2017 12:36:43 +0000 (13:36 +0100)
commit77690ea09ab234d35bf697c33c560a92bd22e967
tree9fc1cf0d32784298be09d09d0f2f08f5efd0997c
parenta08a9cd3afa6445e0cca055e667c845e318f21f4
x86/np2m: flush all np2m objects on nested INVEPT

At the moment, nvmx_handle_invept() updates the current np2m just to
flush it.  Instead introduce a function, np2m_flush_base(), which will
look up the np2m base pointer and call p2m_flush_table() instead.

Unfortunately, since we don't know which p2m a given vcpu is using, we
must flush all p2ms that share that base pointer.

Convert p2m_flush_table() into p2m_flush_table_locked() in order not
to release the p2m_lock after np2m_base check.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jun Nakajima <jun.nakajima@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/p2m.h