All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Gao, Chao" <chao.gao@intel.com>
Cc: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"seanjc@google.com" <seanjc@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"binbin.wu@linxu.intel.com" <binbin.wu@linxu.intel.com>
Subject: Re: [PATCH v2 2/4] KVM: VMX: Move apicv_pre_state_restore to posted_intr.c
Date: Tue, 29 Apr 2025 17:25:40 +0000	[thread overview]
Message-ID: <400a69c2c01a230b8aedf684056bdb21eea13261.camel@intel.com> (raw)
In-Reply-To: <aBCLFB7BS/vhSAuk@intel.com>

On Tue, 2025-04-29 at 16:17 +0800, Chao Gao wrote:
> 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.

Hi Chao,

Thanks for the suggestion, I've added this for the next revision.

> 
> > 
> > Based on a patch by Sean Christopherson <seanjc@google.com>
> 
> You can consider adding his Suggested-by.

Done.

> 
> > -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.

Good find, done.

  reply	other threads:[~2025-04-29 17:25 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
2025-04-29 17:25     ` Verma, Vishal L [this message]
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=400a69c2c01a230b8aedf684056bdb21eea13261.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=binbin.wu@linxu.intel.com \
    --cc=chao.gao@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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.