From: Chao Gao <chao.gao@intel.com>
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>, <kvm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Binbin Wu <binbin.wu@linxu.intel.com>,
Rick Edgecombe <rick.p.edgecombe@intel.com>
Subject: Re: [PATCH v2 2/4] KVM: VMX: Move apicv_pre_state_restore to posted_intr.c
Date: Tue, 29 Apr 2025 16:17:24 +0800 [thread overview]
Message-ID: <aBCLFB7BS/vhSAuk@intel.com> (raw)
In-Reply-To: <20250318-vverma7-cleanup_x86_ops-v2-2-701e82d6b779@intel.com>
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@google.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.
next prev parent reply other threads:[~2025-04-29 8:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 6:35 [PATCH v2 0/4] KVM: TDX: Cleanup the kvm_x86_ops structure for vmx/tdx Vishal Verma
2025-03-18 6:35 ` [PATCH v2 1/4] KVM: TDX: Fix definition of tdx_guest_nr_guest_keyids() Vishal Verma
2025-03-18 15:33 ` Edgecombe, Rick P
2025-03-18 16:31 ` Verma, Vishal L
2025-03-18 6:35 ` [PATCH v2 2/4] KVM: VMX: Move apicv_pre_state_restore to posted_intr.c Vishal Verma
2025-04-29 8:17 ` Chao Gao [this message]
2025-04-29 17:25 ` Verma, Vishal L
2025-03-18 6:35 ` [PATCH v2 3/4] KVM: VMX: Make naming consistent for kvm_complete_insn_gp via define Vishal Verma
2025-03-18 6:35 ` [PATCH v2 4/4] KVM: VMX: Clean up and macrofy x86_ops Vishal Verma
2025-05-02 21:51 ` [PATCH v2 0/4] KVM: TDX: Cleanup the kvm_x86_ops structure for vmx/tdx Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aBCLFB7BS/vhSAuk@intel.com \
--to=chao.gao@intel.com \
--cc=binbin.wu@linxu.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox