crypto: ccp: Use the stack for small SEV command buffers
authorSean Christopherson <seanjc@google.com>
Tue, 6 Apr 2021 22:49:49 +0000 (15:49 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 21 Apr 2021 16:20:07 +0000 (12:20 -0400)
commite4a9af799e5539b0feb99571f0aaed5a3c81dc5a
treea0d0148a1741b5e20f7d895918be1a5bff6a4e90
parent8347b99473a313be6549a5b940bc3c56a71be81c
crypto: ccp: Use the stack for small SEV command buffers

For commands with small input/output buffers, use the local stack to
"allocate" the structures used to communicate with the PSP.   Now that
__sev_do_cmd_locked() gracefully handles vmalloc'd buffers, there's no
reason to avoid using the stack, e.g. CONFIG_VMAP_STACK=y will just work.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210406224952.4177376-6-seanjc@google.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
drivers/crypto/ccp/sev-dev.c