Commit 213e0e1f authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini

KVM: SVM: Refactor logging of NPT enabled/disabled

Tweak SVM's logging of NPT enabled/disabled to handle the logging in a
single pr_info() in preparation for merging kvm_enable_tdp() and
kvm_disable_tdp() into a single function.

No functional change intended.
Reviewed-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a1bead2a
...@@ -1455,16 +1455,14 @@ static __init int svm_hardware_setup(void) ...@@ -1455,16 +1455,14 @@ static __init int svm_hardware_setup(void)
if (!boot_cpu_has(X86_FEATURE_NPT)) if (!boot_cpu_has(X86_FEATURE_NPT))
npt_enabled = false; npt_enabled = false;
if (npt_enabled && !npt) { if (npt_enabled && !npt)
printk(KERN_INFO "kvm: Nested Paging disabled\n");
npt_enabled = false; npt_enabled = false;
}
if (npt_enabled) { if (npt_enabled)
printk(KERN_INFO "kvm: Nested Paging enabled\n");
kvm_enable_tdp(); kvm_enable_tdp();
} else else
kvm_disable_tdp(); kvm_disable_tdp();
pr_info("kvm: Nested Paging %sabled\n", npt_enabled ? "en" : "dis");
if (nrips) { if (nrips) {
if (!boot_cpu_has(X86_FEATURE_NRIPS)) if (!boot_cpu_has(X86_FEATURE_NRIPS))
......
Markdown is supported
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