Re: [Qemu-devel] arm64 qemu tests failing in linux-next since 'arm64: kernel: enforce pmuserenr_el0 initialization and restore'

2016-01-07 Thread Guenter Roeck
On 01/07/2016 08:56 AM, Peter Maydell wrote: On 7 January 2016 at 16:37, Lorenzo Pieralisi wrote: On Thu, Jan 07, 2016 at 03:58:15PM +, Peter Maydell wrote: On 7 January 2016 at 15:53, Lorenzo Pieralisi wrote: Ok, thanks for looking into this. I wonder why reading pmcr_el0 does not suffe

Re: [Qemu-devel] [PATCH 20/22] 9pfs: break out generic code from virtio-9p.{c, h}

2016-01-07 Thread Wei Liu
On Thu, Jan 07, 2016 at 10:27:13PM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > The vast majority of code in virtio-9p.c is actually generic code. > > Rename that file to 9p.c and move virtio specific code to > > virtio-9p-device.c. Rename virtio-9p.h to 9p.h and split out virtio > > sp

Re: [Qemu-devel] arm64 qemu tests failing in linux-next since 'arm64: kernel: enforce pmuserenr_el0 initialization and restore'

2016-01-07 Thread Peter Maydell
On 7 January 2016 at 17:10, Guenter Roeck wrote: > Strictly speaking you may be right (regression is a bit strong, though), > but for my part I tend to be pragmatic. > > A warning message such as "Access to unimplemented register X" may be > useful You can get these from QEMU if you pass it "-d u

Re: [Qemu-devel] [PATCH 20/22] 9pfs: break out generic code from virtio-9p.{c, h}

2016-01-07 Thread Aneesh Kumar K.V
Wei Liu writes: > On Thu, Jan 07, 2016 at 10:27:13PM +0530, Aneesh Kumar K.V wrote: >> Wei Liu writes: >> >> > The vast majority of code in virtio-9p.c is actually generic code. >> > Rename that file to 9p.c and move virtio specific code to >> > virtio-9p-device.c. Rename virtio-9p.h to 9p.h an

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-07 Thread Laszlo Ersek
On 01/07/16 14:51, Igor Mammedov wrote: > On Mon, 4 Jan 2016 21:17:31 +0100 > Laszlo Ersek wrote: > >> Michael CC'd me on the grandparent of the email below. I'll try to add >> my thoughts in a single go, with regard to OVMF. >> >> On 12/30/15 20:52, Michael S. Tsirkin wrote: >>> On Wed, Dec 30,

Re: [Qemu-devel] [PATCH v8 4/4] arm_mptimer: Convert to use ptimer

2016-01-07 Thread Dmitry Osipenko
06.01.2016 16:17, Peter Crosthwaite пишет: +if ((old & 3) != (tb->control & 3)) { +ptimer_stop(tb->timer); +} +if (!(tb->control & 1)) { +break; +} +ptimer_set_period(tb->timer, timerblock_scale(tb)); +if ((old & 3) != (tb->c

Re: [Qemu-devel] [RFC v6 10/14] softmmu: Simplify helper_*_st_name, wrap unaligned code

2016-01-07 Thread Alex Bennée
alvise rigo writes: > On Thu, Jan 7, 2016 at 5:35 PM, Alex Bennée wrote: >> >> alvise rigo writes: >> >>> On Thu, Jan 7, 2016 at 3:46 PM, Alex Bennée wrote: Alvise Rigo writes: > Attempting to simplify the helper_*_st_name, wrap the > do_unaligned_access code into an i

Re: [Qemu-devel] [PATCH v4] igd-passthrough-i440FX: convert to realize()

2016-01-07 Thread Stefano Stabellini
On Thu, 7 Jan 2016, Gerd Hoffmann wrote: > On Do, 2016-01-07 at 15:01 +, Stefano Stabellini wrote: > > Your patch is simpler and more mature. Maybe it should go in before Gerd's > > series? > > My series would throw away most of the error handling fixes here, so > IMHO that would be pointless

Re: [Qemu-devel] [PATCH 00/22] 9pfs: disentangling virtio and generic code

2016-01-07 Thread Wei Liu
On Thu, Jan 07, 2016 at 10:34:13PM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > Hi all > > > > Back in 2015 summer one of our OPW interns Linda Jacobson explored the > > possibility of making 9pfs work on Xen. It turned out lots of code in QEMU > > can > > be reused. > > > > This serie

Re: [Qemu-devel] [PATCH v2 05/10] exec: [ŧcg] Use multiple physical TB caches

2016-01-07 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Nov 24, 2015 at 06:09:14PM +0100, Lluís Vilanova wrote: > Commit message uses 'LATIN SMALL LETTER T WITH STROKE' (U+0167) instead > of regular 't' character :). Woops! Thanks :)

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Peter Maydell
On 10 November 2015 at 14:09, Kevin Wolf wrote: > From: Max Reitz > > Implement 'change' on block devices by calling blockdev-open-tray, > blockdev-remove-medium, blockdev-insert-medium (a variation of that > which does not need a node-name) and blockdev-close-tray. > > Signed-off-by: Max Reitz

Re: [Qemu-devel] [Qemu-arm] [PATCH] disas/libvixl: Update to upstream VIXL 1.12

2016-01-07 Thread Peter Maydell
On 14 December 2015 at 13:04, Peter Maydell wrote: > Update our copy of libvixl to upstream's 1.12 release. > The major benefit from QEMU's point of view is that some instructions > previously disassembled as "unimplemented (System)" are now displayed > as something more useful. It also fixes some

Re: [Qemu-devel] [PATCH 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-07 Thread Laurent Vivier
On 07/01/2016 12:32, Greg Kurz wrote: > When running a fully emulated device in cross-endian conditions, including > a virtio 1.0 device offered to a big endian guest, we need to fix the vnet > headers. This is currently handled by the virtio_net_hdr_swap() function > in the core virtio-net code

Re: [Qemu-devel] [PATCH 20/22] 9pfs: break out generic code from virtio-9p.{c, h}

2016-01-07 Thread Wei Liu
On Thu, Jan 07, 2016 at 05:47:30PM +, Wei Liu wrote: > On Thu, Jan 07, 2016 at 10:58:28PM +0530, Aneesh Kumar K.V wrote: > > Wei Liu writes: > > > > > On Thu, Jan 07, 2016 at 10:27:13PM +0530, Aneesh Kumar K.V wrote: > > >> Wei Liu writes: > > >> > > >> > The vast majority of code in virtio

Re: [Qemu-devel] [PATCH 08/13] block: Support meta dirty bitmap

2016-01-07 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > The added group of operations enables tracking of the changed bits in > the dirty bitmap. > > Signed-off-by: Fam Zheng > --- > block/dirty-bitmap.c | 51 > > include/block/dirty-bitmap.h | 9 +

Re: [Qemu-devel] [PATCH 09/13] block: Add two dirty bitmap getters

2016-01-07 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > For dirty bitmap users to get the size and the name of a > BdrvDirtyBitmap. > > Signed-off-by: Fam Zheng > --- > block/dirty-bitmap.c | 10 ++ > include/block/dirty-bitmap.h | 2 ++ > 2 files changed, 12 insertions(+) > > diff --git

Re: [Qemu-devel] [PATCH v2] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag()

2016-01-07 Thread Peter Maydell
On 31 December 2015 at 08:12, wrote: > From: Chen Gang > > mmap() size in mmap_frag() is qemu_host_page_size, but the outside calls > page_set_flags() may be not with qemu_host_page_size. So after mmap(), > call page_set_flags() in time. > > Also let addr increasing step be TARGET_PAGE_SIZE, jus

Re: [Qemu-devel] [PATCH 10/13] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-01-07 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > This makes sure we don't leak a dirty bitmap in any case. > > Signed-off-by: Fam Zheng > --- > block/dirty-bitmap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c > index 9cac794..60ee965 100644 >

Re: [Qemu-devel] [PATCH 3/6] virtio: drop the virtio_needs_swap() helper

2016-01-07 Thread Laurent Vivier
On 07/01/2016 12:32, Greg Kurz wrote: > It is not used anymore. > > Signed-off-by: Greg Kurz > --- > include/hw/virtio/virtio-access.h |9 - > 1 file changed, 9 deletions(-) > > diff --git a/include/hw/virtio/virtio-access.h > b/include/hw/virtio/virtio-access.h > index 8aec843c8

[Qemu-devel] [PATCH v2 08/27] 9pfs: merge hw/virtio/virtio-9p.h into hw/9pfs/virtio-9p.h

2016-01-07 Thread Wei Liu
The deleted file only contained V9fsConf which wasn't virtio specific. Merge that to the general header of 9pfs. Fixed header inclusions as I went along. Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p-device.c| 1 - hw/9pfs/virtio-9p.h | 8 +++- hw/virtio/virtio-pci.h|

[Qemu-devel] [PATCH v2 00/27] 9pfs: disentangling virtio and generic code

2016-01-07 Thread Wei Liu
Hi all Version 2 of this series is even longer. :-) Back in 2015 summer one of our OPW interns Linda Jacobson explored the possibility of making 9pfs work on Xen. It turned out lots of code in QEMU can be reused. This patch series can be found at: git://xenbits.xen.org/people/liuw/qemu.git wi

[Qemu-devel] [PATCH v2 09/27] 9pfs: remove dead code

2016-01-07 Thread Wei Liu
Some structures virtio-9p.h have been unused since 2011 when relevant functions switched to use coroutines. The declaration of pdu_packunpack and function do_pdu_unpack are useless. Signed-off-by: Wei Liu --- v2: don't delete set_fd_limit function --- hw/9pfs/virtio-9p.h | 68 --

[Qemu-devel] [PATCH v2 16/27] 9pfs: make pdu_{, un}marshal proper functions

2016-01-07 Thread Wei Liu
Factor out v9fs_iov_v{,un}marshal. Implement pdu_{,un}marshal with those functions. Signed-off-by: Wei Liu --- fsdev/9p-iov-marshal.c | 42 ++ fsdev/9p-iov-marshal.h | 5 + hw/9pfs/virtio-9p.c| 26 ++ hw/9pfs/virtio-9p.h

[Qemu-devel] [PATCH v2 10/27] fsdev: break out 9p-marshal.{c, h} from virtio-9p-marshal.{c, h}

2016-01-07 Thread Wei Liu
Break out some generic functions for marshaling 9p state. Pure code motion plus minor fixes for build system. Signed-off-by: Wei Liu --- v2: remove my name and email --- Makefile | 2 +- fsdev/9p-marshal.c| 56 +++ fsdev/9p-marshal.h|

[Qemu-devel] [PATCH v2 17/27] 9pfs: factor out virtio_pdu_{, un}marshal

2016-01-07 Thread Wei Liu
Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p-device.c | 14 ++ hw/9pfs/virtio-9p.c| 6 ++ hw/9pfs/virtio-9p.h| 5 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index f3091cc..d77247f

[Qemu-devel] [PATCH v2 11/27] fsdev: 9p-marshal: introduce V9fsBlob

2016-01-07 Thread Wei Liu
Introduce a concept of blob. It will be used to pack / unpack xattr value. With this change there is no need to expose v9fs_pack to device code anymore. Signed-off-by: Wei Liu --- fsdev/9p-marshal.c| 7 +++ fsdev/9p-marshal.h| 14 ++ fsdev/virtio-9p-marshal.c |

[Qemu-devel] [PATCH v2 23/27] 9pfs: move handle_9p_output and make it static function

2016-01-07 Thread Wei Liu
It's only used in virtio device. Signed-off-by: Wei Liu --- v2: new, part of original "9pfs: break out generic code from virtio-9p.{c,h}" --- hw/9pfs/virtio-9p-device.c | 34 ++ hw/9pfs/virtio-9p.c| 33 - hw/9pfs/virtio-

[Qemu-devel] [PATCH v2 24/27] 9pfs: rename virtio_9p_set_fd_limit to use v9fs_ prefix

2016-01-07 Thread Wei Liu
It's not virtio specific. Signed-off-by: Wei Liu --- v2: new, part of original "9pfs: break out generic code from virtio-9p.{c,h}" --- hw/9pfs/virtio-9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index e2c047c..50d7333 1006

[Qemu-devel] [PATCH v2 22/27] 9pfs: export pdu_{submit, alloc, free}

2016-01-07 Thread Wei Liu
They will be used in later patches. Signed-off-by: Wei Liu --- v2: new, part of original "9pfs: break out generic code from virtio-9p.{c,h}" --- hw/9pfs/9p.h| 3 +++ hw/9pfs/virtio-9p.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/

[Qemu-devel] [PATCH v2 19/27] 9pfs: break out virtio_init_iov_from_pdu

2016-01-07 Thread Wei Liu
Signed-off-by: Wei Liu --- hw/9pfs/virtio-9p-device.c | 12 hw/9pfs/virtio-9p.c| 8 +--- hw/9pfs/virtio-9p.h| 2 ++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index d77247f..5cad654 100

Re: [Qemu-devel] [PATCH 6/6] virtio: optimize virtio_access_is_big_endian() for little-endian targets

2016-01-07 Thread Laurent Vivier
On 07/01/2016 12:32, Greg Kurz wrote: > When adding cross-endian support, we introduced the TARGET_IS_BIENDIAN macro > and the virtio_access_is_big_endian() helper to have a branchless fast path > in the virtio memory accessors for targets that don't switch endian. > > This was considered as a s

Re: [Qemu-devel] [PATCH v4 00/11] simplify usage of tracepoints, and connect them to logging

2016-01-07 Thread Denis V. Lunev
On 01/07/2016 08:04 PM, Eric Blake wrote: On 01/07/2016 06:55 AM, Denis V. Lunev wrote: This series does three things: 1) add a "-trace [enable=]foo" option to enable one or more trace events, and a "-trace help" option to show the list of tracepoints (patches 4-5) 2) change the stderr tracing

Re: [Qemu-devel] [PATCH v1 2/6] kvm/x86: Hyper-V unify stimer_start() and stimer_restart()

2016-01-07 Thread Andrey Smetanin
On 01/07/2016 07:32 PM, Paolo Bonzini wrote: On 23/12/2015 12:28, Andrey Smetanin wrote: This will be used in future to start Hyper-V SynIC timer in several places by one logic in one function. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC

[Qemu-devel] [PATCH 1/2] hw/sd: Add medium insertion status

2016-01-07 Thread Max Reitz
Right now, the change_media_cb (sd_cardchange()) completely ignores its @load parameter. This means that issuing a blockdev-open-tray command will actually not have any effect. Fix this by keeping track of the medium insertion status in the SDState and updating it in sd_init() and sd_cardchange().

[Qemu-devel] [PATCH 2/2] hw/sd: Implement is_tray_open() BlockDevOp

2016-01-07 Thread Max Reitz
This makes the change HMP/QMP command on SD devices work again, after it has been broken in commit de2c6c0536c5c5ebb6e0ce7dcfd8fa9476edab52. Reported-by: Peter Maydell Cc: qemu-stable Signed-off-by: Max Reitz --- hw/sd/sd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/sd/sd.c

[Qemu-devel] [PATCH 0/2] hw/sd: Fix medium change

2016-01-07 Thread Max Reitz
Commit de2c6c0536c5c5ebb6e0ce7dcfd8fa9476edab52 broke changing mediums in SD drives; this series fixes that, and the fact that blockdev-open-tray did not do anything on SD drives so far. Max Reitz (2): hw/sd: Add medium insertion status hw/sd: Implement is_tray_open() BlockDevOp hw/sd/sd.c

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

2016-01-07 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > From: Vladimir Sementsov-Ogievskiy > > Functions to serialize / deserialize(restore) HBitmap. HBitmap should be > saved to linear sequence of bits independently of endianness and bitmap > array element (unsigned long) size. Therefore Little Endian is c

Re: [Qemu-devel] [PATCH 1/2] nbd: do not check request length except for reads and writes

2016-01-07 Thread Max Reitz
On 07.01.2016 14:44, Paolo Bonzini wrote: > Only reads and writes need to allocate memory correspondent to the > request length. Other requests can be sent to the storage without > allocating any memory, and thus any request length is acceptable. > > Reported-by: Sitsofe Wheeler > Cc: qemu-bl...

Re: [Qemu-devel] [PATCH 2/2] nbd: do not exit on failed memory allocation

2016-01-07 Thread Max Reitz
On 07.01.2016 14:44, Paolo Bonzini wrote: > The amount of memory allocated in nbd_co_receive_request is driven by the > NBD client (possibly a virtual machine). Parallel I/O can cause the > server to allocate a large amount of memory; check for failures and > return ENOMEM in that case. > > Signe

Re: [Qemu-devel] [PATCH 00/13] Dirty bitmap changes for migration/persistence work

2016-01-07 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > Two major features are added to block dirty bitmap (and underlying HBitmap) in > this series: meta bitmap and serialization, together with all other supportive > patches. > > Both operations are common in dirty bitmap migration and persistence: they >

Re: [Qemu-devel] [PATCH 1/2] hw/sd: Add medium insertion status

2016-01-07 Thread John Snow
On 01/07/2016 04:03 PM, Max Reitz wrote: > Right now, the change_media_cb (sd_cardchange()) completely ignores its > @load parameter. This means that issuing a blockdev-open-tray command > will actually not have any effect. > > Fix this by keeping track of the medium insertion status in the SDSt

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Peter Maydell
On 7 January 2016 at 20:14, Max Reitz wrote: > On 07.01.2016 20:56, Peter Maydell wrote: >> It looks like sd.c is the only one which implements a change_media_cb >> but no is_tray_open, but it would be nice if we could implement this >> in the default blk_dev_is_tray_open() method rather than in t

Re: [Qemu-devel] [PATCH 1/2] hw/sd: Add medium insertion status

2016-01-07 Thread Peter Maydell
On 7 January 2016 at 21:03, Max Reitz wrote: > Right now, the change_media_cb (sd_cardchange()) completely ignores its > @load parameter. This means that issuing a blockdev-open-tray command > will actually not have any effect. > > Fix this by keeping track of the medium insertion status in the SD

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Max Reitz
On 07.01.2016 22:42, Peter Maydell wrote: > On 7 January 2016 at 20:14, Max Reitz wrote: >> On 07.01.2016 20:56, Peter Maydell wrote: >>> It looks like sd.c is the only one which implements a change_media_cb >>> but no is_tray_open, but it would be nice if we could implement this >>> in the defaul

Re: [Qemu-devel] [PATCH 1/2] hw/sd: Add medium insertion status

2016-01-07 Thread Max Reitz
On 07.01.2016 22:45, Peter Maydell wrote: > On 7 January 2016 at 21:03, Max Reitz wrote: >> Right now, the change_media_cb (sd_cardchange()) completely ignores its >> @load parameter. This means that issuing a blockdev-open-tray command >> will actually not have any effect. >> >> Fix this by keepi

[Qemu-devel] [Bug 1531632] [NEW] Can't compile qemu because of errors in the Xen code

2016-01-07 Thread Leo
Public bug reported: I'm using Arch Linux, with all needed libs packages installed via ABS (compiled from source). I tried to clone the master repository, the v2.5.0 and the stable-2.4.0, all I had the same problems: First I have to disable -Werror, because it claims about some uninitialized va

Re: [Qemu-devel] [Xen-devel] [PATCH v4] igd-passthrough-i440FX: convert to realize()

2016-01-07 Thread Hao, Xudong
Sure. I'll test it soon. Thanks, -Xudong > -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: Wednesday, January 6, 2016 8:18 PM > To: Lars Kurth > Cc: Stefano Stabellini ; Hao, Xudong > ; Lars Kurth ; Cao jin > ; xen-de...@lists.xensource.com

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Peter Maydell
On 7 January 2016 at 21:57, Max Reitz wrote: > On 07.01.2016 22:42, Peter Maydell wrote: >> Well, previously sd.c didn't need to have any state for this >> to all work right (or indeed care about implementing a fake >> tray status for a device that doesn't have a tray), so it seems >> odd that we

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Max Reitz
On 07.01.2016 23:19, Peter Maydell wrote: > On 7 January 2016 at 21:57, Max Reitz wrote: >> On 07.01.2016 22:42, Peter Maydell wrote: >>> Well, previously sd.c didn't need to have any state for this >>> to all work right (or indeed care about implementing a fake >>> tray status for a device that d

[Qemu-devel] [PULL 00/21] Block layer patches

2016-01-07 Thread Max Reitz
Kevin is on PTO this week, so I am filling in for him. The following changes since commit a7e00e2536941a6e570b45b7ab4afec4505ff67e: petalogix-ml605: Set the MicroBlaze CPU version to 8.10.a (2016-01-07 14:57:26 +0100) are available in the git repository at: git://github.com/XanClic/qemu.g

[Qemu-devel] [PULL 01/21] iotests: 086: Add raw format

2016-01-07 Thread Max Reitz
From: Fam Zheng Raw is as qualified as qcow2 for this test case, add it for more coverage. Signed-off-by: Fam Zheng Message-id: 1450851979-15580-1-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/086 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[Qemu-devel] [PULL 02/21] qemu-iotests: make check-block.sh work on out-of-tree builds

2016-01-07 Thread Max Reitz
From: Paolo Bonzini Since check-block.sh, the "check" script has learnt to find the source path. On the other hand, it expects common.env to be in the build tree (both changes made in commit 76c7560, "configure: Enable out-of-tree iotests", 2014-05-24). So, it is wrong to invoke "check" from th

[Qemu-devel] [PULL 10/21] iotests: 034: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-7-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/034 | 6 +- tests/qemu-iotests/034.out | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/te

[Qemu-devel] [PULL 03/21] block: use drained section in bdrv_close

2016-01-07 Thread Max Reitz
From: Paolo Bonzini bdrv_close is used when ejecting a medium. Use a drained section to ensure that all I/O goes to either the old medium or the bitbucket. Signed-off-by: Paolo Bonzini Message-id: 1450867706-19860-2-git-send-email-pbonz...@redhat.com Signed-off-by: Max Reitz --- block.c | 4

[Qemu-devel] [PULL 06/21] iotests: 019: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-3-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/019 | 13 +++-- tests/qemu-iotests/019.out | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff

[Qemu-devel] [PULL 04/21] block/qapi: Clear err for further error

2016-01-07 Thread Max Reitz
From: Fam Zheng Since a5002d5 (block/qapi: allow best-effort query) we don't return at this error, however err must be cleared before passing to bdrv_query_snapshot_info_list below, as required by error API. Signed-off-by: Fam Zheng Message-id: 1450779107-26765-1-git-send-email-f...@redhat.com

[Qemu-devel] [PULL 14/21] iotests: 095: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1450752561-9300-11-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/095 | 6 ++ tests/qemu-iotests/095.out | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/095

[Qemu-devel] [PULL 05/21] iotests: 018: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-2-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/018 | 8 tests/qemu-iotests/018.out | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/

[Qemu-devel] [PULL 09/21] iotests: 028: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-6-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/028 | 5 - tests/qemu-iotests/028.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tes

[Qemu-devel] [PULL 07/21] iotests: 020: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-4-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/020 | 7 +-- tests/qemu-iotests/020.out | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/t

[Qemu-devel] [PULL 16/21] qemu-iotests: s390x: fix test 051

2016-01-07 Thread Max Reitz
From: Bo Tu Replace the remaining "-drive file..." by "-drive file=...,if=none,id=$device_id", then x86 and s390x can get the common output. "if=ide, if=floppy, if=scsi" are not supported by s390x, so these test cases are not executed for s390x platform. Signed-off-by: Bo Tu Message-id: 1451885

[Qemu-devel] [PULL 12/21] iotests: 038: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-9-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/038 | 5 - tests/qemu-iotests/038.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tes

[Qemu-devel] [PULL 11/21] iotests: 037: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-8-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/037 | 5 - tests/qemu-iotests/037.out | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tes

[Qemu-devel] [PULL 08/21] iotests: 024: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-5-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/024 | 10 -- tests/qemu-iotests/024.out | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff -

[Qemu-devel] [PULL 20/21] qmp: Add blockdev-mirror command

2016-01-07 Thread Max Reitz
From: Fam Zheng This will start a mirror job from a named device to another named device, its relation with drive-mirror is similar with blockdev-backup to drive-backup. In blockdev-mirror, the target node should be prepared by blockdev-add, which will be responsible for assigning a name to the

[Qemu-devel] [PULL 17/21] block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE

2016-01-07 Thread Max Reitz
From: Fam Zheng It's necessary to distinguish source and target before we can add blockdev-mirror, because we would want a concrete type of operation to check on target bs before starting. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450932306-13717-2-git-send-email-f...@redhat

[Qemu-devel] [PULL 13/21] iotests: 050: Use TEST_IMG override instead of "mv"

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-10-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/050 | 9 +++-- tests/qemu-iotests/050.out | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --gi

[Qemu-devel] [PULL 21/21] iotests: Add test cases for blockdev-mirror

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450932306-13717-6-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 100 ++--- tests/qemu-iotests/041.out | 4 +- 2 files changed, 79 i

[Qemu-devel] [PULL 15/21] iotests: 095: Filter _img_info output

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1450752561-9300-12-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/095 | 4 ++-- tests/qemu-iotests/095.out | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/095 b/te

[Qemu-devel] [PULL 19/21] block: Add check on mirror target

2016-01-07 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450932306-13717-4-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- blockdev.c| 3 +++ include/block/block.h | 1 + 2 files changed, 4 insertions(+) diff --git a/blockdev.c b/blockdev.c index 2

[Qemu-devel] [PATCH v8 34/35] fixup! qapi: Change visit_type_FOO() to no longer return partial objects

2016-01-07 Thread Eric Blake
[no change in commit message] --- v9: fix bug in use of errp v8: rebase to earlier changes v7: rebase to earlier changes, enhance commit message, also fix visit_type_str() and visit_type_any() v6: rebase on top of earlier doc and formatting improvements, mention that *obj can be uninitialized on e

[Qemu-devel] [PULL 18/21] block: Extract blockdev part of qmp_drive_mirror

2016-01-07 Thread Max Reitz
From: Fam Zheng This is the part that will be reused by blockdev-mirror. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450932306-13717-3-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- blockdev.c | 114 ++---

Re: [Qemu-devel] [PATCH v6 1/6] qdev: get_child_bus(): Use QOM lookup if available

2016-01-07 Thread Alistair Francis
On Wed, Jan 6, 2016 at 4:25 PM, Peter Crosthwaite wrote: > On Wed, Jan 6, 2016 at 4:18 PM, Alistair Francis > wrote: >> On Sat, Dec 19, 2015 at 9:43 PM, Peter Crosthwaite >> wrote: >>> qbus_realize() adds busses as a QOM child of the device in addition to >>> adding it to the qdev bus list. Chan

Re: [Qemu-devel] [PATCH 00/13] Dirty bitmap changes for migration/persistence work

2016-01-07 Thread Fam Zheng
On Thu, 01/07 16:32, John Snow wrote: > > > On 01/04/2016 05:27 AM, Fam Zheng wrote: > > Two major features are added to block dirty bitmap (and underlying HBitmap) > > in > > this series: meta bitmap and serialization, together with all other > > supportive > > patches. > > > > Both operation

Re: [Qemu-devel] [PATCH v1 00/15] data-driven device registers

2016-01-07 Thread Alistair Francis
On Wed, Dec 16, 2015 at 8:33 AM, Alistair Francis wrote: > On Tue, Dec 15, 2015 at 1:56 PM, Peter Maydell > wrote: >> On 15 December 2015 at 20:52, Peter Crosthwaite >> wrote: >>> It needs to exist before it can be used so there is a bit of a chicken >>> and egg problem there. No one seems to

Re: [Qemu-devel] [PATCH v2] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag()

2016-01-07 Thread Chen Gang
On 2016年01月08日 03:35, Peter Maydell wrote: > > Please don't do multiple things in a single patch. This patch > has all of: > * a fix for an unnecessary inefficiency > * a coding style change with no functional effects > * a bug fix > > Mixing them up together like this makes it harder to evalu

[Qemu-devel] [PATCH] linux-user/syscall.c: Add SO_RCVTIMEO and SO_SNDTIMEO for getsockopt

2016-01-07 Thread chengang
From: Chen Gang Just implement them according to the other features implementations. Signed-off-by: Chen Gang --- linux-user/syscall.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 12a6cd2..f2714

[Qemu-devel] [PATCH] linux-user: syscall: Add SO_LINGER for setsockopt

2016-01-07 Thread chengang
From: Chen Gang Just implement it according to the other features implementations. Signed-off-by: Chen Gang --- linux-user/syscall.c | 16 +++- linux-user/syscall_defs.h | 5 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-use

[Qemu-devel] [PATCH v6 02/15] qcow: Assign bs->file->bs to file in qcow_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow.c b/block/qcow.c index 558f443..b59383f 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -509,6 +509,7 @@ static int64_t coroutine_fn qco

[Qemu-devel] [PATCH v6 00/15] qemu-img map: Allow driver to return file of the allocated block

2016-01-07 Thread Fam Zheng
v6: Two more changes as suggested by Max: - Fix comments of BDRV_BLOCK_OFFSET_VALID and BDRV_BLOCK_DATA; - Really keep 102 working; - Add rev-by in patch 11. v5: Address Max's review comments: - "It's" -> "Its" in commit message in patch 1; - Retain the "bs->file" condition to

[Qemu-devel] [PATCH v6 04/15] raw: Assign bs to file in raw_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/raw-posix.c | 1 + block/raw_bsd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index 6fc0b71..344272f 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c

[Qemu-devel] [PATCH v6 05/15] iscsi: Assign bs to file in iscsi_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 2d1e230..8c7f1b3 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -625,6 +625,9 @@ out: if (iTask.task

[Qemu-devel] [PATCH v6 01/15] block: Add "file" output parameter to block status query functions

2016-01-07 Thread Fam Zheng
The added parameter can be used to return the BDS pointer which the valid offset is referring to. Its value should be ignored unless BDRV_BLOCK_OFFSET_VALID in ret is set. Until block drivers fill in the right value, let's clear it explicitly right before calling .bdrv_get_block_status. The "bs->

[Qemu-devel] [PATCH v6 03/15] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index 7096a29..da74eb7 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1348,6 +1348,7 @@ static int64_t coroutine_fn qcow2_co_get_block_st

[Qemu-devel] [PATCH v6 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-07 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/vmdk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index f5a56fd..59e1ffe 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1265,6 +1265,7 @@ static int64_t coroutine_fn vmdk_

[Qemu-devel] [PATCH v6 15/15] iotests: Add "qemu-img map" test for VMDK extents

2016-01-07 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- tests/qemu-iotests/059 | 10 ++ tests/qemu-iotests/059.out | 38 ++ 2 files changed, 48 insertions(+) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 i

[Qemu-devel] [PATCH v6 08/15] sheepdog: Assign bs to file in sd_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/sheepdog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index 0f6789e..d5e7ff8 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2740,6 +2740,9 @@ sd_co_get_block_status(BlockDriv

[Qemu-devel] [PATCH v6 06/15] parallels: Assign bs->file->bs to file in parallels_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index d83246b..129668b 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -273,6 +273,7 @@ static

[Qemu-devel] [PATCH v6 07/15] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qed.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/qed.c b/block/qed.c index a6bbd8b..03af9c1 100644 --- a/block/qed.c +++ b/block/qed.c @@ -692,6 +692,7 @@ typedef struct { uint64_t pos

[Qemu-devel] [PATCH v6 13/15] qemu-img: In "map", use the returned "file" from bdrv_get_block_status

2016-01-07 Thread Fam Zheng
Now all drivers should return a correct "file", we can make use of it, even with the recursion into backing chain above. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b

Re: [Qemu-devel] [PATCH 02/13] typedefs: Add BdrvDirtyBitmap and HBitmapIter

2016-01-07 Thread Fam Zheng
On Tue, 01/05 17:14, John Snow wrote: > > > On 01/04/2016 05:27 AM, Fam Zheng wrote: > > Following patches to refactor and move block dirty bitmap code could use > > this. > > > > Signed-off-by: Fam Zheng > > --- > > include/qemu/typedefs.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > >

[Qemu-devel] [PATCH v6 09/15] vdi: Assign bs->file->bs to file in vdi_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vdi.c b/block/vdi.c index 2199fd3..6b1a57b 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -550,6 +550,7 @@ static int64_t coroutine_fn vdi_co_get_block_status(BlockDriv

[Qemu-devel] [PATCH v6 10/15] vpc: Assign bs->file->bs to file in vpc_co_get_block_status

2016-01-07 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index 912f5d0..412ff41 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -588,6 +588,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDr

[Qemu-devel] [PATCH v6 12/15] block: Use returned *file in bdrv_co_get_block_status

2016-01-07 Thread Fam Zheng
Now that all drivers return the right "file" pointer, we can use it. Signed-off-by: Fam Zheng --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index c3bb7c5..1ca4e61 100644 --- a/block/io.c +++ b/block/io.c @@ -1550,13 +1550,13 @@ sta

[Qemu-devel] [PATCH v6 14/15] qemu-img: Make MapEntry a QAPI struct

2016-01-07 Thread Fam Zheng
The "flags" bit mask is expanded to two booleans, "data" and "zero"; "bs" is replaced with "filename" string. Refactor the merge conditions in img_map() into entry_mergeable(). Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- qapi/block-core.json | 27

Re: [Qemu-devel] [PATCH 1/4] target-ppc: add CPU IRQ state to PPC VMStateDescription

2016-01-07 Thread Alexey Kardashevskiy
On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: Commit a90db15 "target-ppc: Convert ppc cpu savevm to VMStateDescription" appears to drop the internal CPU IRQ state from the migration stream. Whilst testing migration on g3beige/mac99 machines, test images would randomly fail to resume unless a ke

Re: [Qemu-devel] [PATCH 2/4] target-ppc: use cpu_write_xer() helper in cpu_post_load

2016-01-07 Thread Alexey Kardashevskiy
On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: Otherwise some internal xer variables fail to get set post-migration. Signed-off-by: Mark Cave-Ayland --- target-ppc/machine.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/machine.c b/target-ppc/machine.c in

Re: [Qemu-devel] [PATCH 3/4] target-ppc: add CPU access_type into the migration stream

2016-01-07 Thread Alexey Kardashevskiy
On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: This is referenced in cpu_ppc_handle_mmu_fault() and so should be included in the migration stream. Signed-off-by: Mark Cave-Ayland --- target-ppc/machine.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/machi

Re: [Qemu-devel] [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration

2016-01-07 Thread Alexey Kardashevskiy
On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: During local testing with TCG, intermittent errors were found when trying to migrate Darwin OS images. The underlying cause was that Darwin resets the decrementer value to fairly small values on each interrupt. cpu_ppc_set_tb_clk() sets the default

Re: [Qemu-devel] [PULL v3 00/15] Tracing patches

2016-01-07 Thread Stefan Hajnoczi
On Mon, Dec 21, 2015 at 08:53:26AM +0300, Denis V. Lunev wrote: > On 11/13/2015 01:44 PM, Stefan Hajnoczi wrote: > >On Fri, Nov 13, 2015 at 6:30 PM, Peter Maydell > >wrote: > >>On 13 November 2015 at 07:58, Stefan Hajnoczi wrote: > >>>v3: > >>> * Include "exec/log.h" from translate-a64.c [Peter

<    1   2   3   >