Re: [PATCH V2 06/12] virtio_pci: harden MSI-X interrupts

2021-10-18 Thread Jason Wang
On Sat, Oct 16, 2021 at 1:27 AM Michael S. Tsirkin wrote: > > On Fri, Oct 15, 2021 at 05:09:38AM -0700, Dongli Zhang wrote: > > Hi Jason, > > > > On 10/11/21 11:52 PM, Jason Wang wrote: > > > We used to synchronize pending MSI-X irq handlers via > > > synchronize_irq(), this may not work for the

Re: [PATCH 0/5] iommu/virtio: Add identity domains

2021-10-18 Thread Jason Wang
On Mon, Oct 18, 2021 at 11:35 PM Michael S. Tsirkin wrote: > > On Mon, Oct 18, 2021 at 04:23:41PM +0100, Jean-Philippe Brucker wrote: > > On Thu, Oct 14, 2021 at 03:00:38AM +, Tian, Kevin wrote: > > > > From: Jean-Philippe Brucker > > > > Sent: Wednesday, October 13, 2021 8:11 PM > > > > > >

Re: [PATCH 1/5] iova: Move fast alloc size roundup into alloc_iova_fast()

2021-10-18 Thread Michael S. Tsirkin
On Fri, Sep 24, 2021 at 06:01:53PM +0800, John Garry wrote: > It really is a property of the IOVA rcache code that we need to alloc a > power-of-2 size, so relocate the functionality to resize into > alloc_iova_fast(), rather than the callsites. > > Signed-off-by: John Garry for vdpa code:

Re: [PATCH 0/5] iommu/virtio: Add identity domains

2021-10-18 Thread Michael S. Tsirkin
On Mon, Oct 18, 2021 at 04:23:41PM +0100, Jean-Philippe Brucker wrote: > On Thu, Oct 14, 2021 at 03:00:38AM +, Tian, Kevin wrote: > > > From: Jean-Philippe Brucker > > > Sent: Wednesday, October 13, 2021 8:11 PM > > > > > > Support identity domains, allowing to only enable IOMMU protection

Re: [PATCH 0/5] iommu/virtio: Add identity domains

2021-10-18 Thread Jean-Philippe Brucker
On Thu, Oct 14, 2021 at 03:00:38AM +, Tian, Kevin wrote: > > From: Jean-Philippe Brucker > > Sent: Wednesday, October 13, 2021 8:11 PM > > > > Support identity domains, allowing to only enable IOMMU protection for a > > subset of endpoints (those assigned to userspace, for example). Users >

Re: [PATCH v5 12/16] PCI: Add pci_iomap_host_shared(), pci_iomap_host_shared_range()

2021-10-18 Thread Michael S. Tsirkin
On Mon, Oct 18, 2021 at 02:15:47PM +0200, Greg KH wrote: > On Mon, Oct 11, 2021 at 07:59:17AM -0400, Michael S. Tsirkin wrote: > > On Sun, Oct 10, 2021 at 03:22:39PM -0700, Andi Kleen wrote: > > > > > > > To which Andi replied > > > > One problem with removing the ioremap opt-in is that >

Re: [PATCH v5 12/16] PCI: Add pci_iomap_host_shared(), pci_iomap_host_shared_range()

2021-10-18 Thread Greg KH
On Mon, Oct 11, 2021 at 07:59:17AM -0400, Michael S. Tsirkin wrote: > On Sun, Oct 10, 2021 at 03:22:39PM -0700, Andi Kleen wrote: > > > > > To which Andi replied > > > One problem with removing the ioremap opt-in is that > > > it's still possible for drivers to get at devices without going

Re: [PATCH v5 12/16] PCI: Add pci_iomap_host_shared(), pci_iomap_host_shared_range()

2021-10-18 Thread Greg KH
On Tue, Oct 12, 2021 at 11:35:04AM -0700, Andi Kleen wrote: > > I'd rather see more concerted efforts focused/limited core changes > > rather than leaf driver changes until there is a clearer definition of > > hardened. > > A hardened driver is a driver that Ah, you do define this, thank you! >

Re: [PATCH v5 12/16] PCI: Add pci_iomap_host_shared(), pci_iomap_host_shared_range()

2021-10-18 Thread Greg KH
On Sun, Oct 10, 2021 at 03:11:23PM -0700, Andi Kleen wrote: > > On 10/9/2021 1:39 PM, Dan Williams wrote: > > On Sat, Oct 9, 2021 at 2:53 AM Michael S. Tsirkin wrote: > > > On Fri, Oct 08, 2021 at 05:37:07PM -0700, Kuppuswamy Sathyanarayanan > > > wrote: > > > > From: Andi Kleen > > > > > > >

Re: [PATCH 0/5] iommu/virtio: Add identity domains

2021-10-18 Thread j...@8bytes.org
On Thu, Oct 14, 2021 at 03:00:38AM +, Tian, Kevin wrote: > I saw a concept of deferred attach in iommu core. See iommu_is_ > attach_deferred(). Currently this is vendor specific and I haven't > looked into the exact reason why some vendor sets it now. Just > be curious whether the same reason

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-18 Thread Stefano Garzarella
On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote: This will enable cleanups down the road. The idea is to disable cbs, then add "flush_queued_cbs" callback as a parameter, this way drivers can flush any work queued after callbacks have been disabled. Signed-off-by: Michael S.

Re: [PATCH v4 3/3] vdpa: Check for iova range at mappings changes

2021-10-18 Thread Stefano Garzarella
On Thu, Oct 14, 2021 at 04:12:36PM +0200, Eugenio Pérez wrote: Check vdpa device range before updating memory regions so we don't add any outside of it, and report the invalid change if any. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 2 ++ hw/virtio/vhost-vdpa.c

Re: [PATCH v4 2/3] vdpa: Add vhost_vdpa_section_end

2021-10-18 Thread Stefano Garzarella
On Thu, Oct 14, 2021 at 04:12:35PM +0200, Eugenio Pérez wrote: Abstract this operation, that will be reused when validating the region against the iova range that the device supports. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 22 +++--- 1

Re: [PATCH v4 1/3] vdpa: Skip protected ram IOMMU mappings

2021-10-18 Thread Stefano Garzarella
On Thu, Oct 14, 2021 at 04:12:34PM +0200, Eugenio Pérez wrote: Following the logic of commit 56918a126ae ("memory: Add RAM_PROTECTED flag to skip IOMMU mappings") with VFIO, skip memory sections inaccessible via normal mechanisms, including DMA. Signed-off-by: Eugenio Pérez Acked-by: Jason

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-18 Thread Stefan Hajnoczi
On Wed, Oct 13, 2021 at 06:55:31AM -0400, Michael S. Tsirkin wrote: > This will enable cleanups down the road. > The idea is to disable cbs, then add "flush_queued_cbs" callback > as a parameter, this way drivers can flush any work > queued after callbacks have been disabled. > > Signed-off-by:

Re: [GIT PULL] virtio,vdpa: fixes

2021-10-18 Thread pr-tracker-bot
The pull request you sent on Sun, 17 Oct 2021 10:49:00 -0400: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/3bb50f8530c9cb5ec69c0744b7fd32d0ca404254 Thank you! -- Deet-doot-dot, I am a