Re: [PATCH v6 7/7] KVM: SVM: Add Page modification logging support

Sean Christopherson
2026-04-27T20:16:06Z

On Sat, Apr 25, 2026, Tom Lendacky wrote:
> On 4/24/26 11:25, Tom Lendacky wrote:
> >> Now, maybe the APM is trying to say only the save area is undefined, in which
> >> case PML Index is fine and can and should be left alone. But if that's the case,
> >> the APM needs to be updated to make explicitly clear what fields in the VMCS are
> >> and are not valid after SHUTDOWN.
> >
> > I'm checking to see if I can get clarification on this.
>
> PML_INDEX will be valid even when a SHUTDOWN is intercepted. I'm working
> to see if we can update the APM to identify what would be valid and what
> wouldn't be in this situation.
>
> For a triple-fault SHUTDOWN, the saved x86 state could be inconsistent
> because the CPU stopped in the middle of a sequence and redirected to
> shutdown. Everything will be saved, but it might not be valid x86 state.

Yeah, I assumed that the APM wording was an overly-broad description of why guest
state would be garbage.

> The question then becomes are there fields within the VMCB control area
> that are based on x86 state that might not be valid (e.g. V_IRQ or nRIP,
> etc.).

FWIW, even a conservative iset of "these fields/areas are guaranteed to be sane
and consistent" would be super helpful. The big problem right now is that the
wording reads like the entire GHCB is suspect.