Skip to content
Commit a9ef2774 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Paolo Bonzini
Browse files

x86/kvm: Fix SEV check in sev_map_percpu_data()



The function sev_map_percpu_data() checks if it is running on an SEV
platform by checking the CC_ATTR_GUEST_MEM_ENCRYPT attribute. However,
this attribute is also defined for TDX.

To avoid false positives, add a cc_vendor check.

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fixes: 4d96f910 ("x86/sev: Replace occurrences of sev_active() with cc_platform_has()")
Suggested-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Message-Id: <20240124130317.495519-1-kirill.shutemov@linux.intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent d52734d0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment