Re: [Qemu-devel] when does a target frontend need to use gen_io_start()/gen_io_end() ?

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 08:57, Pavel Dovgaluk wrote: It's any instruction that can cause an icount read, typically through QEMU_CLOCK_VIRTUAL or cpu_get_ticks(). Doesn't this mean that ARM has incorrect implementation of icount? MMIO is common for this platform, but none of memory accesses are

Re: [Qemu-devel] [PATCH 14/34] qcow2: Factor out qcow2_update_options()

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 22:04 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: Eventually we want to be able to change options at runtime. As a first step towards that goal, separate some option handling code from the general initialisation code in qcow2_open().

[Qemu-devel] [PATCH v2 08/11] blockdev: Block device IO during external snapshot transaction

2015-05-13 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7f763d9..923fc90 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1404,6 +1404,7 @@ typedef struct ExternalSnapshotState {

Re: [Qemu-devel] [PATCH v2 11/11] block: Block device IO during bdrv_drain and bdrv_drain_all

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 19:28, Fam Zheng wrote: We don't want new requests from guest, so block the operation around the nested poll. Signed-off-by: Fam Zheng f...@redhat.com --- block/io.c | 12 1 file changed, 12 insertions(+) diff --git a/block/io.c b/block/io.c index

Re: [Qemu-devel] [PATCH v2 05/11] virtio-blk: Don't handle output when there is device IO op blocker

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 19:28, Fam Zheng wrote: +static void virtio_blk_data_plane_pause(VirtIOBlock *vblk) +{ +VirtIOBlockDataPlane *s = vblk-dataplane; + +event_notifier_test_and_clear(s-host_notifier); +aio_set_event_notifier(s-ctx, s-host_notifier, NULL); +} + +static void

Re: [Qemu-devel] [PATCH v1 05/18] target-arm: Add MAIR_EL2

2015-05-13 Thread Sergey Fedorov
On 13.05.2015 14:05, Edgar E. Iglesias wrote: On Wed, May 13, 2015 at 10:52:55AM +0300, Sergey Fedorov wrote: On 13.05.2015 09:52, Edgar E. Iglesias wrote: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/helper.c |

Re: [Qemu-devel] [PATCH v2 11/11] block: Block device IO during bdrv_drain and bdrv_drain_all

2015-05-13 Thread Fam Zheng
On Wed, 05/13 12:26, Paolo Bonzini wrote: On 13/05/2015 19:28, Fam Zheng wrote: We don't want new requests from guest, so block the operation around the nested poll. Signed-off-by: Fam Zheng f...@redhat.com --- block/io.c | 12 1 file changed, 12 insertions(+)

Re: [Qemu-devel] [PATCH v2 05/11] virtio-blk: Don't handle output when there is device IO op blocker

2015-05-13 Thread Fam Zheng
On Wed, 05/13 12:26, Paolo Bonzini wrote: On 13/05/2015 19:28, Fam Zheng wrote: +static void virtio_blk_data_plane_pause(VirtIOBlock *vblk) +{ +VirtIOBlockDataPlane *s = vblk-dataplane; + +event_notifier_test_and_clear(s-host_notifier); +aio_set_event_notifier(s-ctx,

Re: [Qemu-devel] [PATCH 14/34] qcow2: Factor out qcow2_update_options()

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: Eventually we want to be able to change options at runtime. As a first step towards that goal, separate some option handling code from the general initialisation code in qcow2_open(). Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 135

Re: [Qemu-devel] Supporting multiple CPU AddressSpaces and memory transaction attributes

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 13:21, Edgar E. Iglesias wrote: It was not clear to me if CPUs should hook into the iommu notification system or if we should make the iommu notification code signal changes through AS change notifications. The latter would be easy to get right I guess but we wouldn't be

Re: [Qemu-devel] [PATCH] iscsi: Remove pointless runtime check of macro value

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 15:15, Fam Zheng wrote: raw_bsd already has QEMU_BUILD_BUG_ON(BDRV_SECTOR_SIZE != 512), so iscsi should relax. It's okay to have the same QEMU_BUILD_BUG_ON in different places. However, you're right that this should be a compile-time check rather than run-time check. Paolo

Re: [Qemu-devel] Bug report - Windows XP guest failure

2015-05-13 Thread Paolo Bonzini
On 12/05/2015 09:22, Michael Tokarev wrote: 12.05.2015 04:05, Peter Crosthwaite wrote: On Thu, May 7, 2015 at 2:34 AM, Michael Tokarev m...@tls.msk.ru wrote: ... Ok, I can reproduce this, winXP BSODs on boot in tcg mode. Git bisect points to this: commit

[Qemu-devel] [PATCH v2 02/11] block: Add op blocker notifier list

2015-05-13 Thread Fam Zheng
BDS users can register a notifier and get notified about op blocker changes. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 28 include/block/block.h | 8 include/block/block_int.h | 3 +++ 3 files changed, 39 insertions(+)

[Qemu-devel] [PATCH v2 04/11] virtio-blk: Move complete_request to 'ops' structure

2015-05-13 Thread Fam Zheng
Should more ops be added to differentiate code between dataplane and non-dataplane, the new saved_ops approach will be cleaner than messing with N pointers. Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/dataplane/virtio-blk.c | 13 - hw/block/virtio-blk.c | 8

[Qemu-devel] [PATCH v2 06/11] nbd-server: Clear can_read when device io blocker is set

2015-05-13 Thread Fam Zheng
So that NBD export cannot submit IO during bdrv_drain_all(). Signed-off-by: Fam Zheng f...@redhat.com --- nbd.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/nbd.c b/nbd.c index 06b501b..7d9d3e4 100644 --- a/nbd.c +++ b/nbd.c @@ -160,6 +160,8 @@ struct NBDExport {

[Qemu-devel] [PATCH 06/10] target-tricore: add RR_CRC32 instruction of the v1.6.1 ISA

2015-05-13 Thread Bastian Koppelmann
This instruction was introduced by the new Aurix platform. Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/helper.h | 2 ++ target-tricore/op_helper.c | 11 +++ target-tricore/translate.c | 5 +

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Wen Congyang
On 05/14/2015 01:28 AM, Fam Zheng wrote: Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ae52d27..bd28183 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1649,6 +1649,7 @@

Re: [Qemu-devel] [PATCH V7 15/16] virtio-pci: increase the maximum number of virtqueues to 513

2015-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2015 at 03:47:51PM +0800, Jason Wang wrote: On 04/28/2015 03:17 PM, Michael S. Tsirkin wrote: On Tue, Apr 28, 2015 at 11:12:10AM +0800, Jason Wang wrote: On Mon, Apr 27, 2015 at 7:02 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Apr 23, 2015 at

Re: [Qemu-devel] [PATCH 19/34] qcow2: Make qcow2_update_options() suitable for transactions

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 23:40 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: Before we can allow updating options at runtime with bdrv_reopen(), we need to split the function into prepare/commit/abort parts. Signed-off-by: Kevin Wolf kw...@redhat.com ---

[Qemu-devel] [PATCH v2 05/11] virtio-blk: Don't handle output when there is device IO op blocker

2015-05-13 Thread Fam Zheng
virtio-blk now listens to op blocker change of the associated block backend. Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: non-dataplane: 1) Set VirtIOBlock.paused 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused dataplane: 1) Clear the host event notifier

Re: [Qemu-devel] Supporting multiple CPU AddressSpaces and memory transaction attributes

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 08:41, Edgar E. Iglesias wrote: I think it would be nice if address_space_translate_for_iotlb was allowed to modify the attributes so that an IOMMU in front of a CPU could for example down-grade a secure to a non-secure accesse (once we add IOMMU support in front of CPUs). If I

Re: [Qemu-devel] when does a target frontend need to use gen_io_start()/gen_io_end() ?

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 11:41, Peter Maydell wrote: For -icount and SMP, yes. I even posted a patch to that end once. I don't see why -icount and SMP need to be mutually exclusive. If we're round-robining between the SMP CPUs then they should all stay deterministic, I would have thought? No,

Re: [Qemu-devel] [PATCH RFC 4/7] vhost: set vring endianness for legacy virtio

2015-05-13 Thread Michael S. Tsirkin
On Wed, May 13, 2015 at 12:39:07PM +0200, Cornelia Huck wrote: On Tue, 12 May 2015 18:40:35 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 12, 2015 at 06:25:32PM +0200, Cornelia Huck wrote: On Tue, 12 May 2015 17:15:53 +0200 Michael S. Tsirkin m...@redhat.com wrote:

[Qemu-devel] [RFC/RFT PATCH v2 1/3] arm/arm64: pageattr: add set_memory_nc

2015-05-13 Thread Andrew Jones
Provide a method to change normal, cacheable memory to non-cacheable. KVM will make use of this to keep emulated device memory regions coherent with the guest. Signed-off-by: Andrew Jones drjo...@redhat.com --- arch/arm/include/asm/cacheflush.h | 1 + arch/arm/mm/pageattr.c | 7

[Qemu-devel] [RFC/RFT PATCH v2 3/3] arm/arm64: KVM: implement 'uncached' mem coherency

2015-05-13 Thread Andrew Jones
When S1 and S2 memory attributes combine wrt to caching policy, non-cacheable types take precedence. If a guest maps a region as device memory, which KVM userspace is using to emulate the device using normal, cacheable memory, then we lose coherency. With KVM_MEM_UNCACHED, KVM userspace can now

[Qemu-devel] [PATCHv4] Move parallel_hds_isa_init to hw/isa/isa-bus.c

2015-05-13 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com Disabling CONFIG_PARALLEL cause removing parallel_hds_isa_init defined in parallel.c. This function is called during initialization of some boards so disabling CONFIG_PARALLEL cause build failure. This patch moves parallel_hds_isa_init to

[Qemu-devel] [PATCH 08/10] target-tricore: add FCALL instructions of the v1.6 ISA

2015-05-13 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/translate.c | 21 + target-tricore/tricore-opcodes.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index

[Qemu-devel] [PATCH 04/10] target-tricore: add CMPSWP instructions of the v1.6.1 ISA

2015-05-13 Thread Bastian Koppelmann
Those instruction were introduced in the new Aurix platform. Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/translate.c | 35 +++ target-tricore/tricore-opcodes.h | 5 + 2 files changed, 40 insertions(+) diff --git

[Qemu-devel] [PATCH 10/10] target-tricore: add RR_DIV and RR_DIV_U instructions of the v1.6 ISA

2015-05-13 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/helper.h | 2 ++ target-tricore/op_helper.c | 49 target-tricore/translate.c | 21 + target-tricore/tricore-opcodes.h | 2 ++ 4 files

[Qemu-devel] [PATCH 00/10] TriCore v1.6.1 ISA and missing v1.6 instructions

2015-05-13 Thread Bastian Koppelmann
Hi, the new Aurix platform introduces a new ISA version, so this patchset adds a new feature bit and changes the generic Aurix cpu to a more specific tc27x cpu model. While at this, it introduces a new cpu model tc1797 which uses the v1.3.1 ISA and fixes the tc1796 to us the v1.3 ISA. It also

Re: [Qemu-devel] [PATCHv4] Move parallel_hds_isa_init to hw/isa/isa-bus.c

2015-05-13 Thread Markus Armbruster
mreza...@redhat.com writes: From: Miroslav Rezanina mreza...@redhat.com Disabling CONFIG_PARALLEL cause removing parallel_hds_isa_init defined in parallel.c. This function is called during initialization of some boards so disabling CONFIG_PARALLEL cause build failure. This patch moves

Re: [Qemu-devel] [PATCH 20/34] qcow2: Support updating driver-specific options in reopen

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 23:47 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: For updating the cache sizes or disabling lazy refcounts there is a bit more to do than just changing the variables, but otherwise we're all set for changing options during bdrv_reopen(). Just

[Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ae52d27..bd28183 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1649,6 +1649,7 @@ typedef struct BlockdevBackupState {

Re: [Qemu-devel] [PATCH RFC 4/7] vhost: set vring endianness for legacy virtio

2015-05-13 Thread Cornelia Huck
On Tue, 12 May 2015 18:40:35 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 12, 2015 at 06:25:32PM +0200, Cornelia Huck wrote: On Tue, 12 May 2015 17:15:53 +0200 Michael S. Tsirkin m...@redhat.com wrote: One issue with virtio 1 patches as they are is with how features are

Re: [Qemu-devel] [PATCH 14/34] qcow2: Factor out qcow2_update_options()

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: Eventually we want to be able to change options at runtime. As a first step towards that goal, separate some option handling code from the general initialisation code in qcow2_open(). Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 135

Re: [Qemu-devel] Supporting multiple CPU AddressSpaces and memory transaction attributes

2015-05-13 Thread Edgar E. Iglesias
On Wed, May 13, 2015 at 11:28:38AM +0200, Paolo Bonzini wrote: On 13/05/2015 08:41, Edgar E. Iglesias wrote: I think it would be nice if address_space_translate_for_iotlb was allowed to modify the attributes so that an IOMMU in front of a CPU could for example down-grade a secure to a

Re: [Qemu-devel] [PATCH v2 01/11] block: Add op blocker type device IO

2015-05-13 Thread Wen Congyang
On 05/14/2015 01:28 AM, Fam Zheng wrote: Preventing device from submitting IO is useful around various nested aio_poll. Op blocker is a good place to put this flag. Devices would submit IO requests through blk_* block backend interface, which calls blk_check_request to check the validity.

Re: [Qemu-devel] when does a target frontend need to use gen_io_start()/gen_io_end() ?

2015-05-13 Thread Paolo Bonzini
On 12/05/2015 21:41, Peter Maydell wrote: It's any instruction that can cause an icount read, typically through QEMU_CLOCK_VIRTUAL or cpu_get_ticks(). Also anything that can cause a CPU interrupt, since tcg_handle_interrupt() will call cpu_abort() if the CPU gets an interrupt while it's

[Qemu-devel] [PATCH v2 09/11] blockdev: Block device IO during drive-backup transaction

2015-05-13 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 923fc90..ae52d27 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1575,6 +1575,7 @@ typedef struct DriveBackupState { BlockDriverState

[Qemu-devel] [PATCH v2 07/11] blockdev: Block device IO during internal snapshot transaction

2015-05-13 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 5eaf77e..7f763d9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1262,6 +1262,7 @@ typedef struct InternalSnapshotState {

[Qemu-devel] [PATCH v2 11/11] block: Block device IO during bdrv_drain and bdrv_drain_all

2015-05-13 Thread Fam Zheng
We don't want new requests from guest, so block the operation around the nested poll. Signed-off-by: Fam Zheng f...@redhat.com --- block/io.c | 12 1 file changed, 12 insertions(+) diff --git a/block/io.c b/block/io.c index 1ce62c4..d369de3 100644 --- a/block/io.c +++ b/block/io.c

Re: [Qemu-devel] when does a target frontend need to use gen_io_start()/gen_io_end() ?

2015-05-13 Thread Peter Maydell
On 13 May 2015 at 09:42, Paolo Bonzini pbonz...@redhat.com wrote: On 12/05/2015 21:41, Peter Maydell wrote: It's any instruction that can cause an icount read, typically through QEMU_CLOCK_VIRTUAL or cpu_get_ticks(). Also anything that can cause a CPU interrupt, since

[Qemu-devel] [PATCH 03/10] target-tricore: Add SRC_MOV_E instruction of the v1.6 ISA

2015-05-13 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/translate.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 663b2a0..1c37e48 100644 --- a/target-tricore/translate.c

[Qemu-devel] [PATCH 02/10] target-tricore: introduce ISA v1.6.1 feature

2015-05-13 Thread Bastian Koppelmann
The aurix platform contains of several different cpu models and uses the 1.6.1 ISA. This patch changes the generic aurix model to the more specific tc27x cpu model and sets specific features. Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/cpu.c | 10

[Qemu-devel] [PATCH 09/10] target-tricore: add FRET instructions of the v1.6 ISA

2015-05-13 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/translate.c | 14 ++ target-tricore/tricore-opcodes.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 545cc06..4f517b3

[Qemu-devel] [PATCH 01/10] target-tricore: Add ISA v1.3.1 cpu and fix tc1796 to using v1.3

2015-05-13 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/cpu.c | 8 1 file changed, 8 insertions(+) diff --git a/target-tricore/cpu.c b/target-tricore/cpu.c index 2ba0cf4..9fe0b97 100644 --- a/target-tricore/cpu.c +++ b/target-tricore/cpu.c @@ -118,6 +118,13

Re: [Qemu-devel] [PATCHv4] Move parallel_hds_isa_init to hw/isa/isa-bus.c

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 11:39, mreza...@redhat.com wrote: From: Miroslav Rezanina mreza...@redhat.com Disabling CONFIG_PARALLEL cause removing parallel_hds_isa_init defined in parallel.c. This function is called during initialization of some boards so disabling CONFIG_PARALLEL cause build failure.

Re: [Qemu-devel] [PATCH 4/5] qemu-io: prompt for encryption keys when required

2015-05-13 Thread Markus Armbruster
Daniel P. Berrange berra...@redhat.com writes: On Tue, May 12, 2015 at 12:32:53PM -0600, Eric Blake wrote: On 05/12/2015 10:09 AM, Daniel P. Berrange wrote: The qemu-io tool does not check if the image is encrypted so historically would silently corrupt the sectors by writing plain text

Re: [Qemu-devel] [PATCH v1 05/18] target-arm: Add MAIR_EL2

2015-05-13 Thread Edgar E. Iglesias
On Wed, May 13, 2015 at 10:52:55AM +0300, Sergey Fedorov wrote: On 13.05.2015 09:52, Edgar E. Iglesias wrote: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com --- target-arm/helper.c | 8 1 file changed, 8

[Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-13 Thread Andrew Jones
Introduce a new memory region flag, KVM_MEM_UNCACHED, which is needed by ARM. This flag informs KVM that the given memory region is typically mapped by the guest as non-cacheable. KVM for ARM then ensures that that memory is indeed mapped non-cacheable by the guest, and also remaps that region as

Re: [Qemu-devel] [PATCH 13/34] qemu-io: Add command 'reopen'

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 17:05 hat Eric Blake geschrieben: On 05/08/2015 11:21 AM, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- qemu-io-cmds.c | 71 ++ 1 file changed, 71 insertions(+) + +while ((c =

Re: [Qemu-devel] [PATCH] iscsi: Remove pointless runtime check of macro value

2015-05-13 Thread Fam Zheng
On Wed, 05/13 10:43, Paolo Bonzini wrote: On 13/05/2015 15:15, Fam Zheng wrote: raw_bsd already has QEMU_BUILD_BUG_ON(BDRV_SECTOR_SIZE != 512), so iscsi should relax. It's okay to have the same QEMU_BUILD_BUG_ON in different places. However, you're right that this should be a

[Qemu-devel] [PATCH v2 00/11] Fix transactional snapshot with virtio-blk dataplane and NBD export

2015-05-13 Thread Fam Zheng
Changes from RFC: - Add op blocker listener in nbd server. - Add other transaction types. - Only notify listeners when changing from/to empty. (Paolo) Reported by Paolo. Unlike the iohandler in main loop, iothreads currently process the event notifier used by virtio-blk ioeventfd in nested

[Qemu-devel] [PATCH v2 01/11] block: Add op blocker type device IO

2015-05-13 Thread Fam Zheng
Preventing device from submitting IO is useful around various nested aio_poll. Op blocker is a good place to put this flag. Devices would submit IO requests through blk_* block backend interface, which calls blk_check_request to check the validity. Return -EBUSY if the operation is blocked, which

Re: [Qemu-devel] [PATCH 0/4] semihosting: clean up and add --semihosting-config arg

2015-05-13 Thread Leon Alrae
On 13/05/2015 06:48, Liviu Ionescu wrote: are these patches finally in? if so, what repo/branch should I use to get them? Note that v3 was sent quite recently and there should be some time to give everyone a chance to comment. I was planning to send it out later, together with UHI via

Re: [Qemu-devel] [PATCH] qemu-io: Use getopt() correctly

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 17:10 hat Eric Blake geschrieben: POSIX says getopt() returns -1 on completion. While Linux happens to define EOF as -1, this definition is not required by POSIX, and there may be platforms where checking for EOF instead of -1 would lead to an infinite loop. Signed-off-by:

Re: [Qemu-devel] [PATCH] block/mirror: Sleep periodically during bitmap scanning

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 05:11, Fam Zheng wrote: Before, we only yield after initializing dirty bitmap, where the QMP command would return. That may take very long, and guest IO will be blocked. Add sleep points like the later mirror iterations. You were also planning to let

[Qemu-devel] [PATCH 05/10] target-tricore: add SWAPMSK instructions of the v1.6.1 ISA

2015-05-13 Thread Bastian Koppelmann
Those instruction were introduced in the new Aurix platform. Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/translate.c | 39 +++ target-tricore/tricore-opcodes.h | 5 + 2 files changed, 44 insertions(+) diff

[Qemu-devel] [PATCH 07/10] target-tricore: add SYS_RESTORE instruction of the v1.6 ISA

2015-05-13 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/translate.c | 10 ++ target-tricore/tricore-opcodes.h | 1 + 2 files changed, 11 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 52f474b..4aea0c6 100644 ---

[Qemu-devel] [PATCH] spapr: ensure we have at least one XICS server

2015-05-13 Thread Greg Kurz
XICS needs to know the upper value for cpu_index as it is used to compute the number of servers: smp_cpus * kvmppc_smt_threads() / smp_threads When passing -smp cpus=1,threads=9 on a POWER8 host, we end up with: 1 * 8 / 9 = 0 ... which leads to an assertion in both emulated: Number of

Re: [Qemu-devel] [PATCH v2 11/11] block: Block device IO during bdrv_drain and bdrv_drain_all

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 13:08, Fam Zheng wrote: I think this isn't enough. It's the callers of bdrv_drain and bdrv_drain_all that need to block before drain and unblock before aio_context_release. Which callers do you mean? qmp_transaction is covered in this series. All of them. :( In some

[Qemu-devel] [RFC/RFT PATCH v2 2/3] KVM: promote KVM_MEMSLOT_INCOHERENT to uapi

2015-05-13 Thread Andrew Jones
Commit 1050dcda30529 introduced KVM_MEMSLOT_INCOHERENT to flag memory regions that may have coherency issues due to mapping host system RAM as non-cacheable. This was introduced as a KVM internal flag, but now give KVM userspace access to it so that it may use it for hinting likely problematic

Re: [Qemu-devel] [PATCHv3 2/2] stubs: Provide parallel_mm_init stub version

2015-05-13 Thread Miroslav Rezanina
On Wed, May 13, 2015 at 10:04:23AM +0200, Markus Armbruster wrote: Paolo Bonzini pbonz...@redhat.com writes: On 12/05/2015 08:22, mreza...@redhat.com wrote: From: Miroslav Rezanina mreza...@redhat.com mips build fail with link error in case PARALLEL_CONFIG is disabled as

Re: [Qemu-devel] [PATCHv3 1/2] Move parallel_hds_isa_init to hw/isa/isa-bus.c

2015-05-13 Thread Miroslav Rezanina
On Wed, May 13, 2015 at 10:01:12AM +0200, Markus Armbruster wrote: mreza...@redhat.com writes: From: Miroslav Rezanina mreza...@redhat.com Disabling CONFIG_PARALLEL cause removing parallel_hds_isa_init defined in parallel.c. This function is called during initialization of some boards

[Qemu-devel] [RESEND PATCH v4] acpi: add acpi_send_gpe_event() to rise sci for hotplug

2015-05-13 Thread Zhu Guihua
Add a new API named acpi_send_gpe_event() to send hotplug SCI. This API can be used by pci, cpu and memory hotplug. This patch is rebased on master. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- v4: -rename struct AcpiHotplugStatus to AcpiGPEStatusBits -add comments for struct

[Qemu-devel] [PATCH v2 03/11] block-backend: Add blk_op_blocker_add_notifier

2015-05-13 Thread Fam Zheng
Forward the call to bdrv_op_blocker_add_notifier. Signed-off-by: Fam Zheng f...@redhat.com --- block/block-backend.c | 6 ++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 71fc695..90d7476

Re: [Qemu-devel] Help with deadlock when using sound

2015-05-13 Thread Peter Maydell
On 13 May 2015 at 04:23, Programmingkid programmingk...@gmail.com wrote: Found out why QEMU is deadlocking. It is because a mutex that has been unlocked over 20 times in a row is being locked. OSX supports 'error checking' mutexes which will fail in these undefined-behaviour cases like

Re: [Qemu-devel] [PATCH 0/2] configure: increase glib requirement to 2.22

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 00:18, John Snow wrote: As discussed during the QEMU 2.3 development freeze. == For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch glib-version-fix https://github.com/jnsnow/qemu/tree/glib-version-fix This version is tagged

Re: [Qemu-devel] [PATCH 0/4] semihosting: clean up and add --semihosting-config arg

2015-05-13 Thread Peter Maydell
On 13 May 2015 at 10:29, Leon Alrae leon.al...@imgtec.com wrote: On 13/05/2015 06:48, Liviu Ionescu wrote: are these patches finally in? if so, what repo/branch should I use to get them? Note that v3 was sent quite recently and there should be some time to give everyone a chance to comment.

Re: [Qemu-devel] [PATCH v2] Add virt-v3 machine that uses GIC-500

2015-05-13 Thread Shlomo Pongratz
-Original Message- From: Pavel Fedin [mailto:p.fe...@samsung.com] Sent: Tuesday, 12 May, 2015 3:33 PM To: Shlomo Pongratz; qemu-devel@nongnu.org Subject: RE: [PATCH v2] Add virt-v3 machine that uses GIC-500 Hello! BTW did you try going beyond 16 cores I had problems with 32

Re: [Qemu-devel] [PATCH 15/34] qcow2: Move qcow2_update_options() call up

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: qcow2_update_options() only updates some variables in BDRVQcowState and doesn't really depend on other parts of it being initialised yet, so it can be moved so that it immediately follows the other half of option handling code in qcow2_open().

Re: [Qemu-devel] [PATCH 16/34] qcow2: Move rest of option handling to qcow2_update_options()

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: With this commit, the handling of driver-specific options in qcow2_open() is completely separated out into qcow2_update_options(). Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 109

Re: [Qemu-devel] [PATCH 5/6] xen_pt: QOMify

2015-05-13 Thread Stefano Stabellini
On Wed, 13 May 2015, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Signed-off-by: Gonglei arei.gong...@huawei.com Tested-by: Stefano Stabellini stefano.stabell...@eu.citrix.com hw/xen/xen_pt.c | 10 +-

Re: [Qemu-devel] [PATCH 18/34] qcow2: Fix memory leak in qcow2_update_options() error path

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index abe22f3..84d6e0f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -546,8

Re: [Qemu-devel] [PATCH v2 01/11] block: Add op blocker type device IO

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 19:28, Fam Zheng wrote: @@ -478,6 +478,10 @@ static int blk_check_request(BlockBackend *blk, int64_t sector_num, return -EIO; } +if (bdrv_op_is_blocked(blk-bs, BLOCK_OP_TYPE_DEVICE_IO, NULL)) { +return -EBUSY; +} I think this is incorrect.

Re: [Qemu-devel] [PATCH 21/34] block: Consider all block layer options in append_open_options

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: The code already special-cased node-name, which is currently the only option passed in the QDict that isn't driver-specific. Generalise the code to take all general block layer options into consideration. Signed-off-by: Kevin Wolf kw...@redhat.com ---

[Qemu-devel] [PATCH 09/11] qemu-iotests: test streaming to an intermediate layer

2015-05-13 Thread Alberto Garcia
This adds test_stream_intermediate(), similar to test_stream() but streams to the intermediate image instead. Signed-off-by: Alberto Garcia be...@igalia.com Reviewed-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/030 | 18 +- tests/qemu-iotests/030.out | 4 ++-- 2

[Qemu-devel] [PATCH 05/11] block: Add QMP support for streaming to an intermediate layer

2015-05-13 Thread Alberto Garcia
This patch makes the 'device' parameter of the 'block-stream' command accept a node name as well as a device name. In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Since qmp_block_stream() now uses the error from

[Qemu-devel] [PATCH v7 00/11] Support streaming to an intermediate layer

2015-05-13 Thread Alberto Garcia
v7: - Rebased against the current master - Updated bdrv_drain_all() to use the new block_job_next() API. v6: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03046.html - fix the no-op test following Max's suggestions v5:

[Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test

2015-05-13 Thread Alberto Garcia
This patch tests that in a partial block-stream operation, no data is ever copied from the base image. Signed-off-by: Alberto Garcia be...@igalia.com Reviewed-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/030 | 18 ++ tests/qemu-iotests/030.out | 4 ++-- 2 files

Re: [Qemu-devel] [PATCH 19/34] qcow2: Make qcow2_update_options() suitable for transactions

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: Before we can allow updating options at runtime with bdrv_reopen(), we need to split the function into prepare/commit/abort parts. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 101

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 19:28, Fam Zheng wrote: +state-bs = bs; +error_setg(state-blocker, blockdev-backup in progress); +bdrv_op_block(bs, BLOCK_OP_TYPE_DEVICE_IO, state-blocker); + qmp_blockdev_backup(backup-device, backup-target, backup-sync,

[Qemu-devel] [PULL 2/3] s390x: Add some documentation in opcode list

2015-05-13 Thread Alexander Graf
I find it really hard to grasp what each field in the opcode list means. Slowly walking through its semantics myself, I figured I'd write a small summary at the top of the file to make life easier for me and whoever looks at the file next. Signed-off-by: Alexander Graf ag...@suse.de Reviewed-by:

Re: [Qemu-devel] [PATCH 22/34] block: Exclude nested options only for children in append_open_options()

2015-05-13 Thread Max Reitz
On 13.05.2015 14:49, Max Reitz wrote: On 08.05.2015 19:21, Kevin Wolf wrote: Some drivers have nested options (e.g. blkdebug rule arrays), which don't belong to a child node and shouldn't be removed. Don't remove all options with . in their name, but check for the complete prefixes of actually

[Qemu-devel] [PULL 0/3] s390 patch queue 2015-05-13

2015-05-13 Thread Alexander Graf
Hi Peter, This is my current patch queue for s390. Please pull. Alex The following changes since commit 968bb75c348a401b85e08d5eb1887a3e6c3185f5: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20150512' into staging (2015-05-12 12:11:32 +0100) are available in the

Re: [Qemu-devel] [PATCH v8 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-13 Thread Kevin Wolf
Am 12.05.2015 um 16:30 hat Denis V. Lunev geschrieben: I have used the following program to test [...] and the amount of requests sent to disk (could be calculated counting number of lines in the output of blktrace) is reduced about 2 times. [...] Signed-off-by: Denis V. Lunev

[Qemu-devel] [PATCH 03/11] block: never cancel a streaming job without running stream_complete()

2015-05-13 Thread Alberto Garcia
We need to call stream_complete() in order to do all the necessary clean-ups, even if there's an early failure. At the moment it's only useful to make sure that s-backing_file_str is not leaked, but it will become more important as we introduce support for streaming to any intermediate node.

[Qemu-devel] [PATCH 07/11] qemu-iotests: fix test_stream_partial()

2015-05-13 Thread Alberto Garcia
This test is streaming to the top layer using the intermediate image as the base. This is a mistake since block-stream never copies data from the base image and its backing chain, so this is effectively a no-op. In addition to fixing the base parameter, this patch also writes some data to the

[Qemu-devel] [PATCH 01/11] block: keep a list of block jobs

2015-05-13 Thread Alberto Garcia
The current way to obtain the list of existing block jobs is to iterate over all root nodes and check which ones own a job. Since we want to be able to support block jobs in other nodes as well, this patch keeps a list of jobs that is updated every time one is created or destroyed. This also

Re: [Qemu-devel] Help with deadlock when using sound

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 11:38, Peter Maydell wrote: then we'll turn on the error checking, and a double-unlock will result in a call to abort(). If you run QEMU under a debugger you'll get a backtrace which will tell you which code did the second unlock (and thus which mutex it is). (Linux has a

Re: [Qemu-devel] [PATCH 18/34] qcow2: Fix memory leak in qcow2_update_options() error path

2015-05-13 Thread Kevin Wolf
Am 13.05.2015 um 13:52 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index abe22f3..84d6e0f

Re: [Qemu-devel] [PATCH 22/34] block: Exclude nested options only for children in append_open_options()

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: Some drivers have nested options (e.g. blkdebug rule arrays), which don't belong to a child node and shouldn't be removed. Don't remove all options with . in their name, but check for the complete prefixes of actually existing child nodes. Signed-off-by:

[Qemu-devel] [PATCH 06/11] docs: Document how to stream to an intermediate layer

2015-05-13 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- docs/live-block-ops.txt | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/live-block-ops.txt

[Qemu-devel] [PULL 1/3] s390x: Fix stoc direction

2015-05-13 Thread Alexander Graf
The store conditional instruction wants to store when the condition is fulfilled, so we should branch out when it's not true. The code today branches out when the condition is true, clearly reversing the logic. Fix it up by negating the condition. Signed-off-by: Alexander Graf ag...@suse.de

Re: [Qemu-devel] [PATCH 23/34] block: Pass driver-specific options to .bdrv_refresh_filename()

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: In order to decide whether a blkdebug: filename can be produced or a json: one is necessary, blkdebug checked whether bs-options had more options than just config, x-image or image (the latter including nested options). That doesn't work well when generic

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Fam Zheng
On Wed, 05/13 19:22, Wen Congyang wrote: On 05/14/2015 01:28 AM, Fam Zheng wrote: Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ae52d27..bd28183 100644 ---

[Qemu-devel] [PATCH 11/11] qemu-iotests: test overlapping block-stream operations

2015-05-13 Thread Alberto Garcia
This test case checks that it's not possible to perform two block-stream operations if there are nodes involved in both. Signed-off-by: Alberto Garcia be...@igalia.com Reviewed-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/030 | 27 +++

[Qemu-devel] [PATCH 10/11] qemu-iotests: test block-stream operations in parallel

2015-05-13 Thread Alberto Garcia
This test case checks that it's possible to launch several stream operations in parallel in the same snapshot chain, each one involving a different set of nodes. Signed-off-by: Alberto Garcia be...@igalia.com Reviewed-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/030 | 80

Re: [Qemu-devel] [PATCH 18/34] qcow2: Fix memory leak in qcow2_update_options() error path

2015-05-13 Thread Max Reitz
On 13.05.2015 14:02, Kevin Wolf wrote: Am 13.05.2015 um 13:52 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c

Re: [Qemu-devel] [PATCH 24/34] block: Keep driver in bs-options

2015-05-13 Thread Max Reitz
On 08.05.2015 19:21, Kevin Wolf wrote: Instead of passing a separate drv argument to bdrv_open_common(), just make sure that a driver option is set in the QDict. This also means that a driver entry is consistently present in bs-options now. This is another step towards keeping all options in

  1   2   3   >