Re: [Qemu-devel] Dynamic Binary Instrumentation

2012-09-21 Thread Wei-Ren Chen
Hi Liuis, On Tue, Sep 04, 2012 at 10:08:09PM +0200, Lluís Vilanova wrote: Hi there, Given that right now I don't have enough time to write the paper that should accompany this work, I've decided to open it up so that whoever is interested can have access to it. You can get some

Re: [Qemu-devel] [PATCH] ehci: Fix interrupt packet MULT handling

2012-09-21 Thread Gerd Hoffmann
On 09/20/12 17:38, Hans de Goede wrote: There are several issues with our handling of the MULT epcap field of interrupt qhs, which this patch fixes. Patch added to usb patch queue. thanks, Gerd

Re: [Qemu-devel] [PATCH] blockdev: preserve readonly and snapshot states across media changes

2012-09-21 Thread Kevin Wolf
Am 21.09.2012 01:20, schrieb Kevin Shanahan: If readonly=on is given at device creation time, the -readonly flag needs to be set in the block driver state for this device so that readonly-ness is preserved across media changes (qmp change command). Similarly, to preserve the snapshot property

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-21 Thread liu ping fan
On Thu, Sep 20, 2012 at 5:07 PM, Avi Kivity a...@redhat.com wrote: On 09/20/2012 10:51 AM, liu ping fan wrote: On Wed, Sep 19, 2012 at 5:23 PM, Avi Kivity a...@redhat.com wrote: On 09/19/2012 12:19 PM, liu ping fan wrote: On Wed, Sep 19, 2012 at 5:14 PM, Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PATCH V3 10/11] vcpu: introduce lockmap

2012-09-21 Thread liu ping fan
On Thu, Sep 20, 2012 at 5:15 PM, Avi Kivity a...@redhat.com wrote: On 09/20/2012 10:51 AM, liu ping fan wrote: On Wed, Sep 19, 2012 at 5:05 PM, Avi Kivity a...@redhat.com wrote: On 09/19/2012 11:36 AM, liu ping fan wrote: It basically means you can't hold contents of device state in local

Re: [Qemu-devel] [PATCH v3 3/3] Fix address handling in inet_nonblocking_connect

2012-09-21 Thread Markus Armbruster
Orit Wasserman owass...@redhat.com writes: On 09/20/2012 04:14 PM, Markus Armbruster wrote: Orit Wasserman owass...@redhat.com writes: getaddrinfo can give us a list of addresses, but we only try to connect to the first one. If that fails we never proceed to the next one. This is common

Re: [Qemu-devel] [PATCH v3 0/3] nonblocking connect address handling cleanup

2012-09-21 Thread Markus Armbruster
Orit Wasserman owass...@redhat.com writes: On 09/20/2012 04:19 PM, Markus Armbruster wrote: Orit Wasserman owass...@redhat.com writes: Changes from v2: - remove the use of getnameinfo - remove errp for inet_connect_addr - remove QemuOpt block - fix errors in

Re: [Qemu-devel] [PATCH] sparc-dis: Remove redundant NULL check

2012-09-21 Thread Andreas Färber
Am 20.09.2012 19:03, schrieb Stefan Weil: Am 05.09.2012 19:45, schrieb Stefan Weil: Am 05.09.2012 19:15, schrieb Stefan Weil: AFAIK, binutils moved to GPL 3. Therefore I don't expect that QEMU will update to upstream in the next years. We'll have to maintain the code which we have. Try

Re: [Qemu-devel] [big lock] Discussion about the convention of device's DMA each other after breaking down biglock

2012-09-21 Thread Paolo Bonzini
Oh! And from this thread, my understanding of the reason for the rule of lock sequence: coarse-fine is that biglock means higher possibility of conflict, so we try it first, then try the fine-lock. In this way, we have a smaller window for holding fine-lock which means the other thread can

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-21 Thread Paolo Bonzini
Il 21/09/2012 05:50, Bharata B Rao ha scritto: Just shooting around a possibility: why reinvent the wheel poorly if we can use a full-blown URI parsing library? The libxml2 one is very good and easy to use. It is also pretty much self-contained and has hardly seen a commit in 3

Re: [Qemu-devel] [PATCH v4 15/19] block: raw-win32 driver reopen support

2012-09-21 Thread Kevin Wolf
Am 20.09.2012 21:13, schrieb Jeff Cody: This is the support for reopen, for win32. Note that there is a key difference in the win32 reopen, namely that it is not guaranteed safe like all the other drivers. Attempts are made to reopen the file, or open the file in a new handle prior to

Re: [Qemu-devel] [PATCH 2/2] tcg: add TB sanity checking

2012-09-21 Thread Michael Tokarev
On 21.09.2012 04:18, Max Filippov wrote: diff --git a/tcg/tcg.c b/tcg/tcg.c +#ifdef CONFIG_DEBUG_TCG +static void tcg_sanity_check(TCGContext *s) #ifndef CONFIG_DEBUG_TCG #define tcg_sanity_check(s) /*empty*/ #else static void tcg_sanity_check(TCGContext *s) +{ [] +} +#endif @@ -2082,6

Re: [Qemu-devel] [PATCH v4 02/17] target-i386: Add missing kvm bits.

2012-09-21 Thread Igor Mammedov
On Thu, 20 Sep 2012 16:03:17 -0400 Don Slutz d...@cloudswitch.com wrote: Fix duplicate name (kvmclock = kvm_clock2) also. Signed-off-by: Don Slutz d...@cloudswitch.com --- target-i386/cpu.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4 15/19] block: raw-win32 driver reopen support

2012-09-21 Thread Paolo Bonzini
Il 21/09/2012 10:33, Kevin Wolf ha scritto: +/* could not reopen the file handle, so fall back to opening + * new file (CreateFile) */ +if (raw_s-hfile == INVALID_HANDLE_VALUE) { +raw_s-hfile = CreateFile(state-bs-filename, access_flags, +

[Qemu-devel] [PATCH 02/41] fix migration sync

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch_init.c b/arch_init.c index f849f9b..cdd8ab7 100644 --- a/arch_init.c +++ b/arch_init.c @@ -489,6 +489,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque) ram_addr_t

[Qemu-devel] [PATCH 26/41] migration: make migrate_fd_wait_for_unfreeze() return errors

2012-09-21 Thread Juan Quintela
Adjust all callers Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 8 ++-- migration.c | 7 --- migration.h | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 9db73dc..6d9a50b 100644 ---

[Qemu-devel] [PATCH 38/41] block-migration: handle errors with the return codes correctly

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- block-migration.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/block-migration.c b/block-migration.c index 565628f..9f94733 100644 --- a/block-migration.c +++ b/block-migration.c @@ -423,10 +423,9

[Qemu-devel] [PATCH 36/41] block-migration: make flush_blks() return errors

2012-09-21 Thread Juan Quintela
This means we don't need to pass through qemu_file to get the errors. Adjust all callers. Signed-off-by: Juan Quintela quint...@redhat.com --- block-migration.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/block-migration.c b/block-migration.c index

[Qemu-devel] [PATCH 13/41] ram: create trace event for migration sync bitmap

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 6 ++ trace-events | 4 2 files changed, 10 insertions(+) diff --git a/arch_init.c b/arch_init.c index a58e8c3..6e0d7c4 100644 --- a/arch_init.c +++ b/arch_init.c @@ -45,6 +45,7 @@ #include hw/pcspk.h #include

[Qemu-devel] [PATCH 25/41] buffered_file: make buffered_flush return the error code

2012-09-21 Thread Juan Quintela
Or the amount of data written if there is no error. Adjust all callers. Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index

Re: [Qemu-devel] [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Richard Davies
Hi Mel, Thank you for this series. I have applied on clean 3.6-rc5 and tested, and it works well for me - the lock contention is (still) gone and isolate_freepages_block is much reduced. Here is a typical test with these patches: # grep -F '[k]' report | head -8 65.20% qemu-kvm

[Qemu-devel] [PATCH 33/41] savevm: make qemu_fill_buffer() be consistent

2012-09-21 Thread Juan Quintela
It was setting last_error directly once, and with the helper the other time. Signed-off-by: Juan Quintela quint...@redhat.com --- savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/savevm.c b/savevm.c index 8ddb9d5..4e4aa3c 100644 --- a/savevm.c +++ b/savevm.c @@ -501,7

[Qemu-devel] [PATCH 40/41] savevm: make qemu_file_put_notify() return errors

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- migration.c | 5 +++-- qemu-file.h | 2 +- savevm.c| 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/migration.c b/migration.c index 6a505c1..2c29d04 100644 --- a/migration.c +++ b/migration.c @@ -285,10 +285,11 @@

[Qemu-devel] [PATCH 21/41] buffered_file: unfold migrate_fd_put_buffer

2012-09-21 Thread Juan Quintela
We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 5 + buffered_file.h | 2 -- migration.c | 4 +--- migration.h | 1 + 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/buffered_file.c

[Qemu-devel] [PATCH 29/41] savevm: Remove qemu_fseek()

2012-09-21 Thread Juan Quintela
It has no users, and is only half implemented. Signed-off-by: Juan Quintela quint...@redhat.com --- qemu-file.h | 1 - savevm.c| 21 - 2 files changed, 22 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index d8487cd..7fe7274 100644 --- a/qemu-file.h +++

[Qemu-devel] [PATCH 32/41] savevm: unexport qemu_ftell()

2012-09-21 Thread Juan Quintela
It was unused out of savevm.c. Signed-off-by: Juan Quintela quint...@redhat.com --- qemu-file.h | 3 --- savevm.c| 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 7fe7274..289849a 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -230,7 +230,4

[Qemu-devel] [PATCH 39/41] savevm: un-export qemu_file_set_error()

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- qemu-file.h | 1 - savevm.c| 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 289849a..8dd9207 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -103,7 +103,6 @@ int

[Qemu-devel] [PATCH 27/41] savevm: unexport qemu_fflush

2012-09-21 Thread Juan Quintela
It is not used outside of savevm.c Signed-off-by: Juan Quintela quint...@redhat.com --- qemu-file.h | 1 - savevm.c| 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 31b83f6..d8487cd 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -71,7 +71,6

Re: [Qemu-devel] [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Mel Gorman
On Fri, Sep 21, 2012 at 10:13:33AM +0100, Richard Davies wrote: Hi Mel, Thank you for this series. I have applied on clean 3.6-rc5 and tested, and it works well for me - the lock contention is (still) gone and isolate_freepages_block is much reduced. Excellent! Here is a typical test

[Qemu-devel] [PATCH 18/41] buffered_file: opaque is MigrationState

2012-09-21 Thread Juan Quintela
It always have that type, just change it. Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 6 +++--- buffered_file.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 33b700b..59d952d 100644 ---

[Qemu-devel] [PATCH 31/41] savevm: unfold qemu_fclose_internal()

2012-09-21 Thread Juan Quintela
It was used only one, and was only one if. It makes error handling saner. Signed-off-by: Juan Quintela quint...@redhat.com --- savevm.c | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/savevm.c b/savevm.c index 0953695..8efa7cc 100644 ---

[Qemu-devel] [PATCH 16/41] BufferedFile: append, then flush

2012-09-21 Thread Juan Quintela
From: Paolo Bonzini pbonz...@redhat.com Simplify the logic for pushing data from the buffer to the output pipe/socket. This also matches more closely what will be the operation of the migration thread. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Juan Quintela

[Qemu-devel] [PATCH 15/41] migration: Add dirty_pages_rate to query migrate output

2012-09-21 Thread Juan Quintela
It indicates how many pages were dirtied during the last second. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 18 ++ hmp.c| 4 migration.c | 2 ++ migration.h | 1 + qapi-schema.json | 8 ++-- 5 files changed, 31

[Qemu-devel] [PATCH 06/41] migration: export migrate_get_current()

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- migration.c | 2 +- migration.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/migration.c b/migration.c index c1655b3..2827663 100644 --- a/migration.c +++ b/migration.c @@ -53,7 +53,7 @@ static NotifierList

[Qemu-devel] [PATCH 03/41] migration: store end_time in a local variable

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 1edeec5..1e3f791 100644 --- a/migration.c +++ b/migration.c @@ -327,6 +327,7 @@ static void migrate_fd_put_ready(void *opaque)

Re: [Qemu-devel] [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Richard Davies
Mel Gorman wrote: I did manage to get a couple which were slightly worse, but nothing like as bad as before. Here are the results: # grep -F '[k]' report | head -8 45.60% qemu-kvm [kernel.kallsyms] [k] clear_page_c 11.26% qemu-kvm [kernel.kallsyms] [k]

[Qemu-devel] [PATCH 28/41] virtio-net: use qemu_get_buffer() in a temp buffer

2012-09-21 Thread Juan Quintela
qemu_fseek() is known to be wrong. Would be removed on the next commit. This code should never been used (value has been MAC_TABLE_ENTRIES since 2009). Signed-off-by: Juan Quintela quint...@redhat.com --- hw/virtio-net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH 05/41] migration: rename expected_time to expected_downtime

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch_init.c b/arch_init.c index cdd8ab7..013e5e5 100644 --- a/arch_init.c +++ b/arch_init.c @@ -539,7 +539,7 @@ static int

[Qemu-devel] [PATCH 23/41] buffered_file: We can access directly to bandwidth_limit

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 5 ++--- buffered_file.h | 3 +-- migration.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 4fca774..43e68b6 100644 --- a/buffered_file.c +++

[Qemu-devel] [PATCH 09/41] ram: introduce migration_bitmap_set_dirty()

2012-09-21 Thread Juan Quintela
It just marks a region of memory as dirty. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 57f7f1a..b2dcc24 100644 --- a/arch_init.c +++ b/arch_init.c @@

[Qemu-devel] [PATCH 07/41] migration: print expected downtime in info migrate

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 2 ++ hmp.c| 4 migration.c | 2 ++ migration.h | 1 + qapi-schema.json | 5 + qmp-commands.hx | 6 ++ 6 files changed, 20 insertions(+) diff --git a/arch_init.c b/arch_init.c index

Re: [Qemu-devel] [PATCH 0/6] Reduce compaction scanning and lock contention

2012-09-21 Thread Mel Gorman
On Fri, Sep 21, 2012 at 10:17:01AM +0100, Richard Davies wrote: Richard Davies wrote: I did manage to get a couple which were slightly worse, but nothing like as bad as before. Here are the results: # grep -F '[k]' report | head -8 45.60% qemu-kvm [kernel.kallsyms] [k]

[Qemu-devel] [PATCH 22/41] buffered_file: unfold migrate_fd_put_buffer

2012-09-21 Thread Juan Quintela
We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 7 ++- buffered_file.h | 5 + migration.c | 8 ++-- migration.h | 1 + 4 files changed, 6 insertions(+), 15 deletions(-) diff --git

[Qemu-devel] [PATCH 12/41] ram: introduce migration_bitmap_sync()

2012-09-21 Thread Juan Quintela
Helper that we use each time that we need to syncronize the migration bitmap with the other dirty bitmaps. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index

[Qemu-devel] [PATCH 19/41] buffered_file: unfold migrate_fd_put_buffer

2012-09-21 Thread Juan Quintela
We only used it once, just remove the callback indirection Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 7 ++- buffered_file.h | 2 -- migration.c | 6 ++ migration.h | 3 +++ 4 files changed, 7 insertions(+), 11 deletions(-) diff --git

[Qemu-devel] [PATCH 20/41] buffered_file: unfold migrate_fd_put_ready

2012-09-21 Thread Juan Quintela
We only use it once, just remove the callback indirection. Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 5 + buffered_file.h | 2 -- migration.c | 4 +--- migration.h | 1 + 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/buffered_file.c

[Qemu-devel] [PATCH 41/41] cpus: create qemu_cpu_is_vcpu()

2012-09-21 Thread Juan Quintela
Old code used !io_thread to know if a thread was an vcpu or not. That fails when we introduce the iothread. Signed-off-by: Juan Quintela quint...@redhat.com --- cpus.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index e476a3c..1b7061a 100644 ---

Re: [Qemu-devel] [PATCH v4 04/19] block: move aio initialization into a helper function

2012-09-21 Thread Kevin Wolf
Am 20.09.2012 21:13, schrieb Jeff Cody: Move AIO initialization for raw-posix block driver into a helper function. In addition to just code motion, the aio_ctx pointer is checked for NULL, prior to calling laio_init(), to make sure laio_init() is only run once. Signed-off-by: Jeff Cody

[Qemu-devel] [PATCH 35/41] buffered_file: buffered_put_buffer() don't need to set last_error

2012-09-21 Thread Juan Quintela
Callers on savevm.c:qemu_fflush() will set it. Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 6d9a50b..318d0f0 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -120,8 +120,6 @@

[Qemu-devel] [PATCH 01/41] buffered_file: g_realloc() can't fail

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index f170aa0..4148abb 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -50,20 +50,12 @@ static void

[Qemu-devel] [PATCH 37/41] block-migration: Switch meaning of return value

2012-09-21 Thread Juan Quintela
Make consistent the result of blk_mig_save_dirty_block() and mig_save_device_dirty() Signed-off-by: Juan Quintela quint...@redhat.com --- block-migration.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/block-migration.c b/block-migration.c index

[Qemu-devel] [PATCH 14/41] Separate migration bitmap

2012-09-21 Thread Juan Quintela
This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. A separate copy of the dirty bitmap for the migration limits the amount of concurrent access to the qemu bitmap from iothread and migration thread (which requires taking the big lock). We use the qemu

[Qemu-devel] [PATCH 34/41] savevm: Only qemu_fflush() can generate errors

2012-09-21 Thread Juan Quintela
Move the error check to the beggining of the callers. Once this is fixed qemu_file_set_if_error() is not used anymore, so remove it. Signed-off-by: Juan Quintela quint...@redhat.com --- savevm.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff

[Qemu-devel] [PATCH 10/41] ram: Introduce migration_bitmap_test_and_reset_dirty()

2012-09-21 Thread Juan Quintela
It just test if the dirty bit is set, and clears it. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c index b2dcc24..acc057f 100644 --- a/arch_init.c +++

[Qemu-devel] [PATCH 30/41] savevm: make qemu_fflush() return an error code

2012-09-21 Thread Juan Quintela
Adjust all the callers. We moved the set of last_error from inside qemu_fflush() to all the callers. Signed-off-by: Juan Quintela quint...@redhat.com --- savevm.c | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/savevm.c b/savevm.c

[Qemu-devel] [PATCH 11/41] ram: Export last_ram_offset()

2012-09-21 Thread Juan Quintela
Is the only way of knowing the RAM size. Signed-off-by: Juan Quintela quint...@redhat.com --- cpu-all.h | 2 ++ exec.c| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu-all.h b/cpu-all.h index 74d3681..5408782 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -517,6 +517,8 @@

[Qemu-devel] [PATCH 24/41] buffered_file: callers of buffered_flush() already check for errors

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 43e68b6..747d672 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -61,13 +61,6 @@ static void

[Qemu-devel] [PATCH 17/41] buffered_file: rename opaque to migration_state

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 7155800..33b700b 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -27,7 +27,7 @@ typedef struct

[Qemu-devel] [PATCH 00/41] Migration cleanups, refactorings, stats, and more

2012-09-21 Thread Juan Quintela
03:07:27 +0400) are available in the git repository at: http://repo.or.cz/r/qemu/quintela.git migration-next-20120921 for you to fetch changes up to 4bce0b88b10ed790ad3669ce4ff61c945cd655eb: cpus: create qemu_cpu_is_vcpu() (2012-09-21 10:43:10 +0200) Juan Quintela (40): buffered_file

[Qemu-devel] [PATCH 08/41] savevm: Factorize ram globals reset in its own function

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index 52ccc7b..57f7f1a 100644 --- a/arch_init.c +++ b/arch_init.c @@ -482,6 +482,14 @@ static void ram_migration_cancel(void

[Qemu-devel] [PATCH 04/41] migration: print total downtime for final phase of migration

2012-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela quint...@redhat.com --- hmp.c| 4 migration.c | 6 +- migration.h | 1 + qapi-schema.json | 7 ++- qmp-commands.hx | 3 +++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/hmp.c b/hmp.c index ba6fbd3..40b0c05 100644

Re: [Qemu-devel] [PATCH 13/13] tcg: Fix !USE_DIRECT_JUMP

2012-09-21 Thread Aurelien Jarno
On Mon, Sep 17, 2012 at 08:28:52AM -0700, Richard Henderson wrote: Commit 6375e09e changed the type of TranslationBlock.tb_next, but failed to change the type of TCGContext.tb_next. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH v4 00/19] block: bdrv_reopen() patches

2012-09-21 Thread Kevin Wolf
Am 20.09.2012 21:13, schrieb Jeff Cody: These patches are based off Supriya Kannery's original bdrv_reopen() patches as part of the hostcache series. This provides support for safe reopen of a single image, or transactional reopening of multiple images atomically. These changes are all

[Qemu-devel] [PATCH 2/9] Revert mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long-fix

2012-09-21 Thread Mel Gorman
This reverts mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long-fix as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de --- mm/compaction.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/compaction.c

[Qemu-devel] [PATCH 4/9] mm: compaction: Abort compaction loop if lock is contended or run too long

2012-09-21 Thread Mel Gorman
From: Shaohua Li s...@fusionio.com Changelog since V2 o Fix BUG_ON triggered due to pages left on cc.migratepages o Make compact_zone_order() require non-NULL arg `contended' Changelog since V1 o only abort the compaction if lock is contended or run too long o Rearranged the code by Andrea

Re: [Qemu-devel] [PATCH 7/9] fbdev: move to pixman

2012-09-21 Thread Stefano Stabellini
On Fri, 21 Sep 2012, Gerd Hoffmann wrote: On 09/20/12 17:33, Stefano Stabellini wrote: On Thu, 20 Sep 2012, Stefano Stabellini wrote: On Thu, 20 Sep 2012, Gerd Hoffmann wrote: Hi, In any graphics mode relevant today vga emulation will use qemu_create_displaysurface_from(). Whenever

[Qemu-devel] [PATCH 8/9] mm: compaction: Cache if a pageblock was scanned and no pages were isolated

2012-09-21 Thread Mel Gorman
When compaction was implemented it was known that scanning could potentially be excessive. The ideal was that a counter be maintained for each pageblock but maintaining this information would incur a severe penalty due to a shared writable cache line. It has reached the point where the scanning

[Qemu-devel] [RFC PATCH v3 02/19][SeaBIOS] Add SSDT memory device support

2012-09-21 Thread Vasilis Liaskovitis
Define SSDT hotplug-able memory devices in _SB namespace. The dynamically generated SSDT includes per memory device hotplug methods. These methods just call methods defined in the DSDT. Also dynamically generate a MTFY method and a MEON array of the online/available memory devices. ACPI

[Qemu-devel] [RFC PATCH v3 06/19] Implement -dimm command line option

2012-09-21 Thread Vasilis Liaskovitis
Example: -dimm id=dimm0,size=512M,node=0,populated=off will define a 512M memory slot belonging to numa node 0. When populated=on, a DimmDevice is created and hot-plugged at system startup. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/Makefile.objs |2 +-

[Qemu-devel] [PATCH 3/9] Revert mm: compaction: abort compaction loop if lock is contended or run too long

2012-09-21 Thread Mel Gorman
This reverts mm-compaction-abort-compaction-loop-if-lock-is-contended-or-run-too-long.patch as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de --- mm/compaction.c | 12 +--- mm/internal.h |2 +- 2 files changed, 6 insertions(+), 8

[Qemu-devel] [RFC PATCH v3 19/19][SeaBIOS] Calculate pcimem_start and pcimem64_start from SRAT entries

2012-09-21 Thread Vasilis Liaskovitis
pcimem_start and pcimem64_start are adjusted from srat entries. For this reason, paravirt info (NUMA SRAT entries and number of cpus) need to be read before pci_setup. Imho, this is an ugly code change since SRAT bios tables and number of cpus have to be read earlier. But the advantage is that no

[Qemu-devel] [RFC PATCH v3 15/19] Add _OST dimm support

2012-09-21 Thread Vasilis Liaskovitis
This allows qemu to receive notifications from the guest OS on success or failure of a memory hotplug request. The guest OS needs to implement the _OST functionality for this to work (linux-next: http://lkml.org/lkml/2012/6/25/321) This patch also updates dimm bitmap state and hot-remove pending

[Qemu-devel] [RFC PATCH v3 13/19] balloon: update with hotplugged memory

2012-09-21 Thread Vasilis Liaskovitis
query-balloon and info balloon should report total memory available to the guest. balloon inflate/ deflate can also use all memory available to the guest (initial + hotplugged memory) Ballon driver has been minimaly tested with the patch, please review and test. Caveat: if the guest does not

[Qemu-devel] [RFC PATCH v3 14/19][SeaBIOS] Add _OST dimm method

2012-09-21 Thread Vasilis Liaskovitis
Add support for _OST method. _OST method will write into the correct I/O byte to signal success / failure of hot-add or hot-remove to qemu. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- src/acpi-dsdt.dsl | 50 ++

[Qemu-devel] [RFC PATCH v3 16/19] Update dimm state on reset

2012-09-21 Thread Vasilis Liaskovitis
in case of hot-remove failure on a guest that does not implement _OST, the dimm bitmaps in qemu and Seabios show the dimm as unplugged, but the dimm is still present on the qdev/memory bus. To avoid this inconsistency, we set the dimm state to active/hot-plugged on a reset of the associated

[Qemu-devel] [PATCH 9/9] mm: compaction: Restart compaction from near where it left off

2012-09-21 Thread Mel Gorman
This is almost entirely based on Rik's previous patches and discussions with him about how this might be implemented. Order 0 compaction stops when enough free pages of the correct page order have been coalesced. When doing subsequent higher order allocations, it is possible for compaction to

Re: [Qemu-devel] [PATCH] New syscalls to the seccomp whitelist

2012-09-21 Thread Kevin Wolf
Am 20.09.2012 23:00, schrieb Eduardo Otubo: Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug - https://bugzilla.redhat.com/show_bug.cgi?id=855162 Regards, --- qemu-seccomp.c | 21 - 1 file changed, 20 insertions(+), 1

[Qemu-devel] [RFC PATCH v3 07/19] acpi_piix4: Implement memory device hotplug registers

2012-09-21 Thread Vasilis Liaskovitis
A 32-byte register is used to present up to 256 hotplug-able memory devices to BIOS and OSPM. Hot-add and hot-remove functions trigger an ACPI hotplug event through these. Only reads are allowed from these registers. An ACPI hot-remove event but needs to wait for OSPM to eject the device. We use

[Qemu-devel] [PATCH 1/9] Revert mm: compaction: check lock contention first before taking lock

2012-09-21 Thread Mel Gorman
This reverts mm-compaction-check-lock-contention-first-before-taking-lock.patch as it is replaced by a later patch in the series. Signed-off-by: Mel Gorman mgor...@suse.de --- mm/compaction.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/compaction.c

[Qemu-devel] [PATCH 5/9] mm: compaction: Acquire the zone-lru_lock as late as possible

2012-09-21 Thread Mel Gorman
Compactions migrate scanner acquires the zone-lru_lock when scanning a range of pages looking for LRU pages to acquire. It does this even if there are no LRU pages in the range. If multiple processes are compacting then this can cause severe locking contention. To make matters worse commit

[Qemu-devel] [RFC PATCH v3 10/19] fix live-migration when populated=on is missing

2012-09-21 Thread Vasilis Liaskovitis
Live migration works after memory hot-add events, as long as the qemu command line -dimm arguments are changed on the destination host to specify populated=on for the dimms that have been hot-added. If a command-line change has not occured, the destination host does not yet have the corresponding

[Qemu-devel] [RFC PATCH v3 17/19][SeaBIOS] Implement _PS3 method for memory device

2012-09-21 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- src/acpi-dsdt.dsl | 15 +++ src/ssdt-mem.dsl |4 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 0d37bbc..8a18770 100644 ---

[Qemu-devel] [RFC PATCH v3 04/19][SeaBIOS] acpi: generate hotplug memory devices

2012-09-21 Thread Vasilis Liaskovitis
The memory device generation is guided by qemu paravirt info. Seabios first uses the info to setup SRAT entries for the hotplug-able memory slots. Afterwards, build_memssdt uses the created SRAT entries to generate appropriate memory device objects. One memory device (and corresponding SRAT entry)

[Qemu-devel] [RFC PATCH v3 19/19] alternative: Introduce paravirt interface QEMU_CFG_PCI_WINDOW

2012-09-21 Thread Vasilis Liaskovitis
Qemu already calculates the 32-bit and 64-bit PCI starting offsets based on initial memory and hotplug-able dimms. This info needs to be passed to Seabios for PCI initialization. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- docs/specs/fwcfg.txt |9 +

[Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-09-21 Thread Vasilis Liaskovitis
Each hotplug-able memory slot is a DimmDevice. All DimmDevices are attached to a new bus called DimmBus. This bus is introduced so that we no longer depend on hotplug-capability of main system bus (the main bus does not allow hotplugging). The DimmBus should be attached to a chipset Device (i440fx

[Qemu-devel] [RFC PATCH v3 18/19] Implement _PS3 for dimm

2012-09-21 Thread Vasilis Liaskovitis
This will allow us to update dimm state on OSPM-initiated eject operations e.g. with echo 1 /sys/bus/acpi/devices/PNP0C80\:00/eject Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- docs/specs/acpi_hotplug.txt |7 +++ hw/acpi_piix4.c |5 +

[Qemu-devel] [RFC PATCH v3 11/19] Implement qmp and hmp commands for notification lists

2012-09-21 Thread Vasilis Liaskovitis
Guest can respond to ACPI hotplug events e.g. with _EJ or _OST method. This patch implements a tail queue to store guest notifications for memory hot-add and hot-remove requests. Guest responses for memory hotplug command on a per-dimm basis can be detected with the new hmp command info memhp or

Re: [Qemu-devel] [PATCH] usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller

2012-09-21 Thread Jan Kiszka
On 2012-09-18 11:41, Hans de Goede wrote: Hi, On 09/17/2012 06:22 PM, Jan Kiszka wrote: If that does not work, add the debug parameter to the usb-redir device, set it to 4, collect logs of trying to redirect the device and send me the logs please, ie: -device

[Qemu-devel] [RFC PATCH v3 01/19][SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros

2012-09-21 Thread Vasilis Liaskovitis
This allows to extract the beginning, end and name of a Device object. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- tools/acpi_extract.py | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/tools/acpi_extract.py

[Qemu-devel] [PATCH 0/9] Reduce compaction scanning and lock contention

2012-09-21 Thread Mel Gorman
Hi Andrew, Richard Davies and Shaohua Li have both reported lock contention problems in compaction on the zone and LRU locks as well as significant amounts of time being spent in compaction. This series aims to reduce lock contention and scanning rates to reduce that CPU usage. Richard reported

[Qemu-devel] [RFC PATCH v3 09/19] pc: Add dimm paravirt SRAT info

2012-09-21 Thread Vasilis Liaskovitis
The numa_fw_cfg paravirt interface is extended to include SRAT information for all hotplug-able dimms. There are 3 words for each hotplug-able memory slot, denoting start address, size and node proximity. The new info is appended after existing numa info, so that the fw_cfg layout does not break.

[Qemu-devel] [PATCH 7/9] Revert mm: have order 0 compaction start off where it left

2012-09-21 Thread Mel Gorman
This reverts commit 7db8889a (mm: have order 0 compaction start off where it left) and commit de74f1cc (mm: have order 0 compaction start near a pageblock with free pages). These patches were a good idea and tests confirmed that they massively reduced the amount of scanning but the

[Qemu-devel] [PATCH 6/9] mm: compaction: Acquire the zone-lock as late as possible

2012-09-21 Thread Mel Gorman
Compactions free scanner acquires the zone-lock when checking for PageBuddy pages and isolating them. It does this even if there are no PageBuddy pages in the range. This patch defers acquiring the zone lock for as long as possible. In the event there are no free pages in the pageblock then the

[Qemu-devel] [RFC PATCH v3 03/19][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug

2012-09-21 Thread Vasilis Liaskovitis
Extend the DSDT to include methods for handling memory hot-add and hot-remove notifications and memory device status requests. These functions are called from the memory device SSDT methods. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- src/acpi-dsdt.dsl | 70

[Qemu-devel] [RFC PATCH v3 12/19] Implement info memory-total and query-memory-total

2012-09-21 Thread Vasilis Liaskovitis
Returns total physical memory available to guest in bytes, including hotplugged memory. Note that the number reported here may be different from what the guest sees e.g. if the guest has not logically onlined hotplugged memory. This functionality is provided independently of a balloon device,

[Qemu-devel] [RFC PATCH v3 20/19][SeaBIOS] alternative: Use paravirt interface for pci windows

2012-09-21 Thread Vasilis Liaskovitis
Initialize the 32-bit and 64-bit pci starting offsets from values passed in by the qemu paravirt interface QEMU_CFG_PCI_WINDOW. Qemu calculates the starting offsets based on initial memory and hotplug-able dimms. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com ---

[Qemu-devel] [RFC PATCH v3 08/19] pc: calculate dimm physical addresses and adjust memory map

2012-09-21 Thread Vasilis Liaskovitis
Dimm physical address offsets are calculated automatically and memory map is adjusted accordingly. If a DIMM can fit before the PCI_HOLE_START (currently 0xe000), it will be added normally, otherwise its physical address will be above 4GB. Also create memory bus on i440fx-pcihost device.

[Qemu-devel] [RFC PATCH v3 00/19] ACPI memory hotplug

2012-09-21 Thread Vasilis Liaskovitis
This is v3 of the ACPI memory hotplug functionality. Only x86_64 target is supported for now. Overview: Dimm device layout is modeled with a new qemu command line -dimm id=name,size=sz,node=pxm,populated=on|off The starting physical address for all dimms is calculated automatically from top

Re: [Qemu-devel] [PATCH 01/41] buffered_file: g_realloc() can't fail

2012-09-21 Thread Paolo Bonzini
Il 21/09/2012 10:46, Juan Quintela ha scritto: Signed-off-by: Juan Quintela quint...@redhat.com --- buffered_file.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index f170aa0..4148abb 100644 --- a/buffered_file.c +++

Re: [Qemu-devel] [PATCH v4 15/19] block: raw-win32 driver reopen support

2012-09-21 Thread Jeff Cody
On 09/21/2012 04:43 AM, Paolo Bonzini wrote: Il 21/09/2012 10:33, Kevin Wolf ha scritto: +/* could not reopen the file handle, so fall back to opening + * new file (CreateFile) */ +if (raw_s-hfile == INVALID_HANDLE_VALUE) { +raw_s-hfile = CreateFile(state-bs-filename,

  1   2   3   4   5   >