QEMU v5.2.0: object_new_with_type: assertion failed: (type != NULL)

2021-02-05 Thread Bharat Bhushan
Hi All, I am using QEMU version "v5.2.0" and getting below error when running on arm64 $ qemu-system-aarch64 --version ERROR:../qom/object.c:711:object_new_with_type: assertion failed: (type != NULL) Bail out! ERROR:../qom/object.c:711:object_new_with_type: assertion failed: (type != NULL)

RE: [EXT] [PATCH v2 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-11 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric > Sent: Tuesday, May 12, 2020 8:39 AM > To: Bharat Bhushan ; eric.auger@gmail.com; > qemu-devel@nongnu.org; qemu-...@nongnu.org; peter.mayd...@linaro.org; > m...@redhat.com; jean-phili...@linaro.org; pet...

RE: [EXT] [PATCH v2 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-11 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric > Sent: Monday, May 11, 2020 2:19 PM > To: Bharat Bhushan ; eric.auger@gmail.com; > qemu-devel@nongnu.org; qemu-...@nongnu.org; peter.mayd...@linaro.org; > m...@redhat.com; jean-phili...@linaro.org; pet...

RE: [EXT] [PATCH v2 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-11 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric > Sent: Monday, May 11, 2020 12:26 PM > To: Bharat Bhushan ; eric.auger@gmail.com; > qemu-devel@nongnu.org; qemu-...@nongnu.org; peter.mayd...@linaro.org; > m...@redhat.com; jean-phili...@linaro.org; pet...

RE: [EXT] [PATCH v2 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-11 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Eric Auger > Sent: Friday, May 8, 2020 11:01 PM > To: eric.auger@gmail.com; eric.au...@redhat.com; qemu-devel@nongnu.org; > qemu-...@nongnu.org; peter.mayd...@linaro.org; m...@redhat.com; jean- > phili...@linaro.org; Bhar

Re: [EXT] Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-05-05 Thread Bharat Bhushan
Hi Eric, On Tue, May 5, 2020 at 3:16 PM Bharat Bhushan wrote: > > hi Eric, > > On Tue, May 5, 2020 at 3:00 PM Auger Eric wrote: > > > > Hi Bharat, > > > > On 5/5/20 11:25 AM, Bharat Bhushan wrote: > > > Hi Eric, > > > > > > On F

Re: [EXT] Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-05-05 Thread Bharat Bhushan
hi Eric, On Tue, May 5, 2020 at 3:00 PM Auger Eric wrote: > > Hi Bharat, > > On 5/5/20 11:25 AM, Bharat Bhushan wrote: > > Hi Eric, > > > > On Fri, Apr 24, 2020 at 7:47 PM Auger Eric wrote: > >> > >> Hi Bharat, > >> > >

Re: [EXT] Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-05-05 Thread Bharat Bhushan
Hi Eric, On Fri, Apr 24, 2020 at 7:47 PM Auger Eric wrote: > > Hi Bharat, > > On 4/2/20 11:01 AM, Bharat Bhushan wrote: > > Hi Eric/Alex, > > > >> -Original Message- > >> From: Alex Williamson > >> Sent: Thursday, March 26, 2020 11

Re: [PATCH v9 8/9] virtio-iommu: Implement probe request

2020-05-05 Thread Bharat Bhushan
On Fri, Apr 24, 2020 at 7:22 PM Auger Eric wrote: > > Hi Bharat, > On 4/23/20 6:09 PM, Jean-Philippe Brucker wrote: > > Hi Bharat, > > > > A few more things found while rebasing > > > > On Mon, Mar 23, 2020 at 02:16:16PM +0530, Bharat Bhushan wrote: >

RE: [EXT] Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-04-02 Thread Bharat Bhushan
Hi Eric/Alex, > -Original Message- > From: Alex Williamson > Sent: Thursday, March 26, 2020 11:23 PM > To: Auger Eric > Cc: Bharat Bhushan ; peter.mayd...@linaro.org; > pet...@redhat.com; eric.auger@gmail.com; kevin.t...@intel.com; > m...@redhat.com; Tomasz

RE: [EXT] Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-03-26 Thread Bharat Bhushan
Hi Alex, Eric, > -Original Message- > From: Alex Williamson > Sent: Thursday, March 26, 2020 11:23 PM > To: Auger Eric > Cc: Bharat Bhushan ; peter.mayd...@linaro.org; > pet...@redhat.com; eric.auger@gmail.com; kevin.t...@intel.com; > m...@redhat.com; Tomasz

RE: [EXT] Re: [PATCH v9 8/9] virtio-iommu: Implement probe request

2020-03-26 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric > Sent: Thursday, March 26, 2020 9:18 PM > To: Bharat Bhushan ; peter.mayd...@linaro.org; > pet...@redhat.com; eric.auger@gmail.com; alex.william...@redhat.com; > kevin.t...@intel.com; m...@redhat.com; Tomasz No

RE: [EXT] Re: [PATCH v9 2/9] memory: Add interface to set iommu page size mask

2020-03-26 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric > Sent: Thursday, March 26, 2020 9:36 PM > To: Bharat Bhushan ; peter.mayd...@linaro.org; > pet...@redhat.com; eric.auger@gmail.com; alex.william...@redhat.com; > kevin.t...@intel.com; m...@redhat.com; Tomasz No

RE: [EXT] Re: [PATCH v9 4/9] virtio-iommu: set supported page size mask

2020-03-26 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric > Sent: Thursday, March 26, 2020 9:22 PM > To: Bharat Bhushan ; peter.mayd...@linaro.org; > pet...@redhat.com; eric.auger@gmail.com; alex.william...@redhat.com; > kevin.t...@intel.com; m...@redhat.com; Tomasz No

[PATCH v9 8/9] virtio-iommu: Implement probe request

2020-03-23 Thread Bharat Bhushan
This patch implements the PROBE request. Currently supported page size mask per endpoint is returned. Also append a NONE property in the end. Signed-off-by: Bharat Bhushan Signed-off-by: Eric Auger --- include/standard-headers/linux/virtio_iommu.h | 6 + hw/virtio/virtio-iommu.c

[PATCH v9 9/9] virtio-iommu: add iommu notifier memory-region

2020-03-23 Thread Bharat Bhushan
Finally add notify_flag_changed() to for memory-region access flag iommu flag change notifier Finally add the memory notifier Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 22 ++ hw/virtio/trace-events | 2 ++ 2 files changed, 24 insertions(+) diff --git

[PATCH v9 6/9] virtio-iommu: Call iommu notifier for attach/detach

2020-03-23 Thread Bharat Bhushan
iommu-notifier are called when a device is attached or detached to as address-space. This is needed for VFIO. Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 49 1 file changed, 49 insertions(+) diff --git a/hw/virtio/virtio-iommu.c b/hw

[PATCH v9 7/9] virtio-iommu: add iommu replay

2020-03-23 Thread Bharat Bhushan
Default replay does not work with virtio-iommu, so this patch provide virtio-iommu replay functionality. Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 44 hw/virtio/trace-events | 1 + 2 files changed, 45 insertions(+) diff --git a/hw

[PATCH v9 4/9] virtio-iommu: set supported page size mask

2020-03-23 Thread Bharat Bhushan
Add optional interface to set page size mask. Currently this is set global configuration and not per endpoint. Signed-off-by: Bharat Bhushan --- include/hw/virtio/virtio-iommu.h | 1 + hw/virtio/virtio-iommu.c | 9 + 2 files changed, 10 insertions(+) diff --git a/include/hw

[PATCH v9 5/9] virtio-iommu: Add iommu notifier for map/unmap

2020-03-23 Thread Bharat Bhushan
This patch extends VIRTIO_IOMMU_T_MAP/UNMAP request to notify registered iommu-notifier. Which will call vfio notifier to map/unmap region in iommu. Signed-off-by: Bharat Bhushan Signed-off-by: Eric Auger --- include/hw/virtio/virtio-iommu.h | 2 + hw/virtio/virtio-iommu.c | 67

[PATCH v9 0/9] virtio-iommu: VFIO integration

2020-03-23 Thread Bharat Bhushan
This patch series integrates VFIO with virtio-iommu. This is only applicable for PCI pass-through with virtio-iommu. This series is available at: https://github.com/bharat-bhushan-devel/qemu.git virtio-iommu-vfio-integration-v8 This is tested with assigning more than one pci devices to Virtual

[PATCH v9 3/9] vfio: set iommu page size as per host supported page size

2020-03-23 Thread Bharat Bhushan
Set iommu supported page size mask same as host Linux supported page size mask. Signed-off-by: Bharat Bhushan --- hw/vfio/common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index c586edf47a..6ea50d696f 100644 --- a/hw/vfio/common.c +++ b/hw/vfio

[PATCH v9 2/9] memory: Add interface to set iommu page size mask

2020-03-23 Thread Bharat Bhushan
Allow to set page size mask to be supported by iommu. This is required to expose page size mask compatible with host with virtio-iommu. Signed-off-by: Bharat Bhushan --- include/exec/memory.h | 20 memory.c | 10 ++ 2 files changed, 30 insertions

[PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-03-23 Thread Bharat Bhushan
On ARM, the MSI doorbell is translated by the virtual IOMMU. As such address_space_translate() returns the MSI controller MMIO region and we get an "iommu map to non memory area" message. Let's remove this latter. Signed-off-by: Eric Auger Signed-off-by: Bharat Bhushan --- hw/vfio/co

Re: [PATCH v8 4/8] virtio-iommu: set supported page size mask

2020-03-23 Thread Bharat Bhushan
Hi Eric/Jean, On Wed, Mar 18, 2020 at 8:05 PM Bharat Bhushan wrote: > > Hi Eric, > > On Wed, Mar 18, 2020 at 4:58 PM Auger Eric wrote: > > > > Hi Bharat, > > > > On 3/18/20 11:11 AM, Bharat Bhushan wrote: > > > Add optional interface to set page

Re: [PATCH v8 4/8] virtio-iommu: set supported page size mask

2020-03-18 Thread Bharat Bhushan
Hi Eric, On Wed, Mar 18, 2020 at 4:58 PM Auger Eric wrote: > > Hi Bharat, > > On 3/18/20 11:11 AM, Bharat Bhushan wrote: > > Add optional interface to set page size mask. > > Currently this is set global configuration and not > > per endpoint. > &g

RE: [EXT] Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-18 Thread Bharat Bhushan
> -Original Message- > From: Jean-Philippe Brucker > Sent: Wednesday, March 18, 2020 4:48 PM > To: Bharat Bhushan > Cc: Auger Eric ; Peter Maydell > ; kevin.t...@intel.com; Tomasz Nowicki [C] > ; m...@redhat.com; drjo...@redhat.com; > pet...@redhat.co

Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-18 Thread Bharat Bhushan
Hi Jean, On Tue, Mar 17, 2020 at 9:29 PM Jean-Philippe Brucker wrote: > > On Tue, Mar 17, 2020 at 02:46:55PM +0530, Bharat Bhushan wrote: > > Hi Jean, > > > > On Tue, Mar 17, 2020 at 2:23 PM Jean-Philippe Brucker > > wrote: > > > > > > On Tue,

[PATCH v8 8/8] virtio-iommu: add iommu notifier memory-region

2020-03-18 Thread Bharat Bhushan
Finally add notify_flag_changed() to for memory-region access flag iommu flag change notifier Finally add the memory notifier Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 22 ++ hw/virtio/trace-events | 2 ++ 2 files changed, 24 insertions(+) diff --git

[PATCH v8 6/8] virtio-iommu: Call iommu notifier for attach/detach

2020-03-18 Thread Bharat Bhushan
iommu-notifier are called when a device is attached or detached to as address-space. This is needed for VFIO. Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 49 1 file changed, 49 insertions(+) diff --git a/hw/virtio/virtio-iommu.c b/hw

[PATCH v8 7/8] virtio-iommu: add iommu replay

2020-03-18 Thread Bharat Bhushan
Default replay does not work with virtio-iommu, so this patch provide virtio-iommu replay functionality. Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 44 hw/virtio/trace-events | 1 + 2 files changed, 45 insertions(+) diff --git a/hw

[PATCH v8 5/8] virtio-iommu: Add iommu notifier for map/unmap

2020-03-18 Thread Bharat Bhushan
This patch extends VIRTIO_IOMMU_T_MAP/UNMAP request to notify registered iommu-notifier. Which will call vfio notifier to map/unmap region in iommu. Signed-off-by: Bharat Bhushan Signed-off-by: Eric Auger --- include/hw/virtio/virtio-iommu.h | 2 + hw/virtio/virtio-iommu.c | 67

[PATCH v8 2/8] memory: Add interface to set iommu page size mask

2020-03-18 Thread Bharat Bhushan
Allow to set page size mask to be supported by iommu. This is required to expose page size mask compatible with host with virtio-iommu. Signed-off-by: Bharat Bhushan --- v7->v8: - new patch include/exec/memory.h | 20 memory.c | 10 ++ 2 files chan

[PATCH v8 3/8] vfio: set iommu page size as per host supported page size

2020-03-18 Thread Bharat Bhushan
Set iommu supported page size mask same as host Linux supported page size mask. Signed-off-by: Bharat Bhushan --- v7->v8: - new patch hw/vfio/common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index c586edf47a..6ea50d696f 100644 --- a/hw/v

[PATCH v8 0/8] virtio-iommu: VFIO integration

2020-03-18 Thread Bharat Bhushan
This patch series integrates VFIO with virtio-iommu. This is only applicable for PCI pass-through with virtio-iommu. This series is available at: https://github.com/bharat-bhushan-devel/qemu.git virtio-iommu-vfio-integration-v8 This is tested with assigning more than one pci devices to Virtual

[PATCH v8 1/8] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-03-18 Thread Bharat Bhushan
On ARM, the MSI doorbell is translated by the virtual IOMMU. As such address_space_translate() returns the MSI controller MMIO region and we get an "iommu map to non memory area" message. Let's remove this latter. Signed-off-by: Eric Auger Signed-off-by: Bharat Bhushan --- hw/vfio/co

[PATCH v8 4/8] virtio-iommu: set supported page size mask

2020-03-18 Thread Bharat Bhushan
Add optional interface to set page size mask. Currently this is set global configuration and not per endpoint. Signed-off-by: Bharat Bhushan --- v7->v8: - new patch hw/virtio/virtio-iommu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/virtio/virtio-iommu.c b/hw/vir

Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-17 Thread Bharat Bhushan
Hi Jean, On Tue, Mar 17, 2020 at 2:23 PM Jean-Philippe Brucker wrote: > > On Tue, Mar 17, 2020 at 12:40:39PM +0530, Bharat Bhushan wrote: > > Hi Jean, > > > > On Mon, Mar 16, 2020 at 3:41 PM Jean-Philippe Brucker > > wrote: > > > > > > Hi Bharat,

Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-17 Thread Bharat Bhushan
r 16, 2020 at 02:40:00PM +0530, Bharat Bhushan wrote: > > > >>> First issue is: your guest can use 4K page and your host can use 64KB > > > >>> pages. In that case VFIO_DMA_MAP will fail with -EINVAL. We must > > > >>> devise > > > &

Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-16 Thread Bharat Bhushan
Hi Eric, On Mon, Mar 16, 2020 at 1:15 PM Bharat Bhushan wrote: > > Hi Eric, > > On Mon, Mar 16, 2020 at 1:02 PM Auger Eric wrote: > > > > Hi Bharat, > > > > On 3/16/20 7:41 AM, Bharat Bhushan wrote: > > > Hi Eric, > > > > > > On F

Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-16 Thread Bharat Bhushan
Hi Eric, On Mon, Mar 16, 2020 at 2:35 PM Auger Eric wrote: > > Hi Bharat, > > On 3/16/20 9:58 AM, Bharat Bhushan wrote: > > Hi Eric, > > > > On Mon, Mar 16, 2020 at 1:15 PM Bharat Bhushan > > wrote: > >> > >> Hi Eric, > >> > &g

Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-16 Thread Bharat Bhushan
Hi Eric, On Mon, Mar 16, 2020 at 1:02 PM Auger Eric wrote: > > Hi Bharat, > > On 3/16/20 7:41 AM, Bharat Bhushan wrote: > > Hi Eric, > > > > On Fri, Mar 13, 2020 at 8:11 PM Auger Eric wrote: > >> > >> Hi Bharat > >> > >> On 3/13

Re: [PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-16 Thread Bharat Bhushan
Hi Eric, On Fri, Mar 13, 2020 at 8:11 PM Auger Eric wrote: > > Hi Bharat > > On 3/13/20 8:48 AM, Bharat Bhushan wrote: > > iommu-notifier are called when a device is attached > IOMMU notifiers > > or detached to as address-space. > > This is needed for VFIO. >

Re: [PATCH v7 2/5] virtio-iommu: Add iommu notifier for map/unmap

2020-03-16 Thread Bharat Bhushan
Hi Eric, On Fri, Mar 13, 2020 at 7:55 PM Auger Eric wrote: > > Hi Bharat, > On 3/13/20 8:48 AM, Bharat Bhushan wrote: > > This patch extends VIRTIO_IOMMU_T_MAP/UNMAP request to > > notify registered iommu-notifier. Which will call vfio > s/iommu-notifier/iommu-notifiers &

[PATCH v7 4/5] virtio-iommu: add iommu replay

2020-03-13 Thread Bharat Bhushan
Default replay does not work with virtio-iommu, so this patch provide virtio-iommu replay functionality. Signed-off-by: Bharat Bhushan --- hw/virtio/trace-events | 1 + hw/virtio/virtio-iommu.c | 44 2 files changed, 45 insertions(+) diff --git a/hw

[PATCH v7 5/5] virtio-iommu: add iommu notifier memory-region

2020-03-13 Thread Bharat Bhushan
Finally add notify_flag_changed() to for memory-region access flag iommu flag change notifier Finally add the memory notifier Signed-off-by: Bharat Bhushan --- hw/virtio/trace-events | 2 ++ hw/virtio/virtio-iommu.c | 32 2 files changed, 34 insertions

[PATCH v7 2/5] virtio-iommu: Add iommu notifier for map/unmap

2020-03-13 Thread Bharat Bhushan
This patch extends VIRTIO_IOMMU_T_MAP/UNMAP request to notify registered iommu-notifier. Which will call vfio notifier to map/unmap region in iommu. Signed-off-by: Bharat Bhushan Signed-off-by: Eric Auger --- hw/virtio/trace-events | 2 + hw/virtio/virtio-iommu.c | 66

[PATCH v7 0/5] virtio-iommu: VFIO integration

2020-03-13 Thread Bharat Bhushan
This patch series integrates VFIO with virtio-iommu. This is only applicable for PCI pass-through with virtio-iommu. This series is available at: https://github.com/bharat-bhushan-devel/qemu.git virtio-iommu-vfio-integration-v7 This is tested with assigning more than one pci devices to Virtual

[PATCH V6 0/5] virtio-iommu: VFIO integration

2020-03-13 Thread Bharat Bhushan
This patch series integrates VFIO with virtio-iommu. This is only applicable for PCI pass-through with virtio-iommu. This series is available at: https://github.com/bharat-bhushan-devel/qemu.git virtio-iommu-vfio-integration-v6 This is tested with assigning more than one pci devices to Virtual

[PATCH v7 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-13 Thread Bharat Bhushan
iommu-notifier are called when a device is attached or detached to as address-space. This is needed for VFIO. Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 47 1 file changed, 47 insertions(+) diff --git a/hw/virtio/virtio-iommu.c b/hw

[PATCH v6 1/5] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-03-13 Thread Bharat Bhushan
On ARM, the MSI doorbell is translated by the virtual IOMMU. As such address_space_translate() returns the MSI controller MMIO region and we get an "iommu map to non memory area" message. Let's remove this latter. Signed-off-by: Eric Auger Signed-off-by: Bharat Bhushan --- hw/vfio/co

[PATCH v6 4/5] virtio-iommu: add iommu replay

2020-03-13 Thread Bharat Bhushan
Default replay does not work with virtio-iommu, so this patch provide virtio-iommu replay functionality. Signed-off-by: Bharat Bhushan --- hw/virtio/trace-events | 1 + hw/virtio/virtio-iommu.c | 44 2 files changed, 45 insertions(+) diff --git a/hw

[PATCH v6 3/5] virtio-iommu: Call iommu notifier for attach/detach

2020-03-13 Thread Bharat Bhushan
iommu-notifier are called when a device is attached or detached to as address-space. This is needed for VFIO. Signed-off-by: Bharat Bhushan --- hw/virtio/virtio-iommu.c | 47 1 file changed, 47 insertions(+) diff --git a/hw/virtio/virtio-iommu.c b/hw

[PATCH v7 1/5] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-03-13 Thread Bharat Bhushan
On ARM, the MSI doorbell is translated by the virtual IOMMU. As such address_space_translate() returns the MSI controller MMIO region and we get an "iommu map to non memory area" message. Let's remove this latter. Signed-off-by: Eric Auger Signed-off-by: Bharat Bhushan --- hw/vfio/co

[PATCH v6 5/5] virtio-iommu: add iommu notifier memory-region

2020-03-13 Thread Bharat Bhushan
Finally add notify_flag_changed() to for memory-region access flag iommu flag change notifier Finally add the memory notifier Signed-off-by: Bharat Bhushan --- hw/virtio/trace-events | 2 ++ hw/virtio/virtio-iommu.c | 32 2 files changed, 34 insertions

[PATCH v6 2/5] virtio-iommu: Add iommu notifier for map/unmap

2020-03-13 Thread Bharat Bhushan
This patch extends VIRTIO_IOMMU_T_MAP/UNMAP request to notify registered iommu-notifier. Which will call vfio notifier to map/unmap region in iommu. Signed-off-by: Bharat Bhushan Signed-off-by: Eric Auger --- hw/virtio/trace-events | 2 + hw/virtio/virtio-iommu.c | 66

Re: [Qemu-devel] [PATCH RFC v5 0/5] virtio-iommu: VFIO integration

2020-03-02 Thread Bharat Bhushan
Hi Eric, On Fri, Feb 28, 2020 at 3:06 PM Auger Eric wrote: > Hi Bharat, > > On 11/27/18 7:52 AM, Bharat Bhushan wrote: > > This patch series integrates VFIO with virtio-iommu. This is > > tested with assigning 2 pci devices to Virtual Machine. > > > > This versi

Re: [Qemu-devel] [RFC v9 00/17] VIRTIO-IOMMU device

2018-11-26 Thread Bharat Bhushan
.com > Cc: kevin.t...@intel.com; t...@semihalf.com; Bharat Bhushan > ; pet...@redhat.com > Subject: [RFC v9 00/17] VIRTIO-IOMMU device > > This series rebases the virtio-iommu device on qemu 3.1.0-rc2 and > implements the v0.8(.1) virtio-iommu spec [1]. The pci proxy for the vir

Re: [Qemu-devel] [RFC v9 15/17] hw/arm/virt: Add the virtio-iommu device tree mappings

2018-11-26 Thread Bharat Bhushan
.com > Cc: kevin.t...@intel.com; t...@semihalf.com; Bharat Bhushan > ; pet...@redhat.com > Subject: [RFC v9 15/17] hw/arm/virt: Add the virtio-iommu device tree > mappings > > Adds the "virtio,pci-iommu" node in the host bridge node and the RID > mapping, excluding the IOM

[Qemu-devel] [PATCH RFC v5 4/5] virtio-iommu: add virtio-iommu replay

2018-11-26 Thread Bharat Bhushan
stered before it is called. So having replay of virtio-iommu helps to take no action if device not yet probed/attached. Signed-off-by: Bharat Bhushan --- v4->v5: - Rebase to v9 version from Eric (no change) hw/virtio/trace-events | 1 + hw/virtio/virtio-iommu.c | 38 +

[Qemu-devel] [PATCH RFC v5 5/5] virtio-iommu: handle IOMMU Notifier flag changes

2018-11-26 Thread Bharat Bhushan
Finally handle the IOMMU Notifier flag changes for the iommu-memory region. Signed-off-by: Bharat Bhushan --- v4->v5: - Rebase to v9 version from Eric (no change) hw/virtio/trace-events | 2 ++ hw/virtio/virtio-iommu.c | 31 +++ 2 files changed, 33 inserti

[Qemu-devel] [PATCH RFC v5 3/5] virtio-iommu: Call iommu notifier on attach/detach

2018-11-26 Thread Bharat Bhushan
This patch extend the ATTACH/DETACH command handling to call iommu-notifier to map/unmap the memory region in IOMMU using vfio. This replay existing address space mappings on attach command and remove existing address space mappings on detach command. Signed-off-by: Bharat Bhushan Signed-off

[Qemu-devel] [PATCH RFC v5 0/5] virtio-iommu: VFIO integration

2018-11-26 Thread Bharat Bhushan
ents v1->v2: - Added trace events - removed vSMMU3 link in patch description Bharat Bhushan (4): virtio-iommu: Add iommu notifier for iommu-map/unmap virtio-iommu: Call iommu notifier on attach/detach virtio-iommu: add virtio-iommu replay virtio-iommu: handle IOMMU Notifier flag ch

[Qemu-devel] [PATCH RFC v5 2/5] virtio-iommu: Add iommu notifier for iommu-map/unmap

2018-11-26 Thread Bharat Bhushan
This patch extends VIRTIO_IOMMU_T_MAP/UNMAP request handling to notify registered iommu-notifier. These iommu-notifier maps the requested region in IOMMU using vfio. Signed-off-by: Bharat Bhushan --- v4->v5: - Rebase to v9 version from Eric - PCIe device hotplug fix hw/virtio/trace-eve

[Qemu-devel] [PATCH RFC v5 1/5] hw/vfio/common: Do not print error when viommu translates into an mmio region

2018-11-26 Thread Bharat Bhushan
From: Eric Auger On ARM, the MSI doorbell is translated by the virtual IOMMU. As such address_space_translate() returns the MSI controller MMIO region and we get an "iommu map to non memory area" message. Let's remove this latter. Signed-off-by: Eric Auger Signed-off-by: Bharat Bhush

Re: [Qemu-devel] [RFC v9 06/17] virtio-iommu: Endpoint and domains structs and helpers

2018-11-23 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric > Sent: Friday, November 23, 2018 1:23 PM > To: Bharat Bhushan ; > eric.auger@gmail.com; qemu-devel@nongnu.org; qemu- > a...@nongnu.org; peter.mayd...@linaro.org; m...@redhat.com; jean- > philippe.br

Re: [Qemu-devel] [RFC v9 06/17] virtio-iommu: Endpoint and domains structs and helpers

2018-11-22 Thread Bharat Bhushan
.com > Cc: kevin.t...@intel.com; t...@semihalf.com; Bharat Bhushan > ; pet...@redhat.com > Subject: [RFC v9 06/17] virtio-iommu: Endpoint and domains structs and > helpers > > This patch introduce domain and endpoint internal datatypes. Both are > stored in RB trees. The d

Re: [Qemu-devel] [RFC v8 15/18] hw/arm/virt: Add virtio-iommu to the virt board

2018-11-22 Thread Bharat Bhushan
.com > Cc: kevin.t...@intel.com; t...@semihalf.com; Bharat Bhushan > ; pet...@redhat.com > Subject: [RFC v8 15/18] hw/arm/virt: Add virtio-iommu to the virt board > > Both the virtio-iommu device and its dedicated mmio transport get > instantiated when requested. > > Signed-

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration

2017-10-10 Thread Bharat Bhushan
Hi Alex, Eric, > -Original Message- > From: Qemu-devel [mailto:qemu-devel- > bounces+bharat.bhushan=nxp@nongnu.org] On Behalf Of Bharat > Bhushan > Sent: Friday, October 06, 2017 9:16 AM > To: Auger Eric <eric.au...@redhat.com>; Linu Cherian > <linuc.dec.

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration

2017-10-05 Thread Bharat Bhushan
> >> Thanks > >> > >> Eric > >>> > >>> However you should be allowed to map 1 sg element of 5 pages and > >>> then notify the host about this event I think. Still looking at the > >>> code... > >>> > >>> I still can't reproduce the issue at the moment. What kind of device > >>> are you

Re: [Qemu-devel] [RFC v4 10/16] virtio-iommu: Implement probe request

2017-09-27 Thread Bharat Bhushan
..@redhat.com; > qemu-...@nongnu.org; qemu-devel@nongnu.org; jean- > philippe.bruc...@arm.com > Cc: will.dea...@arm.com; kevin.t...@intel.com; marc.zyng...@arm.com; > christoffer.d...@linaro.org; drjo...@redhat.com; w...@redhat.com; Bharat > Bhushan <bharat.bhus...@nxp.com>; pet...@redhat.c

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration

2017-09-27 Thread Bharat Bhushan
Hi, > -Original Message- > From: Linu Cherian [mailto:linuc.dec...@gmail.com] > Sent: Wednesday, September 27, 2017 1:11 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com> > Cc: eric.au...@redhat.com; eric.auger@gmail.com; > peter.mayd...@linaro.org; alex.

Re: [Qemu-devel] [PATCH v4 0/5] virtio-iommu: VFIO integration

2017-09-27 Thread Bharat Bhushan
Hi Peter, > -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Wednesday, September 27, 2017 12:32 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com> > Cc: eric.au...@redhat.com; eric.auger@gmail.com; > peter.mayd...@linaro.org; alex.

Re: [Qemu-devel] [PATCH v4 0/5] virtio-iommu: VFIO integration

2017-09-27 Thread Bharat Bhushan
to real-physical. While looking at vfio_listener_region_add(), it does not create initial mapping in IOMMU and relies on guest to create mapping. Is this something known or I am missing something? Thanks -Bharat > -Original Message- > From: Bharat Bhushan [mailto:bharat.bhus...@n

[Qemu-devel] [PATCH v4 4/5] virtio-iommu: add iommu replay

2017-09-27 Thread Bharat Bhushan
Default replay does not work with virtio-iommu, so this patch provide virtio-iommu replay functionality. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- v3->v4: - Replay functionality moved in separate patch - No other changes hw/virtio/trace-events | 1 + hw/virt

[Qemu-devel] [PATCH v4 5/5] virtio-iommu: add iommu notifier memory-region

2017-09-27 Thread Bharat Bhushan
Finally add notify_flag_changed() to for memory-region access flag iommu flag change notifier Finally add the memory notifier Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- v3->v4: - notify_flag_changed functionality moved in separate patch - No other changes hw/vir

[Qemu-devel] [PATCH v4 1/5] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route

2017-09-27 Thread Bharat Bhushan
Translate msi address if device is behind virtio-iommu. This logic is similar to vSMMUv3/Intel iommu emulation. This RFC patch does not handle the case where both vsmmuv3 and virtio-iommu are available. Signed-off-by: Eric Auger <eric.au...@redhat.com> Signed-off-by: Bharat Bhushan <bh

[Qemu-devel] [PATCH v4 3/5] virtio-iommu: Call iommu notifier for attach/detach

2017-09-27 Thread Bharat Bhushan
iommu-notifier are called when a device is attached or detached to as address-space. This is needed for VFIO. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> Signed-off-by: Eric Auger <eric.au...@redhat.com> --- v3->v4: Follwoig fixes by Eric - Retu

[Qemu-devel] [PATCH v4 0/5] virtio-iommu: VFIO integration

2017-09-27 Thread Bharat Bhushan
is based on top of v2.10-rc0 that - Fixed issue with two PCI devices - Addressed review comments v1->v2: - Added trace events - removed vSMMU3 link in patch description Bharat Bhushan (5): target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route virtio-iommu: Add iom

[Qemu-devel] [PATCH v4 2/5] virtio-iommu: Add iommu notifier for map/unmap

2017-09-27 Thread Bharat Bhushan
This patch extends VIRTIO_IOMMU_T_MAP/UNMAP request to notify registered iommu-notifier. This is needed for VFIO support, Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> Signed-off-by: Eric Auger <eric.au...@redhat.com> --- v3->v4: Follwoig fixes by Eric - Calling virtio_i

Re: [Qemu-devel] [PATCH v3 2/2] virtio-iommu: vfio integration with virtio-iommu

2017-09-22 Thread Bharat Bhushan
> -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: Monday, September 18, 2017 1:18 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; > eric.auger@gmail.com; peter.mayd...@linaro.org; > alex.william...@redhat.com; m...@redhat.

Re: [Qemu-devel] [RFC v4 06/16] virtio-iommu: Register attached devices

2017-09-22 Thread Bharat Bhushan
u-devel@nongnu.org; jean- > philippe.bruc...@arm.com > Cc: will.dea...@arm.com; kevin.t...@intel.com; marc.zyng...@arm.com; > christoffer.d...@linaro.org; drjo...@redhat.com; w...@redhat.com; > t...@semihalf.com; Bharat Bhushan <bharat.bhus...@nxp.com>; > pet...@redhat.com; linuc

Re: [Qemu-devel] [RFC v4 09/16] virtio-iommu: Implement translate

2017-09-22 Thread Bharat Bhushan
u-devel@nongnu.org; jean- > philippe.bruc...@arm.com > Cc: will.dea...@arm.com; kevin.t...@intel.com; marc.zyng...@arm.com; > christoffer.d...@linaro.org; drjo...@redhat.com; w...@redhat.com; > t...@semihalf.com; Bharat Bhushan <bharat.bhus...@nxp.com>; > pet...@redhat.com; linuc

Re: [Qemu-devel] [PATCH v3 0/2] virtio-iommu: VFIO integration

2017-08-23 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: Wednesday, August 23, 2017 10:12 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; > eric.auger@gmail.com; peter.mayd...@linaro.org; > alex.william...@redhat.co

Re: [Qemu-devel] [RFC v2 PATCH 2/2] virtio-iommu: vfio integration with virtio-iommu

2017-08-21 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: Thursday, August 17, 2017 9:03 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; > eric.auger@gmail.com; peter.mayd...@linaro.org; > alex.william...@redhat.com; m...@redhat.

[Qemu-devel] [PATCH v3 1/2] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route

2017-08-21 Thread Bharat Bhushan
Translate msi address if device is behind virtio-iommu. This logic is similar to vSMMUv3/Intel iommu emulation. This RFC patch does not handle the case where both vsmmuv3 and virtio-iommu are available. Signed-off-by: Eric Auger <eric.au...@redhat.com> Signed-off-by: Bharat Bhushan <bh

[Qemu-devel] [PATCH v3 0/2] virtio-iommu: VFIO integration

2017-08-21 Thread Bharat Bhushan
at - Fixed issue with two PCI devices - Addressed review comments v1->v2: - Added trace events - removed vSMMU3 link in patch description Bharat Bhushan (2): target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route virtio-iommu: vfio integration with virtio-iommu h

[Qemu-devel] [PATCH v3 2/2] virtio-iommu: vfio integration with virtio-iommu

2017-08-21 Thread Bharat Bhushan
tification is called for given device This assumes that devid passed in virtio_iommu_attach is same as devfn This assumption is based on 1:1 mapping of requested-id with device-id in QEMU. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- v2->v3: - Addressed review com

Re: [Qemu-devel] [RFC v2 PATCH 2/2] virtio-iommu: vfio integration with virtio-iommu

2017-08-17 Thread Bharat Bhushan
> -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: Thursday, August 17, 2017 9:03 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; > eric.auger@gmail.com; peter.mayd...@linaro.org; > alex.william...@redhat.com; m...@redhat.com; qem

Re: [Qemu-devel] [RFC v2 6/8] virtio-iommu: Implement the translation and commands

2017-08-03 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: Monday, July 31, 2017 6:38 PM > To: Peter Xu <pet...@redhat.com>; Bharat Bhushan > <bharat.bhus...@nxp.com> > Cc: w...@redhat.com; peter.mayd...@linaro.org; kevin.t...@i

Re: [Qemu-devel] [RFC v3 6/8] virtio-iommu: Implement the translation and commands

2017-08-03 Thread Bharat Bhushan
nu.org; qemu-devel@nongnu.org; jean- > philippe.bruc...@arm.com > Cc: will.dea...@arm.com; kevin.t...@intel.com; marc.zyng...@arm.com; > christoffer.d...@linaro.org; drjo...@redhat.com; w...@redhat.com; > t...@semihalf.com; Bharat Bhushan <bharat.bhus...@nxp.com>; > pet...@redhat.c

[Qemu-devel] [RFC v2 PATCH 2/2] virtio-iommu: vfio integration with virtio-iommu

2017-07-14 Thread Bharat Bhushan
This patch allows virtio-iommu protection for PCI device-passthrough. MSI region is mapped by current version of virtio-iommu driver. This MSI region mapping in not getting pushed on hw iommu vfio_get_vaddr() allows only ram-region. This RFC patch needed to be improved. Signed-off-by: Bharat

[Qemu-devel] [RFC v2 PATCH 1/2] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route

2017-07-14 Thread Bharat Bhushan
Translate msi address if device is behind virtio-iommu. This logic is similar to vSMMUv3/Intel iommu emulation. This RFC patch does not handle the case where both vsmmuv3 and virtio-iommu are available. Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- v1-v2: - Added trace

[Qemu-devel] [RFC v2 PATCH 0/2] VFIO integration

2017-07-14 Thread Bharat Bhushan
/html/qemu-devel/2017-07/msg01796.html; v1-v2: - Added trace events - removed vSMMU3 link in patch description Bharat Bhushan (2): target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route virtio-iommu: vfio integration with virtio-iommu hw/virtio/trace-events | 5 +

Re: [Qemu-devel] [RFC v2 6/8] virtio-iommu: Implement the translation and commands

2017-07-14 Thread Bharat Bhushan
u-...@nongnu.org; > qemu-devel@nongnu.org; jean-philippe.bruc...@arm.com; > w...@redhat.com; kevin.t...@intel.com; Bharat Bhushan > <bharat.bhus...@nxp.com>; marc.zyng...@arm.com; t...@semihalf.com; > will.dea...@arm.com; drjo...@redhat.com; robin.mur...@arm.com; > christoffer.d..

[Qemu-devel] [RFC PATCH 1/2] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route

2017-07-13 Thread Bharat Bhushan
Fix-up MSI address if it translate via virtual iommu. This code is based on http://patchwork.ozlabs.org/patch/785951/ Signed-off-by: Bharat Bhushan <bharat.bhus...@nxp.com> --- target/arm/kvm.c | 21 + 1 file changed, 21 insertions(+) diff --git a/target/arm/kvm.c b/

[Qemu-devel] [RFC PATCH 2/2] virtio-iommu: vfio integration with virtio-iommu

2017-07-13 Thread Bharat Bhushan
This patch allows virtio-iommu protection for PCI device-passthrough. MSI region is mapped by current version of virtio-iommu driver. This MSI region mapping in not getting pushed on hw iommu vfio_get_vaddr() allows only ram-region. This RFC patch needed to be improved. Signed-off-by: Bharat

[Qemu-devel] [RFC PATCH 0/2] VFIO integration

2017-07-13 Thread Bharat Bhushan
/qemu-devel/2017-07/msg01796.html; Bharat Bhushan (2): target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route virtio-iommu: vfio integration with virtio-iommu hw/virtio/virtio-iommu.c | 127 +++ include/hw/virtio/virtio-iommu.h

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-07-12 Thread Bharat Bhushan
> -Original Message- > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Wednesday, July 12, 2017 4:28 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; Auger Eric > <eric.au...@redhat.com>; eric.auger@gmail.com; > peter.ma

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-07-12 Thread Bharat Bhushan
> -Original Message- > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Wednesday, July 12, 2017 3:48 PM > To: Bharat Bhushan <bharat.bhus...@nxp.com>; Auger Eric > <eric.au...@redhat.com>; eric.auger@gmail.com; > peter.ma

  1   2   3   >