]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virt: sev-guest: Remove is_vmpck_empty() helper
authorNikunj A Dadhania <nikunj@amd.com>
Mon, 6 Jan 2025 12:46:21 +0000 (18:16 +0530)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 7 Jan 2025 07:57:19 +0000 (08:57 +0100)
commit8234177d2027e52126e40472fe5807f4e94b19a3
tree4cfff1630a1fc1e709dd1f293a40826d17d3e008
parent21fc6178e92070523e70fc5db59ac83806d269d6
virt: sev-guest: Remove is_vmpck_empty() helper

Remove is_vmpck_empty() which uses a local array allocation to check if the
VMPCK is empty and replace it with memchr_inv() to directly determine if the
VMPCK is empty without additional memory allocation.

  [ bp: Massage commit message. ]

Suggested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20250106124633.1418972-2-nikunj@amd.com
drivers/virt/coco/sev-guest/sev-guest.c