* [PATCH] KVM: TDX: Remove always true ifdef
@ 2026-08-26 10:03 Nikolay Borisov
2026-09-18 11:36 ` Nikolay Borisov
2026-09-21 14:05 ` Sean Christopherson
0 siblings, 2 replies; 4+ messages in thread
From: Nikolay Borisov @ 2026-08-26 10:03 UTC (permalink / raw)
To: seanjc; +Cc: pbonzini, kvm, linux-kernel, Nikolay Borisov
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.
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
---
arch/x86/kvm/vmx/main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/main.c b/arch/x86/kvm/vmx/main.c
index f204a0fc0a57..e9cca303c855 100644
--- a/arch/x86/kvm/vmx/main.c
+++ b/arch/x86/kvm/vmx/main.c
@@ -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)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: TDX: Remove always true ifdef
2026-08-26 10:03 [PATCH] KVM: TDX: Remove always true ifdef Nikolay Borisov
@ 2026-09-18 11:36 ` Nikolay Borisov
2026-09-20 1:12 ` Binbin Wu
2026-09-21 14:05 ` Sean Christopherson
1 sibling, 1 reply; 4+ messages in thread
From: Nikolay Borisov @ 2026-09-18 11:36 UTC (permalink / raw)
To: seanjc; +Cc: pbonzini, kvm, linux-kernel
On 26.08.26 г. 13:03 ч., Nikolay Borisov wrote:
> 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.
>
> Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
Gentle ping.
> ---
> arch/x86/kvm/vmx/main.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/main.c b/arch/x86/kvm/vmx/main.c
> index f204a0fc0a57..e9cca303c855 100644
> --- a/arch/x86/kvm/vmx/main.c
> +++ b/arch/x86/kvm/vmx/main.c
> @@ -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)
> {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: TDX: Remove always true ifdef
2026-09-18 11:36 ` Nikolay Borisov
@ 2026-09-20 1:12 ` Binbin Wu
0 siblings, 0 replies; 4+ messages in thread
From: Binbin Wu @ 2026-09-20 1:12 UTC (permalink / raw)
To: Nikolay Borisov; +Cc: seanjc, pbonzini, kvm, linux-kernel
On 9/18/2026 7:36 PM, Nikolay Borisov wrote:
>
>
> On 26.08.26 г. 13:03 ч., Nikolay Borisov wrote:
>> 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.
>>
>> Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
>
> Gentle ping.
BTW, I find the patch has been applied to kvm-x86 next branch already.
>
>
>> ---
>> arch/x86/kvm/vmx/main.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/x86/kvm/vmx/main.c b/arch/x86/kvm/vmx/main.c
>> index f204a0fc0a57..e9cca303c855 100644
>> --- a/arch/x86/kvm/vmx/main.c
>> +++ b/arch/x86/kvm/vmx/main.c
>> @@ -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)
>> {
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: TDX: Remove always true ifdef
2026-08-26 10:03 [PATCH] KVM: TDX: Remove always true ifdef Nikolay Borisov
2026-09-18 11:36 ` Nikolay Borisov
@ 2026-09-21 14:05 ` Sean Christopherson
1 sibling, 0 replies; 4+ messages in thread
From: Sean Christopherson @ 2026-09-21 14:05 UTC (permalink / raw)
To: Sean Christopherson, Nikolay Borisov; +Cc: pbonzini, kvm, linux-kernel
On Wed, 26 Aug 2026 13:03:21 +0300, Nikolay Borisov wrote:
> 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.
>
>
Applied to kvm-x86 vmx, thanks!
[1/1] KVM: TDX: Remove always true ifdef
https://github.com/kvm-x86/linux/commit/363479c41f02
--
https://github.com/kvm-x86/linux/tree/next
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-21 14:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 10:03 [PATCH] KVM: TDX: Remove always true ifdef Nikolay Borisov
2026-09-18 11:36 ` Nikolay Borisov
2026-09-20 1:12 ` Binbin Wu
2026-09-21 14:05 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox