[Devel] [PATCH hci-8.1 03/14] ms/KVM: nVMX: Process each host MSR entry at most once when unwinding failed VM-Entry

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:35:07 MSK 2026


> From: Sean Christopherson <seanjc at google.com>
> 
> [ Upstream commit c33ef9d334059f7cb167569ed7b4779752fe4425 ]
> 
> Add a missing "break" in the inner for-loop of the open coded mess that
> unwinds MSRs back to the pre-VM-Enter state when VMLAUNCH/VMRESUME VM-Fails
> due to a consistency check that is caught by hardware but missed by KVM.
> I.e. move on to the next MSR in the VM-Entry load list after performing a
> write using a value found in the VM-Exit load list.  Processing *every*
> matching entry in the VM-Exit load list makes the processing quadratic,
> which is problematic if the load lists are full of MSRs that are expensive
> to emulate.  E.g. writing APIC_BASE triggers kvm_recalculate_apic_map() and
> a whole pile of unnecessary work.
> 
> Functionally, arbitrarily restoring the value of the first matching entry
> [ ... ]
> (cherry picked from commit 05fae367c6878d08f54a7c5bb6986a5e57e9bd1c)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157287
> Feature: fix ms/kvm
> Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157133-klp-and-kvm-fixes-v1-0-0ec8eaadf1bc@virtuozzo.com?part=3




More information about the Devel mailing list