Re: [Qemu-devel] [PATCH 03/28] ide-test: add test for werror=stop

2014-08-01 Thread Markus Armbruster
John Snow writes: > On 07/31/2014 06:58 AM, Stefan Hajnoczi wrote: >> On Mon, Jul 07, 2014 at 02:17:44PM -0400, John Snow wrote: >>> +static void test_retry_flush(void) >>> +{ >>> +uint8_t data; >>> +const char *s; >>> + >>> +prepare_blkdebug_script(debug_path, "flush_to_disk"); >>> +

Re: [Qemu-devel] [PATCH 15/28] ide: stop PIO transfer on errors

2014-08-01 Thread Paolo Bonzini
Il 31/07/2014 14:23, Stefan Hajnoczi ha scritto: > On Mon, Jul 07, 2014 at 02:17:56PM -0400, John Snow wrote: >> From: Paolo Bonzini >> >> This will provide a hook for sending the result of the command via the >> FIS receive area. >> >> Signed-off-by: Paolo Bonzini >> Signed-off-by: John Snow >>

Re: [Qemu-devel] [PATCH 14/15] hw/block/virtio-blk: create num_queues vqs if dataplane is enabled

2014-08-01 Thread Ming Lei
On Fri, Aug 1, 2014 at 2:10 PM, Paolo Bonzini wrote: > Il 01/08/2014 05:09, Ming Lei ha scritto: >> Per virtio spec, only the feature is set, the VM can be allowed to >> access the 'num_queues' field, and I didn't see any problem from >> VM's view point. >> >> So could you

Re: [Qemu-devel] [PATCH 0/7] icount migration and clock.

2014-08-01 Thread Paolo Bonzini
Il 01/08/2014 01:37, fred.kon...@greensocs.com ha scritto: > From: KONRAD Frederic > > Those are some icount patches required for reverse execution. > > It introduces an icount clock which is only growing with icount. > It allows QEMU to migrate icount so virtual clock is kept if the VM is > mi

Re: [Qemu-devel] [PATCH 07/15] dataplane: use object pool to speed up allocation for virtio blk request

2014-08-01 Thread Ming Lei
On Thu, Jul 31, 2014 at 5:18 PM, Paolo Bonzini wrote: > Il 31/07/2014 05:22, Ming Lei ha scritto: >>> > >>> > The problem is that g_slice here is not using the slab-style allocator >>> > because the object is larger than roughly 500 bytes. One solution would >>> > be to make virtqueue_pop/vring_p

Re: [Qemu-devel] [PATCH 14/15] hw/block/virtio-blk: create num_queues vqs if dataplane is enabled

2014-08-01 Thread Paolo Bonzini
Il 01/08/2014 09:35, Ming Lei ha scritto: > OK, I will convert non-dataplane to support multi virtqueues in V1, > and the conversion is not difficult and straightforward. > > BTW, docs/migration.txt mentions that "QEMU has to be launched > with the same arguments the two times", so can I understan

[Qemu-devel] [PATCH v3 7/8] vl: don't use 'Yoda conditions'

2014-08-01 Thread arei.gonglei
From: Gonglei imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei --- vl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index fe451aa..04c5abd 100644 --- a/vl.c +++ b/vl.c @@ -1136,7 +1136,7 @@ static int drive_init_func(Qe

[Qemu-devel] [PATCH v3 3/8] audio: don't use 'Yoda conditions'

2014-08-01 Thread arei.gonglei
From: Gonglei imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei --- hw/audio/gus.c | 2 +- hw/audio/hda-codec.c | 3 ++- hw/audio/sb16.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index

[Qemu-devel] [PATCH v3 for-2.2 0/8] don't use Yoda conditions

2014-08-01 Thread arei.gonglei
From: Gonglei $WHATEVER: don't use 'Yoda conditions' 'Yoda conditions' are not part of idiomatic QEMU coding style, so rewrite them in the more usual order. v3: - rewrite CODINT_STYLE file suggested by Eric, thanks. - rename the patch serials. - imitate nearby code about using '!value' or 'v

[Qemu-devel] [PATCH v3 6/8] spice: don't use 'Yoda conditions'

2014-08-01 Thread arei.gonglei
From: Gonglei imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei --- ui/spice-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 7bb91e6..1a2fb4b 100644 --- a/ui/spice-core.c +++ b/ui/spice-core

[Qemu-devel] [PATCH v3 5/8] don't use 'Yoda conditions'

2014-08-01 Thread arei.gonglei
From: Gonglei imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei --- qdev-monitor.c | 2 +- qemu-char.c | 2 +- util/qemu-sockets.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index f87f3d8.

[Qemu-devel] [PATCH v3 2/8] usb: don't use 'Yoda conditions'

2014-08-01 Thread arei.gonglei
From: Gonglei imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei --- hw/usb/dev-audio.c | 2 +- hw/usb/dev-mtp.c | 4 ++-- hw/usb/hcd-ehci.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index b

[Qemu-devel] [PATCH v3 8/8] vmxnet3: don't use 'Yoda conditions'

2014-08-01 Thread arei.gonglei
From: Gonglei imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei --- hw/net/vmxnet3.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 77bea6f..588149d 100644 --- a/hw/net/vmxnet3.c ++

[Qemu-devel] [PATCH v3 4/8] isa-bus: don't use 'Yoda conditions'

2014-08-01 Thread arei.gonglei
From: Gonglei imitate nearby code about using '!value' or 'value == NULL' Signed-off-by: Gonglei --- hw/isa/isa-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index b28981b..cc85e53 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bu

[Qemu-devel] [PATCH v3 1/8] CODING_STYLE: Section about conditional statement

2014-08-01 Thread arei.gonglei
From: Gonglei Yoda conditions lack readability, and QEMU has a strict compiler configuration for checking a common mistake like "if (dev = NULL)". Make it a written rule. Signed-off-by: Gonglei --- CODING_STYLE | 14 ++ 1 file changed, 14 insertions(+) diff --git a/CODING_STYLE b/

Re: [Qemu-devel] [PATCH v2 1/3] trace: teach lttng backend to use format strings

2014-08-01 Thread Alex Bennée
Alex Bennée writes: > This makes the UST backend pay attention to the format string arguments > that are defined when defining payload data. With this you can now > ensure integers are reported in hex mode if you want. > Ping Stefan, can this one at least be slurped up into your tracing tree?

[Qemu-devel] [PATCH v3 0/9] Virtio PCI libqos driver

2014-08-01 Thread Marc Marí
Add functions for virtio PCI libqos driver. Add more debugging tools. Solve bugs found while generating tests. v3: Solved problems, added indirect descriptor support and test for configuration changes Marc Marí (9): tests: Functions bus_foreach and device_find from libqos virtio API tests

[Qemu-devel] [PATCH v3 5/9] libqos: Change free function called in malloc

2014-08-01 Thread Marc Marí
Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Marc Marí --- tests/libqos/malloc.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc.h b/tests/libqos/malloc.h index 46f6000..5565381 100644 --- a/tests/libqos/malloc.h +++ b/tests/libqo

[Qemu-devel] [PATCH v3 1/9] tests: Functions bus_foreach and device_find from libqos virtio API

2014-08-01 Thread Marc Marí
Virtio header has been changed to compile and work with a real device. Functions bus_foreach and device_find have been implemented for PCI. Virtio-blk test case now opens a fake device. Signed-off-by: Marc Marí --- tests/Makefile|3 +- tests/libqos/virtio-pci.c | 75 +++

[Qemu-devel] [PATCH v3 6/9] virtio-blk: Correct bug in support for flexible descriptor layout

2014-08-01 Thread Marc Marí
Without this correction, only a three descriptor layout is accepted, and requests with just two descriptors are not completed and no error message is displayed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Marc Marí --- hw/block/virtio-blk.c | 14 +++--- 1 file changed, 7 insertions(

[Qemu-devel] [PATCH v3 4/9] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-08-01 Thread Marc Marí
Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Signed-off-by: Marc Marí --- tests/libqos/malloc-pc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index db1496c..2efd095 100644 --- a/

[Qemu-devel] [PATCH v3 2/9] tests: Add virtio device initialization

2014-08-01 Thread Marc Marí
Add functions to read and write virtio header fields. Add status bit setting in virtio-blk-device. Signed-off-by: Marc Marí --- tests/Makefile|2 +- tests/libqos/virtio-pci.c | 57 + tests/libqos/virtio-pci.h | 18 ++ te

[Qemu-devel] [PATCH v3 8/9] libqos: Added indirect descriptor support to virtio implementation

2014-08-01 Thread Marc Marí
Add functions necessary for working with indirect descriptors. Add test using new functions. Signed-off-by: Marc Marí --- tests/libqos/virtio.c | 62 tests/libqos/virtio.h | 11 + tests/virtio-blk-test.c | 120 +++

[Qemu-devel] [PATCH v3 3/9] libqtest: add QTEST_LOG for debugging qtest testcases

2014-08-01 Thread Marc Marí
Signed-off-by: Paolo Bonzini Signed-off-by: Marc Marí --- tests/libqtest.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 98e8f4b..fbd600d 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -167,11 +167,12 @@ QTestState

[Qemu-devel] [PATCH v3 7/9] libqos: Added basic virtqueue support to virtio implementation

2014-08-01 Thread Marc Marí
Add status changing and feature negotiation. Add basic virtqueue support for adding and sending virtqueue requests. Add ISR checking. Signed-off-by: Marc Marí --- tests/libqos/virtio-pci.c | 91 +- tests/libqos/virtio-pci.h |7 ++ tests/libqos/virtio.c | 89 ++

[Qemu-devel] [PATCH v3 9/9] libqos: Added test case for configuration changes in virtio-blk test

2014-08-01 Thread Marc Marí
Signed-off-by: Marc Marí --- tests/virtio-blk-test.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c index 54326d3..c7b3bf4 100644 --- a/tests/virtio-blk-test.c +++ b/tests/virtio-blk-test.c @@ -229,7 +229,7 @

Re: [Qemu-devel] [PATCH 2/2] qemu-iotests: add multiwrite test cases

2014-08-01 Thread Kevin Wolf
Am 31.07.2014 um 20:19 hat Slava Pestov geschrieben: > Why are you guys merging requests in qemu at all? Just submit them to the > kernel and let the kernel do it. Because the kernel generally isn't the next one seeing the requests. You might be right for the special case of using only raw images

[Qemu-devel] [PATCH 1/3] query-memdev: fix potential memory leaks

2014-08-01 Thread Chen Fan
Signed-off-by: Chen Fan --- numa.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/numa.c b/numa.c index 7bf7834..a2b4bca 100644 --- a/numa.c +++ b/numa.c @@ -318,10 +318,11 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner, static int query_m

[Qemu-devel] [PATCH 0/3] Fix some memory leaks about query memdev

2014-08-01 Thread Chen Fan
when using valgrind to test the command "query memdev", I had found some memory leaks. the test result: ==13802== 4 bytes in 1 blocks are definitely lost in loss record 125 of 8,508 ==13802==at 0x4A08934: malloc (vg_replace_malloc.c:291) ==13802==by 0x4A08AA8: realloc (vg_replace_malloc.c:

[Qemu-devel] [PATCH 2/3] qom/object.c: fix string_output_get_string() memory leak

2014-08-01 Thread Chen Fan
string_output_get_string() always return the data the sov->string point. and never free. Signed-off-by: Chen Fan --- hmp.c| 6 -- qom/object.c | 11 --- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hmp.c b/hmp.c index 4d1838e..2414cc7 100644 --- a/hmp.c ++

[Qemu-devel] [PATCH 3/3] hmp: fix MemdevList memory leak

2014-08-01 Thread Chen Fan
Signed-off-by: Chen Fan --- hmp.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hmp.c b/hmp.c index 2414cc7..0b1c830 100644 --- a/hmp.c +++ b/hmp.c @@ -1685,13 +1685,14 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict) { Error *err = NULL; MemdevL

Re: [Qemu-devel] [PATCH v2] target-mips: fix broken MIPS16 and microMIPS

2014-08-01 Thread Yongbok Kim
Ping! Patch for v2.1.0 -Original Message- From: Yongbok Kim Sent: 01 July 2014 17:43 To: qemu-devel@nongnu.org Cc: aurel...@aurel32.net; Leon Alrae; Cristian Cuna; Yongbok Kim Subject: [PATCH v2] target-mips: fix broken MIPS16 and microMIPS Commit 240ce26a broke MIPS16 and microMIPS supp

Re: [Qemu-devel] [PATCH] hw/arm/virt: formatting: memory map

2014-08-01 Thread Peter Maydell
On 29 July 2014 17:46, Andrew Jones wrote: > Add some spacing and zeros to make it easier to read and > modify the map. This patch has no functional changes. The > review looks ugly, but it's actually pretty easy to confirm > all the addresses are as they should be - thanks to the new > formatting

Re: [Qemu-devel] [PATCH 24/28] ahci: Add test_pci_spec to ahci-test.

2014-08-01 Thread Stefan Hajnoczi
On Thu, Jul 31, 2014 at 01:42:02PM -0400, John Snow wrote: > > On 07/31/2014 09:19 AM, Stefan Hajnoczi wrote: > >On Mon, Jul 07, 2014 at 02:18:05PM -0400, John Snow wrote: > >>+static void ahci_test_pci_caps(QPCIDevice *ahci, uint16_t header, > >>+ uint8_t offset) > >

Re: [Qemu-devel] [PATCH target-arm v1 1/1] sd: sdhci: Fix ADMA dma_memory_read access

2014-08-01 Thread Peter Maydell
On 31 July 2014 04:11, Peter Crosthwaite wrote: > This dma_memory_read was giving too big a size when begin was non-zero. > This could cause segfaults in some circumstances. Fix. > > Signed-off-by: Peter Crosthwaite Applied to target-arm.next. thanks -- PMM

Re: [Qemu-devel] [PATCH] arm64: 64K pages and > 1024MB guest

2014-08-01 Thread Peter Maydell
On 23 July 2014 21:09, Joel Schopp wrote: > kvm_set_phys_mem doesn't work on arm64 with memory > 1GB. It exits with: > kvm_set_phys_mem: error registering slot: Invalid argument > > An example of the failing address and size are start_addr == 0x90011000 > and size=0xaffef000. As you can see both

Re: [Qemu-devel] [PATCH] block: add watermark event

2014-08-01 Thread Stefan Hajnoczi
On Tue, Jul 08, 2014 at 04:49:24PM +0200, Francesco Romani wrote: > @@ -5813,3 +5815,57 @@ void bdrv_flush_io_queue(BlockDriverState *bs) > bdrv_flush_io_queue(bs->file); > } > } > + > +static bool watermark_exceeded(BlockDriverState *bs, > + int64_t sec

[Qemu-devel] "cpu-del" support over and above the RFC patches for cpu-hotunplug

2014-08-01 Thread Anshul Makkar
Hi, Attached is the patch for addition of "cpu-del" command over and above the below patches for hot removing the cpu. [RFC PATCH 0/7] i386: add cpu hot remove support [RFC PATCH 1/7] x86: add x86_cpu_unrealizefn() for cpu apic remove [RFC PATCH 2/7] i386: add cpu device_del support [RFC PATCH 3

Re: [Qemu-devel] [PATCH] arm64: 64K pages and > 1024MB guest

2014-08-01 Thread Paolo Bonzini
Il 01/08/2014 13:28, Peter Maydell ha scritto: > Paolo: can you review this? Do we also need to do something > about the use of TARGET_PAGE_BITS in > kvm_physical_sync_dirty_bitmap? No, it should be the host page size, matching cpu_physical_memory_set_dirty_lebitmap. > Is it really OK to define >

Re: [Qemu-devel] [PATCH v2 1/3] trace: teach lttng backend to use format strings

2014-08-01 Thread Stefan Hajnoczi
On Fri, Aug 01, 2014 at 10:05:30AM +0100, Alex Bennée wrote: > > Alex Bennée writes: > > > This makes the UST backend pay attention to the format string arguments > > that are defined when defining payload data. With this you can now > > ensure integers are reported in hex mode if you want. > > >

Re: [Qemu-devel] [PATCH 1/3] query-memdev: fix potential memory leaks

2014-08-01 Thread Peter Crosthwaite
On Fri, Aug 1, 2014 at 8:22 PM, Chen Fan wrote: > Signed-off-by: Chen Fan Reviewed-by: Peter Crosthwaite > --- > numa.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/numa.c b/numa.c > index 7bf7834..a2b4bca 100644 > --- a/numa.c > +++ b/numa.c > @@ -318,10 +318

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Stefan Hajnoczi
On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: > On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: > > Il 31/07/2014 18:13, Ming Lei ha scritto: > >> Follows 'perf report' result on cycles event for with/without bypass > >> coroutine: > >> > >> http://pastebin.com/ae0vnQ6V > >>

Re: [Qemu-devel] [PATCH v3 0/2] coroutine: dynamically scale pool size

2014-08-01 Thread Stefan Hajnoczi
On Mon, Jul 07, 2014 at 03:15:51PM +0200, Stefan Hajnoczi wrote: > v3: > * Use COROUTINE_POOL_RESERVATION constant in block.c [Lluis] > > v2: > * Assert that callers never reduce pool below default size [eblake] > > The coroutine pool reuses exited coroutines to make qemu_coroutine_create() > c

Re: [Qemu-devel] [PATCH 2/3] qom/object.c: fix string_output_get_string() memory leak

2014-08-01 Thread Peter Crosthwaite
On Fri, Aug 1, 2014 at 8:22 PM, Chen Fan wrote: > string_output_get_string() always return the data the sov->string "returns the data sov->string points to and never frees it" Although "sov" is a little out of context however of this change, and you need to go diving into qapi code to get contex

Re: [Qemu-devel] [PATCH v3 07/16] target-arm: Add HCR_EL2

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 7170086..b04fb5d 100644 > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -2107,10 +2107,36 @@ static cons

Re: [Qemu-devel] [PATCH v3 08/16] target-arm: Add SCR_EL3

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h| 16 +++- > target-arm/helper.c | 31 ++- > 2 files changed, 45 insertions(+), 2 deletions(-) > > diff --git a/ta

Re: [Qemu-devel] [PATCH v4 1/8] bootindex: add modify_boot_device_path function

2014-08-01 Thread Eduardo Habkost
On Thu, Jul 31, 2014 at 05:47:26PM +0800, arei.gong...@huawei.com wrote: [...] > +void modify_boot_device_path(int32_t bootindex, DeviceState *dev, > + const char *suffix) > +{ > +FWBootEntry *i, *old_entry = NULL; > + > +assert(dev != NULL || suffix != NULL); >

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Thu, Jul 31, 2014 at 6:45 PM, Paolo Bonzini wrote: > Il 31/07/2014 11:47, Ming Lei ha scritto: >>> Block mirroring of a device for example is done using coroutines. >>> As block mirroring can be done on a raw device you need coroutines. >> >> If block layer knows the mirroring is in-progress, i

Re: [Qemu-devel] [PATCH 3/3] hmp: fix MemdevList memory leak

2014-08-01 Thread Peter Crosthwaite
On Fri, Aug 1, 2014 at 8:22 PM, Chen Fan wrote: > Signed-off-by: Chen Fan > --- > hmp.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/hmp.c b/hmp.c > index 2414cc7..0b1c830 100644 > --- a/hmp.c > +++ b/hmp.c > @@ -1685,13 +1685,14 @@ void hmp_info_memdev(Monit

[Qemu-devel] [PATCH 0/3] vpc: support probing of fixed size images

2014-08-01 Thread Levente Kurusa
Fixed size VPC images do not have a footer, hence the current probe function will fail and QEMU will fall back to the raw_bsd driver, which is not the correct behaviour. The specification of the format says that fixed size images have a footer as the last 512 bytes of the file. The footer is exactl

[Qemu-devel] [PATCH 2/3] block: vpc: introduce vpc_check_signature function

2014-08-01 Thread Levente Kurusa
Check the signature in a helper function instead of in plain code in order to avoid code duplication Reviewed-by: Andrew Jones Signed-off-by: Levente Kurusa --- block/vpc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 2ba8fc2..a6

Re: [Qemu-devel] [PATCH v4 1/8] bootindex: add modify_boot_device_path function

2014-08-01 Thread Luiz Capitulino
On Fri, 1 Aug 2014 10:36:18 -0300 Eduardo Habkost wrote: > On Thu, Jul 31, 2014 at 05:47:26PM +0800, arei.gong...@huawei.com wrote: > [...] > > +void modify_boot_device_path(int32_t bootindex, DeviceState *dev, > > + const char *suffix) > > +{ > > +FWBootEntry *i,

[Qemu-devel] [PATCH 1/3] block: format: pass down the current state to the format's probe function

2014-08-01 Thread Levente Kurusa
While most ->probe functions are content with reading the first 2048 bytes of their disk, there are some (namely VPC) which might need to know more about the disk. Pass down the BlockDriverState to the probe functions, so that the drivers can read more data should they need it. Reviewed-by: Andrew

Re: [Qemu-devel] [PATCH v2 0/2] thread-pool: avoid fd usage and fix nested aio_poll() deadlock

2014-08-01 Thread Stefan Hajnoczi
On Tue, Jul 15, 2014 at 04:44:24PM +0200, Stefan Hajnoczi wrote: > v2: > * Leave BH scheduled so that the code can be simplified [Paolo] > > These patches convert thread-pool.c from EventNotifier to QEMUBH. They then > solve the deadlock when nested aio_poll() calls are made. > > Please speak o

[Qemu-devel] [PATCH 3/3] block: vpc: handle fixed size images in probe function

2014-08-01 Thread Levente Kurusa
Fixed size images do not have a header, only dynamic images have that. This type uses a footer, which is the same structure in the last 512 bytes of the image. We need to parse that too to be able to recognize fixed length images, so check there as well. Reviewed-by: Andrew Jones Signed-off-by: L

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: > On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: >> On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: >> > Il 31/07/2014 18:13, Ming Lei ha scritto: >> >> Follows 'perf report' result on cycles event for with/without bypass >>

Re: [Qemu-devel] [PATCH v3 10/16] target-arm: Break out exception masking to a separate func

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > > +static inline bool arm_excp_unmasked(CPUState *cs, unsigned int excp_idx) > +{ > +CPUARMState *env = cs->env_ptr; > + > +switch (excp_idx) { > +case EXCP_FIQ: > +return !(env->daif & PSTATE_F); > +case EXCP_IRQ: > +

[Qemu-devel] MSI-X interrupt emulation

2014-08-01 Thread Danzer, Uwe
Hi there, I'm implementing an emulated PCIe Memory class device, but can't get MSI-X interrupt emulation working. So far, the card appears in the guest system and the driver for the card recognises it and the emulation of 1MB of accessible r/w registers works as desired. As the real card is c

Re: [Qemu-devel] [PATCH v3 12/16] target-arm: A64: Correct updates to FAR and ESR on exceptions

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Not all exception types update both FAR and ESR. > > Reviewed-by: Alex Bennée > Reviewed-by: Greg Bellows > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper-a64.c | 6 ++ > 1 file changed, 2 insertio

Re: [Qemu-devel] [PATCH] monitor: Remove hardcoded watchdog event names

2014-08-01 Thread Luiz Capitulino
On Tue, 29 Jul 2014 23:22:40 +0100 Hani Benhabiles wrote: > Signed-off-by: Hani Benhabiles Applied to the qmp-next branch, thanks. > --- > monitor.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/monitor.c b/monitor.c > index 5bc70a6..7465775 100644 > --

[Qemu-devel] [Bug 1351271] [NEW] qemu deletes the backing file in snapshot mode

2014-08-01 Thread Giancarlo Formicuccia
Public bug reported: The file removal occurs during the "change" operation. It happens only in snapshot mode. Minimal steps to reproduce the problem: $ dd if=/dev/zero of=file.img bs=1M count=1 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.00288727 s, 363 MB/s $ ls file.img fil

Re: [Qemu-devel] [PATCH v3 2/7] bootindex: add del_boot_device_path function

2014-08-01 Thread Eduardo Habkost
On Sat, Jul 26, 2014 at 12:45:28PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Introduce a del_boot_device_path() cleanup fw_cfg content > when hot-unplugging devcie refer to bootindex. > > Signed-off-by: Gonglei > Signed-off-by: Chenliang > --- > include/sysemu/sysemu.h | 1 +

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Paolo Bonzini
Il 01/08/2014 15:48, Ming Lei ha scritto: > On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: >> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: >>> On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: Il 31/07/2014 18:13, Ming Lei ha scritto: > Follows 'perf report' resu

Re: [Qemu-devel] [PATCH] arm64: 64K pages and > 1024MB guest

2014-08-01 Thread Paolo Bonzini
Il 01/08/2014 16:02, Joel Schopp ha scritto: >> > >> > I think the patch is right but, besides these considerations, does this >> > bug still manifest itself after Andrew fixed the start address of the >> > device at 0x9001 (IIRC it was the pl031)? > The device I see with that address is: > hw/

[Qemu-devel] [PATCH v3 1/2] trace: teach lttng backend to use format strings

2014-08-01 Thread Alex Bennée
This makes the UST backend pay attention to the format string arguments that are defined when defining payload data. With this you can now ensure integers are reported in hex mode if you want. Signed-off-by: Alex Bennée --- v2 - remove silly debug statements v3 - fix spelling - rebase to

[Qemu-devel] [PATCH v3 2/2] trace: add some tcg tracing support

2014-08-01 Thread Alex Bennée
This adds a couple of tcg specific trace-events which are useful for tracing execution though tcg generated blocks. It's been tested with lttng user space tracing but is generic enough for all systems. The tcg events are: * translate_block - when a subject block is translated * exec_tb - when

Re: [Qemu-devel] [PATCH v3 13/16] target-arm: A64: Emulate the HVC insn

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h | 1 + > target-arm/helper-a64.c| 1 + > target-arm/helper.c| 28 +++- > target-arm/helper.h| 1 + >

[Qemu-devel] [PATCH v3 0/2] a few simple trace fixes

2014-08-01 Thread Alex Bennée
Hi Stefan, I've re-based these two on tracing-next. Otherwise now changes from the last post. Alex Bennée (2): trace: teach lttng backend to use format strings trace: add some tcg tracing support cpu-exec.c | 6 ++ scripts/tracetool/__init__.py

Re: [Qemu-devel] [PATCH v3 14/16] target-arm: A64: Emulate the SMC insn

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h | 1 + > target-arm/helper-a64.c| 1 + > target-arm/helper.c| 6 ++ > target-arm/helper.h| 1 + > target-arm/internals.

[Qemu-devel] QEMU Developer Collaboration Patterns

2014-08-01 Thread codeface
Dear QEMU Developers, The University of Passau is currently studying the mechanisms that contribute to effective collaboration in open-source projects so that appropriate tools and techniques are created to support the needs of open-source developers. To achieve this goal, we are evaluating

Re: [Qemu-devel] [PATCH v3 15/16] target-arm: Add IRQ and FIQ routing to EL2 and 3

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -3312,6 +3312,19 @@ unsigned int arm_excp_target_el(CPUState *cs, unsigned > int excp_idx) > target_el = 2; > } > break; > +

Re: [Qemu-devel] [PATCH v3 16/16] target-arm: Add support for VIRQ and VFIQ

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Acked-by: Greg Bellows > Signed-off-by: Edgar E. Iglesias > --- > cpu-exec.c | 12 > target-arm/cpu.c| 20 ++-- > target-arm/cpu.h| 24 +

Re: [Qemu-devel] [PATCH v3 11/16] target-arm: Don't take interrupts targeting lower ELs

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Reviewed-by: Alex Bennée > Reviewed-by: Greg Bellows > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/target-arm/cpu.h b/target-arm/cpu.h

Re: [Qemu-devel] [PATCH v2 4/7] bootindex: delete bootindex when device is removed

2014-08-01 Thread Eduardo Habkost
On Wed, Jul 30, 2014 at 07:29:56AM +, Gonglei (Arei) wrote: > Hi, > > > -Original Message- > > From: Gerd Hoffmann [mailto:kra...@redhat.com] > > Sent: Friday, July 25, 2014 5:52 PM > > > > > +del_boot_device_path(dev); > > > > You can call this from device_finalize() instead of

Re: [Qemu-devel] [PATCH v3 09/16] target-arm: A64: Refactor aarch64_cpu_do_interrupt

2014-08-01 Thread Peter Maydell
On 17 June 2014 09:45, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Introduce new_el and new_mode in preparation for future patches > that add support for taking exceptions to and from EL2 and 3. > No functional change. > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h

Re: [Qemu-devel] [PATCH v1 00/16] target-arm: Parts of the AArch64 EL2/3 exception model

2014-08-01 Thread Peter Maydell
On 30 May 2014 08:28, Edgar E. Iglesias wrote: > This is a second round of AArch64 EL2/3 patches working on the exception > model. Among other things adding HVC/SMC, interrupt routing to EL2/3 and > Virtual IRQs/FIQs. The VIRQ/VFIQ support only adds the external signal > delivery method. > > Patch

Re: [Qemu-devel] [PATCH 01/10] AioContext: take bottom halves into account when computing aio_poll timeout

2014-08-01 Thread Stefan Hajnoczi
On Wed, Jul 09, 2014 at 11:53:01AM +0200, Paolo Bonzini wrote: > diff --git a/async.c b/async.c > index 34af0b2..ac40eab 100644 > --- a/async.c > +++ b/async.c > @@ -152,39 +152,43 @@ void qemu_bh_delete(QEMUBH *bh) > bh->deleted = 1; > } > > -static gboolean > -aio_ctx_prepare(GSource *sou

Re: [Qemu-devel] [PATCH] arm64: 64K pages and > 1024MB guest

2014-08-01 Thread Joel Schopp
> I agree. > > I think the patch is right but, besides these considerations, does this > bug still manifest itself after Andrew fixed the start address of the > device at 0x9001 (IIRC it was the pl031)? The device I see with that address is: hw/arm/virt.c:[VIRT_RTC] = { 0x9001, 0x1000

Re: [Qemu-devel] [PATCH v1 00/16] target-arm: Parts of the AArch64 EL2/3 exception model

2014-08-01 Thread Peter Maydell
On 1 August 2014 15:35, Peter Maydell wrote: > On 30 May 2014 08:28, Edgar E. Iglesias wrote: >> This is a second round of AArch64 EL2/3 patches working on the exception >> model. Among other things adding HVC/SMC, interrupt routing to EL2/3 and >> Virtual IRQs/FIQs. The VIRQ/VFIQ support only ad

Re: [Qemu-devel] [RFC PATCH 04/17] COLO info: use colo info to tell migration target colo is enabled

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > migrate colo info to migration target to tell the target colo is > enabled. If I understand this correctly this means that you send a 'colo info' device information for migrations that don't have COLO enabled; that's bad because it breaks migration

Re: [Qemu-devel] [PATCH v4 4/8] bootindex: delete bootindex when device is removed

2014-08-01 Thread Eduardo Habkost
On Thu, Jul 31, 2014 at 05:47:29PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Device should be removed from global boot list when > it is hot-unplugged. > > Signed-off-by: Chenliang > Signed-off-by: Gonglei > --- > hw/block/virtio-blk.c| 1 + > hw/i386/kvm/pci-assign.c | 1

Re: [Qemu-devel] [RFC PATCH 05/17] COLO save: integrate COLO checkpointed save into qemu migration

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > Integrate COLO checkpointed save flow into qemu migration. > Add a migrate state: MIG_STATE_COLO, enter this migrate state > after the first live migration successfully finished. > Create a colo thread to do the checkpointed save. In postcopy

Re: [Qemu-devel] [PATCH for-2.2 00/10] AioContext cleanups and Win32 socket support

2014-08-01 Thread Stefan Hajnoczi
On Wed, Jul 09, 2014 at 11:53:00AM +0200, Paolo Bonzini wrote: > This series simplifies heavily aio_poll by splitting it into three > phases: prepare (aio_compute_timeout), poll, dispatch. The resulting > code shares more logic between aio_poll and the GSource wrappers, > and makes it easier to ad

Re: [Qemu-devel] [RFC PATCH 07/17] COLO buffer: implement colo buffer as well as QEMUFileOps based on it

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > We need a buffer to store migration data. > > On save side: > all saved data was write into colo buffer first, so that we can know > the total size of the migration data. this can also separate the data > transmission from colo control data, we us

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Fri, Aug 1, 2014 at 9:48 PM, Ming Lei wrote: > On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: >> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: >>> On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: >>> > Il 31/07/2014 18:13, Ming Lei ha scritto: >>> >> Follows 'perf rep

Re: [Qemu-devel] [RFC PATCH 10/17] COLO ctl: introduce is_slave() and is_master()

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > is_slaver is to determine whether the QEMU instance is a > slaver(migration target) at runtime. > is_master is to determine whether the QEMU instance is a > master(migration starter) at runtime. > This 2 APIs will be used later. Since the names are

Re: [Qemu-devel] [RFC PATCH 11/17] COLO ctl: implement colo checkpoint protocol

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > implement colo checkpoint protocol. > > Checkpoint synchronzing points. > > Primary Secondary > NEW @ > Suspend > SUSPENDED @

Re: [Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex command

2014-08-01 Thread Eduardo Habkost
On Fri, Jul 25, 2014 at 02:52:50PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Adds "set-bootindex id=xx,bootindex=xx,suffix=xx" QMP command. > > Example QMP command: > -> { "execute": "set-bootindex", "arguments": { "id": "ide0-0-1", > "bootindex": 1, "suffix": "/disk@0"}} > <- {

Re: [Qemu-devel] [PATCH for-2.2 00/10] AioContext cleanups and Win32 socket support

2014-08-01 Thread Paolo Bonzini
Il 01/08/2014 16:52, Stefan Hajnoczi ha scritto: > I'm happy with this series except for my question about int vs int64_t > types for nanosecond time values. That was just an oversight, thanks for the review. I'll take a look next Monday. Paolo

Re: [Qemu-devel] [PATCH 3/4] libqos: add a simple first-fit memory allocator

2014-08-01 Thread Stefan Hajnoczi
On Thu, Jul 31, 2014 at 05:14:12PM -0400, John Snow wrote: > > On 07/31/2014 06:13 AM, Stefan Hajnoczi wrote: > >On Wed, Jul 30, 2014 at 06:28:28PM -0400, John Snow wrote: > >>-static uint64_t pc_alloc(QGuestAllocator *allocator, size_t size) > >>+static inline void mlist_insert(MemList *head, Mem

Re: [Qemu-devel] [RFC PATCH 15/17] COLO save: reuse migration bitmap under colo checkpoint

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > reuse migration bitmap under colo checkpoint, only send dirty pages > per-checkpoint. > > Signed-off-by: Yang Hongyang > --- > arch_init.c| 20 +++- > include/migration/migration-colo.h | 2 ++ > migration-

Re: [Qemu-devel] [RFC PATCH 13/17] COLO ctl: implement colo save

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > implement colo save My postcopy 'QEMU_VM_CMD_PACKAGED' does something similar to parts of this with the QEMUSizedBuffer, we might be able to share some more: https://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg00886.html > +/* we send t

Re: [Qemu-devel] [RFC PATCH 16/17] COLO ram cache: implement colo ram cache on slaver

2014-08-01 Thread Dr. David Alan Gilbert
* Yang Hongyang (yan...@cn.fujitsu.com) wrote: > The ram cache was initially the same as PVM's memory. At > checkpoint, we cache the dirty memory of PVM into ram cache > (so that ram cache always the same as PVM's memory at every > checkpoint), flush cached memory to SVM after we received > all PVM

Re: [Qemu-devel] vfio in the guest: no available reset mechanism

2014-08-01 Thread Alex Williamson
On Fri, 2014-08-01 at 09:35 +0800, Le Tan wrote: > Hi Alex, > > 2014-07-30 22:46 GMT+08:00 Alex Williamson : > > On Wed, 2014-07-30 at 22:16 +0800, Le Tan wrote: > >> Hi Michael, > >> > >> 2014-07-30 21:16 GMT+08:00 Michael S. Tsirkin : > >> > On Wed, Jul 30, 2014 at 08:24:04PM +0800, Le Tan wrote

Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode

2014-08-01 Thread Ming Lei
On Fri, Aug 1, 2014 at 10:17 PM, Paolo Bonzini wrote: > Il 01/08/2014 15:48, Ming Lei ha scritto: >> On Fri, Aug 1, 2014 at 9:13 PM, Stefan Hajnoczi wrote: >>> On Fri, Aug 01, 2014 at 10:54:02AM +0800, Ming Lei wrote: On Fri, Aug 1, 2014 at 12:30 AM, Paolo Bonzini wrote: > Il 31/07/2014

Re: [Qemu-devel] [PATCH v2 2/7] target-arm: Implement PMCCNTR_EL0 and related registers

2014-08-01 Thread Peter Maydell
On 26 June 2014 06:02, Alistair Francis wrote: > This patch adds support for the ARMv8 version of the PMCCNTR and > related registers. It also starts to implement the PMCCFILTR_EL0 > register. > > Signed-off-by: Peter Crosthwaite > Signed-off-by: Alistair Francis > --- > > target-arm/cpu.h|

Re: [Qemu-devel] [RFC PATCH 7/7] cpus: reclaim allocated vCPU objects

2014-08-01 Thread Anshul Makkar
Hi Gu, Thanks for clarifying. Ah I missed that bit of the patch. Sorry about that and for making noise. Yes, now cpu-hotplug and unplug works fine. Next week I plan to run a series of automated and stress test. Will keep the group posted about the results. Thanks Anshul Makkar On Fri, Aug 1, 2

Re: [Qemu-devel] [PATCH v2 7/7] target-arm: Call the pmccntr_sync function when swapping ELs

2014-08-01 Thread Peter Maydell
On 26 June 2014 06:02, Alistair Francis wrote: > Call the new pmccntr_sync() function when there is a possibility > of swapping ELs (I.E. when there is an exception) > > Signed-off-by: Alistair Francis > --- > > target-arm/helper-a64.c |5 + > target-arm/helper.c |7 +++ > ta

[Qemu-devel] [PATCH v3 1/4] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-08-01 Thread John Snow
From: Marc Marí Signed-off-by: Paolo Bonzini Signed-off-by: Marc Marí Signed-off-by: John Snow --- tests/libqos/malloc-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c index db1496c..2efd095 100644 --- a/tests/libqos/

[Qemu-devel] [PATCH v3 0/4] libqos: add a simple first-fit memory allocator

2014-08-01 Thread John Snow
This set collects two patches by Marc Marí already on the mailing list, but goes further by adding a simple memory allocator that allows us to track and debug freed memory, and optionally keep track of any leaks. For convenience: https://github.com/jnsnow/qemu/tree/libqos-alloc v2: use QTAILQ as

  1   2   >