[Devel] [PATCH RK hci-8.0 3/3] ms/KVM: x86: Unconditionally reset MMU context when emulating INIT

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 03:25:58 MSK 2026


> From: Sean Christopherson <seanjc at google.com>
> 
> [ Upstream commit c7c288d178cb0b78d3464a616b16b1aa0b316049 ]
> 
> Force an MMU reset when emulating an INIT even if paging was already
> disabled, as the MMU page role includes guest_mode (L2), i.e. an INIT while
> L2 is running with CR0.PG=0 will result in KVM running L1 with a stale MMU
> context.
> 
> Alternatively, the reset could be scoped strictly to paging being enabled
> or L2 being active, but SMM is also encoded in the page role.  Even though
> it _should_ be impossible for the vCPU to be INIT'd while SMM is active,
> there's zero value in not handling SMM.  At that point, the only scenario
> where KVM _doesn't_ need to reset the MMU context is on an INIT with the
> vCPU running in Real Mode or Unpaged Protect Mode, and while INIT in those
> [ ... ]
> 
> Co-developed-by: Fima Shevrin <efim.shevrin at virtuozzo.com>
> Signed-off-by: Fima Shevrin <efim.shevrin at virtuozzo.com>
> Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> 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/20261125164802.402895-1-khorenko@virtuozzo.com?part=3




More information about the Devel mailing list