Re: [Qemu-devel] [PATCH 09/17] migration-local: override before_ram_iterate to send pipefd

2013-10-24 Thread Lei Li
On 10/24/2013 10:07 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: Override befor_ram_iterate to send pipefd. It will write the RAM_SAVE_FLAG_HOOK flags which will trigger the load hook to receive it. Signed-off-by: Lei Li --- migration-local.c | 26

Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping

2013-10-24 Thread Lei Li
On 10/24/2013 10:15 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: Signed-off-by: Lei Li --- migration.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index 4ac466b..568b73a 100644 --- a/migration.c +++ b

Re: [Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE

2013-10-24 Thread Lei Li
On 10/24/2013 10:13 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: Introduce new RanState RAN_STATE_FLIPPING_MIGRATE and add it to runstate_needs_reset(). I am not sure about the name; for one thing, the new state would apply also to postcopy migration. About the name, how

Re: [Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket with qemu_fopen_socket_local

2013-10-24 Thread Lei Li
On 10/24/2013 10:10 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: Relace qemu_fopen_socket with qemu_fopen_socket_local in Unix protocol migration. Signed-off-by: Lei Li --- migration-unix.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions

Re: [Qemu-devel] [PATCH 09/17] migration-local: override before_ram_iterate to send pipefd

2013-10-24 Thread Lei Li
On 10/24/2013 10:07 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: Override befor_ram_iterate to send pipefd. It will write the RAM_SAVE_FLAG_HOOK flags which will trigger the load hook to receive it. Signed-off-by: Lei Li --- migration-local.c | 26

Re: [Qemu-devel] [PATCH 02/17] QAPI: introduce magration capability unix_page_flipping

2013-10-24 Thread Lei Li
On 10/24/2013 09:52 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: +# @unix-page-flipping: If enabled, QEMU will support localhost migration. This +# feature allows live upgrade of a running QEMU instance by doing localhost +# migration with page flipping

Re: [Qemu-devel] [PATCH 04/17] qmp-command.hx: add missing docs for migration capabilites

2013-10-24 Thread Lei Li
On 10/24/2013 09:57 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: Signed-off-by: Lei Li --- qmp-commands.hx |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index fba15cd..650a3a8 100644 --- a/qmp

Re: [Qemu-devel] [PATCH 01/17] rename is_active to is_block_active

2013-10-24 Thread Lei Li
On 10/24/2013 09:46 PM, Paolo Bonzini wrote: Il 22/10/2013 04:25, Lei Li ha scritto: is_active is used to identify block migration, rename to is_block_active to make it more clear. No, is_active is used to identify whether a set of SaveVMHandlers is active. The default is true, so only block

Re: [Qemu-devel] [PATCH resend] sdl: Reverse support for video mode setting

2013-10-24 Thread Lei Li
This patch has been confirmed by the reporter himself as link below, https://bugs.launchpad.net/qemu/+bug/1216368 It has been on the mailing list for a while, could it be merged? PING... On 09/04/2013 05:07 PM, Lei Li wrote: Currently, If the setting of video mode failed, qemu will exit. It

[Qemu-devel] [PATCH] save_page: replace block_offset with MemoryRegion

2013-10-22 Thread Lei Li
first, otherwise I'll pick it to my next update of the series. Signed-off-by: Lei Li --- arch_init.c | 4 ++-- include/migration/migration.h | 2 +- include/migration/qemu-file.h | 8 migration-rdma.c | 4 ++-- savevm.c | 8 --

Re: [Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE

2013-10-22 Thread Lei Li
On 10/22/2013 11:51 AM, Eric Blake wrote: On 10/22/2013 04:25 AM, Lei Li wrote: Introduce new RanState RAN_STATE_FLIPPING_MIGRATE and add it to runstate_needs_reset(). Signed-off-by: Lei Li --- qapi-schema.json | 11 +++ vl.c | 12 +++- 2 files changed, 18

[Qemu-devel] [PATCH 17/17] hmp: better format for info migrate_capabilities

2013-10-21 Thread Lei Li
As there might be more capabilities introduced, better to display it in lines. Signed-off-by: Lei Li --- hmp.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hmp.c b/hmp.c index 32ee285..dcfa2f9 100644 --- a/hmp.c +++ b/hmp.c @@ -226,13 +226,12 @@ void

[Qemu-devel] [PATCH 15/17] migration-unix: page flipping support on unix outgoing

2013-10-21 Thread Lei Li
Add page flipping support on unix outgoing part by stopping VM with the new RunState RUN_STATE_FLIPPING_MIGRATE before invoking migration if unix_page_flipping enabled. Signed-off-by: Lei Li --- migration-unix.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git

[Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping

2013-10-21 Thread Lei Li
Signed-off-by: Lei Li --- migration.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index 4ac466b..568b73a 100644 --- a/migration.c +++ b/migration.c @@ -579,10 +579,11 @@ static void *migration_thread(void *opaque

[Qemu-devel] [PATCH 12/17] migration-local: override hook_ram_load

2013-10-21 Thread Lei Li
Override hook_ram_load to receive the pipe file descriptor passed by source process and page address which will be extracted to vmsplice the page data from pipe. Signed-off-by: Lei Li --- migration-local.c | 85 + 1 files changed, 85

[Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket with qemu_fopen_socket_local

2013-10-21 Thread Lei Li
Relace qemu_fopen_socket with qemu_fopen_socket_local in Unix protocol migration. Signed-off-by: Lei Li --- migration-unix.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/migration-unix.c b/migration-unix.c index 651fc5b..d3a151a 100644 --- a

[Qemu-devel] [PATCH 10/17] migration-local: override save_page for page transmit

2013-10-21 Thread Lei Li
This patch implements save_page callback for the outside of page flipping. It will write the address of the page on the Unix socket and flip the page data on pipe by vmsplice(). Every page address would have a header flag RAM_SAVE_FLAG_HOOK. Signed-off-by: Lei Li --- migration-local.c | 54

[Qemu-devel] [PATCH 11/17] savevm: adjust ram_control_save_page for page flipping

2013-10-21 Thread Lei Li
As callback save_page will always be opened by qemu_fopen_socket_local(), and without unix_page_flipping it will return RAM_SAVE_CONTROL_NOT_SUPP, it leads to a wrong qemu_file_set_error() based on the current logic. So this patch adds RAM_SAVE_CONTROL_NOT_SUPP to the check. Signed-off-by: Lei Li

[Qemu-devel] [PATCH 07/17] migration-local: add send_pipefd()

2013-10-21 Thread Lei Li
This patch adds send_pipefd() to pass the pipe file descriptor to destination process. Signed-off-by: Lei Li --- migration-local.c | 53 + 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/migration-local.c b/migration-local.c

[Qemu-devel] [PATCH 08/17] migration-local: add recv_pipefd()

2013-10-21 Thread Lei Li
This patch adds recv_pipefd() to receive the pipe file descriptor that passed by source process. Signed-off-by: Lei Li --- migration-local.c | 64 + 1 files changed, 64 insertions(+), 0 deletions(-) diff --git a/migration-local.c b

[Qemu-devel] [PATCH 09/17] migration-local: override before_ram_iterate to send pipefd

2013-10-21 Thread Lei Li
Override befor_ram_iterate to send pipefd. It will write the RAM_SAVE_FLAG_HOOK flags which will trigger the load hook to receive it. Signed-off-by: Lei Li --- migration-local.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/migration-local.c

[Qemu-devel] [PATCH 06/17] migration-local: introduce qemu_fopen_socket_local()

2013-10-21 Thread Lei Li
Add qemu_fopen_socket_local() to open QEMUFileLocal introduced earlier. It will create a pipe in write mode if unix_page_flipping is enabled, adjust qemu_local_close() to close pipe as well. Signed-off-by: Lei Li --- include/migration/qemu-file.h |2 + migration-local.c | 46

[Qemu-devel] [PATCH 04/17] qmp-command.hx: add missing docs for migration capabilites

2013-10-21 Thread Lei Li
Signed-off-by: Lei Li --- qmp-commands.hx |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index fba15cd..650a3a8 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2898,6 +2898,10 @@ migrate-set-capabilities Enable/Disable

[Qemu-devel] [PATCH 05/17] migration-local: add QEMUFileLocal with socket based QEMUFile

2013-10-21 Thread Lei Li
This patch adds QEMUFileLocal with copy of socket based QEMUFile, will be used as the basis code for Unix socket protocol migration and page flipping migration. Signed-off-by: Lei Li --- Makefile.target |1 + migration-local.c | 121

[Qemu-devel] [PATCH 02/17] QAPI: introduce magration capability unix_page_flipping

2013-10-21 Thread Lei Li
Introduce unix_page_flipping to MigrationCapability for localhost migration. Signed-off-by: Lei Li --- qapi-schema.json |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 60f3fd1..523a5b2 100644 --- a/qapi-schema.json +++ b

[Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_FLIPPING_MIGRATE

2013-10-21 Thread Lei Li
Introduce new RanState RAN_STATE_FLIPPING_MIGRATE and add it to runstate_needs_reset(). Signed-off-by: Lei Li --- qapi-schema.json | 11 +++ vl.c | 12 +++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index

[Qemu-devel] [PATCH 01/17] rename is_active to is_block_active

2013-10-21 Thread Lei Li
is_active is used to identify block migration, rename to is_block_active to make it more clear. Signed-off-by: Lei Li --- block-migration.c |2 +- include/migration/vmstate.h |2 +- savevm.c| 16 3 files changed, 10 insertions(+), 10

[Qemu-devel] [PATCH 03/17] migration: add migrate_unix_page_flipping()

2013-10-21 Thread Lei Li
Add migrate_unix_page_flipping() to check if MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled. Signed-off-by: Lei Li --- include/migration/migration.h |3 +++ migration.c |9 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/migration

[Qemu-devel] [PATCH 0/17 v2] Localhost migration with side channel for ram

2013-10-21 Thread Lei Li
runstate_needs_reset() for the adjustment of the current migration process with page flipping. Lei Li (17): rename is_active to is_block_active QAPI: introduce magration capability unix_page_flipping migration: add migrate_unix_page_flipping() qmp-command.hx: add missing docs for migration

Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-10-03 Thread Lei Li
On 10/03/2013 09:34 PM, Paolo Bonzini wrote: Il 03/10/2013 15:29, Lei Li ha scritto: On 10/03/2013 06:34 PM, Paolo Bonzini wrote: Il 03/10/2013 12:28, Lei Li ha scritto: The load_hook callback is only be called if the RAM_SAVE_FLAG_HOOK is received. To check this flags, it means there would

Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-10-03 Thread Lei Li
On 10/03/2013 06:34 PM, Paolo Bonzini wrote: Il 03/10/2013 12:28, Lei Li ha scritto: The load_hook callback is only be called if the RAM_SAVE_FLAG_HOOK is received. To check this flags, it means there would be a check action first in unix_accept_incoming_migration(), like: f = qemu_fopen_pipe

Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-10-03 Thread Lei Li
On 10/03/2013 04:23 PM, Paolo Bonzini wrote: Il 03/10/2013 06:03, Lei Li ha scritto: Hi Paolo, When debugging the code, I realized that this problem might still exist. In the incoming part, it will qemu_fopen_pipe() in unix_accept_incoming_migration first to enable the load_hook callback, the

Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-10-02 Thread Lei Li
On 09/26/2013 08:44 PM, Lei Li wrote: On 09/25/2013 11:02 PM, Paolo Bonzini wrote: Il 25/09/2013 16:32, Lei Li ha scritto: This RFC patch series tries to introduce a mechanism using side channel pipe for RAM via SCM_RIGHTS with unix domain socket protocol migration. This side channel will be

Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-09-26 Thread Lei Li
On 09/25/2013 11:02 PM, Paolo Bonzini wrote: Il 25/09/2013 16:32, Lei Li ha scritto: This RFC patch series tries to introduce a mechanism using side channel pipe for RAM via SCM_RIGHTS with unix domain socket protocol migration. This side channel will be used for the page flipping by vmsplice

[Qemu-devel] [PATCH 5/8] QAPI: introduce magration capability unix_page_flipping

2013-09-25 Thread Lei Li
Introduce unix_page_flipping to MigrationCapability for localhost migration. Signed-off-by: Lei Li --- qapi-schema.json |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 145eca8..f63dab4 100644 --- a/qapi-schema.json +++ b

[Qemu-devel] [PATCH resend] sdl: Reverse support for video mode setting

2013-09-25 Thread Lei Li
: Lei Li --- ui/sdl.c | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 39a42d6..9d8583c 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -86,6 +86,7 @@ static void sdl_update(DisplayChangeListener *dcl, static void do_sdl_resize(int

[Qemu-devel] [PATCH 6/8] migration: add migrate_unix_page_flipping()

2013-09-25 Thread Lei Li
Add migrate_unix_page_flipping() to check if MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled. Signed-off-by: Lei Li --- include/migration/migration.h |3 +++ migration.c |9 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include

[Qemu-devel] [PATCH 8/8] migration-unix: side channel support on unix incoming

2013-09-25 Thread Lei Li
. Signed-off-by: Lei Li --- migration-unix.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/migration-unix.c b/migration-unix.c index 0bfc1c7..878e063 100644 --- a/migration-unix.c +++ b/migration-unix.c @@ -85,6 +85,7 @@ static void

[Qemu-devel] [PATCH 3/8] migration-local: add send_pipefd()

2013-09-25 Thread Lei Li
This patch adds send_pipefd() to pass the pipe file descriptor to destination process. Signed-off-by: Lei Li --- include/migration/qemu-file.h |1 + migration-local.c | 57 + 2 files changed, 58 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 4/8] migration-local: add recv_pipefd()

2013-09-25 Thread Lei Li
This patch adds recv_pipefd() to receive the pipe file descriptor that passed by source process. Signed-off-by: Lei Li --- include/migration/qemu-file.h |1 + migration-local.c | 56 + 2 files changed, 57 insertions(+), 0 deletions

[Qemu-devel] [PATCH 7/8] migration-unix: side channel support on unix outgoing

2013-09-25 Thread Lei Li
-by: Lei Li --- migration-unix.c | 34 +++--- 1 files changed, 31 insertions(+), 3 deletions(-) diff --git a/migration-unix.c b/migration-unix.c index 651fc5b..0bfc1c7 100644 --- a/migration-unix.c +++ b/migration-unix.c @@ -33,16 +33,44 @@ static void

[Qemu-devel] [PATCH 2/8] migration-loca: add qemu_fopen_pipe()

2013-09-25 Thread Lei Li
Add qemu_fopen_pipe() to open QEMUFileOps pipe_write_ops and pipe_read_ops introduced for pipe protocol. Signed-off-by: Lei Li --- include/migration/qemu-file.h |2 ++ migration-local.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a

[Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-09-25 Thread Lei Li
. Please let me know if it is the proper way for it or there is anything need to be improved. Your suggestions and comments are very welcome, and thanks for Paolo for his review and useful suggestions. Lei Li (8): migration-local: add pipe protocol for QEMUFileOps migration-local: add

[Qemu-devel] [PATCH 1/8] migration-local: add pipe protocol for QEMUFileOps

2013-09-25 Thread Lei Li
. Signed-off-by: Lei Li --- Makefile.target |1 + migration-local.c | 114 + 2 files changed, 115 insertions(+), 0 deletions(-) create mode 100644 migration-local.c diff --git a/Makefile.target b/Makefile.target index 9a49852..ae66fef 100644

Re: [Qemu-devel] [PATCH 3/3 resend v2] arch_init: right return for ram_save_iterate

2013-09-12 Thread Lei Li
On 09/11/2013 07:27 PM, Paolo Bonzini wrote: Il 11/09/2013 13:06, Juan Quintela ha scritto: And I think that the right solution is make qemu_get_rate_limit() to return -1 in case of error (or the error, I don't care). You might do both things, it would avoid the useless g_usleep you pointed out

Re: [Qemu-devel] [PATCHv2 1/3] seccomp: adding blacklist support

2013-09-08 Thread Lei Li
On 09/07/2013 03:21 AM, Eduardo Otubo wrote: Adding a system call blacklist right before the vcpus starts. This filter is composed by the system calls that can't be executed after the guests are up. This list should be refined as the whitelist is, with as much testing as we can do using virt-test

[Qemu-devel] [PATCH resend] sdl: Reverse support for video mode setting

2013-09-04 Thread Lei Li
: Lei Li --- ui/sdl.c | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 39a42d6..9d8583c 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -86,6 +86,7 @@ static void sdl_update(DisplayChangeListener *dcl, static void do_sdl_resize(int

[Qemu-devel] [PATCH 0/3 resend v2] Migration fix

2013-09-04 Thread Lei Li
return value adjusted correspondingly in ram_save_iterate. Lei Li (3): savevm: add comments for qemu_file_get_error() savevm: fix wrong initialization by ram_control_load_hook arch_init: right return for ram_save_iterate arch_init.c | 15 ++- savevm.c|9 - 2

[Qemu-devel] [PATCH 2/3 resend v2] savevm: fix wrong initialization by ram_control_load_hook

2013-09-04 Thread Lei Li
It should set negative error value rather than 0 in QEMUFile if there has been an error. Reviewed-by: Michael R. Hines Signed-off-by: Lei Li --- Change since v1: Initialize ret to -EINVAL rather than -1 from Paolo Bonzini. savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

[Qemu-devel] [PATCH 1/3 resend v2] savevm: add comments for qemu_file_get_error()

2013-09-04 Thread Lei Li
Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li --- savevm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++ b/savevm.c @@ -566,6 +566,13

[Qemu-devel] [PATCH 3/3 resend v2] arch_init: right return for ram_save_iterate

2013-09-04 Thread Lei Li
qemu_file_rate_limit() never return negative value since the refactor by Commit 1964a39, this patch gets rid of the negative check for it, adjust bytes_transferred and return value correspondingly in ram_save_iterate(). Signed-off-by: Lei Li Signed-off-by: Paolo Bonzini --- Change since v1

Re: [Qemu-devel] [Qemu-stable][PATCH] rdma: fix multiple VMs parallel migration

2013-09-02 Thread Lei Li
On 09/03/2013 12:20 PM, Frank Yang wrote: Yes, it depends on low-level implementation. During my earlier test, What do you mean by the 'it depends on low-level implementation'? Do you test it with IB or Ethernet? using one CQ to send and receive may cause packet loss with heavy load: the des

Re: [Qemu-devel] [Qemu-stable][PATCH] rdma: fix multiple VMs parallel migration

2013-09-02 Thread Lei Li
Hi Frank, I failed to apply this patch. Please make sure to use git-send-email, otherwise it's a little hard to review. :) On 08/30/2013 08:39 PM, Frank Yang wrote: When several VMs migrate with RDMA at the same time, the increased pressure cause packet loss probabilistically and make source an

[Qemu-devel] [PATCH 4/4] hmp: add console support for ringbuf backend

2013-09-02 Thread Lei Li
This patch add console command which would suspend the monitor, output the data that backed in the ringbuf backend to console first, and install a new readline handler to get input back to the ringbuf backend. Take back to the monitor once escape sequence 'Ctrl-]' is detected. Signed-o

[Qemu-devel] [PATCH 2/4] hmp: factor out ringbuf_print_help()

2013-09-02 Thread Lei Li
Factor out ringbuf_print_help(), which will be called in hmp_read_ringbuf_cb() reading data that can be written with monitor_printf() to the console from ringbuf backend. Signed-off-by: Lei Li --- hmp.c | 31 +++ 1 files changed, 19 insertions(+), 12 deletions

[Qemu-devel] [PATCH 3/4] qemu-char: export ringbuf_count

2013-09-02 Thread Lei Li
Signed-off-by: Lei Li --- include/sysemu/char.h |2 ++ qemu-char.c |2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 8053130..ed20fe3 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -288,6

[Qemu-devel] [PATCH 1/4] monitor: introduce monitor_read_console

2013-09-02 Thread Lei Li
This patch introduces monitor_read_console(), which will drop into interactive mode with chardev ringbuf backend, and install a readline handler. When the handler is invoked, the given data will be written to ringbuf backend. Signed-off-by: Lei Li --- include/monitor/monitor.h |3

[Qemu-devel] [PATCH 0/4 RFC] Introduce console for ringbuf backend

2013-09-02 Thread Lei Li
version: http://lists.gnu.org/archive/html/qemu-devel/2013-01/msg03888.html Suggestions and comments are very welcome! Lei Li (4): monitor: introduce monitor_read_console hmp: factor out ringbuf_print_help() qemu-char: export ringbuf_count hmp: add console support for ringbuf backend

Re: [Qemu-devel] [PATCH] sdl: Reverse support for video mode setting

2013-08-30 Thread Lei Li
Any comments? On 08/27/2013 06:55 PM, Lei Li wrote: Currently, If the setting of video mode failed, qemu will exit. It should go back to the previous setting if the new screen resolution failed. This patch fixes LP#1216368, add support to revert to existing surface for the failure of video mode

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2013-08-29 Thread Lei Li
Patch posted: http://patchwork.ozlabs.org/patch/270084/ -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1216368 Title: unsupported screen resolution crashes sdl-qemu Status in QEMU: New Bug desc

Re: [Qemu-devel] [PATCH 3/3 v2] arch_init: right return for ram_save_iterate

2013-08-29 Thread Lei Li
Hi, I have tested this series of changes, PING? On 08/26/2013 05:29 PM, Lei Li wrote: Signed-off-by: Lei Li Signed-off-by: Paolo Bonzini --- Change since v1: Return fixes and improvement from Paolo Bonzini. arch_init.c | 15 ++- 1 files changed, 10 insertions(+), 5

Re: [Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local()

2013-08-29 Thread Lei Li
On 08/28/2013 02:37 PM, Paolo Bonzini wrote: Il 28/08/2013 05:26, Lei Li ha scritto: RAMBlock structs are not visible outside of exec.c and arch_init.c, how did you do this? Hi Michael, Good catch! Actually this is the 'Known issue' that I listed in the cover letter, and I pla

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-27 Thread Lei Li
On 08/21/2013 11:08 PM, Eric Blake wrote: On 08/21/2013 01:18 AM, Lei Li wrote: Introduce migration capability localhost. Signed-off-by: Lei Li --- include/migration/migration.h |3 +++ migration.c | 12 qapi-schema.json |8

Re: [Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local()

2013-08-27 Thread Lei Li
On 08/23/2013 03:44 PM, Lei Li wrote: On 08/23/2013 04:42 AM, Michael R. Hines wrote: On 08/21/2013 03:18 AM, Lei Li wrote: Introduce read/write backend of QEMUFileLocal used by localhost migration. The unix domain socket will be replaced by PIPE with vmsplice mechanism. Signed-off-by: Lei Li

[Qemu-devel] [PATCH] sdl: Reverse support for video mode setting

2013-08-27 Thread Lei Li
: Lei Li --- ui/sdl.c | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 39a42d6..9d8583c 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -86,6 +86,7 @@ static void sdl_update(DisplayChangeListener *dcl, static void do_sdl_resize(int

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2013-08-27 Thread Lei Li
Yes, it is a bug. It should go back to the previous setting if the new screen resolution falied. I will send a patch later. Thanks. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1216368 Title: u

Re: [Qemu-devel] [RFC] TCG unit testing

2013-08-26 Thread Lei Li
On 08/24/2013 04:42 AM, Stefan Weil wrote: Am 23.08.2013 21:47, schrieb Richard Henderson: I've been thinking for a while about how to reliably test TCG backends, and maybe how to do regression testing on them. Having to begin the test from a guest binary, especially considering the vast cross-

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2013-08-26 Thread Lei Li
Sorry, a little confusion what's the problem you want to solve? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1216368 Title: unsupported screen resolution crashes sdl-qemu Status in QEMU: New B

[Qemu-devel] [PATCH 2/3 v2] savevm: fix wrong error set by ram_control_load_hook()

2013-08-26 Thread Lei Li
It should set negative error value if there has been an error. Reviewed-by: Michael R. Hines Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..a0be109 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7

[Qemu-devel] [PATCH 3/3 v2] arch_init: right return for ram_save_iterate

2013-08-26 Thread Lei Li
Signed-off-by: Lei Li Signed-off-by: Paolo Bonzini --- Change since v1: Return fixes and improvement from Paolo Bonzini. arch_init.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c index 94d45e1..a26bc89 100644 --- a

[Qemu-devel] [PATCH 1/3 v2] savevm: add comments for qemu_file_get_error()

2013-08-26 Thread Lei Li
Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li --- savevm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++ b/savevm.c @@ -566,6 +566,13

Re: [Qemu-devel] [PATCH resend 3/3] arch_init: right return for ram_save_iterate

2013-08-26 Thread Lei Li
On 08/26/2013 04:27 PM, Paolo Bonzini wrote: Il 23/08/2013 15:30, Lei Li ha scritto: -if (ret < 0) { -bytes_transferred += total_sent; -return ret; -} - qemu_put_be64(f, RAM_SAVE_FLAG_EOS); total_sent += 8; bytes_transferred += total_s

Re: [Qemu-devel] [PATCH 17/18] migration: add prefix for local migration to incoming migration

2013-08-23 Thread Lei Li
On 08/21/2013 06:52 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Signed-off-by: Lei Li --- migration.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 2471664..17cf2fd 100644 --- a/migration.c +++ b/migration.c

[Qemu-devel] [PATCH resend 2/3] savevm: fix wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li
It should set negative error value if there has been an error. Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..a0be109 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7 +649,7 @@ void

[Qemu-devel] [PATCH resend 3/3] arch_init: right return for ram_save_iterate

2013-08-23 Thread Lei Li
Signed-off-by: Lei Li --- arch_init.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 94d45e1..a34437c 100644 --- a/arch_init.c +++ b/arch_init.c @@ -709,16 +709,11 @@ static int ram_save_iterate(QEMUFile *f, void *opaque

[Qemu-devel] [PATCH resend 1/3] savevm: add comments for qemu_file_get_error()

2013-08-23 Thread Lei Li
Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li --- savevm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++ b/savevm.c @@ -566,6 +566,13

Re: [Qemu-devel] [PATCH 2/3] savevm: wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li
On 08/23/2013 06:12 PM, Paolo Bonzini wrote: Il 23/08/2013 12:03, Lei Li ha scritto: Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..fb17a6f 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7 +649,7

[Qemu-devel] [PATCH 3/3] arch_init: right return for ram_save_iterate

2013-08-23 Thread Lei Li
Signed-off-by: Lei Li --- arch_init.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 94d45e1..a34437c 100644 --- a/arch_init.c +++ b/arch_init.c @@ -709,16 +709,11 @@ static int ram_save_iterate(QEMUFile *f, void *opaque

[Qemu-devel] [PATCH 2/3] savevm: wrong error set by ram_control_load_hook()

2013-08-23 Thread Lei Li
Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 95a11f9..fb17a6f 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t flags) void

[Qemu-devel] [PATCH 1/3] savevm: add comments for qemu_file_get_error()

2013-08-23 Thread Lei Li
Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li --- savevm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++ b/savevm.c @@ -566,6 +566,13

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Lei Li
On 08/23/2013 05:22 PM, Paolo Bonzini wrote: Il 23/08/2013 11:18, Lei Li ha scritto: And now as qemu_file_rate_limit() never return negative value, what's the meaning for the check: if (qemu_file_rate_limit(f) < 0) in ram_save_iterate()? I only see a "while ((ret = qemu_file

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-23 Thread Lei Li
On 08/23/2013 04:01 PM, Paolo Bonzini wrote: Il 23/08/2013 09:51, Lei Li ha scritto: Because in these patches, the local URI is only present in the destination (which is wrong: the destination should autodetect local mode using the load-page hook). As you can see above, a "unix"

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Lei Li
On 08/23/2013 05:14 PM, Paolo Bonzini wrote: Il 23/08/2013 11:11, Lei Li ha scritto: In qemu_savevm_state_iterate(), if the return of ram_save_iterate < 0, it will set error in QEMUFile by qemu_file_set_error(f, ret), the error reported by qemu_file_get_error() in the QEMUFile is got f

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-23 Thread Lei Li
On 08/23/2013 01:34 PM, Paolo Bonzini wrote: Say, In ram_save_iterate(), the current logic is: ret = qemu_file_rate_limit(); while(ret == 0) { save RAM blocks until no more to send. } if (ret < 0) { return ret; } ... And in savevm layer, qemu_savevm_state_iterate() set an error if t

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-23 Thread Lei Li
On 08/23/2013 03:48 PM, Paolo Bonzini wrote: Il 23/08/2013 08:25, Lei Li ha scritto: On 08/21/2013 06:48 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Send all the ram blocks hooked by save_page, which will copy ram page and MADV_DONTNEED the page just copied. You should

Re: [Qemu-devel] [PATCH 11/18] migration: introduce capability localhost

2013-08-23 Thread Lei Li
On 08/23/2013 03:40 PM, Paolo Bonzini wrote: Il 22/08/2013 22:50, Michael R. Hines ha scritto: On 08/21/2013 11:18 AM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: } else if (strstart(uri, "unix:", &p)) { +if (s->ena

Re: [Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local()

2013-08-23 Thread Lei Li
On 08/23/2013 04:42 AM, Michael R. Hines wrote: On 08/21/2013 03:18 AM, Lei Li wrote: Introduce read/write backend of QEMUFileLocal used by localhost migration. The unix domain socket will be replaced by PIPE with vmsplice mechanism. Signed-off-by: Lei Li --- Makefile.objs |1

Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-22 Thread Lei Li
On 08/23/2013 01:34 PM, Paolo Bonzini wrote: On 08/21/2013 06:40 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: It should set negative error value if there has been an error. Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

Re: [Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-22 Thread Lei Li
On 08/21/2013 06:48 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Send all the ram blocks hooked by save_page, which will copy ram page and MADV_DONTNEED the page just copied. You should implement this entirely in the hook. It will be a little less efficient because of the

Re: [Qemu-devel] [PATCH 06/18] bugfix: wrong error set by ram_control_load_hook()

2013-08-22 Thread Lei Li
On 08/21/2013 06:40 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: It should set negative error value if there has been an error. Signed-off-by: Lei Li --- savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/savevm.c b/savevm.c index 1522d95

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit

2013-08-22 Thread Lei Li
On 08/21/2013 06:42 PM, Paolo Bonzini wrote: Il 21/08/2013 09:18, Lei Li ha scritto: Commit 1964a397063967acc5ce71a2a24ed26e74824ee1 refactors rate limiting to QEMUFile, but set the return value for qemu_file_rate_limit to 1 in the case of qemu_file_get_error. It is wrong and should be negative

[Qemu-devel] [Bug 1213797] Re: Guest hang after live migration

2013-08-22 Thread Lei Li
Hi, Yes, qemu-kvm is no longer maintained since 1.3, it'd be better to switch to qemu if you want an active one. This patch will be applying to up/master in QEMU branch as well. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https:

[Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local()

2013-08-21 Thread Lei Li
Introduce read/write backend of QEMUFileLocal used by localhost migration. The unix domain socket will be replaced by PIPE with vmsplice mechanism. Signed-off-by: Lei Li --- Makefile.objs |1 + migration-local.c | 211 + 2 files

[Qemu-devel] [PATCH 10/18] migration-local: implementation of outgoing part

2013-08-21 Thread Lei Li
Implementation of outgoing part for localhost migration. The integration of migration thread and corresponding adjustment will be in coming patches. Signed-off-by: Lei Li --- include/migration/migration.h |2 + migration-local.c | 85

[Qemu-devel] [PATCH 18/18] hmp: better fomat for info migrate_capabilities

2013-08-21 Thread Lei Li
As we have more and more capabilities, better to display in lines. Signed-off-by: Lei Li --- hmp.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hmp.c b/hmp.c index c45514b..3544219 100644 --- a/hmp.c +++ b/hmp.c @@ -226,13 +226,12 @@ void

[Qemu-devel] [PATCH 17/18] migration: add prefix for local migration to incoming migration

2013-08-21 Thread Lei Li
Signed-off-by: Lei Li --- migration.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 2471664..17cf2fd 100644 --- a/migration.c +++ b/migration.c @@ -81,6 +81,9 @@ void qemu_start_incoming_migration(const char *uri, Error **errp

[Qemu-devel] [PATCH 13/18] arch_init: adjust ram_save_setup() for migrate_is_localhost

2013-08-21 Thread Lei Li
Send all the ram blocks hooked by save_page, which will copy ram page and MADV_DONTNEED the page just copied. Signed-off-by: Lei Li --- arch_init.c | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 434a4ca..cbbb4db 100644

[Qemu-devel] [PATCH 16/18] migration-local: implementation of incoming part

2013-08-21 Thread Lei Li
Implementation of incoming part of localhost migration. Signed-off-by: Lei Li --- include/migration/migration.h |2 + include/migration/qemu-file.h |8 ++-- migration-local.c | 99 + 3 files changed, 105 insertions(+), 4 deletions

[Qemu-devel] [PATCH 14/18] arch_init: skip migration_bitmap_sync for local migration

2013-08-21 Thread Lei Li
Signed-off-by: Lei Li --- arch_init.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index cbbb4db..e6069eb 100644 --- a/arch_init.c +++ b/arch_init.c @@ -375,6 +375,11 @@ static void migration_bitmap_sync(void) int64_t end_time

[Qemu-devel] [PATCH 15/18] migration: adjust migration_thread for local migration

2013-08-21 Thread Lei Li
device states in qemu_save_device_state stage. Signed-off-by: Lei Li --- migration.c | 73 -- 1 files changed, 45 insertions(+), 28 deletions(-) diff --git a/migration.c b/migration.c index 2f85358..2471664 100644 --- a/migration.c +++ b

<    1   2   3   4   5   >