Due to an off-by-one error, the assert statements allow an
out-of-bound array access.
Signed-off-by: Lidong Chen
Reviewed-by: Liam Merwick
Reviewed-by: Marc-André Lureau
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Li Qiang
Reviewed-by: Darren Kenny
---
hw/sd/sd.c | 4 ++--
1 file
The check for poll_fds in g_assert() was incorrect. The correct assertion
should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the
subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i
is in [0, w->num).
Signed-off-by: Lidong Chen
Suggeste
. Fix to silent static analyzer warnings."
As confirmed by Lidong in v1 here:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg01337.html
Thanks,
Phil.
---
Lidong Chen (2):
sd: Fix out-of-bounds assertions
util/main-loop: Fix incorrect assertion
hw/sd/sd.c | 4 ++--
Hi Philippe,
On 6/6/2019 4:18 PM, Philippe Mathieu-Daudé wrote:
On 6/5/19 9:15 PM, Lidong Chen wrote:
The check for poll_fds in g_assert() was incorrect. The correct assertion
should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the
subsequent for-loop is doing ac
The check for poll_fds in g_assert() was incorrect. The correct assertion
should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the
subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i
is in [0, w->num).
Signed-off-by: Lidong Chen
Suggeste
v1: Patch1 fixed out-of-bounds assertions in hw/sd/sd.c
v2: Added patch2 that fixed the incorrect assertion for poll_fds
in util/main-loop.c based on the feedbacks from Peter Maydell
and Liam Merwick,
Lidong Chen (2):
sd: Fix out-of-bounds assertions
util/main-loop: Fix incorrect
Due to an off-by-one error, the assert statements allow an
out-of-bound array access.
Signed-off-by: Lidong Chen
Reviewed-by: Liam Merwick
Reviewed-by: Marc-André Lureau
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Li Qiang
Reviewed-by: Darren Kenny
---
hw/sd/sd.c | 4 ++--
1 file
On 6/5/2019 1:57 AM, Philippe Mathieu-Daudé wrote:
This patch doesn't seem related to the series cover.
I will resent the patch to include more details to the cover.
On 6/5/19 8:21 AM, Lidong Chen wrote:
The check for poll_fds in g_assert() was incorrect. The correct assertion
should check
The check for poll_fds in g_assert() was incorrect. The correct assertion
should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the
subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i
is in [0, w->num).
Signed-off-by: Lidong Chen
Reviewed-by: L
The v2 changes include the fix for the incorrect assertion for poll_fds
in util/main-loop.c according to the review comments from the previous
sd fixes.
Lidong Chen (2):
sd: Fix out-of-bounds assertions
util/main-loop: Fix incorrect assertion
hw/sd/sd.c | 4 ++--
util/main-loop.c | 2
Due to an off-by-one error, the assert statements allow an
out-of-bound array access.
Signed-off-by: Lidong Chen
Reviewed-by: Liam Merwick
Reviewed-by: Marc-André Lureau
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Li Qiang
Reviewed-by: Darren Kenny
---
hw/sd/sd.c | 4 ++--
1 file
, Markus Armbruster wrote:
Lidong Chen writes:
Due to an off-by-one error, the assert statements allow an
out-of-bounds array access.
Signed-off-by: Lidong Chen
Reviewed-by: Liam Merwick
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw
Hi Philippe,
On 4/8/2019 2:27 PM, Philippe Mathieu-Daudé wrote:
Hi Lidong
On 4/8/19 9:04 PM, Lidong Chen wrote:
Due to an off-by-one error, the assert statements allow an
out-of-bounds array access.
... which can't happen. Thus harmless for 4.0.
I suppose this is a static analysis warning
Due to an off-by-one error, the assert statements allow an
out-of-bounds array access.
Signed-off-by: Lidong Chen
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index aaab15f..818f86c 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
The destination qemu only poll the comp_channel->fd in
qemu_rdma_wait_comp_channel. But when source qemu disconnnect
the rdma connection, the destination qemu should be notified.
Signed-off-by: Lidong Chen
---
migration/migration.c | 3 ++-
migration/rdma.c |
this will cause the guest os hang for a while when migration finished.
So create a dedicated thread to release rdma resource.
Signed-off-by: Lidong Chen
---
migration/migration.c | 6 ++
migration/migration.h | 3 +++
migration/rdma.c | 47
From: Lidong Chen
If the peer qemu is crashed, the qemu_rdma_wait_comp_channel function
maybe loop forever. so we should also poll the cm event fd, and when
receive RDMA_CM_EVENT_DISCONNECTED and RDMA_CM_EVENT_DEVICE_REMOVAL,
we consider some error happened.
Signed-off-by: Lidong Chen
Signed
From: Lidong Chen
if qio_channel_rdma_readv return QIO_CHANNEL_ERR_BLOCK, the destination qemu
crash.
The backtrace is:
(gdb) bt
#0 0x in ?? ()
#1 0x008db50e in qio_channel_set_aio_fd_handler (ioc=0x38111e0,
ctx=0x3726080,
io_read=0x8db841 , io_write
From: Lidong Chen
This patch implements bi-directional RDMA QIOChannel. Because different
threads may access RDMAQIOChannel currently, this patch use RCU to protect it.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/colo.c | 2 +
migration/migration.c
From: Lidong Chen
Because RDMA QIOChannel not implement shutdown function,
If the to_dst_file was set error, the return path thread
will wait forever. and the migration thread will wait
return path thread exit.
the backtrace of return path thread is:
(gdb) bt
#0 0x7f372a76bb0f
From: Lidong Chen
During incoming postcopy, the destination qemu will invoke
qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma
yield, and poll the completion channel fd instead.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 4
From: Lidong Chen
RDMA WRITE operations are performed with no notification to the destination
qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE
after postcopy started.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/qemu-file.c | 8
It's not necessary to send RDMA_CONTROL_ERROR when clean up rdma resource.
If rdma->error_state is ture, the message may not send successfully.
and the cm event can also notify the peer qemu.
Signed-off-by: Lidong Chen
---
migration/rdma.c | 11 ---
1 file changed, 11 deletions(-)
d
From: Lidong Chen
when qio_channel_read return QIO_CHANNEL_ERR_BLOCK, the source qemu crash.
The backtrace is:
(gdb) bt
#0 0x7fb20aba91d7 in raise () from /lib64/libc.so.6
#1 0x7fb20abaa8c8 in abort () from /lib64/libc.so.6
#2 0x7fb20aba2146 in __assert_fail_base
From: Lidong Chen
If start a RDMA migration with postcopy enabled, the source qemu
establish a dedicated connection for return path.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 94 ++--
1 file
close (Daniel)
- destroy the mutex before free QEMUFile (David)
- use rdmain and rmdaout instead of rdma->return_path (Daniel)
[v2]
- does not update bytes_xfer when disable RDMA WRITE (David)
- implement bi-directional communication for RDMA QIOChannel (Daniel)
Lidong Chen (11):
migrat
From: Lidong Chen
Because RDMA QIOChannel not implement shutdown function,
If the to_dst_file was set error, the return path thread
will wait forever. and the migration thread will wait
return path thread exit.
the backtrace of return path thread is:
(gdb) bt
#0 0x7f372a76bb0f
From: Lidong Chen
when qio_channel_read return QIO_CHANNEL_ERR_BLOCK, the source qemu crash.
The backtrace is:
(gdb) bt
#0 0x7fb20aba91d7 in raise () from /lib64/libc.so.6
#1 0x7fb20abaa8c8 in abort () from /lib64/libc.so.6
#2 0x7fb20aba2146 in __assert_fail_base
From: Lidong Chen
The channel_close maybe invoked by different threads. For example, source
qemu invokes qemu_fclose in main thread, migration thread and return path
thread. Destination qemu invokes qemu_fclose in main thread, listen thread
and COLO incoming thread.
Signed-off-by: Lidong Chen
this will cause the guest os hang for a while when migration finished.
So create a dedicated thread to release rdma resource.
Signed-off-by: Lidong Chen
---
migration/migration.c | 6 ++
migration/migration.h | 3 +++
migration/rdma.c | 47
It's not necessary to send RDMA_CONTROL_ERROR when clean up rdma resource.
If rdma->error_state is ture, the message may not send successfully.
and the cm event can also notify the peer qemu.
Signed-off-by: Lidong Chen
---
migration/rdma.c | 11 ---
1 file changed, 11 deletions(-)
d
From: Lidong Chen
If start a RDMA migration with postcopy enabled, the source qemu
establish a dedicated connection for return path.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 94 ++--
1 file
The destination qemu only poll the comp_channel->fd in
qemu_rdma_wait_comp_channel. But when source qemu disconnnect
the rdma connection, the destination qemu should be notified.
Signed-off-by: Lidong Chen
---
migration/migration.c | 3 ++-
migration/rdma.c |
From: Lidong Chen
If the peer qemu is crashed, the qemu_rdma_wait_comp_channel function
maybe loop forever. so we should also poll the cm event fd, and when
receive RDMA_CM_EVENT_DISCONNECTED and RDMA_CM_EVENT_DEVICE_REMOVAL,
we consider some error happened.
Signed-off-by: Lidong Chen
Signed
From: Lidong Chen
RDMA WRITE operations are performed with no notification to the destination
qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE
after postcopy started.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/qemu-file.c | 8
From: Lidong Chen
This patch implements bi-directional RDMA QIOChannel. Because different
threads may access RDMAQIOChannel currently, this patch use RCU to protect it.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/colo.c | 2 +
migration/migration.c
From: Lidong Chen
During incoming postcopy, the destination qemu will invoke
qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma
yield, and poll the completion channel fd instead.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 4
From: Lidong Chen
if qio_channel_rdma_readv return QIO_CHANNEL_ERR_BLOCK, the destination qemu
crash.
The backtrace is:
(gdb) bt
#0 0x in ?? ()
#1 0x008db50e in qio_channel_set_aio_fd_handler (ioc=0x38111e0,
ctx=0x3726080,
io_read=0x8db841 , io_write
close (Daniel)
- destroy the mutex before free QEMUFile (David)
- use rdmain and rmdaout instead of rdma->return_path (Daniel)
[v2]
- does not update bytes_xfer when disable RDMA WRITE (David)
- implement bi-directional communication for RDMA QIOChannel (Daniel)
Lidong Chen (12):
migrat
When cancelling migration, the state is MIGRATION_STATUS_CANCELLING.
The state change to MIGRATION_STATUS_CANCELLED when cleanup_bh is scheduled.
So when migration_iteration_finish is invoked, the state should be
MIGRATION_STATUS_CANCELLING.
Signed-off-by: Lidong Chen
---
migration/migration.c
migrate_fd_connect duplicate initialize expected_downtime and cleanup_bh.
Signed-off-by: Lidong Chen
---
migration/migration.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index ff05422..b8c4fec 100644
--- a/migration/migration.c
+++ b
Qemu initialize the MigrationIncomingState structure in migration_object_init,
but not release it. this patch release it in migration_object_finalize.
Signed-off-by: Lidong Chen
---
migration/migration.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/migration/migration.c b/migration
837
#5 0x7f372aa49e25 in start_thread () from /lib64/libpthread.so.0
#6 0x7f372a77635d in clone () from /lib64/libc.so.6
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 40
1 file changed, 40 insertion
From: Lidong Chen
if qio_channel_rdma_readv return QIO_CHANNEL_ERR_BLOCK, the destination qemu
crash.
The backtrace is:
(gdb) bt
#0 0x in ?? ()
#1 0x008db50e in qio_channel_set_aio_fd_handler (ioc=0x38111e0,
ctx=0x3726080,
io_read=0x8db841 , io_write
From: Lidong Chen
when qio_channel_read return QIO_CHANNEL_ERR_BLOCK, the source qemu crash.
The backtrace is:
(gdb) bt
#0 0x7fb20aba91d7 in raise () from /lib64/libc.so.6
#1 0x7fb20abaa8c8 in abort () from /lib64/libc.so.6
#2 0x7fb20aba2146 in __assert_fail_base
From: Lidong Chen
This patch implements bi-directional RDMA QIOChannel. Because different
threads may access RDMAQIOChannel currently, this patch use RCU to protect it.
Signed-off-by: Lidong Chen
---
migration/colo.c | 2 +
migration/migration.c| 2 +
migration/postcopy-ram.c
If the peer qemu is crashed, the qemu_rdma_wait_comp_channel function
maybe loop forever. so we should also poll the cm event fd, and when
receive RDMA_CM_EVENT_DISCONNECTED and RDMA_CM_EVENT_DEVICE_REMOVAL,
we consider some error happened.
Signed-off-by: Lidong Chen
---
migration/rdma.c | 33
The channel_close maybe invoked by different threads. For example, source
qemu invokes qemu_fclose in main thread, migration thread and return path
thread. Destination qemu invokes qemu_fclose in main thread, listen thread
and COLO incoming thread.
Signed-off-by: Lidong Chen
---
migration
From: Lidong Chen
During incoming postcopy, the destination qemu will invoke
qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma
yield, and poll the completion channel fd instead.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 4
this will cause the guest os hang for a while when migration finished.
So create a dedicated thread to release rdma resource.
Signed-off-by: Lidong Chen
---
migration/rdma.c | 43 +++
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git
DMA WRITE (David)
- implement bi-directional communication for RDMA QIOChannel (Daniel)
Lidong Chen (10):
migration: disable RDMA WRITE after postcopy started
migration: create a dedicated connection for rdma return path
migration: avoid concurrent invoke channel_close by different thre
From: Lidong Chen
If start a RDMA migration with postcopy enabled, the source qemu
establish a dedicated connection for return path.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 94 ++--
1 file
From: Lidong Chen
RDMA WRITE operations are performed with no notification to the destination
qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE
after postcopy started.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/qemu-file.c | 8
Qemu initialize the MigrationIncomingState structure in migration_object_init,
but not release it. this patch release it in migration_object_finalize.
Signed-off-by: Lidong Chen
---
migration/migration.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/migration/migration.c b
If the peer qemu is crashed, the qemu_rdma_wait_comp_channel function
maybe loop forever. so we should also poll the cm event fd, and when
receive any cm event, we consider some error happened.
Signed-off-by: Lidong Chen
---
migration/rdma.c | 35 ---
1 file
From: Lidong Chen
When cancel migration during RDMA precopy, the source qemu main thread hangs
sometime.
The backtrace is:
(gdb) bt
#0 0x7f249eabd43d in write () from /lib64/libpthread.so.0
#1 0x7f24a1ce98e4 in rdma_get_cm_event (channel=0x4675d10,
event=0x7ffe2f643dd0
this will cause the guest os hang for a while when migration finished.
So create a dedicated thread to release rdma resource.
Signed-off-by: Lidong Chen
---
migration/rdma.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/migration/rdma.c b/migration
837
#5 0x7f372aa49e25 in start_thread () from /lib64/libpthread.so.0
#6 0x7f372a77635d in clone () from /lib64/libc.so.6
Signed-off-by: Lidong Chen
---
migration/rdma.c | 40
1 file changed, 40 insertions(+)
diff --git a/migration/rdma.c b
From: Lidong Chen
This patch implements bi-directional RDMA QIOChannel. Because different
threads may access RDMAQIOChannel currently, this patch use RCU to protect it.
Signed-off-by: Lidong Chen
---
migration/colo.c | 2 +
migration/migration.c| 2 +
migration/postcopy-ram.c
From: Lidong Chen
During incoming postcopy, the destination qemu will invoke
qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma
yield, and poll the completion channel fd instead.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 4
From: Lidong Chen
if qio_channel_rdma_readv return QIO_CHANNEL_ERR_BLOCK, the destination qemu
crash.
The backtrace is:
(gdb) bt
#0 0x in ?? ()
#1 0x008db50e in qio_channel_set_aio_fd_handler (ioc=0x38111e0,
ctx=0x3726080,
io_read=0x8db841 , io_write
From: Lidong Chen
The channel_close maybe invoked by different threads. For example, source
qemu invokes qemu_fclose in main thread, migration thread and return path
thread. Destination qemu invokes qemu_fclose in main thread, listen thread
and COLO incoming thread.
Add a mutex in QEMUFile
From: Lidong Chen
Because qio_channel_rdma_writev and qio_channel_rdma_readv maybe invoked
by different threads concurrently, this patch removes unnecessary variables
len in QIOChannelRDMA and use local variable instead.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
Reviewed
From: Lidong Chen
RDMA WRITE operations are performed with no notification to the destination
qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE
after postcopy started.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/qemu-file.c | 8
From: Lidong Chen
when qio_channel_read return QIO_CHANNEL_ERR_BLOCK, the source qemu crash.
The backtrace is:
(gdb) bt
#0 0x7fb20aba91d7 in raise () from /lib64/libc.so.6
#1 0x7fb20abaa8c8 in abort () from /lib64/libc.so.6
#2 0x7fb20aba2146 in __assert_fail_base
(David)
- use rdmain and rmdaout instead of rdma->return_path (Daniel)
[v2]
- does not update bytes_xfer when disable RDMA WRITE (David)
- implement bi-directional communication for RDMA QIOChannel (Daniel)
Lidong Chen (12):
migration: disable RDMA WRITE after postcopy started
migration: cre
From: Lidong Chen
If start a RDMA migration with postcopy enabled, the source qemu
establish a dedicated connection for return path.
Signed-off-by: Lidong Chen
Reviewed-by: Dr. David Alan Gilbert
---
migration/rdma.c | 94 ++--
1 file
implement io_set_aio_fd_handler. so
qio_channel_set_aio_fd_handler will access NULL pointer.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 16
1 file changed, 16 insertions(+)
diff --git a/migration/rdma.c b/migration/rdma.c
index 92e4d30
osix.c:504
#12 0x7fb20af3ddc5 in start_thread () from /lib64/libpthread.so.0
#13 0x7fb20ac6b74d in clone () from /lib64/libc.so.6
This patch fixed by invoke qio_channel_yield only when qemu_in_coroutine().
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/qem
is also destroyed in qemu_rdma_cleanup.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 12 ++--
migration/trace-events | 1 -
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 0dd4033..92e4d30
. When vmpin is large than
max locked memory limitation, ibv_reg_mr will failed, and migration can not
start successfully again.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/migration/rdma.c b/migration/
During incoming postcopy, the destination qemu will invoke
qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma
yield, and poll the completion channel fd instead.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
Reviewed-by: Dr. David Alan Gilbert <dgilb...@r
concurrent invoke channel_close.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/qemu-file.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 977b9ae..87d0f05 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-
If start a RDMA migration with postcopy enabled, the source qemu
establish a dedicated connection for return path.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
---
migration
This patch implements bi-directional RDMA QIOChannel. Because different
threads may access RDMAQIOChannel currently, this patch use RCU to protect it.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/colo.c | 2 +
migration/migration.c| 2 +
migration/po
Because qio_channel_rdma_writev and qio_channel_rdma_readv maybe invoked
by different threads concurrently, this patch removes unnecessary variables
len in QIOChannelRDMA and use local variable instead.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
Reviewed-by: Dr. David Alan Gilbert
ate bytes_xfer when disable RDMA WRITE (David)
- implement bi-directional communication for RDMA QIOChannel (Daniel)
Lidong Chen (6):
migration: disable RDMA WRITE after postcopy started
migration: create a dedicated connection for rdma return path
migration: remove unnecessary variables
RDMA WRITE operations are performed with no notification to the destination
qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE
after postcopy started.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
Reviewed-by: Dr. David Alan Gilbert <dgilb...@r
If start a RDMA migration with postcopy enabled, the source qemu
establish a dedicated connection for return path.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
---
migration
RDMA WRITE operations are performed with no notification to the destination
qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE
after postcopy started.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/qemu-file.c | 8 ++--
migration/
During incoming postcopy, the destination qemu will invoke
qemu_rdma_wait_comp_channel in a seprate thread. So does not use rdma
yield, and poll the completion channel fd instead.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 4 +++-
1 file changed, 3 inse
Because qio_channel_rdma_writev and qio_channel_rdma_readv maybe invoked
by different threads concurrently, this patch removes unnecessary variables
len in QIOChannelRDMA and use local variable instead.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.
.
This patch just make postcopy works, and will improve performance later.
[v2]
- does not update bytes_xfer when disable RDMA WRITE (David)
- implement bi-directional communication for RDMA QIOChannel (Daniel)
Please, review.
Lidong Chen (5):
migration: disable RDMA WRITE after postcopy
This patch implements bi-directional RDMA QIOChannel. Because different
threads may access RDMAQIOChannel concurrently, this patch use RCU to protect
it.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 162 +---
RDMA write operations are performed with no notification to the destination
qemu, then the destination qemu can not wakeup. So disable RDMA WRITE after
postcopy started.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/qemu-file.c | 3 ++-
migration/rdma.c
After postcopy, the destination qemu work in the dedicated
thread, so only invoke yield_until_fd_readable before postcopy
migration.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/migration/rd
The default get_return_path function of iochannel does not work for
RDMA live migration. So add the interface to set get_return_path.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/qemu-file-channel.c | 12
migration/qemu-file.c | 10 --
mig
If start a RDMA migration with postcopy enabled, the source qemu
establish a dedicated connection for return path.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 94 ++--
1 file changed, 91 insertions(+), 3 del
Current Qemu RDMA communication does not support send and receive
data at the same time, so when RDMA live migration with postcopy
enabled, the source qemu return path thread get qemu file error.
Those patch add the postcopy support for RDMA live migration.
Lidong Chen (5):
migration: create
the default get_return_path function does not work for RDMA live
migration, the patch implement the get_return_path for RDMA iochannel.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/rdma.c | 38 ++
1 file changed, 38 insertions(+)
RDMA migration implement save_page function for QEMUFile, but
ram_control_save_page do not increase bytes_xfer. So when doing
RDMA migration, it will use whole bandwidth.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/qemu-file.c | 2 +-
1 file changed, 1 insertion
Public bug reported:
qemu version:v2.9.0-rc5 release
1.virsh migrate --live 165cf436-312f-47e7-90f2-f8aa63f34893 --copy-storage-inc
qemu+ssh://10.59.163.38/system
2.run reboot in guest os, add reboot in /etc/rc.local
3.guest os hang sometime.
strace output of qemu:
ppoll([{fd=9,
Public bug reported:
qemu version:v2.9.0-rc5 release
1.virsh migrate --live 165cf436-312f-47e7-90f2-f8aa63f34893 --copy-storage-all
qemu+ssh://10.59.163.38/system
2.press Ctrl+C cancel migrate
qemu main thread hung
(gdb) bt
#0 0x7fca9f4574b7 in ppoll () from /lib64/libc.so.6
#1
blk->root->perm is 1 when blk_new_open.
the blk->root->perm is update to 3 during virtio_blk_device_realize.
but after this commit, the blk->root->perm is still 1. and cause
bdrv_aligned_pwritev failed.
Breakpoint 1, blk_set_perm (blk=0x14c32b0, perm=3, shared_perm=29,
errp=0x7fffd380) at
Public bug reported:
qemu live migration failed
the dest qemu report this error.
Receiving block device images
Completed 0 %^Mqemu-system-x86_64: block/io.c:1348: bdrv_aligned_pwritev:
Assertion `child->perm & BLK_PERM_WRITE' failed.
this bug is caused by this patch:
when migration with quick speed, mig_save_device_bulk invoke
bdrv_is_allocated too frequently, and cause vnc reponse slowly.
this patch limit the time used for bdrv_is_allocated.
Signed-off-by: Lidong Chen <lidongc...@tencent.com>
---
migration/block.
ove the migration speed from
505856 rsec/s to 855756 rsec/s.
Signed-off-by: Lidong Chen <jemmy858...@gmail.com>
---
migration/block.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/migration/block.c b/migration/block.c
index 6741228..7734ff7 100644
--- a/migration/block.c
+++ b/migratio
Public bug reported:
this is the command line of qemu.
2015-06-30 01:52:59.508+: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name rhel7 -S -machine
pc-i440fx-2.1,accel=kvm,usb=off -cpu SandyBridge -m 2048 -realtime
98 matches
Mail list logo