kvm: vmx: Add IA32_FLUSH_CMD guest support
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): CALMp9eQ+NHvq4uDQp86AmHbeFxj0_nhWzOeoa-tp9vhQ7qk04g@mail.gmail.com
Quoted 14 lines · Jim Mattson
Quoted 10 lines · Konrad Rzeszutek Wilk
Quoted 4 lines · Jim Mattson
Expose
IA32_FLUSH_CMDto the guest if the guest CPUID enumerates support for this MSR. As withIA32_PRED_CMD, permission for unintercepted writes to this MSR will be granted to the guest after the first non-zero write.I can't seem to find the Intel docs (even thought all the pages are all set), but my understanding is that the
ARCH_CAPABILITIESBit(3) would suffice. That is it says that for nested OSes you shouldn't use theIA32_FLUSH_CMD?
Quoted 11 lines
If the L0 hypervisor performs an L1D$ flush on every emulated VM-entry from L1 to L2 (which kvm may or may not do, depending on its configuration) and if it reports that in IA32_ARCH_CAPABILITIES.SKIP_L1DFL_VMENTRY[bit 3], then it would be pointless for the L1 hypervisor to use
IA32_FLUSH_CMDon VM-entry to L2. However, (a) the L0 hypervisor may not perform an L1D$ flush on every emulated VM-entry from L1 to L2, and (b) there may be other reasons that an L1 guest (hypervisor or not) wants to perform an L1D$ flush usingIA32_FLUSH_CMD. It is more forward-thinking to provide this capability than it is not to. And it's all configurable from userspace, so if you don't want it, you don't have to enable it.
Ping.