[PATCH v10 2/2] vhost-vdpa: add support for vIOMMU

2022-10-31 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 122 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 121 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..e483d6e60b 100644 --- a/hw

[PATCH v10 1/2] vfio: move implement of vfio_get_xlat_addr() to memory.c

2022-10-31 Thread Cindy Lu
manager. then device can have its own warning. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 66 +++ include/exec/memory.h | 4 +++ softmmu/memory.c | 72 +++ 3 files changed, 81 insertions(+), 61 deletions

Re: [PATCH v9 2/2] vhost-vdpa: add support for vIOMMU

2022-10-31 Thread Cindy Lu
On Mon, 31 Oct 2022 at 16:30, Cindy Lu wrote: > > On Mon, 31 Oct 2022 at 15:20, Michael S. Tsirkin wrote: > > > > On Mon, Oct 31, 2022 at 03:15:14PM +0800, Cindy Lu wrote: > > > , > > > > > > > > > On Mon, 31 Oct 2022 at 15:04, Michael S

[PATCH v10 0/2] vhost-vdpa: add support for vIOMMU

2022-10-31 Thread Cindy Lu
massage to avoid the duplicate information changes in V8 Organize the code follow the comments in the last version changes in V9 Organize the code follow the comments changes in V10 Address the comments Cindy Lu (2): vfio: move implement of vfio_get_xlat_addr() to memory.c vhost-vdpa: add

Re: [PATCH v9 2/2] vhost-vdpa: add support for vIOMMU

2022-10-31 Thread Cindy Lu
On Mon, 31 Oct 2022 at 15:20, Michael S. Tsirkin wrote: > > On Mon, Oct 31, 2022 at 03:15:14PM +0800, Cindy Lu wrote: > > , > > > > > > On Mon, 31 Oct 2022 at 15:04, Michael S. Tsirkin wrote: > > > > > > On Mon, Oct 31, 2022 at 11:10:20AM +0800

Re: [PATCH v9 2/2] vhost-vdpa: add support for vIOMMU

2022-10-31 Thread Cindy Lu
, On Mon, 31 Oct 2022 at 15:04, Michael S. Tsirkin wrote: > > On Mon, Oct 31, 2022 at 11:10:20AM +0800, Cindy Lu wrote: > > Add support for vIOMMU. add the new function to deal with iommu MR. > > - during iommu_region_add register a specific IOMMU notifier, > >

Re: [PATCH v9 1/2] vfio: move implement of vfio_get_xlat_addr() to memory.c

2022-10-31 Thread Cindy Lu
On Mon, 31 Oct 2022 at 14:55, Michael S. Tsirkin wrote: > > On Mon, Oct 31, 2022 at 02:44:11PM +0800, Cindy Lu wrote: > > On Mon, 31 Oct 2022 at 14:38, Michael S. Tsirkin wrote: > > > > > > On Mon, Oct 31, 2022 at 11:10:19AM +0800, Cindy Lu wrote: > > > &g

Re: [PATCH v9 1/2] vfio: move implement of vfio_get_xlat_addr() to memory.c

2022-10-31 Thread Cindy Lu
On Mon, 31 Oct 2022 at 14:38, Michael S. Tsirkin wrote: > > On Mon, Oct 31, 2022 at 11:10:19AM +0800, Cindy Lu wrote: > > - Move the implement vfio_get_xlat_addr to softmmu/memory.c, and > > change the name to memory_get_xlat_addr(). So we can use this > > f

[PATCH v9 1/2] vfio: move implement of vfio_get_xlat_addr() to memory.c

2022-10-30 Thread Cindy Lu
manager. then device can have its own warning. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 66 +++ include/exec/memory.h | 4 +++ softmmu/memory.c | 72 +++ 3 files changed, 81 insertions(+), 61 deletions

[PATCH v9 0/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
to memeory_get_xlat_addr changes in V7 organize the error massage to avoid the duplicate information changes in V8 Organize the code follow the comments in the last version changes in V9 Organize the code follow the comments Cindy Lu (2): vfio: move implement of vfio_get_xlat_addr() to memory.c vhost

[PATCH v9 2/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 123 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 122 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..dcfaaccfa9 100644 --- a/hw

Re: [PATCH v8 1/2] vfio: move implement of vfio_get_xlat_addr() to memory.c

2022-10-30 Thread Cindy Lu
On Mon, 31 Oct 2022 at 10:30, Alex Williamson wrote: > > On Mon, 31 Oct 2022 09:56:04 +0800 > Cindy Lu wrote: > > > - Move the implement vfio_get_xlat_addr to softmmu/memory.c, and > > change the name to memory_get_xlat_addr(). So we can use this > > function

Re: [PATCH v7 1/2] vfio: move function vfio_get_xlat_addr() to memory.c

2022-10-30 Thread Cindy Lu
On Mon, 31 Oct 2022 at 01:35, Alex Williamson wrote: > > On Mon, 31 Oct 2022 00:45:38 +0800 > Cindy Lu wrote: > > > - Move the function vfio_get_xlat_addr to softmmu/memory.c, and > > change the name to memory_get_xlat_addr(). So we can use this > > function

[PATCH v8 1/2] vfio: move implement of vfio_get_xlat_addr() to memory.c

2022-10-30 Thread Cindy Lu
manager. the device can have its own warning. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 101 +++--- include/exec/memory.h | 4 ++ softmmu/memory.c | 72 ++ 3 files changed, 102 insertions(+), 75 deletions

[PATCH v8 0/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
to memeory_get_xlat_addr changes in V7 organize the error massage to avoid the duplicate information changes in V8 Organize the code follow the comments in the last version Cindy Lu (2): vfio: move implement of vfio_get_xlat_addr() to memory.c vhost-vdpa: add support for vIOMMU hw/vfio/common.c

[PATCH v8 2/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 123 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 122 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..dcfaaccfa9 100644 --- a/hw

[PATCH v7 2/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 123 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 122 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..dcfaaccfa9 100644 --- a/hw

[PATCH v7 0/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
to memeory_get_xlat_addr changes in V7 organize the error massage to avoid the duplicate information Cindy Lu (2): vfio: move function vfio_get_xlat_addr() to memory.c vhost-vdpa: add support for vIOMMU hw/vfio/common.c | 107 hw/virtio/vhost-vdpa.c

[PATCH v7 1/2] vfio: move function vfio_get_xlat_addr() to memory.c

2022-10-30 Thread Cindy Lu
can have its own warning. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 107 +++--- include/exec/memory.h | 4 ++ softmmu/memory.c | 72 3 files changed, 104 insertions(+), 79 deletions(-) diff --git a/hw/vfio/common.c

Re: [PATCH v6 1/2] vfio: move function vfio_get_xlat_addr() to memory.c

2022-10-30 Thread Cindy Lu
On Sun, 30 Oct 2022 at 21:02, Alex Williamson wrote: > > On Sun, 30 Oct 2022 14:01:05 +0800 > Cindy Lu wrote: > > > - Move the function vfio_get_xlat_addr to softmmu/memory.c, and > > change the name to memory_get_xlat_addr(). So we can use this > > function

[PATCH v6 0/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
in the last version 2. Add a new arg in the function vfio_get_xlat_addr, which shows whether the memory is backed by a discard manager. So the device can have its own warning. changes in V6 move the error_report for the unpopulated discard back to memeory_get_xlat_add Cindy Lu (2): vfio: move function

[PATCH v6 1/2] vfio: move function vfio_get_xlat_addr() to memory.c

2022-10-30 Thread Cindy Lu
can have its own warning. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 135 ++ include/exec/memory.h | 4 ++ softmmu/memory.c | 72 ++ 3 files changed, 122 insertions(+), 89 deletions(-) diff --git a/hw/vfio/common.c b/hw

[PATCH v6 2/2] vhost-vdpa: add support for vIOMMU

2022-10-30 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 123 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 122 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..dcfaaccfa9 100644 --- a/hw

Re: [PATCH v5 1/2] vfio: move function vfio_get_xlat_addr() to memory.c

2022-10-29 Thread Cindy Lu
On Sun, 30 Oct 2022 at 13:14, Alex Williamson wrote: > > On Sun, 30 Oct 2022 12:35:54 +0800 > Cindy Lu wrote: > > > - Move the function vfio_get_xlat_addr to softmmu/memory.c, and > > change the name to memory_get_xlat_addr(). So we can use this > > function

[PATCH v5 2/2] vhost-vdpa: add support for vIOMMU

2022-10-29 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 123 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 122 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..dcfaaccfa9 100644 --- a/hw

[PATCH v5 1/2] vfio: move function vfio_get_xlat_addr() to memory.c

2022-10-29 Thread Cindy Lu
can have its own warning. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 163 +++--- include/exec/memory.h | 4 ++ softmmu/memory.c | 69 ++ 3 files changed, 146 insertions(+), 90 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio

[PATCH v5 0/2] vhost-vdpa: add support for vIOMMU

2022-10-29 Thread Cindy Lu
general changes in V5 1. Address the comments in the last version 2. Add a new arg in the function vfio_get_xlat_addr, which shows whether the memory is backed by a discard manager. So the device can have its own warning. Cindy Lu (2): vfio: move function vfio_get_xlat_addr() to memory.c vhost

[PATCH v18 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-10-29 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include

[PATCH v18 10/10] virtio-pci: add support for configure interrupt

2022-10-29 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 - include/hw/virtio/virtio-pci.h | 4 +- 2

[PATCH v18 09/10] virtio-mmio: add support for configure interrupt

2022-10-29 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

[PATCH v18 05/10] vhost-vdpa: add support for config interrupt

2022-10-29 Thread Cindy Lu
Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 1 + hw/virtio/vhost-vdpa.c | 8 2 files changed, 9

[PATCH v18 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-10-29 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 131 +++-- 1 file changed, 73 insertions(+), 58 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 993efb2cb8..4993e46891 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio

[PATCH v18 08/10] virtio-net: add support for configure interrupt

2022-10-29 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13

[PATCH v18 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-10-29 Thread Cindy Lu
, the function will just return Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 18 ++ hw/net/virtio-net.c| 22 -- hw/virtio/vhost-user-fs.c | 18 ++ hw/virtio/vhost-user-gpio.c| 10 ++ hw/virtio/vhost

[PATCH v18 07/10] vhost: add support for configure interrupt

2022-10-29 Thread Cindy Lu
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 78

[PATCH v18 06/10] virtio: add support for configure interrupt

2022-10-29 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu

[PATCH v18 02/10] virtio-pci: decouple notifier from interrupt process

2022-10-29 Thread Cindy Lu
To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 57

[PATCH v18 00/10] vhost-vdpa: add support for configure interrupt

2022-10-29 Thread Cindy Lu
-gpio.c is a new device,So I missed to add the VIRTIO_CONFIG_IRQ_IDX check in notifier_mask Cindy Lu (10): virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX virtio-pci: decouple notifier from interrupt process virtio-pci: decouple the single vector from the interrupt process vhost: introduce new

Re: [PATCH v4 0/2] vhost-vdpa: add support for vIOMMU

2022-10-29 Thread Cindy Lu
On Sat, 29 Oct 2022 at 15:57, Michael S. Tsirkin wrote: > > On Thu, Oct 27, 2022 at 03:40:30PM +0800, Cindy Lu wrote: > > These patches are to support vIOMMU in vdpa device > > > > changes in V3 > > 1. Move function vfio_get_xlat_addr to memory.c > > 2. Use

[PATCH v17 07/10] vhost: add support for configure interrupt

2022-10-28 Thread Cindy Lu
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 78

[PATCH v17 10/10] virtio-pci: add support for configure interrupt

2022-10-28 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 - include/hw/virtio/virtio-pci.h | 4 +- 2

[PATCH v17 09/10] virtio-mmio: add support for configure interrupt

2022-10-28 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

[PATCH v17 08/10] virtio-net: add support for configure interrupt

2022-10-28 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13

[PATCH v17 06/10] virtio: add support for configure interrupt

2022-10-28 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu

[PATCH v17 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-10-28 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include

[PATCH v17 05/10] vhost-vdpa: add support for config interrupt

2022-10-28 Thread Cindy Lu
Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 1 + hw/virtio/vhost-vdpa.c | 8 2 files changed, 9

[PATCH v17 02/10] virtio-pci: decouple notifier from interrupt process

2022-10-28 Thread Cindy Lu
To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 57

[PATCH v17 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-10-28 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 131 +++-- 1 file changed, 73 insertions(+), 58 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 993efb2cb8..4993e46891 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio

[PATCH v17 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-10-28 Thread Cindy Lu
, the function will just return Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 15 +++ hw/net/virtio-net.c| 20 ++-- hw/virtio/vhost-user-fs.c | 16 hw/virtio/vhost-vsock-common.c | 16 hw/virtio/virtio

[PATCH v17 00/10]vhost-vdpa: add support for configure interrupt

2022-10-28 Thread Cindy Lu
and the comments changes in v13 re-send the patches by git-publish changes in v14 rebased the code based on upstream changes in v15 rebased the code based on upstream changes in v16 resend the patch, seems there not send successfully Cindy Lu (10): virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

[PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Cindy Lu
Move the function vfio_get_xlat_addr to softmmu/memory.c, and change the name to memory_get_xlat_addr().So we can use this function in other devices,such as vDPA device. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 92 ++- include/exec/memory.h

[PATCH v4 2/2] vhost-vdpa: add support for vIOMMU

2022-10-27 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 131 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 130 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..407f3e9ac2 100644 --- a/hw

[PATCH v4 0/2] vhost-vdpa: add support for vIOMMU

2022-10-27 Thread Cindy Lu
general Cindy Lu (2): vfio: move the function vfio_get_xlat_addr() to memory.c vhost-vdpa: add support for vIOMMU hw/vfio/common.c | 92 +-- hw/virtio/vhost-vdpa.c | 131 ++--- include/exec/memory.h | 4 + include

Re: [PATCH v3 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Cindy Lu
On Thu, 27 Oct 2022 at 04:40, Michael S. Tsirkin wrote: > > On Tue, Oct 25, 2022 at 10:55:18AM -0600, Alex Williamson wrote: > > On Wed, 26 Oct 2022 00:37:33 +0800 > > Cindy Lu wrote: > > > diff --git a/softmmu/memory.c b/softmmu/memory.c > > >

[PATCH v3 2/2] vhost-vdpa: add support for vIOMMU

2022-10-25 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 134 ++--- include/hw/virtio/vhost-vdpa.h | 10 +++ 2 files changed, 133 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..229b8bdfd5 100644 --- a/hw

[PATCH v3 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-25 Thread Cindy Lu
Move the function vfio_get_xlat_addr to softmmu/memory.c, and change the name to memory_get_xlat_addr().So we can use this function in other devices,such as vDPA device. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 92 ++- include/exec/memory.h

[PATCH v3 0/2] vhost-vdpa: add support for vIOMMU

2022-10-25 Thread Cindy Lu
These patches is to suppor vIOMMU in vdpa device changes in V3 1. Move function vfio_get_xlat_addr to memory.c 2. Use the existing memory listener, while the MR is iommu MR then call the function iommu_region_add/ iommu_region_del Cindy Lu (2): vfio: move the function vfio_get_xlat_addr

Re: [PATCH v2] vhost-vdpa: add support for vIOMMU

2022-10-24 Thread Cindy Lu
On Thu, 20 Oct 2022 at 10:15, Jason Wang wrote: > > On Wed, Oct 19, 2022 at 2:39 PM Cindy Lu wrote: > > > > Add support for vIOMMU. Register a memory listener to dma_as in > > dev_start > > - during region_add register a specific IOMMU notifier, and stor

Re: [PATCH v2] vhost-vdpa: add support for vIOMMU

2022-10-24 Thread Cindy Lu
On Mon, 24 Oct 2022 at 09:51, Jason Wang wrote: > > On Sun, Oct 23, 2022 at 10:46 PM Cindy Lu wrote: > > > > On Thu, 20 Oct 2022 at 10:15, Jason Wang wrote: > > > > > > On Wed, Oct 19, 2022 at 2:39 PM Cindy Lu wrote: > > > > > > > >

[PATCH v16 02/10] virtio-pci: decouple notifier from interrupt process

2022-10-20 Thread Cindy Lu
To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 57

[PATCH v16 06/10] virtio: add support for configure interrupt

2022-10-20 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu

[PATCH v16 10/10] virtio-pci: add support for configure interrupt

2022-10-20 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 - include/hw/virtio/virtio-pci.h | 4 +- 2

[PATCH v16 05/10] vhost-vdpa: add support for config interrupt

2022-10-20 Thread Cindy Lu
Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 1 + hw/virtio/vhost-vdpa.c | 8 2 files changed, 9

[PATCH v16 08/10] virtio-net: add support for configure interrupt

2022-10-20 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13

[PATCH v16 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-10-20 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include

[PATCH v16 09/10] virtio-mmio: add support for configure interrupt

2022-10-20 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

[PATCH v16 07/10] vhost: add support for configure interrupt

2022-10-20 Thread Cindy Lu
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 78

[PATCH v16 00/10] vhost-vdpa: add support for configure interrupt

2022-10-20 Thread Cindy Lu
and the comments changes in v13 re-send the patches by git-publish changes in v14 rebased the code basedon upstream changes in v15 rebased the code basedon upstream Cindy Lu (10): virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX virtio-pci: decouple notifier from interrupt process virtio-pci: decouple

[PATCH v2] vhost-vdpa: add support for vIOMMU

2022-10-19 Thread Cindy Lu
-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 218 - include/hw/virtio/vhost-vdpa.h | 11 ++ 2 files changed, 226 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 3ff9ce3501..8f36423c28 100644 --- a/hw/virtio/vhost

Re: [PATCH v1] vhost-vdpa : add support for vIOMMU

2022-10-17 Thread Cindy Lu
On Sat, 8 Oct 2022 at 01:11, Eugenio Perez Martin wrote: > > On Thu, Oct 6, 2022 at 7:44 AM Cindy Lu wrote: > > > > Add support for vIOMMU. Register a memory listener to dma_as in > > vhost_vdpa_dev_start > > - during region_add register a specific IOMMU notifier

[PATCH v1] vhost-vdpa : add support for vIOMMU

2022-10-05 Thread Cindy Lu
IOMMU batch send Verified in vp_vdpa and vdpa_sim_net driver Signed-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 253 +++-- include/hw/virtio/vhost-vdpa.h | 26 +++- 2 files changed, 267 insertions(+), 12 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw

Re: [PATCH v15 00/10] vhost-vdpa: add support for configure interrupt

2022-07-27 Thread Cindy Lu
that time. Thanks Cindy > On Sun, Jul 24, 2022 at 02:44:44PM +0800, Cindy Lu wrote: > > These patches introduced the support for configure interrupt > > These codes are tested on x86_64 and aarch64 platforms. > > the test scenario is based on vp-vdpa/vdpa_sim /virtio net

[PATCH v15 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-07-24 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include

[PATCH v15 10/10] virtio-pci: add support for configure interrupt

2022-07-24 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 - include/hw/virtio/virtio-pci.h | 4 +- 2

[PATCH v15 07/10] vhost: add support for configure interrupt

2022-07-24 Thread Cindy Lu
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 78

[PATCH v15 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-07-24 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 131 +++-- 1 file changed, 73 insertions(+), 58 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index ea56677f7a..4362dab725 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio

[PATCH v15 09/10] virtio-mmio: add support for configure interrupt

2022-07-24 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

[PATCH v15 06/10] virtio: add support for configure interrupt

2022-07-24 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu

[PATCH v15 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-07-24 Thread Cindy Lu
, the function will just return Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 15 +++ hw/net/virtio-net.c| 20 ++-- hw/virtio/vhost-user-fs.c | 16 hw/virtio/vhost-vsock-common.c | 16 hw/virtio/virtio

[PATCH v15 08/10] virtio-net: add support for configure interrupt

2022-07-24 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13

[PATCH v15 05/10] vhost-vdpa: add support for config interrupt

2022-07-24 Thread Cindy Lu
Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 1 + hw/virtio/vhost-vdpa.c | 8 2 files changed, 9

[PATCH v15 02/10] virtio-pci: decouple notifier from interrupt process

2022-07-24 Thread Cindy Lu
To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 57

[PATCH v15 00/10] vhost-vdpa: add support for configure interrupt

2022-07-24 Thread Cindy Lu
and the comments changes in v13 re-send the patches by git-publish changes in v14 rebased the code based on upstream Cindy Lu (10): virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX virtio-pci: decouple notifier from interrupt process virtio-pci: decouple the single vector from the interrupt process vhost

Re: [PATCH v13 00/10] vhost-vdpa: add support for configure interrupt

2022-07-23 Thread Cindy Lu
On Fri, 22 Jul 2022 at 20:21, Michael S. Tsirkin wrote: > > On Fri, Jul 22, 2022 at 03:46:52PM +0800, Cindy Lu wrote: > > Hi Micheal. > > Would you help review these patches, not sure if this is ok to merge? > > Thanks > > Cindy > > Pls note threading is br

[PATCH v14 10/10] virtio-pci: add support for configure interrupt

2022-07-23 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 ++--- hw/virtio/virtio-pci.h | 4 +- 2 files

[PATCH v14 09/10] virtio-mmio: add support for configure interrupt

2022-07-23 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

[PATCH v14 08/10] virtio-net: add support for configure interrupt

2022-07-23 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13

[PATCH v14 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-07-23 Thread Cindy Lu
-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 131 +++-- 1 file changed, 73 insertions(+), 58 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 2869d0d2f6..4b86008bcf 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio

[PATCH v14 07/10] vhost: add support for configure interrupt

2022-07-23 Thread Cindy Lu
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 78

[PATCH v14 06/10] virtio: add support for configure interrupt

2022-07-23 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu

[PATCH v14 02/10] virtio-pci: decouple notifier from interrupt process

2022-07-23 Thread Cindy Lu
To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 57

[PATCH v14 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-07-23 Thread Cindy Lu
, the function will just return Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 13 + hw/net/virtio-net.c| 20 ++-- hw/virtio/vhost-user-fs.c | 14 ++ hw/virtio/vhost-vsock-common.c | 14 ++ hw/virtio/virtio-crypto.c

[PATCH v14 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-07-23 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include

[PATCH v14 05/10] vhost-vdpa: add support for config interrupt

2022-07-23 Thread Cindy Lu
Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 1 + hw/virtio/vhost-vdpa.c | 8 2 files changed, 9

[PATCH v14 00/10] vhost-vdpa: add support for configure interrupt

2022-07-23 Thread Cindy Lu
changes in v13 re-send the patches by git-publish Cindy Lu (10): virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX virtio-pci: decouple notifier from interrupt process virtio-pci: decouple the single vector from the interrupt process vhost: introduce new VhostOps vhost_set_config_call vhost

Re: [PATCH v13 00/10] vhost-vdpa: add support for configure interrupt

2022-07-22 Thread Cindy Lu
Hi Micheal. Would you help review these patches, not sure if this is ok to merge? Thanks Cindy On Wed, Jul 20, 2022 at 9:12 PM Cindy Lu wrote: > > Add support for virtio-mmio bus > active the notifier while the backend support configure interrupt > misc fixes from v1 > >

[PATCH v13 09/10] virtio-mmio: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

[PATCH v13 06/10] virtio: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu

[PATCH v13 08/10] virtio-net: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13

[PATCH v13 10/10] virtio-pci: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 ++--- hw/virtio/virtio-pci.h | 4 +- 2 files

<    1   2   3   4   5   6   >