[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBCLFB7BS/vhSAuk@intel.com>
Date: Tue, 29 Apr 2025 16:17:24 +0800
From: Chao Gao <chao.gao@...el.com>
To: Vishal Verma <vishal.l.verma@...el.com>
CC: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Binbin Wu <binbin.wu@...xu.intel.com>, Rick Edgecombe
<rick.p.edgecombe@...el.com>
Subject: Re: [PATCH v2 2/4] KVM: VMX: Move apicv_pre_state_restore to
posted_intr.c
On Tue, Mar 18, 2025 at 12:35:07AM -0600, Vishal Verma wrote:
>In preparation for a cleanup of the x86_ops struct for TDX, which turns
>several of the ops definitions to macros, move the
>vt_apicv_pre_state_restore() helper into posted_intr.c.
This doesn't explain how the movement is related to that cleanup.
how about:
In preparation for a cleanup of the kvm_x86_ops struct for TDX, all vt_*
functions are expected to act as glue functions that route to either tdx_*
or vmx_* based on the VM type. Specifically, the pattern is:
vt_abc:
if (is_td())
return tdx_abc();
return vmx_abc();
But vt_apicv_pre_state_restore() does not follow this pattern. To
facilitate that cleanup, rename and move vt_apicv_pre_state_restore() into
posted_intr.c.
>
>Based on a patch by Sean Christopherson <seanjc@...gle.com>
You can consider adding his Suggested-by.
>-static void vt_apicv_pre_state_restore(struct kvm_vcpu *vcpu)
>-{
>- struct pi_desc *pi = vcpu_to_pi_desc(vcpu);
With this removal, vcpu_to_pi_desc() is only used within posted_intr.c. no
need to expose it.
Powered by blists - more mailing lists