diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2025-08-28 12:22:04 +0200 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2025-08-28 16:52:05 +0200 |
commit | e2e29752357f32feb69a68e9e6e7361405b3f289 (patch) | |
tree | ba3d1295d204d30c4f7bc249d5680b7fd1a6eb68 /scripts/gdb/linux/modules.py | |
parent | 1b237f190eb3d36f52dffe07a40b5eb210280e00 (diff) |
x86/sev: Separate MSR and GHCB based snp_cpuid() via a callback
There are two distinct callers of snp_cpuid(): the MSR protocol and the GHCB
page based interface.
The snp_cpuid() logic does not care about the distinction, which only matters
at a lower level. But the fact that it supports both interfaces means that the
GHCB page based logic is pulled into the early startup code where PA to VA
conversions are problematic, given that it runs from the 1:1 mapping of memory.
So keep snp_cpuid() itself in the startup code, but factor out the hypervisor
calls via a callback, so that the GHCB page handling can be moved out.
Code refactoring only - no functional change intended.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/20250828102202.1849035-25-ardb+git@google.com
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions