On Mon, Jan 06, 2025, Jann Horn wrote: > +KVM/SVM folks in case they know more about how enabling CPU features > interacts with virtualization; original patch is at > https://lore.kernel.org/all/20241230175550.4046587-12-riel@xxxxxxxxxxx/ > > On Sat, Jan 4, 2025 at 4:08 AM Rik van Riel <riel@xxxxxxxxxxx> wrote: > > On Fri, 2025-01-03 at 18:49 +0100, Jann Horn wrote: > > > On Mon, Dec 30, 2024 at 6:53 PM Rik van Riel <riel@xxxxxxxxxxx> > > > > only those upper-level entries that lead to the target PTE in > > > > the page table hierarchy, leaving unrelated upper-level entries > > > > intact. > > > > > > How does this patch interact with KVM SVM guests? > > > In particular, will this patch cause TLB flushes performed by guest > > > kernels to behave differently? No. EFER is context switched by hardware on VMRUN and #VMEXIT, i.e. the guest runs with its own EFER, and thus will get the targeted flushes if and only if the hypervisor virtualizes EFER.TCE *and* the guest explicitly enables EFER.TCE. > > That is a good question. > > > > A Linux guest should be fine, since Linux already flushes the parts of the > > TLB where page tables are being freed. > > > > I don't know whether this could potentially break some non-Linux guests, > > though.