Re: [Qemu-devel] [PATCH] Fix two XBZRLE corruption issues

2014-02-14 Thread Orit Wasserman
ddr)->it_data; } -int cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata) +int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata) { CacheItem *it = NULL; Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [pve-devel] QEMU LIve Migration - swap_free: Bad swap file entry

2014-02-11 Thread Orit Wasserman
On 02/11/2014 03:33 PM, Stefan Priebe - Profihost AG wrote: Am 11.02.2014 14:32, schrieb Orit Wasserman: On 02/08/2014 09:23 PM, Stefan Priebe wrote: i could fix it by explicitly disable xbzrle - it seems its automatically on if i do not set the migration caps to false. So it seems to be a

Re: [Qemu-devel] [pve-devel] QEMU LIve Migration - swap_free: Bad swap file entry

2014-02-11 Thread Orit Wasserman
On 02/08/2014 09:23 PM, Stefan Priebe wrote: i could fix it by explicitly disable xbzrle - it seems its automatically on if i do not set the migration caps to false. So it seems to be a xbzrle bug. XBZRLE is disabled by default (actually all capabilities are off by default) What version of Q

Re: [Qemu-devel] migration question: disk images on nfs server

2014-02-07 Thread Orit Wasserman
On 02/07/2014 03:44 PM, Marcin Gibuła wrote: On 07.02.2014 14:36, Orit Wasserman wrote: Do you know if is applies to linux O_DIRECT writes as well? From the man of open: The behaviour of O_DIRECT with NFS will differ from local filesystems. Older kernels, or kernels

Re: [Qemu-devel] migration question: disk images on nfs server

2014-02-07 Thread Orit Wasserman
On 02/07/2014 02:54 PM, Marcin Gibuła wrote: It is more a NFS issue, if you have a file in NFS that two users in two different host are accessing (one at least write to it) you will need to enforce the "sync" option. Even if you flush all the data and close the file the NFS client can still have

Re: [Qemu-devel] migration question: disk images on nfs server

2014-02-07 Thread Orit Wasserman
On 02/07/2014 02:10 PM, Alexey Kardashevskiy wrote: On 07.02.2014 18:46, Orit Wasserman wrote: On 02/07/2014 06:35 AM, Alexey Kardashevskiy wrote: Hi! I have yet another problem with migration. Or NFS. There is one NFS server and 2 test POWER8 machines. There is a shared NFS folder on the

Re: [Qemu-devel] migration question: disk images on nfs server

2014-02-06 Thread Orit Wasserman
On 02/07/2014 06:35 AM, Alexey Kardashevskiy wrote: Hi! I have yet another problem with migration. Or NFS. There is one NFS server and 2 test POWER8 machines. There is a shared NFS folder on the server, mounted to both test hosts. There is an qcow2 image (abc.qcow2) in that shared folder. We s

Re: [Qemu-devel] QEMU LIve Migration - swap_free: Bad swap file entry

2014-02-06 Thread Orit Wasserman
On 02/06/2014 09:20 AM, Stefan Priebe - Profihost AG wrote: Am 05.02.2014 21:15, schrieb Dr. David Alan Gilbert: * Stefan Priebe (s.pri...@profihost.ag) wrote: Hello, after live migrating machines with a lot of memory (32GB, 48GB, ...) i see pretty often crashing services after migration and t

[Qemu-devel] [PATCH] Remove trailing space from error message

2014-02-05 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 25add6f..cc18f6c 100644 --- a/migration.c +++ b/migration.c @@ -482,7 +482,7 @@ void qmp_migrate_set_cache_size(int64_t value, Error **errp

Re: [Qemu-devel] [PATCH 5/8] XBZRLE cache size should not be larger than guest memory size

2014-02-04 Thread Orit Wasserman
On 02/04/2014 06:26 PM, Eric Blake wrote: On 02/04/2014 08:19 AM, Juan Quintela wrote: From: Orit Wasserman Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- migration.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration.c b/migration.c index 46a7305

Re: [Qemu-devel] [PATCH v2 4/6] XBZRLE cache size should not be larger than guest memory size

2014-01-30 Thread Orit Wasserman
On 01/30/2014 08:48 PM, Dr. David Alan Gilbert wrote: * Orit Wasserman (owass...@redhat.com) wrote: On 01/30/2014 08:23 PM, Dr. David Alan Gilbert wrote: * Orit Wasserman (owass...@redhat.com) wrote: Signed-off-by: Orit Wasserman --- migration.c | 7 +++ 1 file changed, 7 insertions

Re: [Qemu-devel] [PATCH v2 4/6] XBZRLE cache size should not be larger than guest memory size

2014-01-30 Thread Orit Wasserman
On 01/30/2014 08:23 PM, Dr. David Alan Gilbert wrote: * Orit Wasserman (owass...@redhat.com) wrote: Signed-off-by: Orit Wasserman --- migration.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration.c b/migration.c index 46a7305..25add6f 100644 --- a/migration.c +++ b

[Qemu-devel] [PATCH v2 6/6] Don't abort on memory allocation error

2014-01-30 Thread Orit Wasserman
It is better to fail migration in case of failure to allocate new cache item Signed-off-by: Orit Wasserman --- arch_init.c| 4 +++- include/migration/page_cache.h | 4 +++- page_cache.c | 16 +++- 3 files changed, 17 insertions(+), 7 deletions

[Qemu-devel] [PATCH v2 5/6] Don't abort on out of memory when creating page cache

2014-01-30 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- arch_init.c | 18 -- page_cache.c | 18 ++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 5eff80b..1fa5f1f 100644 --- a/arch_init.c +++ b/arch_init.c @@ -664,8 +664,22 @@ static

[Qemu-devel] [PATCH v2 2/6] Add check for cache size smaller than page size

2014-01-30 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- arch_init.c | 4 migration.c | 10 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index 66f5e82..8edeabe 100644 --- a/arch_init.c +++ b/arch_init.c @@ -178,6 +178,10 @@ static

[Qemu-devel] [PATCH v2 3/6] migration:fix free XBZRLE decoded_buf wrong

2014-01-30 Thread Orit Wasserman
ChenLiang Reviewed-by: Peter Maydell Reviewed-by: Orit Wasserman Signed-off-by: GongLei --- arch_init.c | 22 -- include/migration/migration.h | 1 + migration.c | 1 + 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/arc

[Qemu-devel] [PATCH v2 4/6] XBZRLE cache size should not be larger than guest memory size

2014-01-30 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- migration.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration.c b/migration.c index 46a7305..25add6f 100644 --- a/migration.c +++ b/migration.c @@ -479,6 +479,13 @@ void qmp_migrate_set_cache_size(int64_t value, Error **errp) return

[Qemu-devel] [PATCH v2 1/6] Set xbzrle buffers to NULL after freeing them to avoid double free errors

2014-01-30 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- arch_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch_init.c b/arch_init.c index 77912e7..66f5e82 100644 --- a/arch_init.c +++ b/arch_init.c @@ -617,6 +617,9 @@ static void migration_end(void) g_free

[Qemu-devel] [PATCH v2 0/6] XBZRLE Fixes

2014-01-30 Thread Orit Wasserman
. Gonglei (Arei) (1): migration:fix free XBZRLE decoded_buf wrong Orit Wasserman (5): Set xbzrle buffers to NULL after freeing them to avoid double free errors Add check for cache size smaller than page size XBZRLE cache size should not be larger than guest memory size Don't abort on o

Re: [Qemu-devel] [PATCH 6/6] Don't abort on memory allocation error

2014-01-30 Thread Orit Wasserman
On 01/30/2014 06:08 PM, Dr. David Alan Gilbert wrote: * Orit Wasserman (owass...@redhat.com) wrote: It is better to fail migration in case of failure to allocate new cache item Does this actually fail migration or just drop back to sending an uncompressed page? (I think the latter, and that&#

Re: [Qemu-devel] [PATCH 5/6] Don't abort on out of memory when creating page cache

2014-01-30 Thread Orit Wasserman
On 01/30/2014 05:48 PM, Dr. David Alan Gilbert wrote: * Orit Wasserman (owass...@redhat.com) wrote: Signed-off-by: Orit Wasserman --- arch_init.c | 16 ++-- page_cache.c | 18 ++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/arch_init.c b

[Qemu-devel] [PATCH 6/6] Don't abort on memory allocation error

2014-01-29 Thread Orit Wasserman
It is better to fail migration in case of failure to allocate new cache item Signed-off-by: Orit Wasserman --- arch_init.c| 4 +++- include/migration/page_cache.h | 4 +++- page_cache.c | 16 +++- 3 files changed, 17 insertions(+), 7 deletions

[Qemu-devel] [PATCH 4/6] XBZRLE cache size should not be larger than guest memory size

2014-01-29 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- migration.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration.c b/migration.c index 46a7305..25add6f 100644 --- a/migration.c +++ b/migration.c @@ -479,6 +479,13 @@ void qmp_migrate_set_cache_size(int64_t value, Error **errp) return

[Qemu-devel] [PATCH 2/6] Add check for cache size smaller than page size

2014-01-29 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- arch_init.c | 4 migration.c | 10 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index 66f5e82..8edeabe 100644 --- a/arch_init.c +++ b/arch_init.c @@ -178,6 +178,10 @@ static

[Qemu-devel] [PATCH 5/6] Don't abort on out of memory when creating page cache

2014-01-29 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- arch_init.c | 16 ++-- page_cache.c | 18 ++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/arch_init.c b/arch_init.c index 5eff80b..806d096 100644 --- a/arch_init.c +++ b/arch_init.c @@ -664,8 +664,20 @@ static int

[Qemu-devel] [PATCH 1/6] Set xbzrle buffers to NULL after freeing them to avoid double free errors

2014-01-29 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- arch_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch_init.c b/arch_init.c index 77912e7..66f5e82 100644 --- a/arch_init.c +++ b/arch_init.c @@ -617,6 +617,9 @@ static void migration_end(void) g_free

[Qemu-devel] [PATCH 3/6] migration:fix free XBZRLE decoded_buf wrong

2014-01-29 Thread Orit Wasserman
ChenLiang Reviewed-by: Peter Maydell Reviewed-by: Orit Wasserman Signed-off-by: GongLei --- arch_init.c | 22 -- include/migration/migration.h | 1 + migration.c | 1 + 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/arc

[Qemu-devel] [PATCH 0/6] XBZRLE Fixes

2014-01-29 Thread Orit Wasserman
Fix memory leak and missing NULLs. Better cache size validation checks. Fail migration instead of aborting QEMU in case there is not enough memory for the page cache. Gonglei (Arei) (1): migration:fix free XBZRLE decoded_buf wrong Orit Wasserman (5): Set xbzrle buffers to NULL after freeing

Re: [Qemu-devel] [PATCH v2] migration:fix free XBZRLE decoded_buf wrong

2014-01-21 Thread Orit Wasserman
On 01/21/2014 02:58 PM, Gonglei (Arei) wrote: -Original Message- From: Orit Wasserman [mailto:owass...@redhat.com] Sent: Tuesday, January 21, 2014 8:24 PM To: Gonglei (Arei); qemu-devel@nongnu.org; qemu-sta...@nongnu.org; Peter Maydell; anth...@codemonkey.ws; pbonz...@redhat.com Cc

Re: [Qemu-devel] [PATCH v2] migration:fix free XBZRLE decoded_buf wrong

2014-01-21 Thread Orit Wasserman
On 01/21/2014 02:11 PM, Gonglei (Arei) wrote: Hi, This is an update of my patch. Modifications in v2: * Removing excess check for g_free * The structure of XBZRLE is divided into two halves.One is for * src side, another is for dest side. What is the benefit of splitting the structure? decode

[Qemu-devel] [PATCH 1/2] Set xbzrle buffers to NULL after freeing them to avoid double free errors

2014-01-07 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- arch_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch_init.c b/arch_init.c index e0acbc5..5c55c68 100644 --- a/arch_init.c +++ b/arch_init.c @@ -587,6 +587,9 @@ static void migration_end(void) g_free(XBZRLE.current_buf

[Qemu-devel] [PATCH 2/2] Add check for cache size smaller than page size

2014-01-07 Thread Orit Wasserman
Signed-off-by: Orit Wasserman --- arch_init.c | 4 migration.c | 10 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index 5c55c68..e52c9ba 100644 --- a/arch_init.c +++ b/arch_init.c @@ -176,6 +176,10 @@ static struct { int64_t

Re: [Qemu-devel] [PATCH 01/38] bitmap: use long as index

2013-12-24 Thread Orit Wasserman
/BITS_PER_LONG; +long k, lim = bits/BITS_PER_LONG; for (k = 0; k < lim; ++k) { if (bitmap1[k] & bitmap2[k]) { Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 37/38] migration: synchronize memory bitmap 64bits at a time

2013-12-19 Thread Orit Wasserman
addr, +TARGET_PAGE_SIZE, +DIRTY_MEMORY_MIGRATION); +migration_bitmap_set_dirty(start + addr); +} } } } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 36/38] ram: split function that synchronizes a range

2013-12-19 Thread Orit Wasserman
migration_bitmap_sync_range(block->mr->ram_addr, block->length); } trace_migration_bitmap_sync_end(migration_dirty_pages - num_dirty_pages_init); Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 35/38] memory: syncronize kvm bitmap using bitmaps operations

2013-12-19 Thread Orit Wasserman
_PAGE_SIZE; +ram_addr = start + addr; +cpu_physical_memory_set_dirty_range(ram_addr, + TARGET_PAGE_SIZE * hpratio); +} while (c != 0); +} } } } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 34/38] memory: move bitmap synchronization to its own function

2013-12-19 Thread Orit Wasserman
y_set_dirty_lebitmap(bitmap, start, pages); return 0; } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 33/38] kvm: refactor start address calculation

2013-12-19 Thread Orit Wasserman
SIZE; +ram_addr = start + addr; cpu_physical_memory_set_dirty_range(ram_addr, TARGET_PAGE_SIZE * hpratio); } while (c != 0); Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 32/38] kvm: use directly cpu_physical_memory_* api for tracking dirty pages

2013-12-19 Thread Orit Wasserman
mr->ram_addr + addr; +cpu_physical_memory_set_dirty_range(ram_addr, +TARGET_PAGE_SIZE * hpratio); } while (c != 0); } } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 31/38] memory: unfold memory_region_test_and_clear()

2013-12-18 Thread Orit Wasserman
cpu_physical_memory_reset_dirty(block->mr->ram_addr + addr, +TARGET_PAGE_SIZE, +DIRTY_MEMORY_MIGRATION); migration_bitmap_set_dirty(block->mr, addr); } } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 26/38] memory: cpu_physical_memory_clear_dirty_range() now uses bitmap operations

2013-12-18 Thread Orit Wasserman
ry[client], page, end - page); } void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 30/38] memory: split cpu_physical_memory_* functions to its own include

2013-12-18 Thread Orit Wasserman
reset_dirty(ram_addr_t start, ram_addr_t length, + unsigned client); + +#endif +#endif diff --git a/memory.c b/memory.c index c010296..59ecc28 100644 --- a/memory.c +++ b/memory.c @@ -22,6 +22,7 @@ #include #include "exec/memory-internal.h" +#include "exec/ram_addr.h" //#define DEBUG_UNASSIGNED Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 29/38] memory: cpu_physical_memory_set_dirty_tracking() should return void

2013-12-18 Thread Orit Wasserman
core_log_global_stop(MemoryListener *listener) { -cpu_physical_memory_set_dirty_tracking(0); +cpu_physical_memory_set_dirty_tracking(false); } static MemoryListener core_memory_listener = { Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 28/38] memory: make cpu_physical_memory_reset_dirty() take a length parameter

2013-12-18 Thread Orit Wasserman
reset_dirty(mr->ram_addr + addr, -mr->ram_addr + addr + size, -client); +cpu_physical_memory_reset_dirty(mr->ram_addr + addr, size, client); } void *memory_region_get_ram_ptr(MemoryRegion *mr) Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 27/38] memory: s/dirty/clean/ in cpu_physical_memory_is_dirty()

2013-12-18 Thread Orit Wasserman
ic inline void cpu_physical_memory_set_dirty_flag(ram_addr_t addr, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 25/38] memory: cpu_physical_memory_set_dirty_range() now uses bitmap operations

2013-12-18 Thread Orit Wasserman
t, length); } static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 24/38] memory: use find_next_bit() to find dirty bits

2013-12-18 Thread Orit Wasserman
rt >> TARGET_PAGE_BITS; +next = find_next_bit(ram_list.dirty_memory[client], end, page); + +return next < end; } static inline bool cpu_physical_memory_get_dirty_flag(ram_addr_t addr, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCHv2] block: add native support for NFS

2013-12-18 Thread Orit Wasserman
On 12/18/2013 01:11 PM, Peter Lieven wrote: Am 18.12.2013 um 11:00 schrieb Orit Wasserman : On 12/18/2013 01:03 AM, Peter Lieven wrote: Am 17.12.2013 um 18:32 schrieb "Daniel P. Berrange" : On Tue, Dec 17, 2013 at 10:15:25AM +0100, Peter Lieven wrote: This patch adds native s

Re: [Qemu-devel] [PATCH 23/38] memory: s/mask/clear/ cpu_physical_memory_mask_dirty_range

2013-12-18 Thread Orit Wasserman
, + unsigned client) { ram_addr_t addr, end; Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 18/38] memory: unfold cpu_physical_memory_clear_dirty_flag() in its only user

2013-12-18 Thread Orit Wasserman
start &= TARGET_PAGE_MASK; for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) { -cpu_physical_memory_clear_dirty_flag(addr, client); +clear_bit(addr >> TARGET_PAGE_BITS, ram_list.dirty_memory[client]); } } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 22/38] memory: cpu_physical_memory_get_dirty() is used as returning a bool

2013-12-18 Thread Orit Wasserman
st.dirty_memory[client])) { +return true; +} } -return ret; +return false; } static inline bool cpu_physical_memory_get_dirty_flag(ram_addr_t addr, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 21/38] memory: make cpu_physical_memory_get_dirty() the main function

2013-12-18 Thread Orit Wasserman
PAGE_MASK; -for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) { -ret |= cpu_physical_memory_get_dirty_flag(addr, client); -} -return ret; -} - static inline void cpu_physical_memory_set_dirty_flag(ram_addr_t addr,

Re: [Qemu-devel] [PATCH 20/38] memory: unfold cpu_physical_memory_set_dirty_flag()

2013-12-18 Thread Orit Wasserman
ified_memory(addr, length); } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 19/38] memory: unfold cpu_physical_memory_set_dirty() in its only user

2013-12-18 Thread Orit Wasserman
Y_MEMORY_CODE); } xen_modified_memory(addr, length); } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 18/38] memory: unfold cpu_physical_memory_clear_dirty_flag() in its only user

2013-12-18 Thread Orit Wasserman
start &= TARGET_PAGE_MASK; for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) { -cpu_physical_memory_clear_dirty_flag(addr, client); +clear_bit(addr >> TARGET_PAGE_BITS, ram_list.dirty_memory[client]); } } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCHv2] block: add native support for NFS

2013-12-18 Thread Orit Wasserman
On 12/18/2013 12:18 PM, Daniel P. Berrange wrote: On Wed, Dec 18, 2013 at 12:00:03PM +0200, Orit Wasserman wrote: On 12/18/2013 01:03 AM, Peter Lieven wrote: Am 17.12.2013 um 18:32 schrieb "Daniel P. Berrange" : On Tue, Dec 17, 2013 at 10:15:25AM +0100, Peter Lieven wrote: This

Re: [Qemu-devel] [PATCH 17/38] memory: split dirty bitmap into three

2013-12-18 Thread Orit Wasserman
define DIRTY_MEMORY_VGA 0 -#define DIRTY_MEMORY_CODE 1 -#define DIRTY_MEMORY_MIGRATION 2 -#define DIRTY_MEMORY_NUM 3 /* num of dirty bits */ - struct MemoryRegionMmio { CPUReadMemoryFunc *read[3]; CPUWriteMemoryFunc *write[3]; Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 16/38] bitmap: Add bitmap_zero_extend operation

2013-12-18 Thread Orit Wasserman
; +} + #endif /* BITMAP_H */ Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 14/38] memory: only resize dirty bitmap when memory size increases

2013-12-18 Thread Orit Wasserman
_list.phys_dirty, new_ram_size); +memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS), 0, size >> TARGET_PAGE_BITS); +} cpu_physical_memory_set_dirty_range(new_block->offset, size); qemu_ram_setup_dump(new_block->host, size); Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 15/38] memory: cpu_physical_memory_clear_dirty_flag() result is never used

2013-12-18 Thread Orit Wasserman
ARGET_PAGE_BITS] &= mask; +ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] &= mask; } static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 13/38] memory: make sure that client is always inside range

2013-12-18 Thread Orit Wasserman
(1 << client); +assert(client < DIRTY_MEMORY_NUM); + return ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] &= mask; } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 12/38] memory: use bit 2 for migration

2013-12-18 Thread Orit Wasserman
DIRTY_MEMORY_MIGRATION 3 +#define DIRTY_MEMORY_MIGRATION 2 +#define DIRTY_MEMORY_NUM 3/* num of dirty bits */ struct MemoryRegionMmio { CPUReadMemoryFunc *read[3]; Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 11/38] memory: cpu_physical_memory_mask_dirty_range() always clears a single flag

2013-12-18 Thread Orit Wasserman
t(mr->terminates); cpu_physical_memory_reset_dirty(mr->ram_addr + addr, mr->ram_addr + addr + size, - 1 << client); +client); } void *memory_region_get_ram_ptr(MemoryRegion *mr) Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 10/38] memory: cpu_physical_memory_set_dirty_range() always dirty all flags

2013-12-18 Thread Orit Wasserman
dr, hwaddr size) { assert(mr->terminates); -cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size, -1); +cpu_physical_memory_set_dirty_range(mr->ram_addr + addr, size); } bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 09/38] memory: set single dirty flags when possible

2013-12-18 Thread Orit Wasserman
RTY_FLAG); +cpu_physical_memory_set_dirty_flag(addr, VGA_DIRTY_FLAG); +cpu_physical_memory_set_dirty_flag(addr, CODE_DIRTY_FLAG); } static inline int cpu_physical_memory_clear_dirty_flags(ram_addr_t addr, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 08/38] memory: all users of cpu_physical_memory_get_dirty used only one flag

2013-12-18 Thread Orit Wasserman
lt; end; addr += TARGET_PAGE_SIZE) { -ret |= cpu_physical_memory_get_dirty_flags(addr) & dirty_flags; +ret |= cpu_physical_memory_get_dirty_flag(addr, dirty_flag); } return ret; } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 07/38] memory: make cpu_physical_memory_is_dirty return bool

2013-12-18 Thread Orit Wasserman
addr, MIGRATION_DIRTY_FLAG); +return vga && code && migration; } static inline int cpu_physical_memory_get_dirty(ram_addr_t start, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCHv2] block: add native support for NFS

2013-12-18 Thread Orit Wasserman
On 12/18/2013 01:03 AM, Peter Lieven wrote: Am 17.12.2013 um 18:32 schrieb "Daniel P. Berrange" : On Tue, Dec 17, 2013 at 10:15:25AM +0100, Peter Lieven wrote: This patch adds native support for accessing images on NFS shares without the requirement to actually mount the entire NFS share on

Re: [Qemu-devel] [PATCH 0/9] vmstate code split + unit tests

2013-12-05 Thread Orit Wasserman
create mode 100644 vmstate.c Series Reviewed-by: Orit Wasserman (with v2 of patch 8)

Re: [Qemu-devel] [PATCH] The calculation of bytes_xfer in qemu_put_buffer() is wrong

2013-11-20 Thread Orit Wasserman
t;buf_index, buf, l); -f->bytes_xfer += size; +f->bytes_xfer += l; if (f->ops->writev_buffer) { add_to_iovec(f, f->buf + f->buf_index, l); } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 05/39] memory: create function to set a single dirty bit

2013-11-07 Thread Orit Wasserman
y_flag) +{ +ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] |= dirty_flag; +} + static inline void cpu_physical_memory_set_dirty(ram_addr_t addr) { cpu_physical_memory_set_dirty_flags(addr, 0xff); Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 04/39] exec: use accessor function to know if memory is dirty

2013-11-07 Thread Orit Wasserman
->env_ptr; tlb_set_dirty(env, env->mem_io_vaddr); } Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 03/39] memory: cpu_physical_memory_set_dirty_range() return void

2013-11-07 Thread Orit Wasserman
} bool memory_region_test_and_clear_dirty(MemoryRegion *mr, hwaddr addr, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 02/39] memory: cpu_physical_memory_set_dirty_flags() result is never used

2013-11-07 Thread Orit Wasserman
inline void cpu_physical_memory_set_dirty(ram_addr_t addr) Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 01/39] Move prototypes to memory.h

2013-11-07 Thread Orit Wasserman
*ram_addr); +void qemu_ram_set_idstr(ram_addr_t addr, const char *name, DeviceState *dev); #endif #endif Reviewed-by: Orit Wasserman

Re: [Qemu-devel] KVM call for agenda for 2013-10-01

2013-09-30 Thread Orit Wasserman
On 09/24/2013 05:09 PM, Juan Quintela wrote: > > Hi > > Please, send any topic that you are interested in covering. > > Last week I forgot to send the call for topics. We still have a topic there. > > Thanks, Juan. > > Agenda so far: > - Talk about qemu reverse executing (1st description was

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

2013-09-12 Thread Orit Wasserman
On 09/11/2013 02: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

Re: [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance

2013-09-12 Thread Orit Wasserman
On 09/11/2013 04:54 AM, junqing.w...@cs2c.com.cn wrote: > Hi, > >>The first is that if the VM failure happen in the middle on the live >>migration >the backup VM state will be inconsistent which means you can't >>failover to it. > > Yes, I have concerned about this problem. That is why we need

Re: [Qemu-devel] [PATCH RFC 0/4] Curling: KVM Fault Tolerance

2013-09-10 Thread Orit Wasserman
On 09/10/2013 06:43 AM, Jules Wang wrote: > The goal of Curling(sports) is to provide a fault tolerant mechanism for KVM, > so that in the event of a hardware failure, the virtual machine fails over to > the backup in a way that is completely transparent to the guest operating > system. > > Our g

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

2013-09-04 Thread Orit Wasserman
ch_init: right return for ram_save_iterate > > arch_init.c | 15 ++- > savevm.c|9 - > 2 files changed, 18 insertions(+), 6 deletions(-) > > Looks good, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH v2] Fix query-migrate documentation in qmp-commands.hx

2013-08-20 Thread Orit Wasserman
On 08/19/2013 09:41 PM, Luiz Capitulino wrote: > On Mon, 12 Aug 2013 10:19:52 -0400 > Luiz Capitulino wrote: > >> On Thu, 8 Aug 2013 20:05:48 +0300 >> Orit Wasserman wrote: >> >>> "ram" is present also when migration completes. >>> expect

[Qemu-devel] [PATCH v2] Fix query-migrate documentation in qmp-commands.hx

2013-08-08 Thread Orit Wasserman
"ram" is present also when migration completes. expected-downtime, total-time and downtime are no longer part of "ram" data. Signed-off-by: Orit Wasserman --- qmp-commands.hx | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/q

Re: [Qemu-devel] [PATCH] Fix query-migrate documentation in qmp-commands.hx

2013-08-08 Thread Orit Wasserman
On 08/08/2013 05:50 PM, Luiz Capitulino wrote: > On Thu, 8 Aug 2013 11:46:14 +0300 > Orit Wasserman wrote: > >> "ram" is present also when migration completes. >> total-time and downtime are no longer part of "ram" data. > > expected-downtime has

[Qemu-devel] [PATCH] Fix query-migrate documentation in qmp-commands.hx

2013-08-08 Thread Orit Wasserman
"ram" is present also when migration completes. total-time and downtime are no longer part of "ram" data. Signed-off-by: Orit Wasserman --- qmp-commands.hx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx in

Re: [Qemu-devel] [PATCH for-1.6 4/4] rdma: proper getaddrinfo() handling

2013-08-07 Thread Orit Wasserman
; - > -DPRINTF("%s => %s\n", rdma->host, ip); > - > - ret = rdma_bind_addr(listen_id, res->ai_addr); > -if (ret) { > -ERROR(errp, "Error: could not rdma_bind_addr!"); > -goto err_dest_init_bind_addr; > -} > +listen: > > rdma->listen_id = listen_id; > qemu_rdma_dump_gid("dest_init", listen_id); > @@ -2351,7 +2354,6 @@ static void *qemu_rdma_data_init(const char *host_port, > Error **errp) > if (addr != NULL) { > rdma->port = atoi(addr->port); > rdma->host = g_strdup(addr->host); > -rdma->ipv6 = addr->ipv6; > } else { > ERROR(errp, "bad RDMA migration address '%s'", host_port); > g_free(rdma); > Looks good, Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH 0/3] rdma: validate remote provided RDMAControlHeader::len

2013-08-07 Thread Orit Wasserman
; rdma: check if RDMAControlHeader::len match transferred byte > > migration-rdma.c | 44 ++-- > 1 file changed, 30 insertions(+), 14 deletions(-) > Series Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH v3 For-1.6 3/7] rdma: correct newlines in error statements

2013-08-07 Thread Orit Wasserman
;not identical on both the source and > destination.\n"); > +"not identical on both the source and destination."); > return -EINVAL; > } > local->block[j].remote_host_addr = > @@ -3089,7 +3089,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, > void *opaque, > if (j >= local->nb_blocks) { > ERROR(errp, "ram blocks mismatch #3! " > "Your QEMU command line parameters are probably " > -"not identical on both the source and > destination.\n"); > +"not identical on both the source and destination."); > return -EINVAL; > } > } > @@ -3163,7 +3163,7 @@ static void rdma_accept_incoming_migration(void *opaque) > ret = qemu_rdma_accept(rdma); > > if (ret) { > -ERROR(errp, "RDMA Migration initialization failed!\n"); > +ERROR(errp, "RDMA Migration initialization failed!"); > return; > } > > @@ -3171,7 +3171,7 @@ static void rdma_accept_incoming_migration(void *opaque) > > f = qemu_fopen_rdma(rdma, "rb"); > if (f == NULL) { > -ERROR(errp, "could not qemu_fopen_rdma!\n"); > +ERROR(errp, "could not qemu_fopen_rdma!"); > qemu_rdma_cleanup(rdma); > return; > } > @@ -3204,7 +3204,7 @@ void rdma_start_incoming_migration(const char > *host_port, Error **errp) > ret = rdma_listen(rdma->listen_id, 5); > > if (ret) { > -ERROR(errp, "listening on socket!\n"); > +ERROR(errp, "listening on socket!"); > goto err; > } > > @@ -3228,7 +3228,7 @@ void rdma_start_outgoing_migration(void *opaque, > int ret = 0; > > if (rdma == NULL) { > -ERROR(temp, "Failed to initialize RDMA data structures! %d\n", ret); > +ERROR(temp, "Failed to initialize RDMA data structures! %d", ret); > goto err; > } > > Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH v3 For-1.6 2/7] rdma: forgot to turn off the debugging flag

2013-08-07 Thread Orit Wasserman
t; > diff --git a/migration-rdma.c b/migration-rdma.c > index 9cf73e3..fe6118d 100644 > --- a/migration-rdma.c > +++ b/migration-rdma.c > @@ -27,7 +27,7 @@ > #include > #include > > -#define DEBUG_RDMA > +//#define DEBUG_RDMA > //#define DEBUG_RDMA_VERBOSE > //#define DEBUG_RDMA_REALLY_VERBOSE > > Reviewed-by: Orit Wasserman

Re: [Qemu-devel] [PATCH v3 For-1.6 1/7] rdma: bugfix: make IPv6 support work

2013-08-07 Thread Orit Wasserman
On 08/04/2013 05:54 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > RDMA does not use sockets, so we cannot use many of the socket > helper functions, but we *do* use inet_parse() which gives > RDMA all the necessary details of the connection parameters. > > However, when te

Re: [Qemu-devel] [PATCH] rdma: bugfix: make IPv6 support work

2013-07-31 Thread Orit Wasserman
On 07/31/2013 04:39 PM, Michael R. Hines wrote: > On 07/30/2013 11:31 AM, Orit Wasserman wrote: >> On 07/30/2013 05:57 PM, Michael R. Hines wrote: >>> On 07/30/2013 04:14 AM, Orit Wasserman wrote: >>>> On 07/27/2013 05:23 AM, mrhi...@linux.vnet.ibm.com wrote:

Re: [Qemu-devel] [PATCH] rdma: bugfix: make IPv6 support work

2013-07-30 Thread Orit Wasserman
On 07/30/2013 05:57 PM, Michael R. Hines wrote: > On 07/30/2013 04:14 AM, Orit Wasserman wrote: >> On 07/27/2013 05:23 AM, mrhi...@linux.vnet.ibm.com wrote: >>> From: "Michael R. Hines" >>> >>> When testing with libvirt, a simple IPv6 migra

Re: [Qemu-devel] [PATCH] rdma: bugfix: make IPv6 support work

2013-07-30 Thread Orit Wasserman
On 07/27/2013 05:23 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > When testing with libvirt, a simple IPv6 migration test failed > because we were not using getaddrinfo() properly. > This makes IPv6 migration over RDMA work. > > Also, we forgot to turn the DPRINTF flag off

[Qemu-devel] [PATCH v3 2/2] Fix real mode guest segments dpl value in savevm

2013-07-22 Thread Orit Wasserman
. Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- target-i386/machine.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/target-i386/machine.c b/target-i386/machine.c index af4c167..f9ec581 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -252,6

[Qemu-devel] [PATCH v3 1/2] Fix real mode guest migration

2013-07-22 Thread Orit Wasserman
example migration from a Penryn host (with kernel 2.6.32) to a Westmere host (for real mode guest) will fail with "kvm: unhandled exit 8021". Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela --- target-i386/machine.c | 18 ++ 1 file changed, 18 insertion

[Qemu-devel] [PATCH v3 0/2] Fix real mode guest live migration

2013-07-22 Thread Orit Wasserman
ith kernel 2.6.32) to a Westmere host (for real mode guest) This series fixing it both in the destination and source QEMU. Changes from v2: Fix more typos Changes from v1: Fix typos and style Orit Wasserman (2): Fix real mode guest migration Fix real mode guest segments dpl value in savev

[Qemu-devel] [PATCH v2 1/2] Fix real mode guest migration

2013-07-22 Thread Orit Wasserman
example migration from a Penryn host (with kernel 2.6.32) to a Westmere host (for real mode guest) will fail with "kvm: unhandled exit 8021". Signed-off-by: Orit Wasserman --- target-i386/machine.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/target-i386

[Qemu-devel] [PATCH v2 0/2] Fix real mode guest live migration

2013-07-22 Thread Orit Wasserman
ith kernel 2.6.32) to a Westmere host (for real mode guest) This series fixing it both in the destination and source QEMU. Changes from v1: Fix typos and style Orit Wasserman (2): Fix real mode guest migration Fix real mode guest segments dpl value in savevm target-i386/mach

[Qemu-devel] [PATCH v2 2/2] Fix real mode guest segments dpl value in savevm

2013-07-22 Thread Orit Wasserman
. Signed-off-by: Orit Wasserman --- target-i386/machine.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/target-i386/machine.c b/target-i386/machine.c index 83ea6ac..c98f1c9 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -252,6 +252,24 @@ static void

Re: [Qemu-devel] [PATCH 1/2] Fix real mode guest migration

2013-07-22 Thread Orit Wasserman
On 07/22/2013 01:33 PM, Andreas Färber wrote: > Am 22.07.2013 11:49, schrieb Paolo Bonzini: >> Il 22/07/2013 08:49, Orit Wasserman ha scritto: >>> Older KVM versions save CS dpl value to an invalid value for real mode >>> guests >>> (0x3). This patch detect t

Re: [Qemu-devel] [PATCH 1/2] Fix real mode guest migration

2013-07-22 Thread Orit Wasserman
On 07/22/2013 12:49 PM, Paolo Bonzini wrote: > Il 22/07/2013 08:49, Orit Wasserman ha scritto: >> Older KVM versions save CS dpl value to an invalid value for real mode guests >> (0x3). This patch detect this situation when loading CPU state and set all >> the >> se

  1   2   3   4   5   6   7   8   >