KVM: TDX: Remove always true ifdef
PATCH 1/1 KVM: TDX: Remove always true ifdef
CONFIG_KVM_INTEL_TDX depends on KVM_TDX_HOST, which in turn depends on CONFIG_X86_64. So it's guaranteed that any code under ifdef CONFIG_KVM_INTEL_TDX is also running under CONFIG_X86_64 being true, remove pointless ifdef guard.
--- arch/x86/kvm/vmx/main.c | 2 -- 1 file changed, 2 deletions(-)
arch/x86/kvm/vmx/main.c +0 -2
@@ -799,7 +799,6 @@ static void vt_write_tsc_multiplier(struct kvm_vcpu *vcpu)vmx_write_tsc_multiplier (vcpu); } -#ifdef CONFIG_X86_64 static int vt_set_hv_timer (struct kvm_vcpu *vcpu,u64 guest_deadline_tsc,bool *expired) {
@@ -818,7 +817,6 @@ static void vt_cancel_hv_timer(struct kvm_vcpu *vcpu)vmx_cancel_hv_timer (vcpu); } -#endif static void vt_setup_mce (struct kvm_vcpu *vcpu) {
Signature · 1 line
2.34.1
Quoted 6 lines · Nikolay Borisov
CONFIG_KVM_INTEL_TDXdepends onKVM_TDX_HOST, which in turn depends onCONFIG_X86_64. So it's guaranteed that any code under ifdefCONFIG_KVM_INTEL_TDXis also running underCONFIG_X86_64being true, remove pointless ifdef guard.Signed-off-by Nikolay Borisov <[email protected]>
Gentle ping.
Quoted 24 lines
--- arch/x86/kvm/vmx/main.c | 2 -- 1 file changed, 2 deletions(-)arch/x86/kvm/vmx/main.c +0
-2@@ -799,7 +799,6 @@ static void vt_write_tsc_multiplier(struct kvm_vcpu *vcpu)vmx_write_tsc_multiplier (vcpu); } -#ifdef CONFIG_X86_64 static int vt_set_hv_timer (struct kvm_vcpu *vcpu,u64 guest_deadline_tsc,bool *expired) {@@ -818,7 +817,6 @@ static void vt_cancel_hv_timer(struct kvm_vcpu *vcpu)vmx_cancel_hv_timer (vcpu); } -#endif static void vt_setup_mce (struct kvm_vcpu *vcpu) {
Binbin Wu
Reviewed-byQuoted 9 lines · Nikolay Borisov
Quoted 6 lines · Nikolay Borisov
CONFIG_KVM_INTEL_TDXdepends onKVM_TDX_HOST, which in turn depends onCONFIG_X86_64. So it's guaranteed that any code under ifdefCONFIG_KVM_INTEL_TDXis also running underCONFIG_X86_64being true, remove pointless ifdef guard.Signed-off-by Nikolay Borisov <[email protected]>
Quoted 2 lines
Gentle ping.
BTW, I find the patch has been applied to kvm-x86 next branch already.
Quoted 24 lines
Quoted 23 lines
---
arch/x86/kvm/vmx/main.c| 2 --1 file changed, 2 deletions(-)arch/x86/kvm/vmx/main.c +0
-0@@ -799,7 +799,6 @@ static void vt_write_tsc_multiplier(struct kvm_vcpu *vcpu) vmx_write_tsc_multiplier(vcpu); }-#ifdef
CONFIG_X86_64
static intvt_set_hv_timer(struct kvm_vcpu *vcpu, u64 guest_deadline_tsc, bool *expired)
{arch/x86/kvm/vmx/main.c +0
-1@@ -818,7 +817,6 @@ static void vt_cancel_hv_timer(struct kvm_vcpu *vcpu) vmx_cancel_hv_timer(vcpu); } -#endif static void vt_setup_mce(struct kvm_vcpu *vcpu) {
Quoted 6 lines · Nikolay Borisov
CONFIG_KVM_INTEL_TDXdepends onKVM_TDX_HOST, which in turn depends onCONFIG_X86_64. So it's guaranteed that any code under ifdefCONFIG_KVM_INTEL_TDXis also running underCONFIG_X86_64being true, remove pointless ifdef guard.
Applied to kvm-x86 vmx, thanks!
[1/1] KVM: TDX: Remove always true ifdef
https://github.com/kvm-x86/linux/commit/363479c41f02