Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-21 Thread Yan Zhao
On Fri, Jun 19, 2020 at 04:55:34PM -0600, Alex Williamson wrote: > On Wed, 10 Jun 2020 01:23:14 -0400 > Yan Zhao wrote: > > > On Fri, Jun 05, 2020 at 10:13:01AM -0600, Alex Williamson wrote: > > > On Thu, 4 Jun 2020 22:02:31 -0400 > > > Yan Zhao wrote: > > > > > > > On Wed, Jun 03, 2020 at

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-19 Thread Alex Williamson
On Wed, 10 Jun 2020 01:23:14 -0400 Yan Zhao wrote: > On Fri, Jun 05, 2020 at 10:13:01AM -0600, Alex Williamson wrote: > > On Thu, 4 Jun 2020 22:02:31 -0400 > > Yan Zhao wrote: > > > > > On Wed, Jun 03, 2020 at 10:10:58PM -0600, Alex Williamson wrote: > > > > On Wed, 3 Jun 2020 22:42:28

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-09 Thread Yan Zhao
On Fri, Jun 05, 2020 at 10:13:01AM -0600, Alex Williamson wrote: > On Thu, 4 Jun 2020 22:02:31 -0400 > Yan Zhao wrote: > > > On Wed, Jun 03, 2020 at 10:10:58PM -0600, Alex Williamson wrote: > > > On Wed, 3 Jun 2020 22:42:28 -0400 > > > Yan Zhao wrote: > > > > > > > On Wed, Jun 03, 2020 at

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-05 Thread Alex Williamson
On Fri, 5 Jun 2020 00:26:10 + "He, Shaopeng" wrote: > > From: Alex Williamson > > Sent: Thursday, June 4, 2020 12:11 PM > > > > On Wed, 3 Jun 2020 22:42:28 -0400 > > Yan Zhao wrote: > > > > > On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote: > > > > On Tue, 2 Jun 2020

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-05 Thread Alex Williamson
On Thu, 4 Jun 2020 22:02:31 -0400 Yan Zhao wrote: > On Wed, Jun 03, 2020 at 10:10:58PM -0600, Alex Williamson wrote: > > On Wed, 3 Jun 2020 22:42:28 -0400 > > Yan Zhao wrote: > > > > > On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote: > > > > On Tue, 2 Jun 2020 21:40:58

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-04 Thread Yan Zhao
On Wed, Jun 03, 2020 at 10:10:58PM -0600, Alex Williamson wrote: > On Wed, 3 Jun 2020 22:42:28 -0400 > Yan Zhao wrote: > > > On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote: > > > On Tue, 2 Jun 2020 21:40:58 -0400 > > > Yan Zhao wrote: > > > > > > > On Tue, Jun 02, 2020 at

RE: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-04 Thread He, Shaopeng
> From: Alex Williamson > Sent: Thursday, June 4, 2020 12:11 PM > > On Wed, 3 Jun 2020 22:42:28 -0400 > Yan Zhao wrote: > > > On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote: > > > On Tue, 2 Jun 2020 21:40:58 -0400 > > > Yan Zhao wrote: > > > > > > > On Tue, Jun 02, 2020 at

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-03 Thread Alex Williamson
On Wed, 3 Jun 2020 22:42:28 -0400 Yan Zhao wrote: > On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote: > > On Tue, 2 Jun 2020 21:40:58 -0400 > > Yan Zhao wrote: > > > > > On Tue, Jun 02, 2020 at 01:34:35PM -0600, Alex Williamson wrote: > > > > I'm not at all happy with this.

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-03 Thread Yan Zhao
On Wed, Jun 03, 2020 at 05:04:52PM -0600, Alex Williamson wrote: > On Tue, 2 Jun 2020 21:40:58 -0400 > Yan Zhao wrote: > > > On Tue, Jun 02, 2020 at 01:34:35PM -0600, Alex Williamson wrote: > > > I'm not at all happy with this. Why do we need to hide the migration > > > sparse mmap from the

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-03 Thread Alex Williamson
On Tue, 2 Jun 2020 21:40:58 -0400 Yan Zhao wrote: > On Tue, Jun 02, 2020 at 01:34:35PM -0600, Alex Williamson wrote: > > I'm not at all happy with this. Why do we need to hide the migration > > sparse mmap from the user until migration time? What if instead we > > introduced a new

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-02 Thread Yan Zhao
On Tue, Jun 02, 2020 at 01:34:35PM -0600, Alex Williamson wrote: > I'm not at all happy with this. Why do we need to hide the migration > sparse mmap from the user until migration time? What if instead we > introduced a new VFIO_REGION_INFO_CAP_SPARSE_MMAP_SAVING capability > where the existing

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-02 Thread Alex Williamson
On Tue, 2 Jun 2020 04:28:58 -0400 Yan Zhao wrote: > On Mon, Jun 01, 2020 at 10:43:07AM -0600, Alex Williamson wrote: > > On Mon, 1 Jun 2020 02:57:26 -0400 > > Yan Zhao wrote: > > > > > On Fri, May 29, 2020 at 03:45:47PM -0600, Alex Williamson wrote: > > > > On Sun, 17 May 2020 22:52:45

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-02 Thread Yan Zhao
On Mon, Jun 01, 2020 at 10:43:07AM -0600, Alex Williamson wrote: > On Mon, 1 Jun 2020 02:57:26 -0400 > Yan Zhao wrote: > > > On Fri, May 29, 2020 at 03:45:47PM -0600, Alex Williamson wrote: > > > On Sun, 17 May 2020 22:52:45 -0400 > > > Yan Zhao wrote: > > > > > > > This is a virtual irq

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-01 Thread Alex Williamson
On Mon, 1 Jun 2020 02:57:26 -0400 Yan Zhao wrote: > On Fri, May 29, 2020 at 03:45:47PM -0600, Alex Williamson wrote: > > On Sun, 17 May 2020 22:52:45 -0400 > > Yan Zhao wrote: > > > > > This is a virtual irq type. > > > vendor driver triggers this irq when it wants to notify userspace to > >

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-06-01 Thread Yan Zhao
On Fri, May 29, 2020 at 03:45:47PM -0600, Alex Williamson wrote: > On Sun, 17 May 2020 22:52:45 -0400 > Yan Zhao wrote: > > > This is a virtual irq type. > > vendor driver triggers this irq when it wants to notify userspace to > > remap PCI BARs. > > > > 1. vendor driver triggers this irq and

Re: [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-05-29 Thread Alex Williamson
On Sun, 17 May 2020 22:52:45 -0400 Yan Zhao wrote: > This is a virtual irq type. > vendor driver triggers this irq when it wants to notify userspace to > remap PCI BARs. > > 1. vendor driver triggers this irq and packs the target bar number in >the ctx count. i.e. "1 << bar_number". >if

[RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION

2020-05-17 Thread Yan Zhao
This is a virtual irq type. vendor driver triggers this irq when it wants to notify userspace to remap PCI BARs. 1. vendor driver triggers this irq and packs the target bar number in the ctx count. i.e. "1 << bar_number". if a bit is set, the corresponding bar is to be remapped. 2.