mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 02:20:40 +00:00
KVM: SVM: Remove the call to sev_platform_status() during setup
commit 9d4747d023
upstream.
When both KVM support and the CCP driver are built into the kernel instead
of as modules, KVM initialization can happen before CCP initialization. As
a result, sev_platform_status() will return a failure when it is called
from sev_hardware_setup(), when this isn't really an error condition.
Since sev_platform_status() doesn't need to be called at this time anyway,
remove the invocation from sev_hardware_setup().
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <618380488358b56af558f2682203786f09a49483.1607620209.git.thomas.lendacky@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
49830b2d1b
commit
711081d7e0
1 changed files with 1 additions and 21 deletions
|
@ -1127,9 +1127,6 @@ void sev_vm_destroy(struct kvm *kvm)
|
|||
|
||||
int __init sev_hardware_setup(void)
|
||||
{
|
||||
struct sev_user_data_status *status;
|
||||
int rc;
|
||||
|
||||
/* Maximum number of encrypted guests supported simultaneously */
|
||||
max_sev_asid = cpuid_ecx(0x8000001F);
|
||||
|
||||
|
@ -1148,26 +1145,9 @@ int __init sev_hardware_setup(void)
|
|||
if (!sev_reclaim_asid_bitmap)
|
||||
return 1;
|
||||
|
||||
status = kmalloc(sizeof(*status), GFP_KERNEL);
|
||||
if (!status)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* Check SEV platform status.
|
||||
*
|
||||
* PLATFORM_STATUS can be called in any state, if we failed to query
|
||||
* the PLATFORM status then either PSP firmware does not support SEV
|
||||
* feature or SEV firmware is dead.
|
||||
*/
|
||||
rc = sev_platform_status(status, NULL);
|
||||
if (rc)
|
||||
goto err;
|
||||
|
||||
pr_info("SEV supported\n");
|
||||
|
||||
err:
|
||||
kfree(status);
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sev_hardware_teardown(void)
|
||||
|
|
Loading…
Reference in a new issue