[Qemu-devel] [PATCH v2 32/41] savevm: add new section that is used by postcopy

2012-06-04 Thread Isaku Yamahata
This is used by postcopy to tell the total length of QEMU_VM_SECTION_FULL and QEMU_VM_SUBSECTION from outgoing to incoming. Signed-off-by: Isaku Yamahata --- savevm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 318ec61..3adabad 100644 --- a

[Qemu-devel] [PATCH v2 15/41] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip

2012-06-04 Thread Isaku Yamahata
Those will be used by postcopy. Signed-off-by: Isaku Yamahata --- qemu-file.h |3 +++ savevm.c|6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 31b83f6..a285bef 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -88,6 +88,9 @@ void

[Qemu-devel] [PATCH v2 16/41] savevm: qemu_pending_size() to return pending buffered size

2012-06-04 Thread Isaku Yamahata
This will be used later by postcopy migration. Signed-off-by: Isaku Yamahata --- qemu-file.h |1 + savevm.c|5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index a285bef..880ef4b 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -91,6

[Qemu-devel] [PATCH v2 29/41] umem.h: import Linux umem.h

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- linux-headers/linux/umem.h | 42 ++ 1 files changed, 42 insertions(+), 0 deletions(-) create mode 100644 linux-headers/linux/umem.h diff --git a/linux-headers/linux/umem.h b/linux-headers/linux/umem.h new file mode

[Qemu-devel] [PATCH v2 22/41] savevm/QEMUFile: introduce qemu_fopen_fd

2012-06-04 Thread Isaku Yamahata
Introduce nonblocking fd read backend of QEMUFile. This will be used by postcopy live migration. Signed-off-by: Isaku Yamahata --- qemu-file.h |1 + savevm.c| 40 2 files changed, 41 insertions(+), 0 deletions(-) diff --git a/qemu-file.h b

[Qemu-devel] [PATCH v2 09/41] arch_init: introduce helper function to find ram block with id string

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 13 + arch_init.h |1 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index bb0cd52..9981abe 100644 --- a/arch_init.c +++ b/arch_init.c @@ -397,6 +397,19 @@ int ram_save_live(QEMUFile *f

[Qemu-devel] [PATCH v2 12/41] arch_init: factor out setting last_block, last_offset

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 13 - arch_init.h |1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c index 2617478..22d9691 100644 --- a/arch_init.c +++ b/arch_init.c @@ -203,6 +203,12 @@ int ram_save_page(QEMUFile *f

[Qemu-devel] [PATCH v2 34/41] postcopy outgoing: add -p and -n option to migrate command

2012-06-04 Thread Isaku Yamahata
Added -p option to migrate command for postcopy mode and introduce postcopy parameter for migration to indicate that postcopy mode is enabled. Add -n option for postcopy migration which indicates disabling background transfer. Signed-off-by: Isaku Yamahata --- Chnages v1 -> v2: - catch up

[Qemu-devel] [PATCH v2 40/41] migrate: add -m (movebg) option to migrate command

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- hmp-commands.hx |5 +++-- hmp.c|3 ++- migration.c |8 +++- migration.h |1 + qapi-schema.json |2 +- qmp-commands.hx |2 +- savevm.c |1 + 7 files changed, 16 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v2 27/41] buffered_file: Introduce QEMUFileNonblock for nonblock write

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- buffered_file.c | 115 +++ buffered_file.h | 13 ++ 2 files changed, 128 insertions(+), 0 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 22dd4c9..5198923 100644 --- a/buffered_file.c

[Qemu-devel] [PATCH v2 33/41] postcopy: introduce -postcopy and -postcopy-flags option

2012-06-04 Thread Isaku Yamahata
This patch prepares for postcopy livemigration. It introduces -postcopy option and its internal flag, migration_postcopy. It introduces -postcopy-flags for chaging the behavior of incoming postcopy mainly for benchmark/debug. Signed-off-by: Isaku Yamahata --- migration.h |3 +++ qemu

[Qemu-devel] [PATCH v2 01/41] arch_init: export sort_ram_list() and ram_save_block()

2012-06-04 Thread Isaku Yamahata
This will be used by postcopy. Signed-off-by: Isaku Yamahata --- arch_init.c |4 ++-- migration.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index a9e8b74..38e0173 100644 --- a/arch_init.c +++ b/arch_init.c @@ -164,7 +164,7 @@ static

[Qemu-devel] [PATCH v2 03/41] arch_init/ram_save: introduce constant for ram save version = 4

2012-06-04 Thread Isaku Yamahata
Introduce RAM_SAVE_VERSION_ID to represent version_id for ram save format. Signed-off-by: Isaku Yamahata --- arch_init.c |2 +- arch_init.h |2 ++ vl.c|4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index bd4e61e..2a53f58

[Qemu-devel] [PATCH v2 04/41] arch_init: refactor host_from_stream_offset()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 25 ++--- arch_init.h |7 +++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 2a53f58..36ece1d 100644 --- a/arch_init.c +++ b/arch_init.c @@ -374,21 +374,22 @@ int

[Qemu-devel] [PATCH v2 07/41] arch_init/ram_save_live: factor out ram_save_limit

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 28 migration.h |1 + 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/arch_init.c b/arch_init.c index 900cc8e..c861e30 100644 --- a/arch_init.c +++ b/arch_init.c @@ -311,9 +311,23 @@ void

[Qemu-devel] [PATCH v2 35/41] postcopy: introduce helper functions for postcopy

2012-06-04 Thread Isaku Yamahata
This patch introduces helper function for postcopy to access umem char device and to communicate between incoming-qemu and umemd. Signed-off-by: Isaku Yamahata --- changes v1 -> v2: - code simplification - make fault trigger more robust - introduce struct umem_pages --- umem.c |

[Qemu-devel] [PATCH v2 05/41] arch_init/ram_save_live: factor out RAM_SAVE_FLAG_MEM_SIZE case

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 21 ++--- migration.h |1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 36ece1d..28e5abb 100644 --- a/arch_init.c +++ b/arch_init.c @@ -287,6 +287,19 @@ void sort_ram_list

[Qemu-devel] [PATCH v3 2/2] umem: chardevice for kvm postcopy

2012-06-04 Thread Isaku Yamahata
This is a character device to hook page access. The page fault in the area is propagated to another user process by this chardriver. Then, the process fills the page contents and resolves the page fault. Cc: Andrea Arcangeli Cc: Avi Kivity Cc: Paolo Bonzini Signed-off-by: Isaku Yamahata

[Qemu-devel] [PATCH v2 06/41] arch_init: refactor ram_save_block()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- Chnages v1 -> v2: - don't refer last_block which can be NULL. And avoid possible infinite loop. --- arch_init.c | 82 +- arch_init.h |1 + 2 files changed, 48 insertions(+), 35 deletions(

[Qemu-devel] [PATCH v2 21/41] savevm: rename QEMUFileSocket to QEMUFileFD, socket_close to fd_close

2012-06-04 Thread Isaku Yamahata
Later the structure will be shared. Signed-off-by: Isaku Yamahata --- savevm.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/savevm.c b/savevm.c index 4b560b3..2fb0c3e 100644 --- a/savevm.c +++ b/savevm.c @@ -187,14 +187,14 @@ typedef struct QEMUFileStdio

[Qemu-devel] [PATCH v2 25/41] migration: factor out parameters into MigrationParams

2012-06-04 Thread Isaku Yamahata
Introduce MigrationParams for parameters of migration. Cc: Orit Wasserman Cc: Juan Quintela Signed-off-by: Isaku Yamahata --- Changes v1 -> v2: - catch up qapi change --- block-migration.c |8 migration.c | 21 +++-- migration.h |8 ++-- q

[Qemu-devel] [PATCH v3 0/2] postcopy migration: umem: Linux char device for postcopy

2012-06-04 Thread Isaku Yamahata
version 1 -> 2: - make ioctl structures padded to align - un-KVM KVM_VMEM -> UMEM - dropped some ioctl commands as Avi requested Isaku Yamahata (2): export necessary symbols umem: chardevice for kvm postcopy Documentation/misc-devices/umem.txt | 303 drivers/char/

[Qemu-devel] [PATCH v2 20/41] savevm/QEMUFileSocket: drop duplicated member fd

2012-06-04 Thread Isaku Yamahata
fd is already stored in QEMUFile so drop duplicated member QEMUFileSocket::fd. Signed-off-by: Isaku Yamahata --- savevm.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/savevm.c b/savevm.c index ec9f5d0..4b560b3 100644 --- a/savevm.c +++ b/savevm.c @@ -189,7 +189,6

[Qemu-devel] [PATCH v2 02/41] arch_init: export RAM_SAVE_xxx flags for postcopy

2012-06-04 Thread Isaku Yamahata
Those constants will be also used by postcopy. Signed-off-by: Isaku Yamahata --- arch_init.c |7 --- arch_init.h |7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 38e0173..bd4e61e 100644 --- a/arch_init.c +++ b/arch_init.c

[Qemu-devel] [PATCH v2 31/41] configure: add CONFIG_POSTCOPY option

2012-06-04 Thread Isaku Yamahata
Add enable/disable postcopy mode. No dynamic test yet. Signed-off-by: Isaku Yamahata --- configure | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 1f338f8..21de4cb 100755 --- a/configure +++ b/configure @@ -194,6 +194,7 @@ zlib

[Qemu-devel] [PATCH v2 39/41] postcopy/outgoing: implement prefault

2012-06-04 Thread Isaku Yamahata
When page is requested, send surrounding pages are also sent. Signed-off-by: Isaku Yamahata --- migration-postcopy.c | 56 + 1 files changed, 51 insertions(+), 5 deletions(-) diff --git a/migration-postcopy.c b/migration-postcopy.c index

[Qemu-devel] [PATCH v2 28/41] buffered_file: add qemu_file to read/write to buffer in memory

2012-06-04 Thread Isaku Yamahata
This is used by postcopy live migration. Signed-off-by: Isaku Yamahata --- buffered_file.c | 50 ++ buffered_file.h | 10 ++ 2 files changed, 60 insertions(+), 0 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index

[Qemu-devel] [PATCH v2 14/41] exec.c: export last_ram_offset()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- exec-obsolete.h |1 + exec.c |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h index 792c831..fb21dd7 100644 --- a/exec-obsolete.h +++ b/exec-obsolete.h @@ -25,6 +25,7 @@ #ifndef

[Qemu-devel] [PATCH v2 17/41] savevm, buffered_file: introduce method to drain buffer of buffered file

2012-06-04 Thread Isaku Yamahata
Introduce a new method to drain the buffer of QEMUBufferedFile. When postcopy migration, buffer size can increase unboundedly. To keep the buffer size reasonably small, introduce the method to wait for buffer to drain. Signed-off-by: Isaku Yamahata --- buffered_file.c | 20

[Qemu-devel] [PATCH v2 08/41] arch_init/ram_load: refactor ram_load

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 67 +- arch_init.h |1 + 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/arch_init.c b/arch_init.c index c861e30..bb0cd52 100644 --- a/arch_init.c +++ b/arch_init.c

[Qemu-devel] [PATCH v3 1/2] export necessary symbols

2012-06-04 Thread Isaku Yamahata
Cc: Andrea Arcangeli Cc: Avi Kivity Cc: Paolo Bonzini Signed-off-by: Isaku Yamahata --- mm/memcontrol.c |1 + mm/mempolicy.c |1 + mm/shmem.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ac35bcc..265ba2f 100644

[Qemu-devel] [PATCH v2 24/41] migration: export migrate_fd_completed() and migrate_fd_cleanup()

2012-06-04 Thread Isaku Yamahata
This will be used by postcopy migration. Signed-off-by: Isaku Yamahata --- migration.c |4 ++-- migration.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 753addb..48a8f68 100644 --- a/migration.c +++ b/migration.c @@ -159,7 +159,7

[Qemu-devel] [PATCH v2 00/41] postcopy live migration

2012-06-04 Thread Isaku Yamahata
| V V migration completes exit() Isaku Yamahata (41): arch_init: export sort_ram_list() and ram_save_block() arch_init: export RAM_SAVE_xxx flags for postcopy arch_init/ram_save: introduce constant for ram

[Qemu-devel] [PATCH v2 38/41] postcopy/outgoing: add forward, backward option to specify the size of prefault

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- hmp-commands.hx | 15 ++- hmp.c|3 +++ migration.c | 20 migration.h |2 ++ qapi-schema.json |3 ++- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/hmp-commands.hx b/hmp

[Qemu-devel] [PATCH v2 13/41] exec.c: factor out qemu_get_ram_ptr()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- cpu-all.h |2 ++ exec.c| 51 +-- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index 028528f..ff7f827 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -508,6 +508,8

[Qemu-devel] [PATCH v2 26/41] buffered_file: factor out buffer management logic

2012-06-04 Thread Isaku Yamahata
This patch factors out buffer management logic. Signed-off-by: Isaku Yamahata --- buffered_file.c | 141 +- buffered_file.h |8 +++ 2 files changed, 94 insertions(+), 55 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index

[Qemu-devel] [PATCH v2 30/41] update-linux-headers.sh: teach umem.h to update-linux-headers.sh

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- scripts/update-linux-headers.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 9d2a4bc..2afdd54 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update

[Qemu-devel] [PATCH v2 18/41] QEMUFile: add qemu_file_fd() for later use

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- qemu-file.h |1 + savevm.c| 12 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 331ac8b..98a8023 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -71,6 +71,7 @@ QEMUFile *qemu_fopen_socket(int

[Qemu-devel] [PATCH v2 10/41] arch_init: simplify a bit by ram_find_block()

2012-06-04 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 21 - exec.c | 12 ++-- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/arch_init.c b/arch_init.c index 9981abe..73bf250 100644 --- a/arch_init.c +++ b/arch_init.c @@ -432,11 +432,10 @@ void

[Qemu-devel] [PATCH v2 36/41] postcopy: implement incoming part of postcopy live migration

2012-06-04 Thread Isaku Yamahata
This patch implements postcopy live migration for incoming part Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - fork umemd early to address qemu devices touching guest ram via post/pre_load - code clean up on initialization - Makefile.target migration-postcopy.c is target dependent

Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-03-26 Thread Isaku Yamahata
On Mon, Mar 26, 2012 at 02:20:24PM +0200, Jan Kiszka wrote: > I'm also sure we will have to refactor the merge significantly again for > the introduction of additional chipsets and PC boards. But unless those > requirements can already be specified (Isaku?), that might be unavoidable. Agreed. At l

Re: [Qemu-devel] 回??: [PATCH 00/21][RFC] postcopy live?migration

2012-03-12 Thread Isaku Yamahata
make the patches work > incorrectly? PV clock touches guest pages on loading before enabling umem. Anyway I found many other devices touch guest pages. virtio-balloon and audio devices... I addressed it locally by enabling umem before device loading, and it will be included in v2. thanks, > Tha

Re: [Qemu-devel] [PATCH] pci: add accessors to get/set registers by mask

2012-02-22 Thread Isaku Yamahata
sounds good idea and the patch Looks good. On Tue, Feb 21, 2012 at 03:41:30PM +0200, Michael S. Tsirkin wrote: > pci_regs.h specifies many registers by mask + > shifted register values. > There's always some duplication when using such: > for example to override device type, we would need: > > pc

Re: [Qemu-devel] [PATCHv2-RFC 1/2] shpc: standard hot plug controller

2012-02-13 Thread Isaku Yamahata
On Mon, Feb 13, 2012 at 01:49:32PM +0200, Michael S. Tsirkin wrote: > On Mon, Feb 13, 2012 at 07:03:52PM +0900, Isaku Yamahata wrote: > > Oh nice work. > > > > On Mon, Feb 13, 2012 at 11:15:55AM +0200, Michael S. Tsirkin wrote: > > > This adds support for SHP

Re: [Qemu-devel] [PATCHv2-RFC 1/2] shpc: standard hot plug controller

2012-02-13 Thread Isaku Yamahata
Oh nice work. On Mon, Feb 13, 2012 at 11:15:55AM +0200, Michael S. Tsirkin wrote: > This adds support for SHPC interface, as defined by PCI Standard > Hot-Plug Controller and Subsystem Specification, Rev 1.0 > http://www.pcisig.com/specifications/conventional/pci_hot_plug/SHPC_10 > > Only SHPC in

Re: [Qemu-devel] ICH6+ chipset emulation

2012-01-27 Thread Isaku Yamahata
On Fri, Jan 27, 2012 at 08:12:59PM +0100, Jan Kiszka wrote: > On 2012-01-27 17:18, Dmitry Zamaruev wrote: > > Hi, > > > > I'm trying to run specific firmware under QEMU, and it is tied > > (hardcoded) to newer chipsets than QEMU currently supports. > > I know there was an effort to emulate Q35, bu

Re: [Qemu-devel] 回??: [PATCH 00/21][RFC] postcopy live?migration

2012-01-16 Thread Isaku Yamahata
On Mon, Jan 16, 2012 at 03:51:16PM +0900, Isaku Yamahata wrote: > Thank you for your info. > I suppose I found the cause, MSR_KVM_WALL_CLOCK and MSR_KVM_SYSTEM_TIME. > Your kernel enables KVM paravirt_ops, right? > > Although I'm preparing the next path series including the f

Re: [Qemu-devel] 回??: [PATCH 00/21][RFC] postcopy live?migration

2012-01-15 Thread Isaku Yamahata
AND > umem_fault--qemu-system-x86 > > > ━━━━━━━ > Tommy > > From: Isaku Yamahata > Date: 2012-01-12 16:54 > To: thfbjyddx > CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh > Subject: Re: [Qemu-devel]回??: [PATCH 00/21][RFC] postcopy live

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-12 Thread Isaku Yamahata
One more question. Does your architecture/implementation (in theory) allow KVM memory features like swap, KSM, THP? On Fri, Jan 13, 2012 at 11:03:23AM +0900, Isaku Yamahata wrote: > Very interesting. We can cooperate for better (postcopy) live migration. > The code doesn't seem av

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-12 Thread Isaku Yamahata
tep stone as the post copy live migration mainly > enable us to validate the architecture design and code. > > Regards > Benoit > > > > > > > > Regards > Benoit > > > On 12 January 2012 13:59, Avi Kivity wrote: > > On 01/04/2012 05:03 AM,

Re: [Qemu-devel] 回??: [PATCH 00/21][RFC] postcopy live?migration

2012-01-12 Thread Isaku Yamahata
29 > 2130:2130 postcopy_incoming_umemd:1840: daemon pid: 2130 > 2130:2130 postcopy_incoming_umemd:1875: entering umemd main loop > Can't find block ! > 2130:2130 postcopy_incoming_umem_ram_load:1526: shmem == NULL > 2130:2130 postcopy_incoming_umemd:1882: exiting umemd main loop >

Re: [Qemu-devel] 回??: [PATCH 00/21][RFC] postcopy live migration

2012-01-11 Thread Isaku Yamahata
it stuck in kvm_put_msrs()? kvm_put_msrs() doesn't seem to block.(backtrace by the debugger would be best.) If possible, can you please test with more simplified configuration. i.e. drop device as much as possible i.e. no usbdevice, no disk... So the debug will be simplified. thanks, > D

Re: [Qemu-devel] 回??: [PATCH 2/2] umem: chardevice for kvm?postcopy

2012-01-06 Thread Isaku Yamahata
1 > Thanks! > ━━━ > Tommy > > From: Isaku Yamahata > Date: 2012-01-05 20:18 > To: Tommy > CC: t.hirofuchi; qemu-devel; kvm; satoshi.itoh > Subject: Re: [Qemu-devel]回??: [PATCH 2/2] umem: chardevice for kvm postcopy > Hmm, this sounds like you haven't specified -postco

Re: [Qemu-devel] 回??: [PATCH 2/2] umem: chardevice for kvm postcopy

2012-01-05 Thread Isaku Yamahata
with qemu side for it doesn't get to the umem > part > I'm not sure about the problem > do you have some suggestion? > ━━━ > Tommy > > From: Isaku Yamahata > Date: 2012-01-05 18:48 > To: thfbjyddx > CC: t.hirofuchi; qemu-

Re: [Qemu-devel] 回??: [PATCH 2/2] umem: chardevice for kvm postcopy

2012-01-05 Thread Isaku Yamahata
On Thu, Jan 05, 2012 at 12:08:50PM +0800, thfbjyddx wrote: > hi, > I've tried to use this patch, Oh great! Can we share your results? > but it doesn't work for compiling error on > > page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address);//vmf-> > virtual_address? > > I guess it's f

Re: [Qemu-devel] [PATCH 00/21][RFC] postcopy live migration

2012-01-03 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 04:39:52PM -0600, Anthony Liguori wrote: >> TODO >> >> - benchmark/evaluation. Especially how async page fault affects the result. > > I'll review this series next week (Mike/Juan, please also review when you > can). > > But we really need to think hard about whether t

Re: [Qemu-devel] [PATCH 21/21] postcopy: implement postcopy livemigration

2012-01-03 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 06:06:10PM +0200, Avi Kivity wrote: > On 12/29/2011 03:26 AM, Isaku Yamahata wrote: > > This patch implements postcopy livemigration. > > > > > > +/* RAM is allocated via umem for postcopy incoming mode */ > > +#define RAM_POSTCOPY_UMEM_

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-03 Thread Isaku Yamahata
the VMA into anonymous. > The patch 2/2 is small and self contained so it's quite attractive, I > didn't see patch 1/2, was it posted? Posted. It's quite short and trivial which just do EXPORT_SYMBOL_GPL of mem_cgroup_cache_chage and shmem_zero_setup. I include it here for

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-29 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 04:55:11PM +0200, Avi Kivity wrote: > On 12/29/2011 04:49 PM, Isaku Yamahata wrote: > > > > Great, then we agreed with list/reattach basically. > > > > (Maybe identity scheme needs reconsideration.) > > > > > > I guess we misc

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-29 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 04:35:36PM +0200, Avi Kivity wrote: > On 12/29/2011 04:18 PM, Isaku Yamahata wrote: > > > > > > > > The issue is how to solve the page fault, not whether > > > > TASK_INTERRUPTIBLE or > > > > TASK_UNINTERRUPTIBLE. >

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-29 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 03:52:58PM +0200, Avi Kivity wrote: > On 12/29/2011 03:49 PM, Isaku Yamahata wrote: > > > > > > qemu can have an extra thread that wait4()s the daemon, and relaunch > > > it. This extra thread would not be blocked by the page fault. It can

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-29 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 02:55:42PM +0200, Avi Kivity wrote: > On 12/29/2011 02:39 PM, Isaku Yamahata wrote: > > > > ioctl commands: > > > > > > > > UMEM_DEV_CRATE_UMEM: create umem device for qemu > > > > UMEM_DEV_LIST: list created umem devic

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-29 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 01:24:32PM +0200, Avi Kivity wrote: > On 12/29/2011 03:26 AM, Isaku Yamahata wrote: > > This is Linux kernel driver for qemu/kvm postcopy live migration. > > This is used by qemu/kvm postcopy live migration patch. > > > > TODO: > > - Consi

Re: [Qemu-devel] [PATCH 2/2] umem: chardevice for kvm postcopy

2011-12-29 Thread Isaku Yamahata
Thank you for review. On Thu, Dec 29, 2011 at 01:17:51PM +0200, Avi Kivity wrote: > > + default n > > + help > > + User process backed memory driver provides /dev/umem device. > > + The /dev/umem device is designed for some sort of distributed > > + shared memory. Especially post-c

[Qemu-devel] [PATCH 04/21] arch_init: refactor host_from_stream_offset()

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 25 ++--- arch_init.h |9 + 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 5ad6956..d55e39c 100644 --- a/arch_init.c +++ b/arch_init.c @@ -335,21 +335,22 @@ int

[Qemu-devel] [PATCH 11/21] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip

2011-12-28 Thread Isaku Yamahata
Those will be used by postcopy. Signed-off-by: Isaku Yamahata --- hw/hw.h |3 +++ savevm.c |6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index efa04d1..0b481ba 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -77,6 +77,9 @@ void qemu_put_be32(QEMUFile

[Qemu-devel] [PATCH 18/21] configure: add CONFIG_POSTCOPY option

2011-12-28 Thread Isaku Yamahata
Add enable/disable postcopy mode. No dynamic test yet. Signed-off-by: Isaku Yamahata --- configure | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 640e815..440fa9e 100755 --- a/configure +++ b/configure @@ -190,6 +190,7 @@ opengl

[Qemu-devel] [PATCH 07/21] arch_init/ram_save_live: factor out ram_save_limit

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 28 +--- migration.h |1 + 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/arch_init.c b/arch_init.c index 982c846..249b440 100644 --- a/arch_init.c +++ b/arch_init.c @@ -261,9 +261,24 @@ void

[Qemu-devel] [PATCH 05/21] arch_init/ram_save_live: factor out RAM_SAVE_FLAG_MEM_SIZE case

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 21 ++--- migration.h |1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index d55e39c..9bc313e 100644 --- a/arch_init.c +++ b/arch_init.c @@ -243,6 +243,19 @@ void sort_ram_list

[Qemu-devel] [PATCH 17/21] update-linux-headers.sh: teach umem.h to update-linux-headers.sh

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- scripts/update-linux-headers.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 9d2a4bc..2afdd54 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update

[Qemu-devel] [PATCH 08/21] arch_init/ram_load: refactor ram_load

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 67 +- arch_init.h |1 + 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/arch_init.c b/arch_init.c index 249b440..bc53092 100644 --- a/arch_init.c +++ b/arch_init.c

[Qemu-devel] [PATCH 13/21] savevm, buffered_file: introduce method to drain buffer of buffered file

2011-12-28 Thread Isaku Yamahata
Introduce a new method to drain the buffer of QEMUBufferedFile. When postcopy migration, buffer size can increase unboundedly. To keep the buffer size reasonably small, introduce the method to wait for buffer to drain. Signed-off-by: Isaku Yamahata --- buffered_file.c | 20

[Qemu-devel] [PATCH 03/21] arch_init/ram_save: introduce constant for ram save version = 4

2011-12-28 Thread Isaku Yamahata
Introduce RAM_SAVE_VERSION_ID to represent version_id for ram save format. Signed-off-by: Isaku Yamahata --- arch_init.c |2 +- arch_init.h |2 ++ vl.c|4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index 4ede5ad..5ad6956

[Qemu-devel] [PATCH 1/2] export necessary symbols

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- mm/memcontrol.c |1 + mm/shmem.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b63f5f7..85530fc 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2807,6 +2807,7 @@ int

[Qemu-devel] [PATCH 01/21] arch_init: export sort_ram_list() and ram_save_block()

2011-12-28 Thread Isaku Yamahata
This will be used by postcopy. Signed-off-by: Isaku Yamahata --- arch_init.c |4 ++-- migration.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index d4c92b0..1947396 100644 --- a/arch_init.c +++ b/arch_init.c @@ -112,7 +112,7 @@ static

[Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-28 Thread Isaku Yamahata
OT_ implemented yet. anonymous I'm not sure whether this can be implemented or not. --- Changes version 1 -> 2: - make ioctl structures padded to align - un-KVM KVM_VMEM -> UMEM - dropped some ioctl commands as Avi requested Is

[Qemu-devel] [PATCH 02/21] arch_init: export RAM_SAVE_xxx flags for postcopy

2011-12-28 Thread Isaku Yamahata
Those constants will be also used by postcopy. Signed-off-by: Isaku Yamahata --- arch_init.c |7 --- arch_init.h |7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 1947396..4ede5ad 100644 --- a/arch_init.c +++ b/arch_init.c

[Qemu-devel] [PATCH 10/21] exec.c: export last_ram_offset()

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- exec-obsolete.h |1 + exec.c |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h index 34b9fc5..8f69f1c 100644 --- a/exec-obsolete.h +++ b/exec-obsolete.h @@ -25,6 +25,7 @@ #ifndef

[Qemu-devel] [PATCH 06/21] arch_init: refactor ram_save_block()

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- arch_init.c | 82 +++--- arch_init.h |1 + 2 files changed, 45 insertions(+), 38 deletions(-) diff --git a/arch_init.c b/arch_init.c index 9bc313e..982c846 100644 --- a/arch_init.c +++ b/arch_init.c

[Qemu-devel] [PATCH 00/21][RFC] postcopy live migration

2011-12-28 Thread Isaku Yamahata
note: I'm not sure if this can be implemented or not) | | V V migration completes exit() Isaku Yamahata (21): arch_init: export sort_ram_list() and ram_s

[Qemu-devel] [PATCH 09/21] exec.c: factor out qemu_get_ram_ptr()

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- cpu-all.h |2 ++ exec.c| 51 +-- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index 9d78715..0244f7a 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -496,6 +496,8

[Qemu-devel] [PATCH 14/21] migration: export migrate_fd_completed() and migrate_fd_cleanup()

2011-12-28 Thread Isaku Yamahata
This will be used by postcopy migration. Signed-off-by: Isaku Yamahata --- migration.c |4 ++-- migration.h |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 412fdfe..057dde7 100644 --- a/migration.c +++ b/migration.c @@ -166,7 +166,7

[Qemu-devel] [PATCH 19/21] postcopy: introduce -postcopy and -postcopy-flags option

2011-12-28 Thread Isaku Yamahata
This patch prepares for postcopy livemigration. It introduces -postcopy option and its internal flag, migration_postcopy. It introduces -postcopy-flags for chaging the behavior of incoming postcopy mainly for benchmark/debug. Signed-off-by: Isaku Yamahata postcopy: introduce -postcopy-flags

[Qemu-devel] [PATCH 16/21] umem.h: import Linux umem.h

2011-12-28 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- linux-headers/linux/umem.h | 83 1 files changed, 83 insertions(+), 0 deletions(-) create mode 100644 linux-headers/linux/umem.h diff --git a/linux-headers/linux/umem.h b/linux-headers/linux/umem.h new file mode

[Qemu-devel] [PATCH 12/21] savevm: qemu_pending_size() to return pending buffered size

2011-12-28 Thread Isaku Yamahata
This will be used later by postcopy migration. Signed-off-by: Isaku Yamahata --- hw/hw.h |1 + savevm.c |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 0b481ba..d508b4e 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -80,6 +80,7 @@ int

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2011-12-28 Thread Isaku Yamahata
On Thu, Dec 29, 2011 at 10:26:16AM +0900, Isaku Yamahata wrote: > UMEM_DEV_LIST: list created umem devices > UMEM_DEV_REATTACH: re-attach the created umem device > UMEM_DEV_LIST and UMEM_DEV_REATTACH are used when > the process that services page faul

[Qemu-devel] [PATCH 15/21] migration: factor out parameters into MigrationParams

2011-12-28 Thread Isaku Yamahata
Introduce MigrationParams for parameters of migration. Signed-off-by: Isaku Yamahata --- block-migration.c |8 hw/hw.h |2 +- migration.c | 16 +--- migration.h |8 ++-- qemu-common.h |1 + savevm.c | 12

[Qemu-devel] [PATCH 2/2] umem: chardevice for kvm postcopy

2011-12-28 Thread Isaku Yamahata
This is a character device to hook page access. The page fault in the area is reported to another user process by this chardriver. Then, the process fills the page contents and resolves the page fault. Signed-off-by: Isaku Yamahata --- drivers/char/Kconfig |9 + drivers/char/Makefile

[Qemu-devel] [PATCH 20/21] postcopy outgoing: add -p and -n option to migrate command

2011-12-28 Thread Isaku Yamahata
Added -p option to migrate command for postcopy mode and introduce postcopy parameter for migration to indicate that postcopy mode is enabled. Add -n option for postcopy migration which indicates disabling background transfer. Signed-off-by: Isaku Yamahata --- hmp-commands.hx | 12

[Qemu-devel] [PATCH] migration.h: remove incoming_expected declarations

2011-12-12 Thread Isaku Yamahata
The variable is deleted by 1bcef683bf840a928d633755031ac572d5fdb851 So remove its declaration. Cc: Luiz Capitulino Signed-off-by: Isaku Yamahata --- migration.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/migration.h b/migration.h index 999d60f..372b066 100644

Re: [Qemu-devel] [PATCH V3 05/10] pci_regs: Fix value of PCI_EXP_TYPE_RC_EC.

2011-11-04 Thread Isaku Yamahata
Good catch. This patch (and the next one 6/10) can be picked up independently through qemu-trivial or pci-tree. On Fri, Oct 28, 2011 at 04:07:31PM +0100, Anthony PERARD wrote: > Value check in PCI Express Base Specification rev 1.1 > > Signed-off-by: Anthony PERARD > --- > hw/pci_regs.h |2

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-11-01 Thread Isaku Yamahata
On Tue, Nov 01, 2011 at 04:49:08PM +0800, Wen Congyang wrote: > At 11/01/2011 04:44 PM, Michael S. Tsirkin Write: > > On Tue, Nov 01, 2011 at 09:27:25AM +0800, Wen Congyang wrote: > >> Hi, Michael S. Tsirkin > >> > >> At 09/26/2011 03:08 PM, Michael S. Tsirkin Write: > >>> On Mon, Sep 26, 2011 at 0

Re: [Qemu-devel] [SeaBIOS] [PATCH 0/5] More pci init simplifications

2011-10-17 Thread Isaku Yamahata
On Mon, Oct 17, 2011 at 11:57:09AM +0200, Gerd Hoffmann wrote: > On 10/15/11 18:25, Kevin O'Connor wrote: >> This main patch in this series is patch 2 - replacement of the >> recursive scan with a linear scan. The other patches are just >> cosmetic changes. > > Looks sane at a quick glance. > >> G

Re: [Qemu-devel] About hotplug multifunction

2011-09-13 Thread Isaku Yamahata
On Tue, Sep 13, 2011 at 09:52:49AM +0300, Gleb Natapov wrote: > On Tue, Sep 13, 2011 at 02:57:20PM +0900, Isaku Yamahata wrote: > > On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > > > On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > &g

Re: [Qemu-devel] About hotplug multifunction

2011-09-12 Thread Isaku Yamahata
On Sun, Sep 11, 2011 at 12:05:17PM +0300, Michael S. Tsirkin wrote: > On Sat, Sep 10, 2011 at 02:43:11AM +0900, Isaku Yamahata wrote: > > pci/pcie hot plug needs clean up for multifunction hotplug in long term. > > Only single function device case works. Multifunction case is broke

Re: [Qemu-devel] About hotplug multifunction

2011-09-09 Thread Isaku Yamahata
pci/pcie hot plug needs clean up for multifunction hotplug in long term. Only single function device case works. Multifunction case is broken somwehat. Especially the current acpi based hotplug should be replaced by the standardized hot plug controller in long term. On Fri, Sep 09, 2011 at 03:08:2

Re: [Qemu-devel] [PATCH][RFC] post copy chardevice (was Re: [RFC] postcopy livemigration proposal)

2011-08-15 Thread Isaku Yamahata
On Mon, Aug 15, 2011 at 12:29:37PM -0700, Avi Kivity wrote: > On 08/12/2011 04:07 AM, Isaku Yamahata wrote: >> This is a character device to hook page access. >> The page fault in the area is reported to another user process by >> this chardriver. Then, the process fills

Re: [Qemu-devel] [PATCH][RFC] post copy chardevice (was Re: [RFC] postcopy livemigration proposal)

2011-08-12 Thread Isaku Yamahata
://sites.google.com/site/grivonhome/quick-kvm-migration * Author: Isaku Yamahata * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is

[Qemu-devel] [PATCH][RFC] post copy chardevice (was Re: [RFC] postcopy livemigration proposal)

2011-08-12 Thread Isaku Yamahata
and go for better way. thanks, >From e262979e95b3c5a095c8cb0bc178309baa861a3f Mon Sep 17 00:00:00 2001 Message-Id: From: Isaku Yamahata Date: Wed, 10 Aug 2011 18:28:05 +0900 Subject: [PATCH] kvm/postcopy: chardevice for postcopy This is a character device to hook page access. The page fault i

Re: [Qemu-devel] [RFC] postcopy livemigration proposal

2011-08-10 Thread Isaku Yamahata
On Wed, Aug 10, 2011 at 04:55:32PM +0300, Avi Kivity wrote: > On 08/09/2011 05:33 AM, Isaku Yamahata wrote: >> On Mon, Aug 08, 2011 at 03:38:54PM +0300, Avi Kivity wrote: >> > On 08/08/2011 06:24 AM, Isaku Yamahata wrote: >> >> This mail is on "Yabusame: P

<    1   2   3   4   5   6   7   8   9   10   >