[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

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

2022-07-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 v13 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-07-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 v13 05/10] vhost-vdpa: add support for config interrupt

2022-07-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 v13 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-07-20 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 v13 07/10] vhost: add support for configure interrupt

2022-07-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 v13 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-07-20 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 v13 00/10] vhost-vdpa: add support for configure interrupt

2022-07-20 Thread Cindy Lu
the typo and the comments 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

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

2022-07-20 Thread Cindy Lu
On Tue, Jul 19, 2022 at 10:28 PM Daniel P. Berrangé wrote: > > On Tue, Jul 19, 2022 at 09:46:45PM +0800, Cindy Lu wrote: > > These patches introduced the support for configure interrupt > > The email threading of this series isn't setup right. Each > patch is appearing as

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

2022-07-19 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 v12 05/10] vhost-vdpa: add support for config interrupt

2022-07-19 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 v12 06/10] virtio: add support for configure interrupt

2022-07-19 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 v12 02/10] virtio-pci: decouple notifier from interrupt process

2022-07-19 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 v12 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-07-19 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 v12 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-07-19 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 v12 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-07-19 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 v12 00/10] vhost-vdpa: add support for configure interrupt

2022-07-19 Thread Cindy Lu
the comments 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-vdpa: add support for config interrupt

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

2022-07-19 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 v12 08/10] virtio-net: add support for configure interrupt

2022-07-19 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 v12 10/10] virtio-pci: add support for configure interrupt

2022-07-19 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

Re: [PATCH v11 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2022-07-19 Thread Cindy Lu
On Tue, Jul 19, 2022 at 8:53 PM Cindy Lu wrote: > > On Tue, Jul 19, 2022 at 4:58 PM Jason Wang wrote: > > > > > > 在 2022/7/11 23:52, Cindy Lu 写道: > > > To support configure interrupt for vhost-vdpa > > > Introduce VIRTIO_CONFIG_IRQ_IDX -1 as configure

Re: [PATCH v11 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2022-07-19 Thread Cindy Lu
On Tue, Jul 19, 2022 at 4:58 PM Jason Wang wrote: > > > 在 2022/7/11 23:52, Cindy Lu 写道: > > To support configure interrupt for vhost-vdpa > > Introduce VIRTIO_CONFIG_IRQ_IDX -1 as configure interrupt's queue index, > > Then we can reuse the fu

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

2022-07-19 Thread Cindy Lu
Hi Michael, Would you help review these patches, I wonder if this is ok to merge? please let me know if there is anything I need to do. Thanks Cindy On Mon, Jul 11, 2022 at 11:53 PM Cindy Lu wrote: > > These patches introduced the support for configure interrupt > > These code

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

2022-07-11 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 v11 07/10] vhost: add support for configure interrupt

2022-07-11 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 v11 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-07-11 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 v11 05/10] vhost-vdpa: add support for config interrupt

2022-07-11 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 v11 06/10] virtio: add support for configure interrupt

2022-07-11 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 v11 08/10] virtio-net: add support for configure interrupt

2022-07-11 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 v11 02/10] virtio-pci: decouple notifier from interrupt process

2022-07-11 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 v11 00/10] vhost-vdpa: add support for configure interrupt

2022-07-11 Thread Cindy Lu
move the vhost configure interrupt to vhost_net Change in v9 misc fixes from v8 address the comments from v8 Change in v10 fix the hang issue in qtest address the comments from v9 Change in v11 fix the crash in aarch64 plateform. fix the crash upstream reported Cindy Lu (10): virtio: introduce

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

2022-07-11 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 v11 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

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

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

2022-07-11 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

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

2022-01-09 Thread Cindy Lu
On Mon, Jan 10, 2022 at 10:37 AM Jason Wang wrote: > On Mon, Jan 10, 2022 at 9:37 AM Cindy Lu wrote: > > > > > > > > > > On Mon, Jan 10, 2022 at 1:56 AM Michael S. Tsirkin > wrote: > >> > >> On Fri, Nov 05, 2021 at 12:48:17AM +0800

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

2022-01-09 Thread Cindy Lu
On Mon, Jan 10, 2022 at 1:56 AM Michael S. Tsirkin wrote: > On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > > these patches add the support for configure interrupt > > > > These codes are all tested in vp-vdpa (support configure interrupt) > > vdpa

[PATCH] virtio-mmio : fix the crash in the vm shutdown

2021-11-08 Thread Cindy Lu
0x55b06bd2 in qemu_cleanup () at ../softmmu/runstate.c:822 9 0x5586e693 in main (argc=, argv=, envp=) at ../softmmu/main.c:51 Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw

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

2021-11-04 Thread Cindy Lu
Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will inject a msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 92 -- hw

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

2021-11-04 Thread Cindy Lu
-by: Cindy Lu --- hw/virtio/vhost.c | 76 +++ include/hw/virtio/vhost.h | 4 +++ 2 files changed, 80 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 437347ad01..9451a6222e 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c

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

2021-11-04 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net The functions are config_pending and config_mask, while this input idx is VIRTIO_CONFIG_IRQ_IDX will check the function of configure interrupt. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c

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

2021-11-04 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 v10 09/10] virtio-mmio: add support for configure interrupt

2021-11-04 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will be working while the backend is vhost-vdpa 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

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

2021-11-04 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the vhost to set the event fd to kernel 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/hw/virtio

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

2021-11-04 Thread Cindy Lu
Add new call back function in vhost-vdpa, this function will 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 | 7 +++ 2 files changed, 8 insertions(+) diff

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

2021-11-04 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 4bdb6e5694..7201cf3dc1 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c

[PATCH v10 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2021-11-04 Thread Cindy Lu
, the function will just return Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 6 ++ hw/net/virtio-net.c| 10 -- hw/virtio/vhost-user-fs.c | 6 ++ hw/virtio/vhost-vsock-common.c | 6 ++ hw/virtio/virtio-crypto.c | 6 ++ include/hw

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

2021-11-04 Thread Cindy Lu
To reuse the notifier process in configure interrupt. Use the virtio_pci_get_notifier function to get the notifier. the INPUT of this function is the IDX, the OUTPUT is notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1

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

2021-11-04 Thread Cindy Lu
/release process decouple vq from set notifier fd handler process move the vhost configure interrupt to vhost_net Change in v9 misc fixes from v8 address the comments from v8 Change in v10 fix the hang issue in qtest address the comments from v9 Cindy Lu (10): virtio: introduce macro

Re: [PATCH v9 05/10] vhost-vdpa: add support for config interrupt call back

2021-10-19 Thread Cindy Lu
On Tue, Oct 19, 2021 at 2:55 PM Michael S. Tsirkin wrote: > > On Thu, Sep 30, 2021 at 10:33:43AM +0800, Cindy Lu wrote: > > Add new call back function in vhost-vdpa, this call back function will > > set the fb number to hardware. > > > > Signed-off-by: Cindy Lu

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

2021-10-19 Thread Cindy Lu
On Tue, Oct 19, 2021 at 2:56 PM Michael S. Tsirkin wrote: > > On Thu, Sep 30, 2021 at 10:33:38AM +0800, Cindy Lu wrote: > > these patches add the support for configure interrupt > > > > These codes are all tested in vp-vdpa (support configure interrupt) > > v

Re: [PATCH v9 04/10] vhost: add new call back function for config interrupt

2021-10-19 Thread Cindy Lu
On Tue, Oct 19, 2021 at 2:52 PM Michael S. Tsirkin wrote: > > On Thu, Sep 30, 2021 at 10:33:42AM +0800, Cindy Lu wrote: > > To support the config interrupt, we need to > > add a new call back function for config interrupt. > > > > Signed-off-by: Cindy Lu > >

[PATCH v9 08/10] vhost: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt in vhost the interrupt will start in vhost_dev_start and stop in vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 76 +++ include/hw/virtio/vhost.h | 4 +++ 2 files changed, 80 insertions(+) diff

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

2021-09-29 Thread Cindy Lu
Add the support for configure interrupt in virtio add notifier_read and set_fd_handler function Signed-off-by: Cindy Lu --- hw/virtio/virtio.c | 29 + include/hw/virtio/virtio.h | 4 2 files changed, 33 insertions(+) diff --git a/hw/virtio/virtio.c b

[PATCH v9 05/10] vhost-vdpa: add support for config interrupt call back

2021-09-29 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function will set the fb number to hardware. Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events

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

2021-09-29 Thread Cindy Lu
Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will inject a msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +- hw

[PATCH v9 04/10] vhost: add new call back function for config interrupt

2021-09-29 Thread Cindy Lu
To support the config interrupt, we need to add a new call back function for config interrupt. 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/hw/virtio/vhost-backend.h index

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

2021-09-29 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will be working while the backend is vhost-vdpa 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

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

2021-09-29 Thread Cindy Lu
-by: Cindy Lu --- hw/virtio/virtio-pci.c | 130 +++-- 1 file changed, 72 insertions(+), 58 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 456782c43e..d0a2c2fb81 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -677,7

[PATCH v9 07/10] virtio-net: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt in virtio_net The functions are config_pending and config_mask Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 10 ++ hw/net/virtio-net.c | 6 ++ include/net/vhost_net.h | 3 +++ 3 files changed, 19 insertions(+) diff --git a/hw/net

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

2021-09-29 Thread Cindy Lu
To reuse the notifier process in configure interrupt. Use the virtio_pci_get_notifier function to get the notifier. the INPUT of this function is the IDX, the OUTPUT is notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 84 +- 1

[PATCH v9 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2021-09-29 Thread Cindy Lu
Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 6 ++ hw/net/virtio-net.c| 10 +++--- hw/virtio/vhost-user-fs.c | 9 +++-- hw/virtio/vhost-vsock-common.c | 6 ++ hw/virtio/virtio-crypto.c | 6 ++ include/hw/virtio/virtio.h | 2 ++ 6

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

2021-09-29 Thread Cindy Lu
process decouple virtqueue from vector use/release process decouple virtqueue from set notifier fd handler process move the vhost configure interrupt to vhost_net Change in v9 misc fixes from v8 address the comments for v8 Cindy Lu (10): virtio: introduce macro IRTIO_CONFIG_IRQ_IDX virtio-pci

Re: [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-29 Thread Cindy Lu
On Wed, Sep 29, 2021 at 9:36 PM Michael S. Tsirkin wrote: > > On Wed, Sep 29, 2021 at 08:08:40PM +0800, Cindy Lu wrote: > > On Wed, Sep 29, 2021 at 6:07 PM Michael Tokarev wrote: > > > > > > 29.09.2021 09:52, Cindy Lu wrote: > > > > For vdpa de

Re: [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-29 Thread Cindy Lu
On Wed, Sep 29, 2021 at 6:07 PM Michael Tokarev wrote: > > 29.09.2021 09:52, Cindy Lu wrote: > > For vdpa device, if the host support VIRTIO_NET_F_MAC > > we need to read the mac address from hardware, so need > > to check this bit, the logic is > > 1 if the

[PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-29 Thread Cindy Lu
the mac from cmdline 3.if the cmdline not provide mac address, qemu will use radam mac address Signed-off-by: Cindy Lu --- hw/net/virtio-net.c | 34 +++--- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index

[PATCH v8 8/9] virtio-pci:decouple the single vector from the interrupt process

2021-07-06 Thread Cindy Lu
use the kvm_virtio_pci_vector_use_one and _release_one these funtion is to deal with the single vector, the whole process will finish in a loop with vq number. Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 109 - 1 file changed, 42 insertions

[PATCH v8 9/9] virtio-pci: add support for configure interrupt

2021-07-06 Thread Cindy Lu
Add support for configure interrupt, use kvm_irqfd_assign and set the gsi to kernel. When the configure notifier was eventfd_signal by host kernel, this will finally inject an msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 60

[PATCH v8 3/9] vhost: add new call back function for config interrupt

2021-07-06 Thread Cindy Lu
To support configure interrupt, we need to add a new call back function for config interrupt. 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/hw/virtio/vhost-backend.h index

[PATCH v8 6/9] virtio-mmio: add support for configure interrupt

2021-07-06 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will working while backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c

[PATCH v8 7/9] virtio-pci: decouple notifier from interrupt process

2021-07-06 Thread Cindy Lu
use the virtio_pci_get_notifier function to get the notifer, the input of the function will is the idx, the output is notifier and vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 45 -- 1 file changed, 35 insertions(+), 10 deletions(-) diff

[PATCH v8 2/9] virtio-pci:decouple virtqueue from interrupt setting process

2021-07-06 Thread Cindy Lu
Decouple virtqueue from interrupt setting process to support config interrupt Now the code for interrupt/vector are coupling with the vq number, this patch will decouple the vritqueue numbers from these functions Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 55

[PATCH v8 1/9] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2021-07-06 Thread Cindy Lu
return Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 6 ++ hw/net/virtio-net.c| 10 +++--- hw/virtio/vhost-user-fs.c | 9 +++-- hw/virtio/vhost-vsock-common.c | 6 ++ hw/virtio/virtio-crypto.c | 6 ++ include/hw/virtio/virtio.h | 2

[PATCH v8 5/9] vhost-net:add support for configure interrupt

2021-07-06 Thread Cindy Lu
Add configure notifier support in vhost and virtio driver When backend support VIRTIO_NET_F_STATUS,setup the configure interrupt function in vhost_net_start and release the related resource when vhost_net_stop Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 36

[PATCH v8 4/9] vhost-vdpa: add support for config interrupt call back

2021-07-06 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function only supported in vhost-vdpa backend Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events

[PATCH v8 0/9] vhost-vdpa: add support for configure interrupt

2021-07-06 Thread Cindy Lu
and misc process decouple virtqueue from verctor use/release process decouple virtqueue from set notifier fd handler process move the vhost configure interrpt to vhost_net Cindy Lu (9): virtio: introduce macro IRTIO_CONFIG_IRQ_IDX virtio-pci:decouple virtqueue from interrupt setting process

Re: [PATCH v7 06/10] vhost:add support for configure interrupt

2021-06-07 Thread Cindy Lu
On Thu, Jun 3, 2021 at 2:28 PM Jason Wang wrote: > > > 在 2021/6/2 上午11:47, Cindy Lu 写道: > > Add configure notifier support in vhost and virtio driver > > When backend support VIRTIO_NET_F_STATUS, > > > So config interrupt is the basic facility of the virtio devi

Re: [PATCH v7 09/10] virtio-pci: add support for configure interrupt

2021-06-07 Thread Cindy Lu
On Thu, Jun 3, 2021 at 2:45 PM Jason Wang wrote: > > > 在 2021/6/2 上午11:47, Cindy Lu 写道: > > Add support for configure interrupt, use kvm_irqfd_assign and set the > > gsi to kernel. When the configure notifier was eventfd_signal by host > > kernel, this will final

Re: [PATCH v7 08/10] virtio-pci: decouple virtqueue from kvm_virtio_pci_vector_use

2021-06-07 Thread Cindy Lu
On Thu, Jun 3, 2021 at 2:39 PM Jason Wang wrote: > > > 在 2021/6/2 上午11:47, Cindy Lu 写道: > > inorder > > > s/inorder/In order/ > > > > to support configure interrupt, we need to decouple > > virtqueue from vector use and vector release function &

Re: [PATCH v7 07/10] virtio-mmio: add support for configure interrupt

2021-06-07 Thread Cindy Lu
On Thu, Jun 3, 2021 at 2:36 PM Jason Wang wrote: > > > 在 2021/6/2 上午11:47, Cindy Lu 写道: > > Add configure interrupt support for virtio-mmio bus. This > > interrupt will working while backend is vhost-vdpa > > > > Signed-off-by: Cindy Lu > >

Re: [PATCH v7 05/10] vhost-vdpa: add support for config interrupt call back

2021-06-07 Thread Cindy Lu
On Thu, Jun 3, 2021 at 2:06 PM Jason Wang wrote: > > > 在 2021/6/2 上午11:47, Cindy Lu 写道: > > Add new call back function in vhost-vdpa, this call back function only > > supported in vhost-vdpa backend > > > > Signed-off-by: Cindy Lu > > --- > > hw/vir

Re: [PATCH v7 10/10] virtio-net: add peer_deleted check in virtio_net_handle_rx

2021-06-07 Thread Cindy Lu
On Thu, Jun 3, 2021 at 2:58 PM Jason Wang wrote: > > 在 2021/6/2 上午11:47, Cindy Lu 写道: > > During the test, We found this function will continue running > > while the peer is deleted, this will cause the crash. so add > > check for this. this only exist in machines typ

[PATCH v7 05/10] vhost-vdpa: add support for config interrupt call back

2021-06-01 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function only supported in vhost-vdpa backend Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events

[PATCH v7 08/10] virtio-pci: decouple virtqueue from kvm_virtio_pci_vector_use

2021-06-01 Thread Cindy Lu
inorder to support configure interrupt, we need to decouple virtqueue from vector use and vector release function this patch introduce vector_release_one and vector_use_one to support one vector. Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 122

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

2021-06-01 Thread Cindy Lu
Add support for configure interrupt, use kvm_irqfd_assign and set the gsi to kernel. When the configure notifier was eventfd_signal by host kernel, this will finally inject an msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 63

[PATCH v7 04/10] vhost: add new call back function for config interrupt

2021-06-01 Thread Cindy Lu
To support configure interrupt, we need to add a new call back function for config interrupt. 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/hw/virtio/vhost-backend.h index

[PATCH v7 07/10] virtio-mmio: add support for configure interrupt

2021-06-01 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will working while backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c

[PATCH v7 03/10] virtio: decouple virtqueue from set notifier fd handler

2021-06-01 Thread Cindy Lu
To support config interrupt.we need to decouple virtqueue number from virtio_queue_set_guest_notifier_fd_handler, Signed-off-by: Cindy Lu --- hw/s390x/virtio-ccw.c | 6 +++--- hw/virtio/virtio-mmio.c| 4 ++-- hw/virtio/virtio-pci.c | 4 ++-- hw/virtio/virtio.c | 17

[PATCH v7 10/10] virtio-net: add peer_deleted check in virtio_net_handle_rx

2021-06-01 Thread Cindy Lu
() at ../softmmu/runstate.c:821 11 0x5585b19b in main (argc=21, argv=0x7fffe1c8, envp=0x7fffe278) Signed-off-by: Cindy Lu --- hw/net/virtio-net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 02033be748..927a808654

[PATCH v7 06/10] vhost:add support for configure interrupt

2021-06-01 Thread Cindy Lu
Add configure notifier support in vhost and virtio driver When backend support VIRTIO_NET_F_STATUS,setup the configure interrupt function in vhost_dev_start and release the related resource when vhost_dev_stop Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio

[PATCH v7 02/10] virtio-pci:decouple virtqueue from interrupt setting process

2021-06-01 Thread Cindy Lu
Decouple virtqueue from interrupt setting process to support config interrupt Now the code for interrupt/vector are coupling with the vq number, this patch will decouple the vritqueue numbers from these functions. Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 51

[PATCH v7 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX 聽

2021-06-01 Thread Cindy Lu
Signed-off-by: Cindy Lu --- hw/display/vhost-user-gpu.c| 6 ++ hw/net/virtio-net.c| 10 +++--- hw/virtio/vhost-user-fs.c | 9 +++-- hw/virtio/vhost-vsock-common.c | 6 ++ hw/virtio/virtio-crypto.c | 6 ++ include/hw/virtio/virtio.h | 2 ++ 6

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

2021-06-01 Thread Cindy Lu
and masked_config_notifier to VirtIODevice fix the bug in virtio_net_handle_rx, add more information add VIRTIO_CONFIG_IRQ_IDX as the queue number to identify if the interrupt is configure interrupt Cindy Lu (10): virtio: introduce macro IRTIO_CONFIG_IRQ_IDX   virtio-pci:decouple virtqueue

Re: [PATCH v6 1/9] hw: Add check for queue number

2021-04-28 Thread Cindy Lu
On Tue, Apr 27, 2021 at 1:39 PM Jason Wang wrote: > > > 在 2021/4/27 上午11:39, Cindy Lu 写道: > > In order to support configure interrupt. we will use queue number -1 > > as configure interrupt > > since all these device are not support the configure interrupt >

Re: [PATCH v6 7/9] virtio-pci: add support for configure interrupt

2021-04-28 Thread Cindy Lu
On Tue, Apr 27, 2021 at 3:12 PM Jason Wang wrote: > > > 在 2021/4/27 上午11:39, Cindy Lu 写道: > > Add support for configure interrupt, use kvm_irqfd_assign and set the > > gsi to kernel. When the configure notifier was eventfd_signal by host > > kernel, this will final

[PATCH v6 7/9] virtio-pci: add support for configure interrupt

2021-04-26 Thread Cindy Lu
Add support for configure interrupt, use kvm_irqfd_assign and set the gsi to kernel. When the configure notifier was eventfd_signal by host kernel, this will finally inject an msix interrupt to guest --- hw/virtio/virtio-pci.c | 186 ++--- 1 file changed, 120

[PATCH v6 6/9] virtio-mmio: add support for configure interrupt

2021-04-26 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will working while backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c

[PATCH v6 5/9] vhost:add support for configure interrupt

2021-04-26 Thread Cindy Lu
Add configure notifier support in vhost and related driver When backend support VIRTIO_NET_F_STATUS,setup the configure interrupt function in vhost_dev_start and release the related resource when vhost_dev_stop Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio

[PATCH v6 4/9] vhost-vdpa: add support for config interrupt call back

2021-04-26 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function only supported in vhost-vdpa backend Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events

<    1   2   3   4   5   6   >