On 24/05/2018 19:04, Liran Alon wrote: > > ----- liran.alon@xxxxxxxxxx wrote: > >> ----- sean.j.christopherson@xxxxxxxxx wrote: >> >>> On Tue, 2018-05-22 at 08:50 -0700, Jim Mattson wrote: >>>> While we're on the subject, is there any need for L0 to allocate >> a >>>> vpid02 in the common case, where nested EPT is enabled? >>>> >>>> Per section 28.3.2 of the SDM, volume 3, when EPT is enabled, >>> combined >>>> mappings in the TLB are tagged by {VPID, PCID, EP4TA}. With >> nested >>>> EPT, vmcs02 and vmcs01 do not share an EP4TA. Therefore, I think >> it >>>> suffices to simply copy the VPID field from vmcs12 to vmcs02 in >>> this >>>> case. >>> >>> VPID handling in general looks like it could use a good once-over, >>> e.g. vpid02 allocation can be delayed until prepare_vmcs02_full(), >>> we never re-attempt VPID allocation in the (extremely unlikely) >>> case that there are no available VPIDs at vmx_create_vcpu(), and >>> load_vmcs12_host_state() explicitly flushes the TLB when VPID is >>> enabled because it has obsolete code that assumes L1 and L2 always >>> share a VPID. >> >> Agree with all the above. >> As a starting point, I think we should apply this current series as it >> at-least >> handle the load_vmcs12_host_state() issue. :) >> >> Will also add handling for the rest of these issues in my upcoming >> series. >> Thanks for explicitly pointing these out. >> >>> > > Paolo / Radim: > Do you agree with me that it makes sense to first apply this series as a first step? > Or do you want me to resend these patches as part of a bigger series that will fix the extra issues we discussed here? > Yes, I agree enitrely. Paolo