CVE-2026-98715: KVM: SVM: Preserve TLB control (i.e. pending TLB flush) on failed VMRUN
In the Linux kernel, the following vulnerability has been resolved:
KVM: SVM: Preserve TLB control (i.e. pending TLB flush) on failed VMRUN
Don't reset the VMCB's TLB control back to "do nothing" on a failed VMRUN, as empirical testing shows that the CPU performs the requested TLB flush if and only if VMRUN is successful, i.e. clearing TLB control on a failed VMRUN effectively drops a TLB flush.
Explicitly track the need to flush all ASIDs on a per-CPU basis, as the ASID reuse condition is tied to the pCPU, not to the vCPU. As a bonus, this also obviates the need to avoid clobbering FLUSHALLASID with TLBCONTROLFLUSHASID, e.g. in svmflushtlbasid().
Deliberately don't bother saving/restoring the "old" tlbctl on failure, in quotes because it's not exactly the old tlbctl, it's the tlbctl from after presvmrun(), but before updating tlbctl for flushallasids. If VMRUN fails and TLBCONTROLFLUSHALLASID is forced, then the next successful run of the VMCB may unnecessarily flush all ASIDs, which strictly speaking could result in noisy neighbor issues. However, the fact that newasid() is already guest-triggerable, because of KVM's flawed behavior of clearing the ASID on emulated INIT, means that a guest can already trigger a flush of all ASIDs at roughly the same rate. And once KVM stops clobbering the ASID on emulated INIT, or assigns a static ASID to each vCPU, this flaw goes away.