OSDN Git Service

KVM: nVMX: Emulate L1 individual-address invvpid by L0 individual-address invvpid
authorLiran Alon <liran.alon@oracle.com>
Tue, 22 May 2018 14:16:15 +0000 (17:16 +0300)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 24 May 2018 17:45:45 +0000 (19:45 +0200)
commitcd9a491f6ef731cdee07dd0a2fe003389424a393
tree728c12364ae108f31672ba632cc5a4bbae026e8c
parent6f1e03bcabcdbb199940dab0a60b1371cf95f6f9
KVM: nVMX: Emulate L1 individual-address invvpid by L0 individual-address invvpid

When vmcs12 uses VPID, all TLB entries populated by L2 are tagged with
vmx->nested.vpid02. Currently, INVVPID executed by L1 is emulated by L0
by using INVVPID single/global-context to flush all TLB entries
tagged with vmx->nested.vpid02 regardless of INVVPID type executed by
L1.

However, we can easily optimize the case of L1 INVVPID on an
individual-address. Just INVVPID given individual-address tagged with
vmx->nested.vpid02.

Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
[Squashed with a preparatory patch that added the !operand.vpid line.]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c