aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/lib/x86.c
diff options
context:
space:
mode:
authorLiran Alon <liran.alon@oracle.com>2018-10-08 23:42:20 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-13 12:00:55 +0200
commitefebf0aaec3de4df2bdb2949ebaacacd82de37db (patch)
treeb560ba2cdb3edc1a9f6f4fe5d27a80ada2f42af4 /tools/testing/selftests/kvm/lib/x86.c
parentKVM: nVMX: Flush linear and combined mappings on VPID02 related flushes (diff)
downloadlinux-dev-efebf0aaec3de4df2bdb2949ebaacacd82de37db.tar.xz
linux-dev-efebf0aaec3de4df2bdb2949ebaacacd82de37db.zip
KVM: nVMX: Do not flush TLB on L1<->L2 transitions if L1 uses VPID and EPT
If L1 uses VPID, it expects TLB to not be flushed on L1<->L2 transitions. However, code currently flushes TLB nonetheless if we didn't allocate a vpid02 for L2. As in this case, vmcs02->vpid == vmcs01->vpid == vmx->vpid. But, if L1 uses EPT, TLB entires populated by L2 are tagged with EPTP02 while TLB entries populated by L1 are tagged with EPTP01. Therefore, we can also avoid TLB flush if L1 uses VPID and EPT. Reviewed-by: Mihai Carabas <mihai.carabas@oracle.com> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com> Signed-off-by: Liran Alon <liran.alon@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/x86.c')
0 files changed, 0 insertions, 0 deletions