[Qemu-devel] [PATCH v3 3/6] block: Remove bdrv_reset_dirty

2015-05-12 Thread Fam Zheng
Using this function would always be wrong because a dirty bitmap must have a specific owner that consumes the dirty bits and calls bdrv_reset_dirty_bitmap(). Remove the unused function to avoid future misuse. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com

[Qemu-devel] [PATCH v3 2/6] block: Fix dirty bitmap in bdrv_co_discard

2015-05-12 Thread Fam Zheng
Unsetting dirty globally with discard is not very correct. The discard may zero out sectors (depending on can_write_zeroes_with_unmap), we should replicate this change to destinition side to make sure that the guest sees the same data. Calling bdrv_reset_dirty also troubles mirror job because the

[Qemu-devel] [PATCH v3 1/6] mirror: Do zero write on target if sectors not allocated

2015-05-12 Thread Fam Zheng
If guest discards a source cluster during mirror, we would want to skip the read-write steps. Source and target may have different can_write_zeroes_with_unmap values and different discard granularity. It's important to replicate the exact zeroing on the destination, so bdrv_aio_discard is only

[Qemu-devel] [PATCH v3 0/6] block: Mirror discarded sectors

2015-05-12 Thread Fam Zheng
v3: Add John's rev-by in patches 3~6. Rewrite patch 1: discard may not suffice, use write zeroes in that case. v2: Fix typo and add Eric's rev-by in patch 3. Add patch 1 to discard target in mirror job. (Paolo) Add patch 6 to improve iotests.wait_ready. (John) This fixes the mirror

[Qemu-devel] [PATCH v3 6/6] iotests: Use event_wait in wait_ready

2015-05-12 Thread Fam Zheng
Only poll the specific type of event we are interested in, to avoid stealing events that should be consumed by someone else. Suggested-by: John Snow js...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: John Snow js...@redhat.com --- tests/qemu-iotests/iotests.py | 9 ++---

Re: [Qemu-devel] [PATCH v6 1/3] Revert block: Fix unaligned zero write

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: This reverts commit fc3959e4669a1c2149b91ccb05101cfc7ae1fc05. The core write code already handles the case, so remove this duplication. Because commit 61007b316 moved the touched code from block.c to block/io.c, the change is manually

Re: [Qemu-devel] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: For zero write, callers pass in NULL qiov (qemu-io write -z or scsi-disk write same). Commit fc3959e466 fixed bdrv_co_write_zeroes which is the common case for this bug, but it still exists in bdrv_aio_write_zeroes. A simpler fix would be in

[Qemu-devel] [PATCH 12/15] tap-bsd: Convert tap_open() to Error

2015-05-12 Thread Markus Armbruster
Fixes inappropriate use of stderr in monitor command handler. While there, improve some of the messages a bit. Signed-off-by: Markus Armbruster arm...@redhat.com --- net/tap-bsd.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git

[Qemu-devel] [PATCH 14/15] tap: Finish conversion of tap_open() to Error

2015-05-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- net/tap.c | 4 1 file changed, 4 deletions(-) diff --git a/net/tap.c b/net/tap.c index 348b786..f7db9dc 100644 --- a/net/tap.c +++ b/net/tap.c @@ -597,10 +597,6 @@ static int net_tap_init(const NetdevTapOptions *tap, int *vnet_hdr,

Re: [Qemu-devel] [RFC v4] monitor: add memory search commands s, sp

2015-05-12 Thread Luiz Capitulino
On Fri, 24 Apr 2015 14:39:48 +0200 hw.clau...@gmail.com wrote: From: Claudio Fontana claudio.font...@huawei.com usage is similar to the commands x, xp. Example with string: looking for ELF header in memory: (qemu) s/100cb 0x40001000 ELF searching memory area

Re: [Qemu-devel] [v8 13/14] migration: Add qmp commands to set and query parameters

2015-05-12 Thread Li, Liang Z
* Liang Li (liang.z...@intel.com) wrote: Add the qmp commands to tune and query the parameters used in live migration. Hi, Do you know if there's anyone working on libvirt code to drive this interface and turn on your compression code? Yes, I have confirmed that one person of

Re: [Qemu-devel] KVM call for agenda 2015-05-12

2015-05-12 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please, send any topic that you are interested in covering. No topics, no call. Have a good day. Thanks, Juan. Call details: By popular demand, a google calendar public entry with it

Re: [Qemu-devel] [PATCH v6 3/3] qemu-iotests: Test unaligned sub-block zero write

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: Test zero write in byte range 512~1024 for 4k alignment. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com

Re: [Qemu-devel] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Stefan Hajnoczi
On Tue, May 12, 2015 at 02:09:31PM +0800, Fam Zheng wrote: +static int coroutine_fn bdrv_co_do_zero_pwritev(BlockDriverState *bs, +int64_t offset, +unsigned int bytes, +

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

2015-05-12 Thread Pavel Fedin
Hello! BTW did you try going beyond 16 cores I had problems with 32 and 64 cores. Just tried it. Works fine, except qemu takes incredibly long time to start up with so many cores. 64 cores took something like 2 minutes. Indeed, looks like freeze, but if you're patient enough, you'll see it

Re: [Qemu-devel] [ARM]: Adding support for Cortex-M4

2015-05-12 Thread aurelio remonda
Im using lm3s6965evb stellaris board, trying to make it work as an M4, i would like to separate them, adding an dsp feature (i.e ARM_FEATURE_DSP) could work? the problem is if this feature is added it has to be set on all the cpus that use dsp instructions.

Re: [Qemu-devel] [ARM]: Adding support for Cortex-M4

2015-05-12 Thread Peter Maydell
On 12 May 2015 at 13:46, aurelio remonda aurelioremo...@gmail.com wrote: Im using lm3s6965evb stellaris board, trying to make it work as an M4, i would like to separate them, adding an dsp feature (i.e ARM_FEATURE_DSP) could work? the problem is if this feature is added it has to be set on all

Re: [Qemu-devel] [PATCH] ui: use libexpoxy

2015-05-12 Thread Peter Maydell
On 12 May 2015 at 14:04, Gerd Hoffmann kra...@redhat.com wrote: libepoxy does the opengl extension handling for us. It also is helpful for trouble-shooting as it prints nice error messages instead of silently failing or segfaulting in case we do something wrong, like using gl commands not

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

2015-05-12 Thread Fam Zheng
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. Signed-off-by: Fam Zheng f...@redhat.com --- block/mirror.c | 13 - 1 file changed, 12

[Qemu-devel] Serial port passthrough for arm kvm

2015-05-12 Thread Lennart Sorensen
We are trying to pass a serial port through to an arm guest on kvm and the serial port is working for passing data, but is not setting the baud rate when the guest changes it. If I change the baud rate of the port from the host, then the baud rate is set correctly and data is passed through just

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

2015-05-12 Thread Wen Congyang
On 05/13/2015 11:11 AM, 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. Do you have such case to reproduce it? If the disk image is too larger, and I think qemu doesn't cache all

[Qemu-devel] [PATCH v7 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Fam Zheng
For zero write, callers pass in NULL qiov (qemu-io write -z or scsi-disk write same). Commit fc3959e466 fixed bdrv_co_write_zeroes which is the common case for this bug, but it still exists in bdrv_aio_write_zeroes. A simpler fix would be in bdrv_co_do_pwritev which is the NULL dereference point

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

2015-05-12 Thread Liviu Ionescu
On 06 May 2015, at 19:12, Leon Alrae leon.al...@imgtec.com wrote: ... I'm going to follow up with UHI patch series only. I don't have anything set up to test other semihosting interfaces, thus I don't plan to do any changes in these areas in near future. Therefore feel free to send your

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Peter Maydell
On 12 May 2015 at 14:14, Cornelia Huck cornelia.h...@de.ibm.com wrote: On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: @@ -233,7 +233,6 @@ static inline void virtio_clear_feature(uint32_t *features, unsigned int fbit) static inline bool

Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 15:41 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096 bytes. The difference is quite

Re: [Qemu-devel] [Xen-devel] [PATCH v6 2/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-12 Thread Stefano Stabellini
On Tue, 12 May 2015, Xu, Quan wrote: -Original Message- From: xen-devel-boun...@lists.xen.org [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Stefano Stabellini Sent: Friday, May 08, 2015 1:26 AM To: Xu, Quan Cc: wei.l...@citrix.com; stef...@linux.vnet.ibm.com;

Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
On 12/05/15 17:08, Kevin Wolf wrote: Am 12.05.2015 um 15:41 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096

Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
On 12/05/15 17:26, Kevin Wolf wrote: Am 12.05.2015 um 16:20 hat Denis V. Lunev geschrieben: On 12/05/15 17:08, Kevin Wolf wrote: Am 12.05.2015 um 15:41 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i

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

2015-05-12 Thread Denis V. Lunev
I have used the following program to test #define _GNU_SOURCE #include stdio.h #include unistd.h #include fcntl.h #include sys/types.h #include malloc.h #include string.h int main(int argc, char *argv[]) { int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); void *buf; int i =

[Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096 bytes. The difference is quite reliable. On the other hand we do not want at the moment to enforce

[Qemu-devel] [PATCH 1/2] block: minimal bounce buffer alignment

2015-05-12 Thread Denis V. Lunev
The patch introduces new concept: minimal memory alignment for bounce buffers. Original so called optimal value is actually minimal required value for aligment. It should be used for validation that the IOVec is properly aligned and bounce buffer is not required. Though, from the performance

Re: [Qemu-devel] [PATCH 10/34] block: Fix reopen flag inheritance

2015-05-12 Thread Eric Blake
On 05/08/2015 11:21 AM, Kevin Wolf wrote: When reopening an image, the block layer already takes care to reopen bs-file as well with recalculated inherited flags. The same must happen for any other child (most notably missing before this patch: backing files). If bs-file (or any other

Re: [Qemu-devel] Regression: qemu crash of hvm domUs with spice (backtrace included)

2015-05-12 Thread Stefano Stabellini
On Tue, 12 May 2015, Fabio Fantoni wrote: Il 12/05/2015 12:26, Fabio Fantoni ha scritto: Il 12/05/2015 11:23, Fabio Fantoni ha scritto: Il 11/05/2015 17:04, Fabio Fantoni ha scritto: Il 21/04/2015 14:53, Stefano Stabellini ha scritto: On Tue, 21 Apr 2015, Fabio Fantoni wrote:

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

2015-05-12 Thread Paolo Bonzini
On 12/05/2015 00:43, Programmingkid wrote: On May 10, 2015, at 10:54 AM, Paolo Bonzini wrote: On 06/05/2015 18:40, Programmingkid wrote: When I try to use the pcspk sound hardware, QEMU freezes and uses 100% of the cpu time. This is the command I use: qemu-system-i386 -cdrom anything

[Qemu-devel] [PATCH 2/3] cirrus_vga: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com QOMify pci-cirrus-vga like isa-cirrus-vga device. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/display/cirrus_vga.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index

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

2015-05-12 Thread Pavel Fedin
Hello! If we're going to start adding new machine types for aarch64 with version numbers, then I think we should we be using a versioning scheme that matches what we do on x86. ie, define versioned machine types based on the QEMU release numbers As i wrote in v1 patch message, i am

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

2015-05-12 Thread Stefan Hajnoczi
On Mon, May 11, 2015 at 07:47:41PM +0300, Denis V. Lunev wrote: On 11/05/15 19:07, Denis V. Lunev wrote: On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and the same 5%. qemu-io -n -c 'write -P 0xaa

Re: [Qemu-devel] Regression: qemu crash of hvm domUs with spice (backtrace included)

2015-05-12 Thread Fabio Fantoni
Il 12/05/2015 11:23, Fabio Fantoni ha scritto: Il 11/05/2015 17:04, Fabio Fantoni ha scritto: Il 21/04/2015 14:53, Stefano Stabellini ha scritto: On Tue, 21 Apr 2015, Fabio Fantoni wrote: Il 21/04/2015 12:49, Stefano Stabellini ha scritto: On Mon, 20 Apr 2015, Fabio Fantoni wrote: I updated

Re: [Qemu-devel] Regression: qemu crash of hvm domUs with spice (backtrace included)

2015-05-12 Thread Fabio Fantoni
Il 12/05/2015 12:26, Fabio Fantoni ha scritto: Il 12/05/2015 11:23, Fabio Fantoni ha scritto: Il 11/05/2015 17:04, Fabio Fantoni ha scritto: Il 21/04/2015 14:53, Stefano Stabellini ha scritto: On Tue, 21 Apr 2015, Fabio Fantoni wrote: Il 21/04/2015 12:49, Stefano Stabellini ha scritto: On

Re: [Qemu-devel] [v8 13/14] migration: Add qmp commands to set and query parameters

2015-05-12 Thread Dr. David Alan Gilbert
* Li, Liang Z (liang.z...@intel.com) wrote: * Liang Li (liang.z...@intel.com) wrote: Add the qmp commands to tune and query the parameters used in live migration. Hi, Do you know if there's anyone working on libvirt code to drive this interface and turn on your compression

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Greg Kurz
On Tue, 12 May 2015 15:14:53 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Unlike with add and clear, there is no valid reason to abort when checking for a feature. It makes more sense to return false (i.e.

Re: [Qemu-devel] [PATCH 08/34] block: Add list of children to BlockDriverState

2015-05-12 Thread Kevin Wolf
Am 11.05.2015 um 17:45 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: This allows iterating over all children of a given BDS, not only including bs-file and bs-backing_hd, but also driver-specific ones like VMDK extents or Quorum children. Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 16:20 hat Denis V. Lunev geschrieben: On 12/05/15 17:08, Kevin Wolf wrote: Am 12.05.2015 um 15:41 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd,

Re: [Qemu-devel] [RFC PATCH 6/8] tap: Drop tap_can_send

2015-05-12 Thread Jason Wang
On Thu, Apr 30, 2015 at 6:32 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 30/04/2015 10:59, Jason Wang wrote: +/* If !can_send, we will want to disable the read poll, but we still + * need the send completion callback to enable it again, which is a + *

Re: [Qemu-devel] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Fam Zheng
On Tue, 05/12 13:52, Kevin Wolf wrote: Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: For zero write, callers pass in NULL qiov (qemu-io write -z or scsi-disk write same). Commit fc3959e466 fixed bdrv_co_write_zeroes which is the common case for this bug, but it still exists in

Re: [Qemu-devel] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Fam Zheng
On Tue, 05/12 13:18, Stefan Hajnoczi wrote: On Tue, May 12, 2015 at 02:09:31PM +0800, Fam Zheng wrote: +static int coroutine_fn bdrv_co_do_zero_pwritev(BlockDriverState *bs, +int64_t offset, +

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

2015-05-12 Thread Fam Zheng
raw_bsd already has QEMU_BUILD_BUG_ON(BDRV_SECTOR_SIZE != 512), so iscsi should relax. Signed-off-by: Fam Zheng f...@redhat.com --- block/iscsi.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 8fca1d3..14e97a6 100644 --- a/block/iscsi.c +++

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

2015-05-12 Thread Programmingkid
On May 12, 2015, at 3:45 AM, Paolo Bonzini wrote: On 12/05/2015 00:43, Programmingkid wrote: On May 10, 2015, at 10:54 AM, Paolo Bonzini wrote: On 06/05/2015 18:40, Programmingkid wrote: When I try to use the pcspk sound hardware, QEMU freezes and uses 100% of the cpu time. This is

[Qemu-devel] [PATCH 0/6] pci/isa: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Because DO_UPCAST() is long deprecated, let me do some cleanup work. Please review, thanks Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Gonglei (6): pci-assign: QOMify piix: piix3 QOMify piix4: QOMify wdt_i6300esb:

[Qemu-devel] [PATCH v7 3/3] qemu-iotests: Test unaligned sub-block zero write

2015-05-12 Thread Fam Zheng
Test zero write in byte range 512~1024 for 4k alignment. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/033 | 13 + tests/qemu-iotests/033.out | 30

[Qemu-devel] [PATCH v7 0/3] block: Fix unaligned bdrv_aio_write_zeroes

2015-05-12 Thread Fam Zheng
v7: Add Kevin's rev-by in patch 1 and 3. Address Stefan's and Kevin's comments on patch 2: - Don't duplicate tracked_request_begin and tracked_request_end; - Don't forget to remove debug printf; - Call qemu_vfree unconditionally; - Don't serialize aligned part of the zero write

[Qemu-devel] [PATCH v7 1/3] Revert block: Fix unaligned zero write

2015-05-12 Thread Fam Zheng
This reverts commit fc3959e4669a1c2149b91ccb05101cfc7ae1fc05. The core write code already handles the case, so remove this duplication. Because commit 61007b316 moved the touched code from block.c to block/io.c, the change is manually reverted. Signed-off-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [PULL 00/19] target-arm queue

2015-05-12 Thread Peter Maydell
On 12 May 2015 at 12:03, Peter Maydell peter.mayd...@linaro.org wrote: v2 of the pull, fixing a silly compile failure on ARM hosts. target-arm queue: * Support TZ and grouping in the GIC * hw/sd: sd_reset cleanup *

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

2015-05-12 Thread Paolo Bonzini
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 hw/mips/mips_jazz.c calls parallel_mm_init. Due to dependecies to content of parallel.c we can't simply move it to

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

2015-05-12 Thread Cornelia Huck
On Wed, 06 May 2015 14:08:02 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Legacy virtio is native endian: if the guest and host endianness differ, we have to tell vhost so it can swap bytes where appropriate. This is done through a vhost ring ioctl. Signed-off-by: Greg Kurz

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

2015-05-12 Thread Paolo Bonzini
On 12/05/2015 08:22, 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 07/34] block: Move flag inheritance to bdrv_open_inherited()

2015-05-12 Thread Kevin Wolf
Am 11.05.2015 um 17:20 hat Max Reitz geschrieben: On 08.05.2015 19:21, Kevin Wolf wrote: Instead of letting every caller of bdrv_open() determine the right flags for its child node manually and pass them to the function, pass the parent node and the role of the newly opened child (like backing

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Michael S. Tsirkin
On Tue, May 12, 2015 at 03:14:53PM +0200, Cornelia Huck wrote: On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Unlike with add and clear, there is no valid reason to abort when checking for a feature. It makes more sense to return false (i.e. the feature bit

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Cornelia Huck
On Tue, 12 May 2015 15:34:47 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 12, 2015 at 03:14:53PM +0200, Cornelia Huck wrote: On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Unlike with add and clear, there is no valid reason to abort when

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
On 12/05/15 16:08, Kevin Wolf wrote: Am 12.05.2015 um 12:36 hat Denis V. Lunev geschrieben: On 12/05/15 13:27, Kevin Wolf wrote: Am 12.05.2015 um 07:47 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i

[Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096 bytes. The difference is quite reliable. On the other hand we do not want at the moment to enforce

[Qemu-devel] [PATCH 1/2] block: minimal bounce buffer alignment

2015-05-12 Thread Denis V. Lunev
The patch introduces new concept: minimal memory alignment for bounce buffers. Original so called optimal value is actually minimal required value for aligment. It should be used for validation that the IOVec is properly aligned and bounce buffer is not required. Though, from the performance

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

2015-05-12 Thread Denis V. Lunev
I have used the following program to test #define _GNU_SOURCE #include stdio.h #include unistd.h #include fcntl.h #include sys/types.h #include malloc.h #include string.h int main(int argc, char *argv[]) { int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); void *buf; int i =

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Cornelia Huck
On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Unlike with add and clear, there is no valid reason to abort when checking for a feature. It makes more sense to return false (i.e. the feature bit isn't set). This is exactly what __virtio_has_feature() does if fbit

Re: [Qemu-devel] [PATCH] ui: use libexpoxy

2015-05-12 Thread Gerd Hoffmann
On Di, 2015-05-12 at 14:10 +0100, Peter Maydell wrote: On 12 May 2015 at 14:04, Gerd Hoffmann kra...@redhat.com wrote: libepoxy does the opengl extension handling for us. It also is helpful for trouble-shooting as it prints nice error messages instead of silently failing or segfaulting in

Re: [Qemu-devel] [PATCH v1 1/1] S390 pci infrastructure modeling

2015-05-12 Thread Cornelia Huck
On Tue, 21 Apr 2015 13:29:01 +0800 Hong Bo Li lih...@linux.vnet.ibm.com wrote: Sorry, I sent the patch three times by accident. Please take this one as the formal patch. This is a followup to the discussion started by Frank Blaschka: Option 1: s390x/pci: Extend pci representation by new

Re: [Qemu-devel] [PATCH 1/1] Add support for PCI Enhanced Allocation BARs

2015-05-12 Thread Michael S. Tsirkin
On Mon, May 11, 2015 at 01:08:05PM -0700, Sean O. Stalley wrote: On Mon, May 11, 2015 at 09:26:08PM +0200, Michael S. Tsirkin wrote: On Mon, May 11, 2015 at 11:56:44AM -0700, Sean O. Stalley wrote: PCI Enhanced Allocation is a new method of allocating MMIO IO resources for PCI devices

Re: [Qemu-devel] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Paolo Bonzini
On 12/05/2015 12:27, Kevin Wolf wrote: I think it would make more sense to keep this specific to the raw-posix driver. After all, it's only the kernel page cache that we optimise here. Other backends probably don't take advantage of page alignment. I don't think it makes sense to keep it

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

2015-05-12 Thread Daniel P. Berrange
On Tue, May 12, 2015 at 02:15:46PM +0300, Pavel Fedin wrote: Hello! We are not. Support for GICv2 vs v3 should be dealt with by suitable machine properties I don't remember whether i clearly wrote about it... First i added a property, like -machine virt,gicv3=on. But then i decided to

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

2015-05-12 Thread Michael S. Tsirkin
On Tue, May 12, 2015 at 03:25:30PM +0200, Cornelia Huck wrote: On Wed, 06 May 2015 14:08:02 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: Legacy virtio is native endian: if the guest and host endianness differ, we have to tell vhost so it can swap bytes where appropriate. This is done

Re: [Qemu-devel] [PULL 00/14] Ide patches

2015-05-12 Thread John Snow
On 05/12/2015 06:44 AM, Peter Maydell wrote: On 11 May 2015 at 19:12, John Snow js...@redhat.com wrote: The following changes since commit 9ad2c8cd41a086020e21aa6d616b73bd5e2a800b: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-05-09' into staging (2015-05-11

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-12 Thread Richard Henderson
On 05/12/2015 12:23 AM, Peter Crosthwaite wrote: In my multi-compile approach helper_*[ld|st]* needs to be renamed per-arch for the multiple compiled cputlb.o. Hence I have no symbol with the unqualified name. But even if I do solve my namespacing problem, I still have an ambiguity of which

Re: [Qemu-devel] [PULL 00/14] Ide patches

2015-05-12 Thread Peter Maydell
On 12 May 2015 at 16:22, John Snow js...@redhat.com wrote: On 05/12/2015 06:44 AM, Peter Maydell wrote: Doesn't build on 32-bit: /root/qemu/qtest.c: In function ‘qtest_process_command’: /root/qemu/qtest.c:519:28: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Michael S. Tsirkin
On Tue, May 12, 2015 at 04:46:11PM +0200, Cornelia Huck wrote: On Tue, 12 May 2015 15:44:46 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Tue, 12 May 2015 15:34:47 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 12, 2015 at 03:14:53PM +0200, Cornelia Huck wrote:

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

2015-05-12 Thread Peter Maydell
In order for -icount to work, it's important for the target translate.c code to correctly bracket any generated code which can do I/O with gen_io_start()/gen_io_end() calls. But does anybody know exactly what the criteria are here for this? It would be nice if we could document this in a comment

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

2015-05-12 Thread Alberto Garcia
On Tue 12 May 2015 05:10:56 PM CEST, Eric Blake ebl...@redhat.com wrote: 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

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Cornelia Huck
On Tue, 12 May 2015 15:44:46 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Tue, 12 May 2015 15:34:47 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 12, 2015 at 03:14:53PM +0200, Cornelia Huck wrote: On Wed, 06 May 2015 14:07:37 +0200 Greg Kurz

Re: [Qemu-devel] [PATCH 11/34] block: Allow references for backing files

2015-05-12 Thread Eric Blake
On 05/08/2015 11:21 AM, Kevin Wolf wrote: For bs-file, using references to existing BDSes has been possible for a while already. This patch enables the same for bs-backing_hd. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 42

Re: [Qemu-devel] [PATCH 12/34] block: Allow specifying driver-specific options to reopen

2015-05-12 Thread Eric Blake
On 05/08/2015 11:21 AM, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 42 +++--- block/commit.c| 4 ++-- include/block/block.h | 4 +++- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git

Re: [Qemu-devel] [RFC v4] monitor: add memory search commands s, sp

2015-05-12 Thread Claudio Fontana
On 11.05.2015 16:16, Luiz Capitulino wrote: On Fri, 24 Apr 2015 14:39:48 +0200 hw.clau...@gmail.com wrote: From: Claudio Fontana claudio.font...@huawei.com usage is similar to the commands x, xp. Example with string: looking for ELF header in memory: (qemu) s/100cb 0x40001000 ELF

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

2015-05-12 Thread Eric Blake
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 = getopt(argc, argv, c:o:r)) != EOF) { POSIX says getopt() returns

Re: [Qemu-devel] Regression: qemu crash of hvm domUs with spice (backtrace included)

2015-05-12 Thread Stefano Stabellini
On Tue, 12 May 2015, Stefano Stabellini wrote: On Tue, 12 May 2015, Fabio Fantoni wrote: Il 12/05/2015 12:26, Fabio Fantoni ha scritto: Il 12/05/2015 11:23, Fabio Fantoni ha scritto: Il 11/05/2015 17:04, Fabio Fantoni ha scritto: Il 21/04/2015 14:53, Stefano Stabellini ha scritto:

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

2015-05-12 Thread Peter Maydell
Resurrecting a six month old thread (and starting with a big long quote for context): On 8 September 2014 at 12:53, Peter Maydell peter.mayd...@linaro.org wrote: On 7 September 2014 02:47, Edgar E. Iglesias edgar.igles...@gmail.com wrote: On Thu, Sep 04, 2014 at 06:47:58PM +0100, Peter Maydell

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

2015-05-12 Thread Eric Blake
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: Eric Blake ebl...@redhat.com --- qemu-io-cmds.c | 16

Re: [Qemu-devel] [PATCH] doc: fix qmp event type

2015-05-12 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 05/11/2015 09:17 AM, Michael S. Tsirkin wrote: Even name for hot unplug errors was wrong. s/Even/Event/ ? Make doc match code. Cc: Zhu Guihua zhugh.f...@cn.fujitsu.com Reported-by: Eric Blake ebl...@redhat.com Signed-off-by: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH v3 00/14] Fix qapi mangling of downstream names

2015-05-12 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: This series makes it possible to use downstream extensions (such as __com.redhat_xyz) and temporary names (such as x-foo) in every position possible in QAPI schemes, with added tests that the generated code still compiles. There's still some things we

Re: [Qemu-devel] [PATCH v2 2/2] target-mips: Misaligned memory accesses for MSA

2015-05-12 Thread Richard Henderson
On 05/12/2015 02:54 AM, Peter Maydell wrote: Ideally it would be nice to have support in TCG so that a frontend could output a TCG load/store op with a flag for unaligned access OK or not. ARM also has this issue of some load/stores wanting to do alignment traps and some not. Yes, that would

Re: [Qemu-devel] [PATCH v2] qmp: Add qom_path field to query-cpus command

2015-05-12 Thread Markus Armbruster
Eduardo Habkost ehabk...@redhat.com writes: This will allow clients to query additional information directly using qom-get on the CPU objects. Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Andreas Färber afaer...@suse.de Signed-off-by: Eduardo Habkost

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

2015-05-12 Thread Richard Henderson
On 05/12/2015 08:32 AM, Peter Maydell wrote: In order for -icount to work, it's important for the target translate.c code to correctly bracket any generated code which can do I/O with gen_io_start()/gen_io_end() calls. But does anybody know exactly what the criteria are here for this? It

Re: [Qemu-devel] [PATCH v2] qmp: Add qom_path field to query-cpus command

2015-05-12 Thread Eduardo Habkost
On Tue, May 12, 2015 at 05:38:37PM +0200, Markus Armbruster wrote: [...] @@ -699,8 +701,9 @@ #data is sent to the client, the guest may no longer be halted. ## { 'struct': 'CpuInfo', - 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int', -

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

2015-05-12 Thread Peter Maydell
On 12 May 2015 at 16:43, Richard Henderson r...@twiddle.net wrote: On 05/12/2015 08:32 AM, Peter Maydell wrote: In order for -icount to work, it's important for the target translate.c code to correctly bracket any generated code which can do I/O with gen_io_start()/gen_io_end() calls. But

<    1   2   3