RE: [PATCH V4 03/11] vfio/pci: Prepare for dynamic interrupt context storage

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

 



> From: Chatre, Reinette <reinette.chatre@xxxxxxxxx>
> Sent: Friday, April 28, 2023 1:36 AM
>
> @@ -55,17 +80,28 @@ static void vfio_send_intx_eventfd(void *opaque,
> void *unused)
>  {
>  	struct vfio_pci_core_device *vdev = opaque;
> 
> -	if (likely(is_intx(vdev) && !vdev->virq_disabled))
> -		eventfd_signal(vdev->ctx[0].trigger, 1);
> +	if (likely(is_intx(vdev) && !vdev->virq_disabled)) {
> +		struct vfio_pci_irq_ctx *ctx;
> +
> +		ctx = vfio_irq_ctx_get(vdev, 0);
> +		if (!ctx)
> +			return;

if this error happens it implies a kernel bug since the same check
has been done in vfio_intx_enable(). Then should be a WARN_ON().

ditto for other intx functions which can be called only after intx
is enabled.




[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