[Qemu-devel] [PATCH v3] migration: optimize the downtime

2017-07-28 Thread Jay Zhou
v1->v2: - create a VMChangeStateHandler in memory.c to reduce the coupling [Paolo] Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- memory.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/memory.c b/memory.c index a7bc70a..c0

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-21 Thread Jay Zhou
Hi Dave, On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests with a 8U24G vm(20G is really occupied), the main cost comes from KVM_SET_USER_MEMORY_REGION ioctl when mem.memory_size

Re: [Qemu-devel] [PATCH v2] migration: optimize the downtime

2017-07-28 Thread Jay Zhou
Hi Paolo, On 2017/7/27 22:15, Paolo Bonzini wrote: On 27/07/2017 04:36, Jay Zhou wrote: Qemu_savevm_state_cleanup takes about 300ms in my ram migration tests with a 8U24G vm(20G is really occupied), the main cost comes from KVM_SET_USER_MEMORY_REGION ioctl when mem.memory_size = 0

[Qemu-devel] [PATCH v2] migration: optimize the downtime

2017-07-26 Thread Jay Zhou
the active_mmu_pages list to zap the unsync sptes. It can be optimized by delaying memory_global_dirty_log_stop to the next vm_start. Changes v1->v2: - create a VMChangeStateHandler in memory.c to reduce the coupling [Paolo] Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- memo

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-25 Thread Jay Zhou
On 2017/7/24 23:35, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Hi Dave, On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests with a 8U24G vm(20G

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-25 Thread Jay Zhou
On 2017/7/25 0:33, Paolo Bonzini wrote: On 24/07/2017 17:35, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Hi Dave, On 2017/7/21 17:49, Dr. David Alan Gilbert wrote: * Jay Zhou (jianjay.z...@huawei.com) wrote: Qemu_savevm_state_cleanup() takes about 300ms in my

[Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-19 Thread Jay Zhou
the active_mmu_pages list to zap the unsync sptes. I think it can be optimized: (1) source vm will be destroyed if the migration is successfully done, so the resources will be cleanuped automatically by the system (2) delay the cleanup if the migration failed Signed-off-by: Jay Zhou <jianja

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-31 Thread Jay Zhou
Hi Dave, On 2017/7/25 18:34, Dr. David Alan Gilbert wrote: After checking the codes of the newest libvirt, I think it is the same in the qemuMigrationWaitForCompletion function, which is used to poll qemu every 50ms. Checking with Jiri Denemark (added to cc), newer libvirt should use events

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-17 Thread Jay Zhou
TLB-stores (16.50%) 93,793 iTLB-load-misses #7.43% of all iTLB cache hits (16.67%) 1,262,137 iTLB-loads (33.33%) 10.000709900 seconds time elapsed Regards, Jay Zhou Regards, Wanpeng Li These are

[Qemu-devel] [PATCH RFC] KVM: X86: save and load PVCLOCK_TSC_UNSTABLE_BIT when migration

2017-06-12 Thread Jay Zhou
-off-by: Jay Zhou <jianjay.z...@huawei.com> --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/uapi/asm/kvm.h | 2 ++ arch/x86/kvm/x86.c | 7 --- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/inclu

[Qemu-devel] [PATCH RFC] migration: kvmclock: save and load the PVCLOCK_TSC_UNSTABLE_BIT flag when migration

2017-06-12 Thread Jay Zhou
-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/i386/kvm/clock.c | 12 ++-- linux-headers/asm-x86/kvm.h | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 13eca37..fcc4f62 100644 --- a/hw/i386/kvm/clock.c

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-19 Thread Jay Zhou
Hi Xiao, On 2017/5/19 16:32, Xiao Guangrong wrote: I do not know why i was removed from the list. I was CCed to you... Your comments are very valuable to us, and thank for your quick response. On 05/19/2017 04:09 PM, Jay Zhou wrote: Hi Paolo and Wanpeng, On 2017/5/17 16:38, Wanpeng Li

Re: [Qemu-devel] [PATCH 0/7] KVM: MMU: fast write protect

2017-06-05 Thread Jay Zhou
ry_global_dirty_log_stop(void); +typedef void (*write_protect_all_fn)(bool write); +void memory_register_write_protect_all(write_protect_all_fn func); + void mtree_info(fprintf_function mon_printf, void *f); -- Best Regards, Jay Zhou

Re: [Qemu-devel] [PATCH RFC] KVM: X86: save and load PVCLOCK_TSC_UNSTABLE_BIT when migration

2017-06-13 Thread Jay Zhou
Hi Radim, On 2017/6/13 3:52, Radim Krčmář wrote: 2017-06-12 21:23+0800, Jay Zhou: Guest using kvmclock will be hanged when migrating from unstable tsc host to stable tsc host occasionally. Sometimes, the tsc timestamp saved at the source side will be backward when the guest stopped

Re: [Qemu-devel] [PATCH RFC] migration: kvmclock: save and load the PVCLOCK_TSC_UNSTABLE_BIT flag when migration

2017-06-13 Thread Jay Zhou
Hi Radim, On 2017/6/13 4:03, Radim Krčmář wrote: 2017-06-12 21:30+0800, Jay Zhou: Guest using kvmclock will be hanged when migrating from unstable tsc host to stable tsc host occasionally. Sometimes, the tsc timestamp saved at the source side will be backward when the guest stopped

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-19 Thread Jay Zhou
ioctl_run+0xd5/0x440 [kvm] [139574.369205] [] kvm_vcpu_ioctl+0x2b1/0x640 [kvm] [139574.369209] [] ? do_futex+0x122/0x5b0 [139574.369212] [] do_vfs_ioctl+0x2e5/0x4c0 [139574.369223] [] ? kvm_on_user_return+0x75/0xb0 [kvm] [139574.369225] [] SyS_ioctl+0xa1/0xc0 [139574.369229] [] system_call_fastpath+0x16/0x1b Any suggestion will be appreciated, Thanks! Regards, Jay Zhou

[Qemu-devel] [PATCH] docs/devel/migration.txt: keep functions consistent with the code

2017-11-23 Thread Jay Zhou
Since the commit 11808bb0c422134bf09119f4aa22c59b0ce84bf3 removed the put_buffer callback and using an iovec based write handler instead, the docs should be sync with the code too. Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- docs/devel/migration.tx

Re: [Qemu-devel] [PATCH] docs/devel/migration.txt: keep functions consistent with the code

2017-12-04 Thread Jay Zhou
Hi, Does this document update make sense? Regards, Jay On 2017/11/23 16:47, Jay Zhou wrote: Since the commit 11808bb0c422134bf09119f4aa22c59b0ce84bf3 removed the put_buffer callback and using an iovec based write handler instead, the docs should be sync with the code too. Signed-off-by: Jay

[Qemu-devel] [PATCH 1/2] vhost: add used memslot number for vhost-user

2017-12-14 Thread Jay Zhou
memory slots can be used by vhost user, it is failed to hot plug a new memory RAM because vhost_has_free_slot just returned false, but we can hot plug it safely in fact. Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Zhe Liu <gary.liu...@huawei.com> --- hw/v

[Qemu-devel] [PATCH 0/2] vhost: two fixes

2017-12-14 Thread Jay Zhou
Jay Zhou (2): vhost: add used memslot number for vhost-user vhost: double check memslot number hw/virtio/vhost-user.c| 31 + hw/virtio/vhost.c | 49 ++- include/hw/virtio/vhost-backend.h | 4 3

[Qemu-devel] [PATCH 2/2] vhost: double check memslot number

2017-12-14 Thread Jay Zhou
If the VM already has N(N>=8) available memory slots for vhost user, the VM will be crashed in vhost_user_set_mem_table if we try to hotplug the first vhost user NIC. This patch checks if memslot number exceeded or not after updating vhost_user_used_memslots. Signed-off-by: Jay Zhou <jia

[Qemu-devel] [PATCH v2 2/2] vhost: double check used memslots number

2017-12-15 Thread Jay Zhou
If the VM already has N(N>8) available memory slots for vhost user, the VM will be crashed in vhost_user_set_mem_table if we try to hotplug the first vhost user NIC. This patch checks if memslots number exceeded or not after updating vhost_user_used_memslots. Signed-off-by: Jay Zhou <jia

[Qemu-devel] [PATCH v2 0/2] vhost: two fixes

2017-12-15 Thread Jay Zhou
v1 -> v2: * delete the "used_memslots" global variable, and add it for vhost-user and vhost-kernel separately Jay Zhou (2): vhost: add used memslot number for vhost-user and vhost-kernel separately vhost: double check used memslots number hw/virtio/vhost-backend.c

[Qemu-devel] [PATCH v2 1/2] vhost: add used memslot number for vhost-user and vhost-kernel separately

2017-12-15 Thread Jay Zhou
memory slots can be used by vhost user, it is failed to hot plug a new memory RAM because vhost_has_free_slot just returned false, but we can hot plug it safely in fact. Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Zhe Liu <gary.liu...@huawei.com> --- hw/virt

[Qemu-devel] [RFC PATCH] vhost-user: quit infinite loop while used memslots is more than the backend limit

2017-12-12 Thread Jay Zhou
ich means it can not reduce the number of memslots, it must be failed at last. Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/virtio/vhost.c | 3 +++ include/hw/virtio/vhost.h | 2 ++ net/vhost-user.c | 5 + 3 files changed, 10 insertions(+) diff --git a/hw/virt

[Qemu-devel] [PATCH] backends/cryptodev: fix coverity issue

2018-04-27 Thread Jay Zhou
This patch removes the dead code, which fixes Coverity (CID 1390600) issue. Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 5 - 1 file changed, 5 deletions(-) diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH] memory: delete struct AddressSpaceOps

2018-05-15 Thread Jay Zhou
Since struct AddressSpaceOps isn't used anywhere else, so just delete it. Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- memory.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/memory.c b/memory.c index fc7f9b7..94b91f9 100644 --- a/memory.c +++ b/memory.c @@ -220,8 +220,6 @@

[Qemu-devel] [PATCH v4] vhost: set used memslots for vhost-user and vhost-kernel respectively

2017-12-29 Thread Jay Zhou
fixed the VM crash issue. Suggested-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Zhe Liu <gary.liu...@huawei.com> --- hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhos

[Qemu-devel] [PATCH RESEND v4] vhost: set used memslots for vhost-user and vhost-kernel respectively

2017-12-29 Thread Jay Zhou
fixed the VM crash issue. Suggested-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Liuzhe <liuzh...@huawei.com> --- hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhos

[Qemu-devel] [PATCH v2 3/4] cryptodev-vhost-user: add crypto session handler

2017-12-30 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 50 +- docs/interop/vhost-user.txt | 19 + hw/virtio/vhost-user.c| 89 +++

[Qemu-devel] [PATCH v2 4/4] cryptodev-vhost-user: set the key length

2017-12-30 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH v2 1/4] cryptodev: add vhost-user as a new cryptodev backend

2017-12-30 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 4 + backends/cryptodev-vhost-user.c | 333 +++ backends/cryptodev-vhost.c | 73 + include/sysemu

[Qemu-devel] [PATCH v2 0/4] cryptodev: add vhost support

2017-12-30 Thread Jay Zhou
From: Gonglei I posted the RFC verion five months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK community,

[Qemu-devel] [PATCH v2 2/4] cryptodev: add vhost support

2017-12-30 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH v5 1/4] vhost: remove assertion to prevent crash

2018-01-09 Thread Jay Zhou
...@nongnu.org Signed-off-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/virtio/vhost-user.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 093675e..8500562 100

[Qemu-devel] [PATCH v5 4/4] vhost: used_memslots refactoring

2018-01-09 Thread Jay Zhou
; Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Liuzhe <liuzh...@huawei.com> --- hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhost-user.c| 77 ++- hw/virtio/vhost.c | 13 +++ include/h

[Qemu-devel] [PATCH v5 3/4] vhost: fix memslot limit check

2018-01-09 Thread Jay Zhou
Since used_memslots will be updated to the actual value after registering memory listener for the first time, move the memslots limit checking to the right place. Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/virtio/vhost.c | 19 --- 1 file changed, 12 insertions

[Qemu-devel] [PATCH v5 0/4] vhost: two fixes and used_memslots refactoring

2018-01-09 Thread Jay Zhou
v4 -> v5: Making the followed up device_add to fall back to userspace virtio when netdev_add fails if vhost force flag does not set. Jay Zhou (4): vhost: remove assertion to prevent crash tap: do not close fd if only vhost failed to initialize vhost: fix memslot limit check vh

[Qemu-devel] [PATCH v5 2/4][RFC] tap: do not close fd if only vhost failed to initialize

2018-01-09 Thread Jay Zhou
Making the followed up device_add to fall back to userspace virtio when netdev_add fails if vhost force flag does not set. Suggested-by: Michael S. Tsirkin <m...@redhat.com> Suggested-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> -

[Qemu-devel] [PATCH v4 2/5] cryptodev: add vhost support

2018-01-18 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH v4 1/5] cryptodev: add vhost-user as a new cryptodev backend

2018-01-18 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 4 + backends/cryptodev-vhost-user.c | 333 +++ backends/cryptodev-vhost.c | 73 + include/sysemu

[Qemu-devel] [PATCH v4 4/5] cryptodev-vhost-user: set the key length

2018-01-18 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH v4 3/5] cryptodev-vhost-user: add crypto session handler

2018-01-18 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 50 ++ docs/interop/vhost-user.txt | 26 ++ hw/virtio/vhost-user.c| 104 ++

[Qemu-devel] [PATCH v4 5/5] cryptodev-vhost-user: depend on CONFIG_VHOST_CRYPTO and CONFIG_VHOST_USER

2018-01-18 Thread Jay Zhou
From: Gonglei <arei.gong...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 4 +++- backends/cryptodev-vhost.c | 57 +++--- configure | 15 vl.c

[Qemu-devel] [PATCH v4 0/5] cryptodev: add vhost support

2018-01-18 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK

[Qemu-devel] [PATCH v3 0/4] cryptodev: add vhost support

2018-01-16 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK

[Qemu-devel] [PATCH v3 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-01-16 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 4 + backends/cryptodev-vhost-user.c | 333 +++ backends/cryptodev-vhost.c | 73 + include/sysemu

[Qemu-devel] [PATCH v3 2/4] cryptodev: add vhost support

2018-01-16 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH v6 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-01-21 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 6 + backends/cryptodev-vhost-user.c | 333 +++ backends/cryptodev-vhost.c | 8

[Qemu-devel] [PATCH v6 4/4] cryptodev-vhost-user: set the key length

2018-01-21 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH v6 0/4] cryptodev: add vhost support

2018-01-21 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK

[Qemu-devel] [PATCH v6 3/4] cryptodev-vhost-user: add crypto session handler

2018-01-21 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 48 ++ docs/interop/vhost-user.txt | 26 ++ hw/virtio/vhost-user.c| 104 ++

[Qemu-devel] [PATCH v6 2/4] cryptodev: add vhost support

2018-01-21 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH v5 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-01-18 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 5 + backends/cryptodev-vhost-user.c | 333 +++ backends/cryptodev-vhost.c | 8

[Qemu-devel] [PATCH v5 0/4] cryptodev: add vhost support

2018-01-18 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK

[Qemu-devel] [PATCH v5 4/4] cryptodev-vhost-user: set the key length

2018-01-18 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH v5 2/4] cryptodev: add vhost support

2018-01-18 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH v5 3/4] cryptodev-vhost-user: add crypto session handler

2018-01-18 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 50 ++ docs/interop/vhost-user.txt | 26 ++ hw/virtio/vhost-user.c| 104 ++

[Qemu-devel] [PATCH v7 0/2] vhost: used_memslots limit check fixes and refactoring

2018-01-21 Thread Jay Zhou
v6 -> v7: rebase on the master Jay Zhou (2): vhost: fix memslot limit check vhost: used_memslots refactoring hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhost-user.c| 77 ++- hw/virtio/vhost.c |

[Qemu-devel] [PATCH v7 1/2] vhost: fix memslot limit check

2018-01-21 Thread Jay Zhou
Since used_memslots will be updated to the actual value after registering memory listener for the first time, move the memslots limit checking to the right place. Reviewed-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/virtio/

[Qemu-devel] [PATCH v7 2/2] vhost: used_memslots refactoring

2018-01-21 Thread Jay Zhou
; Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Liuzhe <liuzh...@huawei.com> --- hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhost-user.c| 77 ++- hw/virtio/vhost.c | 13 +++ include/h

[Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-01-25 Thread Jay Zhou
to initialize but without vhostforce flag. So the followed up device_add can fall back to userspace virtio successfully. Suggested-by: Michael S. Tsirkin <m...@redhat.com> Suggested-by: Igor Mammedov <imamm...@redhat.com> Suggested-by: Jason Wang <jasow...@redhat.com> Signed-off-by: J

[Qemu-devel] [PATCH v3 3/4] cryptodev-vhost-user: add crypto session handler

2018-01-16 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 50 ++ docs/interop/vhost-user.txt | 26 ++ hw/virtio/vhost-user.c| 104 ++

[Qemu-devel] [PATCH v3 4/4] cryptodev-vhost-user: set the key length

2018-01-16 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH v6 1/3] vhost: remove assertion to prevent crash

2018-01-11 Thread Jay Zhou
gracefully. Cc: qemu-sta...@nongnu.org Signed-off-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/virtio/vhost-user.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-

[Qemu-devel] [PATCH v6 2/3] vhost: fix memslot limit check

2018-01-11 Thread Jay Zhou
Since used_memslots will be updated to the actual value after registering memory listener for the first time, move the memslots limit checking to the right place. Reviewed-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/virtio/

[Qemu-devel] [PATCH v6 0/3] vhost: two fixes and used_memslots refactoring

2018-01-11 Thread Jay Zhou
Jay Zhou (3): vhost: remove assertion to prevent crash vhost: fix memslot limit check vhost: used_memslots refactoring hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhost-user.c| 74 +++ hw/virtio/vhost.c | 30

[Qemu-devel] [PATCH v6 3/3] vhost: used_memslots refactoring

2018-01-11 Thread Jay Zhou
; Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Liuzhe <liuzh...@huawei.com> --- hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhost-user.c| 77 ++- hw/virtio/vhost.c | 13 +++ include/h

[Qemu-devel] [PATCH] tap: close fd conditionally when error occured

2018-01-11 Thread Jay Zhou
but without vhostforce flag. So the followed up device_add can fall back to userspace virtio successfully. Suggested-by: Michael S. Tsirkin <m...@redhat.com> Suggested-by: Igor Mammedov <imamm...@redhat.com> Suggested-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Jay Zhou <ji

[Qemu-devel] [PATCH v3] tap: close fd conditionally when error occured

2018-02-02 Thread Jay Zhou
failed to open or initialize but without vhostforce flag. So the followed up device_add can fall back to userspace virtio successfully. Suggested-by: Michael S. Tsirkin <m...@redhat.com> Suggested-by: Igor Mammedov <imamm...@redhat.com> Suggested-by: Jason Wang <jasow...@redhat.com>

Re: [Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-02-02 Thread Jay Zhou
Hi Jason, On 2018/2/2 14:56, Jason Wang wrote: On 2018年02月02日 11:53, Jay Zhou wrote: Hi Jason, On 2018/2/2 11:11, Jason Wang wrote: On 2018年01月26日 11:08, Jay Zhou wrote: If netdev_add tap,id=net0,...,vhost=on failed in net_init_tap_one(), the followed up device_add virtio-net-pci,netdev

Re: [Qemu-devel] [PATCH v6 0/4] cryptodev: add vhost support

2018-02-01 Thread Jay Zhou
On 2018/2/2 1:06, Michael S. Tsirkin wrote: Yes, I plan to merge it in the next pull. Pls don't assume anything until it's merged upstream though, some issues surface late. Okay, I see. Thanks for reviewing! Regards, Jay On Thu, Feb 01, 2018 at 11:29:15AM +, Zhoujian (jay) wrote: Hi

Re: [Qemu-devel] [PATCH v2] tap: close fd conditionally when error occured

2018-02-01 Thread Jay Zhou
Hi Jason, On 2018/2/2 11:11, Jason Wang wrote: On 2018年01月26日 11:08, Jay Zhou wrote: If netdev_add tap,id=net0,...,vhost=on failed in net_init_tap_one(), the followed up device_add virtio-net-pci,netdev=net0 will fail too, prints: TUNSETOFFLOAD ioctl() failed: Bad file descriptor

[Qemu-devel] [PATCH v4] tap: setting error appropriately when calling net_init_tap_one()

2018-02-06 Thread Jay Zhou
failed to open or initialize but without vhostforce flag. So the followed up device_add can fall back to userspace virtio successfully. Suggested-by: Michael S. Tsirkin <m...@redhat.com> Suggested-by: Igor Mammedov <imamm...@redhat.com> Suggested-by: Jason Wang <jasow...@redhat.com>

[Qemu-devel] [PATCH v3] vhost: add used memslot number for vhost-user and vhost-kernel separately

2017-12-28 Thread Jay Zhou
fixed the VM crash issue. Suggested-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Zhe Liu <gary.liu...@huawei.com> --- hw/virtio/vhost-backend.c | 14 +++ hw/virtio/vhos

[Qemu-devel] [PATCH] memory: update comments and fix some typos

2018-01-03 Thread Jay Zhou
Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- include/exec/memory.h | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index a4cabdf..6e5684d 100644 --- a/include/exec/memory.h +++ b/includ

[Qemu-devel] [PATCH v8 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-02-26 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 6 + backends/cryptodev-vhost-user.c | 331 +++ backends/cryptodev-vhost.c | 8

[Qemu-devel] [PATCH v8 2/4] cryptodev: add vhost support

2018-02-26 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH v8 3/4] cryptodev-vhost-user: add crypto session handler

2018-02-26 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 48 ++ docs/interop/vhost-user.txt | 26 ++ hw/virtio/vhost-user.c| 104 ++

[Qemu-devel] [PATCH v8 0/4] cryptodev: add vhost support

2018-02-26 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK

[Qemu-devel] [PATCH v8 4/4] cryptodev-vhost-user: set the key length

2018-02-26 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH v8 0/2] vhost: used_memslots limit check fixes and refactoring

2018-02-26 Thread Jay Zhou
v8: - rebased on the master v7: - rebased on the master v2 ... v6: - delete the "used_memslots" global variable, and add it for vhost-user and vhost-kernel separately - refine the function, commit log - used_memslots refactoring Jay Zhou (2): vhost: fix memslot limit che

[Qemu-devel] [PATCH v8 2/2] vhost: used_memslots refactoring

2018-02-26 Thread Jay Zhou
; Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Liuzhe <liuzh...@huawei.com> --- hw/virtio/vhost-backend.c | 15 +++- hw/virtio/vhost-user.c| 77 ++- hw/virtio/vhost.c | 13 +++ include/h

[Qemu-devel] [PATCH v8 1/2] vhost: fix memslot limit check

2018-02-26 Thread Jay Zhou
Since used_memslots will be updated to the actual value after registering memory listener for the first time, move the memslots limit checking to the right place. Reviewed-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- hw/virtio/

[Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Jay Zhou
: invalid runstate transition: 'prelaunch' -> 'postmigrate' Aborted The run state transition is RUN_STATE_FINISH_MIGRATE to RUN_STATE_PRELAUNCH, then the migration thread aborted when it tries to set RUN_STATE_POSTMIGRATE. There is a race between the main loop thread and the migration thread I think.

[Qemu-devel] [PATCH RESEND v8 2/4] cryptodev: add vhost support

2018-03-01 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH RESEND v8 4/4] cryptodev-vhost-user: set the key length

2018-03-01 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH RESEND v8 3/4] cryptodev-vhost-user: add crypto session handler

2018-03-01 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 48 ++ docs/interop/vhost-user.txt | 26 ++ hw/virtio/vhost-user.c| 104 ++

[Qemu-devel] [PATCH RESEND v8 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-03-01 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 6 + backends/cryptodev-vhost-user.c | 331 +++ backends/cryptodev-vhost.c | 8

[Qemu-devel] [PATCH RESEND v8 0/4] cryptodev: add vhost support

2018-03-01 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK

[Qemu-devel] [PATCH RESEND v10] vhost: used_memslots refactoring

2018-03-26 Thread Jay Zhou
; Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Liuzhe <liuzh...@huawei.com> --- v10: - fix misaligned access to structures - refine on setting used_memslots for vhost-user to avoid side effect - distinguish "has free memslots" and "out of memslo

[Qemu-devel] [PATCH v10] vhost: used_memslots refactoring

2018-03-26 Thread Jay Zhou
; Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by: Liuzhe <liuzh...@huawei.com> --- v10: - fix misaligned access to structures - refine on setting used_memslots for vhost-user to avoid side effect v7 ... v9: - rebased on the master v2 ... v6: - delete the "u

[Qemu-devel] [PATCH v9] vhost: used_memslots refactoring

2018-03-05 Thread Jay Zhou
delete the "used_memslots" global variable, and add it for vhost-user and vhost-kernel separately - refine the function, commit log - used_memslots refactoring Signed-off-by: Igor Mammedov <imamm...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> Signed-off-by:

[Qemu-devel] [PATCH v7 0/4] cryptodev: add vhost support

2018-02-26 Thread Jay Zhou
From: Gonglei I posted the RFC verion a few months ago for DPDK vhost-crypto implmention, and now it's time to send the formal version. Because we need an user space scheme for better performance. The vhost user crypto server side patches had been sent to DPDK

[Qemu-devel] [PATCH v7 2/4] cryptodev: add vhost support

2018-02-26 Thread Jay Zhou
point, the cryptdoev-vhost-user works. Signed-off-by: Gonglei <arei.gong...@huawei.com> Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-builtin.c | 1 + backends/cryptodev-vhost-user.c | 16

[Qemu-devel] [PATCH v7 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-02-26 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/Makefile.objs | 6 + backends/cryptodev-vhost-user.c | 331 +++ backends/cryptodev-vhost.c | 8

[Qemu-devel] [PATCH v7 3/4] cryptodev-vhost-user: add crypto session handler

2018-02-26 Thread Jay Zhou
; Signed-off-by: Longpeng(Mike) <longpe...@huawei.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- backends/cryptodev-vhost-user.c | 48 ++ docs/interop/vhost-user.txt | 26 ++ hw/virtio/vhost-user.c| 104 ++

[Qemu-devel] [PATCH v7 4/4] cryptodev-vhost-user: set the key length

2018-02-26 Thread Jay Zhou
From: Gonglei Signed-off-by: Gonglei --- backends/cryptodev-vhost-user.c | 4 include/sysemu/cryptodev-vhost-user.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/backends/cryptodev-vhost-user.c

[Qemu-devel] [PATCH v5] tap: setting error appropriately when calling net_init_tap_one()

2018-03-02 Thread Jay Zhou
ed-by: Jason Wang <jasow...@redhat.com> Signed-off-by: Jay Zhou <jianjay.z...@huawei.com> --- include/net/vhost_net.h | 3 +++ net/tap.c | 22 +- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/include/net/vhost_net.h b/include/net/v

[PATCH] kvm: support to get/set dirty log initial-all-set capability

2020-03-03 Thread Jay Zhou
Since the new capability KVM_DIRTY_LOG_INITIALLY_SET of KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 has been introduced in the kernel, tweak the userspace side to detect and enable this capability. Signed-off-by: Jay Zhou --- accel/kvm/kvm-all.c | 21 ++--- linux-headers/linux/kvm.h

  1   2   >