[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL1PR11MB52713E13EB82604A2599616A8C202@BL1PR11MB5271.namprd11.prod.outlook.com>
Date: Thu, 7 Mar 2024 08:37:53 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Alex Williamson <alex.williamson@...hat.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "eric.auger@...hat.com"
<eric.auger@...hat.com>, "clg@...hat.com" <clg@...hat.com>, "Chatre,
Reinette" <reinette.chatre@...el.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/7] vfio/pci: Lock external INTx masking ops
> From: Alex Williamson <alex.williamson@...hat.com>
> Sent: Thursday, March 7, 2024 5:15 AM
>
> Mask operations through config space changes to DisINTx may race INTx
> configuration changes via ioctl. Create wrappers that add locking for
> paths outside of the core interrupt code.
>
> In particular, irq_type is updated holding igate, therefore testing
> is_intx() requires holding igate. For example clearing DisINTx from
> config space can otherwise race changes of the interrupt configuration.
>
Looks the suspend path still checks irq_type w/o holding igate:
vdev->pm_intx_masked = ((vdev->irq_type == VFIO_PCI_INTX_IRQ_INDEX) &&
vfio_pci_intx_mask(vdev));
Is it with assumption that no change of configuration is possible at
that point?
Powered by blists - more mailing lists