[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200522162545.28bb7db4@x1.home>
Date: Fri, 22 May 2020 16:25:45 -0600
From: Alex Williamson <alex.williamson@...hat.com>
To: Qian Cai <cai@....pw>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
cohuck@...hat.com, jgg@...pe.ca, peterx@...hat.com
Subject: Re: [PATCH v3 0/3] vfio-pci: Block user access to disabled device
MMIO
On Fri, 22 May 2020 18:08:58 -0400
Qian Cai <cai@....pw> wrote:
> On Fri, May 22, 2020 at 01:17:09PM -0600, Alex Williamson wrote:
> > v3:
> >
> > The memory_lock semaphore is only held in the MSI-X path for callouts
> > to functions that may access MSI-X MMIO space of the device, this
> > should resolve the circular locking dependency reported by Qian
> > (re-testing very much appreciated). I've also incorporated the
> > pci_map_rom() and pci_unmap_rom() calls under the memory_lock. Commit
> > 0cfd027be1d6 ("vfio_pci: Enable memory accesses before calling
> > pci_map_rom") made sure memory was enabled on the info path, but did
> > not provide locking to protect that state. The r/w path of the BAR
> > access is expanded to include ROM mapping/unmapping. Unless there
> > are objections, I'll plan to drop v2 from my next branch and replace
> > it with this. Thanks,
>
> FYI, the lockdep warning is gone.
>
Thank you for testing!
Alex
Powered by blists - more mailing lists