]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: SEV: Add support to handle Page State Change VMGEXIT
authorMichael Roth <michael.roth@amd.com>
Wed, 1 May 2024 08:52:00 +0000 (03:52 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 12 May 2024 08:09:31 +0000 (04:09 -0400)
commit9b54e248d2644be71cb394eb85f31ad99e023a05
tree61f6bbf12fbcad9b4f524002213adb6bc828f4cf
parentd46b7b6a5f9ec652a9e3ac6344f679235c9b67da
KVM: SEV: Add support to handle Page State Change VMGEXIT

SEV-SNP VMs can ask the hypervisor to change the page state in the RMP
table to be private or shared using the Page State Change NAE event
as defined in the GHCB specification version 2.

Forward these requests to userspace as KVM_EXIT_VMGEXITs, similar to how
it is done for requests that don't use a GHCB page.

As with the MSR-based page-state changes, use the existing
KVM_HC_MAP_GPA_RANGE hypercall format to deliver these requests to
userspace via KVM_EXIT_HYPERCALL.

Signed-off-by: Michael Roth <michael.roth@amd.com>
Co-developed-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Message-ID: <20240501085210.2213060-11-michael.roth@amd.com>
Co-developed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/sev-common.h
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.h