From: Longpeng
This allows the vhost device to batch the setup of all its host notifiers.
This significantly reduces the device starting time, e.g. the vhost-vDPA
generic device [1] start time reduce from 376ms to 9.1ms for a VM with
64 vCPUs and 3 vDPA device(64vq per device).
[1] https://www.m
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 88 +++
c->desc' [Stefano]
Patch 5:
- check returned number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (5):
virtio: get class_id and pci device id by the virtio id
vdpa: add vdpa-dev support
vdpa: add vdpa-dev-
From: Longpeng
Signed-off-by: Longpeng
---
.../devices/vhost-vdpa-generic-device.rst | 66 +++
1 file changed, 66 insertions(+)
create mode 100644 docs/system/devices/vhost-vdpa-generic-device.rst
diff --git a/docs/system/devices/vhost-vdpa-generic-device.rst
b/docs/syste
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
h
From: Longpeng
The generic vDPA device doesn't support migration currently, so
mark it as unmigratable temporarily.
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vdpa-dev.c b
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 102 +
From: Longpeng
Changes v2->v1:
Patch-1:
- remove vq_init_count [Jason]
Patch-2:
- new added. [Jason]
v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg922499.html
Longpeng (Mike) (2):
vhost: configure all host notifiers in a single MR transaction
vdpa: commit all h
From: Longpeng
This allows the vhost device to batch the setup of all its host notifiers.
This significantly reduces the device starting time, e.g. the time spend
on enabling notifiers reduce from 376ms to 9.1ms for a VM with 64 vCPUs
and 3 vhost-vDPA generic devices[1] (64vq per device)
[1] htt
From: Longpeng
This allows the vhost-vdpa device to batch the setup of all its MRs of
host notifiers.
This significantly reduces the device starting time, e.g. the time spend
on setup the host notifier MRs reduce from 423ms to 32ms for a VM with
64 vCPUs and 3 vhost-vDPA generic devices[1] (64vq
elapsed, so synchronize_sched would wait for a long time.
Is there any solution to this ? Any suggestion would be greatly appreciated,
thanks!
--
Regards,
Longpeng(Mike)
在 2019/12/2 17:31, Paolo Bonzini 写道:
> On 02/12/19 10:10, Longpeng (Mike) wrote:
>>
>> Suppose there're two VMs: VM1 is bind to node-0 and calling
>> vfio_pin_map_dma(),
>> VM2 is a migrate incoming VM which bind to node-1. We found the vm_start(
>> QEMU
在 2019/12/2 18:06, Paolo Bonzini 写道:
> On 02/12/19 10:42, Longpeng (Mike) wrote:
>>> cond_resched in vfio_iommu_map. Perhaps you could add one to
>>> vfio_pin_pages_remote and/or use vfio_pgsize_bitmap to cap the
>>> number of pages that it returns.
>> Um ...
在 2019/7/10 11:57, Jason Wang 写道:
>
> On 2019/7/10 上午11:36, Longpeng (Mike) wrote:
>> 在 2019/7/10 11:25, Jason Wang 写道:
>>> On 2019/7/8 下午5:47, Dr. David Alan Gilbert wrote:
>>>> * longpeng (longpe...@huawei.com) wrote:
>>>>> Hi guys,
>>>
t; -hava_afalg=no
> +have_afalg=no
> cat > $TMPC << EOF
> #include
> #include
>
Reviewed-by: Longpeng(Mike)
--
Regards,
Longpeng(Mike)
6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (10):
virtio: get class_id and pci device id by the virtio id
update linux headers
vdpa: add the infrastructure of vdpa-dev
vdpa-dev: implement the instance_init/class_init interface
vdpa-dev:
From: Longpeng
Update linux headers to 5.xxx(kernel part is not merged yet)
To support generic vdpa deivce, we need add the following ioctls:
- VHOST_VDPA_GET_CONFIG_SIZE: get the configuration size.
- VHOST_VDPA_GET_VQS_NUM: get the count of supported virtqueues.
Signed-off-by: Longpeng
---
From: Longpeng
Add the infrastructure of vdpa-dev (the generic vDPA device), we
can add a generic vDPA device as follow:
-device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5
hw/virtio/meson.build| 2 ++
hw/virti
From: Longpeng
Implements the .instance_init and the .class_init interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev-pci.c | 52 ++-
hw/virtio/vdpa-dev.c | 81 +++-
include/hw/virtio/vdpa-dev.h | 5 +++
3 files changed, 134
From: Longpeng
Implements the .unrealize interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 24 +++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index bd28cf7a15..e5691d02bb 100644
--- a/hw/virtio/vdpa
From: Longpeng
The generic vDPA device doesn't support migration currently, so
mark it as unmigratable temporarily.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 99722c88a1..65511243f9 1006
From: Longpeng
Implements the .get_config and .set_config interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index e5691d02bb..cef0a58012 100644
--- a/hw/vir
From: Longpeng
Implements the .get_features interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index cef0a58012..7bf07fef9b 100644
--- a/hw/virtio/vdpa-dev.c
+++ b/h
From: Longpeng
Implements the .realize interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 101 +++
include/hw/virtio/vdpa-dev.h | 8 +++
2 files changed, 109 insertions(+)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index b1037
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 77 +
From: Longpeng
Implements the .set_status interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 100 ++-
1 file changed, 99 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 7bf07fef9b..99722c88a1 100644
Move re-enabling INTX out, and the callers should decide to
re-enable it or not.
Signed-off-by: Longpeng(Mike)
---
hw/vfio/pci.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index dd30806..d5e542b 100644
--- a/hw/vfio/pci.c
Extract a common helper that add MSI route for specific vector
but does not commit immediately.
Signed-off-by: Longpeng(Mike)
---
accel/kvm/kvm-all.c | 15 +--
include/sysemu/kvm.h | 6 ++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/accel/kvm/kvm-all.c b
ned-off-by: Longpeng(Mike)
---
hw/vfio/pci.c | 20 +++-
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 1ff84e6..69ad081 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -569,9 +569,6 @@ static void vfio_msix_vector_release(PCIDe
:
- fix several typos and grammatical errors [Alex, Philippe]
- split fixups and cleanups into separate patches [Alex, Philippe]
- introduce kvm_irqchip_add_deferred_msi_route to
minimize code changes[Alex]
- enable the optimization in msi setup path[Alex]
Longpeng (Mike) (6):
It's unnecessary to test against the specific return value of
VFIO_DEVICE_SET_IRQS, since any positive return is an error
indicating the number of vectors we should retry with.
Signed-off-by: Longpeng(Mike)
---
hw/vfio/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
Use vfio_msi_disable_common to simplify the error handling
in vfio_msi_enable.
Signed-off-by: Longpeng(Mike)
---
hw/vfio/pci.c | 16 ++--
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index d5e542b..1ff84e6 100644
--- a/hw/vfio/pci.c
s that already assigned and need to process in this
round.
The optimization can be applied to msi type too.
Signed-off-by: Longpeng(Mike)
---
hw/vfio/pci.c | 123 --
hw/vfio/pci.h | 1 +
2 files changed, 95 insertions(+), 29 deletions(-)
diff -
From: Longpeng
Update headers to 5.18-rc6. I need latest vhost changes.
Signed-off-by: Longpeng
---
linux-headers/linux/vhost.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index c998860d7b..5d99e7c242 100644
--- a/linux-h
6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (4):
linux-headers: Update headers to Linux 5.18-rc6
virtio: get class_id and pci device id by the virtio id
vdpa: add vdpa-dev support
vdpa: add vdpa-dev-pci support
hw/virtio/Kconfig
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 77 +
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 101 +++
2 files changed, 102 insertions
From: Longpeng
Supports vdpa-dev.
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev.c | 385 +++
include/hw/virtio/vdpa-dev.h | 43
4 files changed, 434 insertions(+)
create
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev
get_u32 as a common
function to make the code clearer [Stefan]
- fix the misleading description of 'dc->desc' [Stefano]
Patch 5:
- check returned number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
From: Longpeng
Update headers to 5.18-rc6. I need latest vhost changes.
Signed-off-by: Longpeng
---
linux-headers/linux/vhost.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index c998860d7b..5d99e7c242 100644
--- a/linux-h
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 101 +++
2 files changed, 102 insertions
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 77 +
eck returned number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (4):
linux-headers: Update headers to Linux 5.18-rc6
virtio: get class_id and pci device id by the virtio id
vdpa: add vdpa-dev support
vdpa: a
From: Longpeng
Update headers to 5.18-rc6. I need latest vhost changes.
Signed-off-by: Longpeng
---
linux-headers/linux/vhost.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index c998860d7b..5d99e7c242 100644
--- a/linux-h
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 101
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Reviewed-by: Stefano Garzarella
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 102 +++
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Reviewed-by: Stefano Garzarella
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 102 +++
From: Longpeng
Update headers to 5.18-rc6. I need latest vhost changes.
Signed-off-by: Longpeng
---
linux-headers/linux/vhost.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index c998860d7b..5d99e7c242 100644
--- a/linux-h
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev
number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (4):
linux-headers: Update headers to Linux 5.18-rc6
virtio: get class_id and pci device id by the virtio id
vdpa: add vdpa-dev support
vdpa: add vdpa-dev-
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 88 +
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id" of the
deivce which is specificed by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 93 +++
-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X
I've done some simple tests on Huawei's offloading card (net, 0.95)
and vdpa_sim_blk (1.0);
Note:
the kernel part does not send out yet, I'll send it as soon as possible.
[1] https://lore.kernel.org/all/20211208052010.1719-1-longpe...@h
From: Longpeng
To support generic vdpa deivce, we need add the following ioctls:
- GET_VECTORS_NUM: the count of vectors that supported
- GET_CONFIG_SIZE: the size of the virtio config space
- GET_VQS_NUM: the count of virtqueues that exported
Signed-off-by: Longpeng
---
linux-headers/linux/vh
From: Longpeng
Implements the .instance_init and the .class_init interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev-pci.c | 80 +++-
hw/virtio/vdpa-dev.c | 68 +-
include/hw/virtio/vdpa-dev.h | 2 +
3 files changed
From: Longpeng
Implements the .realize interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 114 +++
include/hw/virtio/vdpa-dev.h | 8 +++
2 files changed, 122 insertions(+)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 79011
From: Longpeng
Add the infrastructure of vdpa-dev (the generic vDPA device), we
can add a generic vDPA device as follow:
-device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5
hw/virtio/meson.build| 2 ++
hw/virti
From: Longpeng
Implements the .get_config and .set_config interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 4e4dd3d201..4f97a7521b 100644
--- a/hw/vir
From: Longpeng
Implements the .unrealize interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 2d534d837a..4e4dd3d201 100644
--- a/hw/virtio/vdpa-d
From: Longpeng
The generic vDPA device doesn't support migration currently, so
mark it as unmigratable temporarily.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 64649bfb5a..0644aace22 1006
From: Longpeng
Implements the .set_status interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 100 ++-
1 file changed, 99 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 32b3117c4b..64649bfb5a 100644
From: Longpeng
Implements the .get_features interface.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 4f97a7521b..32b3117c4b 100644
--- a/hw/virtio/vdpa-dev.c
+++ b/h
remove CONFIG_SEM_TIMEDWAIT in this way? No, because some systems
(e.g. mac os) mark the sem_xxx API as deprecated.
So maybe remove the usage of POSIX semaphore and turn to use the
pthread variant for all systems looks better.
Signed-off-by: Longpeng(Mike)
---
include/qemu/thread-posix.h | 4
Use CLOCK_MONOTONIC, so the timeout isn't affected by changes
to the system time. It depends on the pthread_condattr_setclock(),
while some systems(e.g. mac os) do not support it, the behavior
won't change in these systems.
Signed-off-by: Longpeng(Mike)
---
include/qemu/thread-po
realtime clock, this could
make sure we would not be affected by the system time anymore.
Longpeng (Mike) (2):
sem-posix: remove the posix semaphore support
sem-posix: use monotonic clock instead
include/qemu/thread-posix.h | 5 +--
meson.build | 12 ++-
util/qemu-thread
Use CLOCK_MONOTONIC, so the timeout isn't affected by changes to
the system time. It depends on the pthread_condattr_setclock(),
while some systems(e.g. mac os) does not support it, so the behavior
won't change in these systems.
Signed-off-by: Longpeng(Mike)
---
meson.build
remove CONFIG_SEM_TIMEDWAIT in this way? No, because some systems
(e.g. mac os) mark the sem_xxx API as deprecated.
So maybe remove the usage of POSIX semaphore and turn to use the
pthread variant for all systems looks better.
Signed-off-by: Longpeng(Mike)
---
include/qemu/thread-posix.h | 4
realtime clock, this could
make sure we would not be affected by the system time anymore.
Changes v1(RFC) -> v2:
Patch 2:
- clean the code [Paolo]
- use pthread_condattr_setclock when initializing qemu-cond. [Paolo]
Patch 3:
- new added, make the qemu-sem code neater. [Longpeng]
Longpeng (M
Now, qemu-sem is based on the pthread_cond only, we can use
qemu-cond and qemu-mutex to make the code neater and the mutex
trace can be supported in qemu-sem naturally.
Signed-off-by: Longpeng(Mike)
---
include/qemu/thread-posix.h | 5 +--
util/qemu-thread-posix.c| 103
From: Longpeng
This patchset moves the call to kvm_irqchip_commit_routes() out of
kvm_irqchip_add_msi_route(). An optimization of vfio migration [1]
depends on this changes.
[1] https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg00968.html
Longpeng (Mike) (2):
kvm-irqchip: introduce
From: Longpeng
Paolo suggested adding the new API to support route changes [1]. We should
invoke
kvm_irqchip_begin_route_changes() before changing the routes, increasing the
KVMRouteChange.changes if the routes are changed, and commit the changes at
last.
[1] https://lists.gnu.org/archive/html
From: Longpeng
We invoke the kvm_irqchip_commit_routes() for each addition to MSI route
table, which is not efficient if we are adding lots of routes in some cases.
This patch lets callers invoke the kvm_irqchip_commit_routes(), so the
callers can decide how to optimize.
[1] https://lists.gnu.o
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
h
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 88 +++
of 'dc->desc' [Stefano]
Patch 5:
- check returned number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (4):
virtio: get class_id and pci device id by the virtio id
vdpa: add vdpa-dev support
vd
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 102 +
From: Longpeng
Signed-off-by: Longpeng
---
docs/system/devices/vhost-vdpa-device.rst | 43 +++
1 file changed, 43 insertions(+)
create mode 100644 docs/system/devices/vhost-vdpa-device.rst
diff --git a/docs/system/devices/vhost-vdpa-device.rst
b/docs/system/devices/vhost-
of 'dc->desc' [Stefano]
Patch 5:
- check returned number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (4):
virtio: get class_id and pci device id by the virtio id
vdpa: add vdpa-dev support
vd
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 88 +++
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
h
From: Longpeng
Signed-off-by: Longpeng
---
docs/system/devices/vhost-vdpa-device.rst | 43 +++
1 file changed, 43 insertions(+)
create mode 100644 docs/system/devices/vhost-vdpa-device.rst
diff --git a/docs/system/devices/vhost-vdpa-device.rst
b/docs/system/devices/vhost-
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 102 +
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
h
he code clearer [Stefan]
- fix the misleading description of 'dc->desc' [Stefano]
Patch 5:
- check returned number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (5):
virtio: get class_id and pc
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 102 +
From: Longpeng
Signed-off-by: Longpeng
---
docs/system/devices/vhost-vdpa-device.rst | 43 +++
1 file changed, 43 insertions(+)
create mode 100644 docs/system/devices/vhost-vdpa-device.rst
diff --git a/docs/system/devices/vhost-vdpa-device.rst
b/docs/system/devices/vhost-
From: Longpeng
The generic vDPA device doesn't support migration currently, so
mark it as unmigratable temporarily.
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c
index 2885d06cbe..62d83d3423 1006
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 88 +++
From: Longpeng
Signed-off-by: Longpeng
---
.../devices/vhost-vdpa-generic-device.rst | 46 +++
1 file changed, 46 insertions(+)
create mode 100644 docs/system/devices/vhost-vdpa-generic-device.rst
diff --git a/docs/system/devices/vhost-vdpa-generic-device.rst
b/docs/syste
From: Longpeng
Supports vdpa-dev, we can use the deivce directly:
-M microvm -m 512m -smp 2 -kernel ... -initrd ... -device \
vhost-vdpa-device,vhostdev=/dev/vhost-vdpa-x
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/Kconfig| 5 +
h
From: Longpeng
Supports vdpa-dev-pci, we can use the device as follow:
-device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-X
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/meson.build| 1 +
hw/virtio/vdpa-dev-pci.c | 102 +
From: Longpeng
Add helpers to get the "Transitional PCI Device ID" and "class_id"
of the device specified by the "Virtio Device ID".
These helpers will be used to build the generic vDPA device later.
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/virtio-pci.c | 88 +++
number of virtqueues [Stefan]
Patch 6:
- init s->num_queues [Stefano]
- free s->dev.vqs [Stefano]
Longpeng (Mike) (5):
virtio: get class_id and pci device id by the virtio id
vdpa: add vdpa-dev support
vdpa: add vdpa-dev-pci support
vdpa-dev: mark the device as unmigr
From: Longpeng
The generic vDPA device doesn't support migration currently, so
mark it as unmigratable temporarily.
Reviewed-by: Stefano Garzarella
Acked-by: Jason Wang
Signed-off-by: Longpeng
---
hw/virtio/vdpa-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vdpa-dev.c b
From: Longpeng
The kvm_irqchip_commit_routes() is a time-intensive operation, it needs
scan and update all irqfds that are already assigned during each invocation,
so more vectors means need more time to process them. For virtio-pci, we
can just submit once when enabling vectors of a virtio-pci d
From: Longpeng
This patchset optimizes the time-consuming operation in
virtio_pci_set_guest_notifier,
especially for the vhost-vdpa migration, the time spend on set_guest_notifier
can
reduce 87% in some cases.
Longpeng (Mike) (3):
virtio-pci: submit msi route changes in batch
kvm-irqchip
From: Longpeng
The KVMRouteChange API is added by commit 9568690868e ("kvm-irqchip:
introduce new API to support route change"). We can also apply it on
kvm_irqchip_update_msi_route(), there are no functional changes and
we can optimize the virtio-pci core base on this change in the next
patch.
From: Longpeng
All unmasked vectors will be setup in msix_set_vector_notifiers(), which
is a time-consuming operation because each vector need to be submit to
KVM once. It's even worse if the VM has several devices and each devices
has dozens of vectors.
We can defer and commit the vectors in ba
1 - 100 of 537 matches
Mail list logo