Skip to content

Commit

Permalink
KVM: SVM: Unconditionally invoke sev_hardware_teardown()
Browse files Browse the repository at this point in the history
Remove the redundant svm_sev_enabled() check when calling
sev_hardware_teardown(), the teardown helper itself does the check.
Removing the check from svm.c will eventually allow dropping
svm_sev_enabled() entirely.

No functional change intended.

Reviewed by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210422021125.3417167-11-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Sean Christopherson authored and Paolo Bonzini committed Apr 26, 2021
1 parent 6c2c7bf commit 4cafd0c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kvm/svm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,7 @@ static void svm_hardware_teardown(void)
{
int cpu;

if (svm_sev_enabled())
sev_hardware_teardown();
sev_hardware_teardown();

for_each_possible_cpu(cpu)
svm_cpu_uninit(cpu);
Expand Down

0 comments on commit 4cafd0c

Please sign in to comment.