mbox series

[v2,0/4] KVM: nVMX: Various VPID fixes

Message ID 20181008204220.36032-1-liran.alon@oracle.com (mailing list archive)
Headers show
Series KVM: nVMX: Various VPID fixes | expand

Message

Liran Alon Oct. 8, 2018, 8:42 p.m. UTC
Hi,

This series aims to fix various issues in nested VPID emulation.

The 1st patch fixes a bug that INVEPT was executed on L1<->L2
transitions to flush TLB but with the wrong EPTP because it hasn't been
loaded yet with the destination EPTP. The patch handles this issue
easily by just delaying vmx_flush_tlb() to be called after EPTP has been
set to destination by using KVM_REQ_TLB_FLUSH.

The 2nd patch fixes a bug in L0 emulation of INVVPID which can
use a wrong VPID02 in case KVM failed to allocate vmx->nested.vpid02.

The 3rd patch fixes a critical issue of invalidating wrong mappings from
TLB when performing VPID02 related invalidations. The issue is that these
invalidations mistakenly invalidates combined and guest-physical mappings
tagged by EPTP01 instead of invalidating linear and combined mappings
tagged by VPID02.

The 4rd patch optimizes L1<->L2 transitions by avoiding unnecessary TLB flush
in case L1 use both VPID and EPT and thus L0 can separate TLB entries of L1 and L2
by EPTP tag.

Regards,
-Liran