summaryrefslogtreecommitdiff
path: root/include/linux/array_size.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-05-01 13:22:30 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2026-05-29 20:25:28 +0200
commit2be54670bdc017004c4a4b8bddb6ff02ebe7dbe2 (patch)
treec9132d949f58456e98fc16b5578aaaa5a9addd26 /include/linux/array_size.h
parent3988bd2723de407ae90fa7a6f6029b4e60238c58 (diff)
KVM: SEV: Use the size of the PSC header as the minimum size for PSC requests
When handling a Page State Change (PSC) #VMGEXIT use the size of the PSC header as the minimum size for the scratch area. Per the GHCB spec, PSC requests do NOT provide the length, i.e. using control->exit_info_2 for the length is completely made up behavior. The existing code "works", e.g. even though Linux-as-a-guest always passes '0', because KVM doesn't do anything with the length when the request is in the GHCB's shared buffer. Use the header as the min length. Once the header is retrieved, KVM can use the specified indices to compute the full size of the request. Fixes: 9b54e248d264 ("KVM: SEV: Add support to handle Page State Change VMGEXIT") Cc: stable@vger.kernel.org Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Michael Roth <michael.roth@amd.com> Signed-off-by: Sean Christopherson <seanjc@google.com> Message-ID: <20260501202250.2115252-6-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/linux/array_size.h')
0 files changed, 0 insertions, 0 deletions