diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-07-09 13:49:31 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-07-10 09:01:10 -0700 |
| commit | 42a39ad5d592aec87a70527a4e694f6210694482 (patch) | |
| tree | 834af92af790b10436d79e1ec4c55919182e58b6 /include/linux/timerqueue.h | |
| parent | a204badd8432f93b7e862e7dac6db0fe3d65f370 (diff) | |
KVM: SEV: Track the GPA of the guest-controlled VMSA used for SNP guests
Track the GPA of the guest-provided VMSA used after AP_CREATION events when
running SNP guests, instead of simply tracking whether or not the vCPU is
using a guest-provided VMSA. KVM needs to know the GPA of the VMSA that's
actively being used so that it can react to MMU invalidation events, i.e.
so that KVM can drop the VMSA if its backing guest_memfd page is punched
out of existence.
Opportunistically rename snp_vmsa_gpa to clarify that it tracks the pending
VMSA GPA, whereas snp_guest_vmsa_gpa now tracks the in-use VMSA GPA.
Note! Take care to track the GPA, not the GFN, as VALID_PAGE() won't
behave correctly if an invalid GFN is converted to a GPA for checking.
Note #2! Keep snp_has_guest_vmsa so that switching to a guest-provided
VMSA is sticky, even if the guest-provided VMSA becomes invalid.
No functional change intended.
Cc: stable@vger.kernel.org # 6.12.x
Reviewed-by: Michael Roth <michael.roth@amd.com>
Link: https://patch.msgid.link/20260709204948.1988414-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
