Re: [RFC PATCH v5 078/104] KVM: TDX: Implement interrupt injection

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

 



Please do not duplicate code, for example:

On 3/4/22 20:49, isaku.yamahata@xxxxxxxxx wrote:
+void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu)
+{
+	struct vcpu_tdx *tdx = to_tdx(vcpu);
+
+	pi_clear_on(&tdx->pi_desc);
+	memset(tdx->pi_desc.pir, 0, sizeof(tdx->pi_desc.pir));
+}

This is the same as vmx_apicv_post_state_restore.  Please write this like:

void vt_apicv_post_state_restore(struct kvm_vcpu *vcpu)
{
	struct pi_desc *pi = vcpu_to_pi_desc(vcpu);
	pi_clear_on(pi);
	memset(pi->pir, 0, sizeof(pi->pir));
}


Otherwise,

Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

Paolo



[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