Re: [Qemu-devel] [PATCH v1 17/17] arm: boot: Support big-endian elfs

2016-02-27 Thread Peter Crosthwaite
On Tue, Jan 19, 2016 at 10:06 AM, Peter Maydell wrote: > On 18 January 2016 at 07:12, Peter Crosthwaite > wrote: >> Support ARM big-endian ELF files in system-mode emulation. When loading >> an elf, determine the endianness mode expected by the elf, and set the >> relevant CPU state accordingly.

Re: [Qemu-devel] [PATCH v1 16/17] loader: Add data swap option to load-elf

2016-02-27 Thread Peter Crosthwaite
On Tue, Jan 19, 2016 at 9:53 AM, Peter Maydell wrote: > On 18 January 2016 at 07:12, Peter Crosthwaite > wrote: >> Some CPUs are of an opposite data-endianness to other components in the >> system. Sometimes elfs have the data sections layed out with this CPU >> data-endianess accounting for when

Re: [Qemu-devel] [PATCH v1 15/17] loader: add API to load elf header

2016-02-27 Thread Peter Crosthwaite
On Tue, Jan 19, 2016 at 9:50 AM, Peter Maydell wrote: > On 18 January 2016 at 07:12, Peter Crosthwaite > wrote: >> Add an API to load an elf header header from a file. Populates a >> buffer with the header contents, as well as a boolean for whether the >> elf is 64b or not. Both arguments are opt

Re: [Qemu-devel] [PATCH v1 13/17] arm: linux-user: don't set CPSR.E in BE32 mode

2016-02-27 Thread Peter Crosthwaite
On Tue, Jan 19, 2016 at 9:35 AM, Peter Maydell wrote: > On 19 January 2016 at 17:26, Peter Maydell wrote: >> On 18 January 2016 at 07:12, Peter Crosthwaite >> wrote: >>> Don't set CPSR.E for BE32 linux-user mode. As linux-user mode models >>> BE32, using normal BE (and system mode will not), a s

Re: [Qemu-devel] [PATCH v1 10/17] target-arm: implement setend

2016-02-27 Thread Peter Crosthwaite
On Tue, Jan 19, 2016 at 8:29 AM, Peter Maydell wrote: > On 18 January 2016 at 07:12, Peter Crosthwaite > wrote: >> From: Paolo Bonzini >> >> Since this is not a high-performance path, just use a helper to >> flip the E bit and force a lookup in the hash table since the >> flags have changed. >>

[Qemu-devel] [Bug 1550743] [NEW] connect low speed host devices to qemu ehci does not work

2016-02-27 Thread Bert Brecht
Public bug reported: $ qemu-system-i386 -hda my_x86.img -device ich9-usb-ehci1,id=ehci -device usb-host,vendorid=0x045e,productid=0x071d -serial stdio qemu-system-i386: Warning: speed mismatch trying to attach usb device "Microsoft? 2.4GHz Transceiver V" ( speed) to bus "ehci.0", port "1" (high

Re: [Qemu-devel] [PATCH v1 08/17] target-arm: cpu: Move cpu_is_big_endian to header

2016-02-27 Thread Peter Crosthwaite
On Tue, Jan 19, 2016 at 8:11 AM, Peter Maydell wrote: > On 18 January 2016 at 07:12, Peter Crosthwaite > wrote: >> From: Peter Crosthwaite >> >> There is a CPU data endianness test that is used to drive the >> virtio_big_endian test. >> >> Move this up to the header so it can be more generally u

Re: [Qemu-devel] [PATCH v1 04/17] target-arm: implement SCTLR.EE

2016-02-27 Thread Peter Crosthwaite
On Tue, Jan 19, 2016 at 7:58 AM, Peter Maydell wrote: > On 18 January 2016 at 07:12, Peter Crosthwaite > wrote: >> From: Peter Crosthwaite >> >> Implement SCTLR.EE bit which controls data endianess for exceptions >> and page table translations. SCTLR.EE is mirrored to the CPSR.E bit >> on except

Re: [Qemu-devel] [PATCH v2 6/9] i.MX: Add i.MX6 System Reset Controller device.

2016-02-27 Thread Peter Maydell
On 27 February 2016 at 16:57, Jean-Christophe DUBOIS wrote: > Hi Peter and Peter, > > I need to test that the changes I did for PSCI (factor out on/off code) do > not introduce any regression. > > On which QEMU target should I test my changes to PSCI to check I didn't mess > up anything? The 'vir

Re: [Qemu-devel] [PATCH v2 6/9] i.MX: Add i.MX6 System Reset Controller device.

2016-02-27 Thread Jean-Christophe DUBOIS
Hi Peter and Peter, I need to test that the changes I did for PSCI (factor out on/off code) do not introduce any regression. On which QEMU target should I test my changes to PSCI to check I didn't mess up anything? Thanks JC Le 16/02/2016 16:35, Peter Maydell a écrit : On 8 February 2016

Re: [Qemu-devel] [Bug 1550503] [NEW] target-arm/helper.c:5493: bad test ?

2016-02-27 Thread Peter Maydell
On 26 February 2016 at 20:07, dcb <1550...@bugs.launchpad.net> wrote: > Public bug reported: > > [qemu/target-arm/helper.c:5493]: (style) Expression '(X & 0x1f) != > 0xf80f' is always true. > > Source code is > > (env->uncached_cpsr & CPSR_M) != CPSR_USER && > > but > > ./qemu/target-ar

Re: [Qemu-devel] [PATCH COLO-Frame v15 29/38] COLO: Separate the process of saving/loading ram and device state

2016-02-27 Thread Hailiang Zhang
On 2016/2/26 21:16, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We separate the process of saving/loading ram and device state when do checkpoint, we add new helpers for save/load ram/device. With this change, we can directly transfer ram from master to

[Qemu-devel] [PATCH v3 12/15] hbitmap: serialization

2016-02-27 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions are appropriate for dirty bit

[Qemu-devel] [PATCH v3 13/15] block: BdrvDirtyBitmap serialization interface

2016-02-27 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Several functions to provide necessary access to BdrvDirtyBitmap for block-migration.c Signed-off-by: Vladimir Sementsov-Ogievskiy [Add the "finish" parameters. - Fam] Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 37 +++

[Qemu-devel] [PATCH v3 14/15] tests: Add test code for hbitmap serialization

2016-02-27 Thread Fam Zheng
Acked-by: John Snow Signed-off-by: Fam Zheng --- tests/test-hbitmap.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index c00c2b5..8f64941 100644 --- a/tests/test-hbitmap.c +++ b/tests/test-h

[Qemu-devel] [PATCH v3 09/15] block: Support meta dirty bitmap

2016-02-27 Thread Fam Zheng
The added group of operations enables tracking of the changed bits in the dirty bitmap. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 51 include/block/dirty-bitmap.h | 9 2 files changed, 60 insertions(+) diff --git a/block/d

[Qemu-devel] [PATCH v3 10/15] block: Add two dirty bitmap getters

2016-02-27 Thread Fam Zheng
For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bi

[Qemu-devel] [PATCH v3 08/15] tests: Add test code for meta bitmap

2016-02-27 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/test-hbitmap.c | 116 +++ 1 file changed, 116 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index abe1427..c00c2b5 100644 --- a/tests/test-hbitmap.c +++ b/tests/tes

[Qemu-devel] [PATCH v3 04/15] block: Move block dirty bitmap code to separate files

2016-02-27 Thread Fam Zheng
The only code change is making bdrv_dirty_bitmap_truncate public. It is used in block.c. Also two long lines (bdrv_get_dirty) are wrapped. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block.c | 360 block/Makefile.objs

[Qemu-devel] [PATCH v3 06/15] block: Hide HBitmap in block dirty bitmap interface

2016-02-27 Thread Fam Zheng
HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before, an HBitmapIter is initialized in place, now the new BdrvDirtyBitmapIter must be dyn

[Qemu-devel] [PATCH v3 15/15] block: More operations for meta dirty bitmap

2016-02-27 Thread Fam Zheng
Callers can create an iterator of meta bitmap with bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on it. Meta iterators are also counted by bitmap->active_iterators. Also add a couple of functions to retrieve granularity and count. Signed-off-by: Fam Zheng --- Vladimir,

[Qemu-devel] [PATCH v3 05/15] block: Remove unused typedef of BlockDriverDirtyHandler

2016-02-27 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow --- include/block/block.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 3fbd70d..ff1933a 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -322,8 +322,6 @@ BlockDriverState

[Qemu-devel] [PATCH v3 07/15] HBitmap: Introduce "meta" bitmap to track bit changes

2016-02-27 Thread Fam Zheng
Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- include/qemu/hbitmap.h | 17 + util/hbitmap.c | 66 ++ 2 files changed, 68 insertions(+), 15 deleti

[Qemu-devel] [PATCH v3 03/15] typedefs: Add BdrvDirtyBitmap

2016-02-27 Thread Fam Zheng
Following patches to refactor and move block dirty bitmap code could use this. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- include/block/block.h | 1 - include/qemu/typedefs.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block.h b/include/block/blo

[Qemu-devel] [PATCH v3 11/15] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-02-27 Thread Fam Zheng
We use a loop over bs->dirty_bitmaps to make sure the caller is only releasing a bitmap owned by bs. Let's also assert that in this case the caller is releasing a bitmap that does exist. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bloc

[Qemu-devel] [PATCH v3 02/15] block: Include hbitmap.h in block.h

2016-02-27 Thread Fam Zheng
Signed-off-by: Fam Zheng --- include/block/block.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block.h b/include/block/block.h index 1c4f4d8..00827f7 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -8,6 +8,7 @@ #include "block/accounting.h"

[Qemu-devel] [PATCH v3 01/15] backup: Use Bitmap to replace "s->bitmap"

2016-02-27 Thread Fam Zheng
"s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- bloc

[Qemu-devel] [PATCH v3 00/15] Dirty bitmap changes for migration/persistence work

2016-02-27 Thread Fam Zheng
v2: Rebase and address comments from John, Eric and Vladimir: [02/15] block: Include hbitmap.h in block.h Split from the next patch. [Eric] [04/15] block: Move block dirty bitmap code to separate files Fix long line to keep checkpatch.pl happy. [Vladimir]

Re: [Qemu-devel] [PATCH v2 11/13] hbitmap: serialization

2016-02-27 Thread Fam Zheng
On Tue, 01/26 12:01, John Snow wrote: > > > On 01/20/2016 01:11 AM, Fam Zheng wrote: > > From: Vladimir Sementsov-Ogievskiy > > > > Functions to serialize / deserialize(restore) HBitmap. HBitmap should be > > saved to linear sequence of bits independently of endianness and bitmap > > array elem

Re: [Qemu-devel] [PATCH v2 14/13] block: More operations for meta dirty bitmap

2016-02-27 Thread Fam Zheng
On Wed, 01/27 17:57, Vladimir Sementsov-Ogievskiy wrote: > On 26.01.2016 10:26, Fam Zheng wrote: > >Callers can create an iterator of meta bitmap with > >bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on > >it. Meta iterators are also counted by bitmap->active_iterators. > >

Re: [Qemu-devel] [PATCH v2 05/13] block: Hide HBitmap in block dirty bitmap interface

2016-02-27 Thread Fam Zheng
On Tue, 01/26 19:02, Vladimir Sementsov-Ogievskiy wrote: > > why? The old way works for meta iters. The new code - doesn't. I suppose > > assert(iter->hbi.hb); > hbitmap_iter_init(&iter->hbi, iter->hbi.hb, sector_num); Okay, will change. Fam