Re: [PATCH v2 2/4] KVM: VMX: Move apicv_pre_state_restore to posted_intr.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux