diff options
author | Sean Christopherson <seanjc@google.com> | 2021-04-07 00:49:52 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-04-21 18:20:07 +0200 |
commit | 238eca821cee90e91139da84ef4f38c74d7cf0d9 (patch) | |
tree | 559925f1aabb8ce350b21d5e7437390adedfdb29 /kernel/gcov/clang.c | |
parent | crypto: ccp: Use the stack and common buffer for INIT command (diff) | |
download | linux-238eca821cee90e91139da84ef4f38c74d7cf0d9.tar.xz linux-238eca821cee90e91139da84ef4f38c74d7cf0d9.zip |
KVM: SVM: Allocate SEV command structures on local stack
Use the local stack to "allocate" the structures used to communicate with
the PSP. The largest struct used by KVM, sev_data_launch_secret, clocks
in at 52 bytes, well within the realm of reasonable stack usage. The
smallest structs are a mere 4 bytes, i.e. the pointer for the allocation
is larger than the allocation itself.
Now that the PSP driver plays nice with vmalloc pointers, putting the
data on a virtually mapped stack (CONFIG_VMAP_STACK=y) will not cause
explosions.
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210406224952.4177376-9-seanjc@google.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
[Apply same treatment to PSP migration commands. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kernel/gcov/clang.c')
0 files changed, 0 insertions, 0 deletions