Message ID | 20210114003708.3798992-10-seanjc@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: SVM: Misc SEV cleanups | expand |
On 1/13/21 6:37 PM, Sean Christopherson wrote: > 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. > > Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> > --- > arch/x86/kvm/svm/svm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c > index f89f702b2a58..bb7b99743bea 100644 > --- a/arch/x86/kvm/svm/svm.c > +++ b/arch/x86/kvm/svm/svm.c > @@ -887,8 +887,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); >
On 1/13/21 6:37 PM, Sean Christopherson wrote: > 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. > > Signed-off-by: Sean Christopherson <seanjc@google.com> > --- > arch/x86/kvm/svm/svm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Brijesh Singh <brijesh.singh@amd.com> > > diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c > index f89f702b2a58..bb7b99743bea 100644 > --- a/arch/x86/kvm/svm/svm.c > +++ b/arch/x86/kvm/svm/svm.c > @@ -887,8 +887,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);
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index f89f702b2a58..bb7b99743bea 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -887,8 +887,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);
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. Signed-off-by: Sean Christopherson <seanjc@google.com> --- arch/x86/kvm/svm/svm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)