[Qemu-devel] [PATCH] exec: Remove unnecessary RAM_FILE flag

2015-11-06 Thread Eduardo Habkost
The only code that sets RAMBlock.fd is file_ram_alloc(), and the only code that calls file_ram_alloc() sets the RAM_FILE flag. That means the flag is always set when RAMBlock.fd >= 0, and the munmap() call at reclaim_ramblock() is dead code that never runs. Signed-off-by: Eduardo Habkost --- exe

[Qemu-devel] [PATCH 1/2] exec: Eliminate qemu_ram_free_from_ptr()

2015-11-06 Thread Eduardo Habkost
Replace qemu_ram_free_from_ptr() with qemu_ram_free(). The only difference between qemu_ram_free_from_ptr() and qemu_ram_free() is that g_free_rcu() is used instead of call_rcu(reclaim_ramblock). We can safely replace it because: * RAM blocks allocated by qemu_ram_alloc_from_ptr() always have R

[Qemu-devel] [PATCH 0/2] memory: Eliminate qemu_ram_free_from_ptr() & memory_region_destructor_ram_from_ptr()

2015-11-06 Thread Eduardo Habkost
This series eliminates two functions that are not needed anymore: qemu_ram_free_from_ptr(), and memory_region_destructor_ram_from_ptr(). Eduardo Habkost (2): exec: Eliminate qemu_ram_free_from_ptr() memory: Eliminate memory_region_destructor_ram_from_ptr() exec.c | 19 --

[Qemu-devel] [PATCH 2/2] memory: Eliminate memory_region_destructor_ram_from_ptr()

2015-11-06 Thread Eduardo Habkost
The function is equivalent to memory_region_destructor_ram(), so it's not needed anymore. Signed-off-by: Eduardo Habkost --- memory.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/memory.c b/memory.c index 183eca5..57d7d33 100644 --- a/memory.c +++ b/memory.c @@ -859,

Re: [Qemu-devel] [PATCH 2.5 v5 0/11] dataplane snapshot fixes

2015-11-06 Thread Denis V. Lunev
On 11/06/2015 07:05 PM, Eric Blake wrote: On 11/06/2015 08:54 AM, Stefan Hajnoczi wrote: On Wed, Nov 04, 2015 at 08:19:31PM +0300, Denis V. Lunev wrote: with test while /bin/true ; do virsh snapshot-create rhel7 sleep 10 virsh snapshot-delete rhel7 --current

Re: [Qemu-devel] [PATCH] ppc: Add/Re-introduce MMU model definitions needed by PR KVM

2015-11-06 Thread Benjamin Herrenschmidt
On Fri, 2015-11-06 at 13:12 +0530, Bharata B Rao wrote: > Commit aa4bb5875231 (ppc: Add mmu_model defines for arch 2.03 and > 2.07) > removed the mmu_model definition POWERPC_MMU_2_06a which is needed by > PR KVM. Reintroduce it and also add POWERPC_MMU_2_07a. > > This fixes QEMU crash (qemu: fata

Re: [Qemu-devel] [Qemu-block] [PATCH v10 12/14] block: add transactional properties

2015-11-06 Thread John Snow
On 11/06/2015 01:46 PM, John Snow wrote: > > > On 11/06/2015 03:32 AM, Kevin Wolf wrote: >> Am 05.11.2015 um 19:52 hat John Snow geschrieben: >>> >>> >>> On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: > > > On 11/03/201

[Qemu-devel] [PULL 4/5] ahci: Add allwinner AHCI

2015-11-06 Thread John Snow
From: Peter Crosthwaite Add a Sysbus AHCI subclass for the Allwinner AHCI. It has a few extra vendor specific registers which are used for phy and power init. Signed-off-by: Peter Crosthwaite Reviewed-by: John Snow Message-id: 833b5b05ed5ade38bf69656679b0a7575e79492b.1445917756.git.crosthwait

[Qemu-devel] [PULL 3/5] ahci: split realize and init

2015-11-06 Thread John Snow
From: Peter Crosthwaite Do the init level tasks asap and the realize later (mainly when num_ports is available). This allows sub-class realize routines to work with the device post-init. Signed-off-by: Peter Crosthwaite Reviewed-by: John Snow Message-id: 1a7c7b2b32e5ccf49373a5065da5ece89730d3

[Qemu-devel] [PULL 1/5] ide: remove hardcoded 2GiB transactional limit

2015-11-06 Thread John Snow
Not that you can request a >2GiB transaction, but that's why checking for it makes no sense anymore. With the newer 'limit' parameter to prepare_buf, we no longer need a static limit. The maximum limit is still 2GiB, but the limit parameter is set to the current transaction size, which cannot surp

[Qemu-devel] [PULL 2/5] ahci: Add some MMIO debug printfs

2015-11-06 Thread John Snow
From: Peter Crosthwaite These are useful for bringup of AHCI. Signed-off-by: Peter Crosthwaite Reviewed-by: John Snow Message-id: 517ba413dce7deb4ab17c0cc1e8bbdaaace2a0db.1445917756.git.crosthwaite.pe...@gmail.com Signed-off-by: John Snow --- hw/ide/ahci.c | 21 +++-- 1 file

[Qemu-devel] [PULL 0/5] Ide patches

2015-11-06 Thread John Snow
The following changes since commit 4b59f39bc9a03afcc74b2fa28da7c3189fca507c: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-11-06' into staging (2015-11-06 12:50:24 +) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-req

[Qemu-devel] [PULL 5/5] arm: allwinner-a10: Add SATA

2015-11-06 Thread John Snow
From: Peter Crosthwaite Add the Allwinner A10 AHCI controller module to the SoC. Signed-off-by: Peter Crosthwaite Reviewed-by: John Snow Message-id: 69d6962f2d14a218bd07e9ac4ccd1947737cc30f.1445917756.git.crosthwaite.pe...@gmail.com Signed-off-by: John Snow --- hw/arm/allwinner-a10.c

Re: [Qemu-devel] [PATCH v4 0/3] qemu-io: clean up cvtnum usage

2015-11-06 Thread John Snow
On 11/06/2015 04:46 AM, Kevin Wolf wrote: > Am 06.11.2015 um 00:53 hat John Snow geschrieben: >> cvtnum returns an int64_t, not an int, so correct the lvalue types >> wherever it is used. While we're at it, make the error messages more >> meaningful and hopefully less confusing. >> >> v4: >> - N

Re: [Qemu-devel] [Qemu-block] [PATCH v6 03/15] block: Release dirty bitmaps in bdrv_close()

2015-11-06 Thread John Snow
On 11/04/2015 01:57 PM, Max Reitz wrote: > bdrv_delete() is not very happy about deleting BlockDriverStates with > dirty bitmaps still attached to them. In the past, we got around that > very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and > bdrv_close() simply ignoring that co

Re: [Qemu-devel] [PATCH COLO-Frame v10 12/38] COLO: Save PVM state to secondary side when do checkpoint

2015-11-06 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > The main process of checkpoint is to synchronize SVM with PVM. > VM's state includes ram and device state. So we will migrate PVM's > state to SVM when do checkpoint, just like migration does. > > We will cache PVM's state in slave, we use

Re: [Qemu-devel] [Qemu-block] [PATCH v10 12/14] block: add transactional properties

2015-11-06 Thread John Snow
On 11/06/2015 03:32 AM, Kevin Wolf wrote: > Am 05.11.2015 um 19:52 hat John Snow geschrieben: >> >> >> On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: >>> On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote: > On Fri, Oct 23,

Re: [Qemu-devel] [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-06 Thread Max Reitz
On 06.11.2015 11:22, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily too, for both bdrv_aio_write_zeroes and bdrv_aio_discard > branches. > > Reorganize mirror_iteration flow so

Re: [Qemu-devel] [PATCH COLO-Frame v10 11/38] QEMUSizedBuffer: Introduce two help functions for qsb

2015-11-06 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Introduce two new QEMUSizedBuffer APIs which will be used by COLO to buffer > VM state: > One is qsb_put_buffer(), which put the content of a given QEMUSizedBuffer > into QEMUFile, this is used to send buffered VM state to secondary. > Anoth

Re: [Qemu-devel] [PATCH COLO-Frame v10 10/38] COLO: Add a new RunState RUN_STATE_COLO

2015-11-06 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Guest will enter this state when paused to save/restore VM state > under colo checkpoint. Reviewed-by: Dr. David Alan Gilbert > > Cc: Eric Blake > Cc: Markus Armbruster > Signed-off-by: zhanghailiang > Signed-off-by: Li Zhijian > Sig

Re: [Qemu-devel] [PATCH COLO-Frame v10 09/38] COLO: Implement colo checkpoint protocol

2015-11-06 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We need communications protocol of user-defined to control the checkpoint > process. > > The new checkpoint request is started by Primary VM, and the interactive > process > like below: > Checkpoint synchronizing points, > >

Re: [Qemu-devel] [PULL 0/7] Block patches

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 17:52, Stefan Hajnoczi wrote: > The following changes since commit 4b59f39bc9a03afcc74b2fa28da7c3189fca507c: > > Merge remote-tracking branch > 'remotes/mjt/tags/pull-trivial-patches-2015-11-06' into staging (2015-11-06 > 12:50:24 +) > > are available in the git repos

[Qemu-devel] [PATCH] Revert "vhost-net: tell tap backend about the vnet endianness"

2015-11-06 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now configured by the core virtio-net code. We simply fall back on full emulation if the net backend cannot support the requested endianness for vnet headers. Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 33 +-

[Qemu-devel] [PULL 6/7] monitor: add missed aio_context_acquire into vm_completion call

2015-11-06 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Kevin Wolf CC: Luiz Capitulino CC: Markus Armbruster Signed-off-by: Stefan Hajnoczi --- monitor.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index 6cd747f

[Qemu-devel] [PULL 4/7] aio: Introduce aio_context_setup

2015-11-06 Thread Stefan Hajnoczi
From: Fam Zheng This is the place to initialize platform specific bits of AioContext. Signed-off-by: Fam Zheng Message-id: 1446177989-6702-3-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 4 aio-win32.c | 4 async.c | 13

[Qemu-devel] [PULL 3/7] aio: Introduce aio_external_disabled

2015-11-06 Thread Stefan Hajnoczi
From: Fam Zheng This allows AioContext users to check the enable/disable state of external clients. Signed-off-by: Fam Zheng Message-id: 1446177989-6702-2-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- include/block/aio.h | 11 +++ 1 file changed, 11 insertions(+)

[Qemu-devel] [PULL 2/7] dataplane: support non-contigious s/g

2015-11-06 Thread Stefan Hajnoczi
From: "Michael S. Tsirkin" bring_map currently fails if one of the entries it's mapping is contigious in GPA but not HVA address space. Introduce a mapped_len parameter so it can handle this, returning the actual mapped length. This will still fail if there's no space left in the sg, but luckil

[Qemu-devel] [PULL 7/7] blockdev: acquire AioContext in hmp_commit()

2015-11-06 Thread Stefan Hajnoczi
This one slipped through. Although we acquire AioContext when committing all devices we don't for just a single device. AioContext must be acquired before calling bdrv_*() functions to synchronize access with other threads that may be using the AioContext. Signed-off-by: Stefan Hajnoczi Signed-

[Qemu-devel] [PULL 5/7] aio: Introduce aio-epoll.c

2015-11-06 Thread Stefan Hajnoczi
From: Fam Zheng To minimize code duplication, epoll is hooked into aio-posix's aio_poll() instead of rolling its own. This approach also has both compile-time and run-time switchability. 1) When QEMU starts with a small number of fds in the event loop, ppoll is used. 2) When QEMU starts with a

[Qemu-devel] [PULL 0/7] Block patches

2015-11-06 Thread Stefan Hajnoczi
The following changes since commit 4b59f39bc9a03afcc74b2fa28da7c3189fca507c: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-11-06' into staging (2015-11-06 12:50:24 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-r

[Qemu-devel] [PULL 1/7] dataplane: simplify indirect descriptor read

2015-11-06 Thread Stefan Hajnoczi
From: "Michael S. Tsirkin" Use address_space_read to make sure we handle the case of an indirect descriptor crossing DIMM boundary correctly. Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Tested-by: Igor Mammedov Message-id: 1446047243-3221-1-git-send-email-...@redhat.com Sig

Re: [Qemu-devel] anybody using MMIO tracing?

2015-11-06 Thread Hollis Blanchard
On 11/06/2015 03:15 AM, Peter Maydell wrote: On 6 November 2015 at 11:12, Stefan Hajnoczi wrote: On Mon, Nov 02, 2015 at 09:18:03AM -0800, Hollis Blanchard wrote: I'm trying to use the memory_region_ops_read/write tracepoints. They produce output like this: memory_region_ops_write 0.000 p

[Qemu-devel] [PATCH] virtio-net: use the backend cross-endian capabilities

2015-11-06 Thread Greg Kurz
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 but it should actually be handled by the net bac

Re: [Qemu-devel] [PATCH 2.5 v5 0/11] dataplane snapshot fixes

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 6, 2015 at 4:19 PM, Denis V. Lunev wrote: > On 11/06/2015 07:05 PM, Eric Blake wrote: >> >> On 11/06/2015 08:54 AM, Stefan Hajnoczi wrote: >>> >>> On Wed, Nov 04, 2015 at 08:19:31PM +0300, Denis V. Lunev wrote: with test while /bin/true ; do virsh snap

Re: [Qemu-devel] [PATCH COLO-Frame v10 06/38] migration: Integrate COLO checkpoint process into loadvm

2015-11-06 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Switch from normal migration loadvm process into COLO checkpoint process if > COLO mode is enabled. > We add three new members to struct MigrationIncomingState, > 'have_colo_incoming_thread' > and 'colo_incoming_thread' record the colo rela

[Qemu-devel] [PATCH] fixup! qapi: Simplify error cleanup in test-qmp-*

2015-11-06 Thread Eric Blake
[As part of the fixup, replace the old commit message with this] We have several tests that perform multiple sub-actions that are expected to fail. Asserting that an error occurred, then clearing it up to prepare for the next action, turned into enough boilerplate that it was sometimes forgotten

Re: [Qemu-devel] [PATCH COLO-Frame v10 05/38] migration: Integrate COLO checkpoint process into migration

2015-11-06 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state > after the first live migration successfully finished. > > We reuse migration thread, so if colo is enabled by user, migration thread > will > go into the process of c

Re: [Qemu-devel] virtio-gpu doesn't build if you do a linux-headers update from kvm/next

2015-11-06 Thread Peter Maydell
On 5 November 2015 at 17:15, Laszlo Ersek wrote: > --*-- > > I think we had the same discussion when Wei was working on SMBIOS 3.0 > for ARM. In > , > you asked > > "Is support for this all in the mainline kernel yet?" > > I di

Re: [Qemu-devel] [Qemu-block] [PATCH v10 12/14] block: add transactional properties

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 06, 2015 at 09:32:19AM +0100, Kevin Wolf wrote: > Am 05.11.2015 um 19:52 hat John Snow geschrieben: > > > > > > On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: > > > On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: > > >> > > >> > > >> On 11/03/2015 10:17 AM, Stefan Hajnoczi

Re: [Qemu-devel] [PATCH COLO-Frame v10 03/38] COLO: migrate colo related info to secondary node

2015-11-06 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We can know if VM in destination should go into COLO mode by refer to > the info that been migrated from PVM. > > We skip this section if colo is not enabled (i.e. > migrate_set_capability colo off), so that, It not break compatibility with

Re: [Qemu-devel] virtio-gpu doesn't build if you do a linux-headers update from kvm/next

2015-11-06 Thread Alex Bennée
Laszlo Ersek writes: > On 11/05/15 16:11, Peter Maydell wrote: >> On 5 November 2015 at 14:58, Gerd Hoffmann wrote: >>> On Do, 2015-11-05 at 14:45 +, Peter Maydell wrote: On 5 November 2015 at 14:42, Gerd Hoffmann wrote: > Chicken & egg issue in that case because airlied (linux ke

Re: [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations

2015-11-06 Thread Paolo Bonzini
On 06/11/2015 09:36, Pierre Morel wrote: > The calculation are not broken and it works for actual usage Thanks for confirming. > For me, it is the design that is broken, as it uses an integer to represent > something that is fundamentally unsigned like the size of a memory area. But it uses a

Re: [Qemu-devel] [PATCH v10 07/30] qapi: Simplify error cleanup in test-qmp-*

2015-11-06 Thread Eric Blake
On 11/06/2015 09:23 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 11/06/2015 08:40 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> By moving err into data, we can let test teardown take care of cleaning up any collected error; it also gives us fewer lines of co

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix, avoid undefined behavior

2015-11-06 Thread Mark Cave-Ayland
On 06/11/15 15:50, Paolo Bonzini wrote: > This is reported by Coverity. The algorithm description at > ftp://ftp.icm.edu.pl/packages/ggi/doc/hw/sparc/Sparc.pdf suggests > that the 32-bit parts of rs2, after the left shift, is treated > as a 64-bit integer. Bits 32 and above are used to do the >

Re: [Qemu-devel] [PATCH v10 06/30] qapi: Simplify non-error testing in test-qmp-*

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > On 11/06/2015 08:36 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> By using &error_abort, we can avoid a local err variable in >>> situations where we expect success. It also has the nice >>> effect that if the test breaks, the error message from >>> error_abort

Re: [Qemu-devel] [PATCH v10 07/30] qapi: Simplify error cleanup in test-qmp-*

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > On 11/06/2015 08:40 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> By moving err into data, we can let test teardown take care >>> of cleaning up any collected error; it also gives us fewer >>> lines of code between repeated tests where init runs teardown >>> on

Re: [Qemu-devel] Minutes of QEMU Summit 2015 (2015-08-18, Seattle)

2015-11-06 Thread Peter Maydell
On 6 September 2015 at 07:05, Stefan Weil wrote: > Part of that infrastructure is the FSF savannah server. > The FSF infrastructure is still used for our mailing lists. > > http://savannah.nongnu.org/projects/qemu/ needs > someone who updates the summary. There should be > a link to the official w

Re: [Qemu-devel] [PATCH 2.5 v5 0/11] dataplane snapshot fixes

2015-11-06 Thread Denis V. Lunev
On 11/06/2015 07:05 PM, Eric Blake wrote: On 11/06/2015 08:54 AM, Stefan Hajnoczi wrote: On Wed, Nov 04, 2015 at 08:19:31PM +0300, Denis V. Lunev wrote: with test while /bin/true ; do virsh snapshot-create rhel7 sleep 10 virsh snapshot-delete rhel7 --current

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix, avoid undefined behavior

2015-11-06 Thread Richard Henderson
On 11/06/2015 04:50 PM, Paolo Bonzini wrote: This is reported by Coverity. The algorithm description at ftp://ftp.icm.edu.pl/packages/ggi/doc/hw/sparc/Sparc.pdf suggests that the 32-bit parts of rs2, after the left shift, is treated as a 64-bit integer. Bits 32 and above are used to do the sat

Re: [Qemu-devel] [PATCH v10 00/30] qapi member collision (post-introspection cleanups, subset C')

2015-11-06 Thread Eric Blake
On 11/06/2015 09:03 AM, Markus Armbruster wrote: > Eric Blake writes: > >> No pending prerequisites; based on qemu.git master >> >> Also available as a tag at this location: >> git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv9c Make that the qapi-cleanupv10c label. >> >> and will soon be

Re: [Qemu-devel] [PATCH 2.5 v5 0/11] dataplane snapshot fixes

2015-11-06 Thread Eric Blake
On 11/06/2015 08:54 AM, Stefan Hajnoczi wrote: > On Wed, Nov 04, 2015 at 08:19:31PM +0300, Denis V. Lunev wrote: >> with test >> while /bin/true ; do >> virsh snapshot-create rhel7 >> sleep 10 >> virsh snapshot-delete rhel7 --current >> done >> with enabled iothreads

Re: [Qemu-devel] [PATCH v10 00/30] qapi member collision (post-introspection cleanups, subset C')

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > No pending prerequisites; based on qemu.git master > > Also available as a tag at this location: > git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv9c > > and will soon be part of my branch with the rest of the v5 series, at: > http://repo.or.cz/qemu/ericb.git/shortlog/

Re: [Qemu-devel] [PATCH v10 07/30] qapi: Simplify error cleanup in test-qmp-*

2015-11-06 Thread Eric Blake
On 11/06/2015 08:40 AM, Markus Armbruster wrote: > Eric Blake writes: > >> By moving err into data, we can let test teardown take care >> of cleaning up any collected error; it also gives us fewer >> lines of code between repeated tests where init runs teardown >> on our behalf. > > I think this

Re: [Qemu-devel] [PATCH 2.5 v5 0/11] dataplane snapshot fixes

2015-11-06 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 08:19:31PM +0300, Denis V. Lunev wrote: > with test > while /bin/true ; do > virsh snapshot-create rhel7 > sleep 10 > virsh snapshot-delete rhel7 --current > done > with enabled iothreads on a running VM leads to a lot of troubles: hangs, > as

Re: [Qemu-devel] [PATCH v10 06/30] qapi: Simplify non-error testing in test-qmp-*

2015-11-06 Thread Eric Blake
On 11/06/2015 08:36 AM, Markus Armbruster wrote: > Eric Blake writes: > >> By using &error_abort, we can avoid a local err variable in >> situations where we expect success. It also has the nice >> effect that if the test breaks, the error message from >> error_abort tends to be nicer than that

Re: [Qemu-devel] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-06 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: > lseek can not work for all block devices as the man page says: > | Some devices are incapable of seeking and POSIX does not specify > | which devices must support lseek(). > > This patch tries to add the support on Linux by using BL

Re: [Qemu-devel] [PATCH v10 12/30] qapi-introspect: Document lack of sorting

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > qapi-code-gen.txt already claims that types, commands, and > events share a common namespace; set this in stone by further > documenting that our introspection output will never have > collisions with the same name tied to more than one meta-type. > > Our largest QMP enum cur

[Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix, avoid undefined behavior

2015-11-06 Thread Paolo Bonzini
This is reported by Coverity. The algorithm description at ftp://ftp.icm.edu.pl/packages/ggi/doc/hw/sparc/Sparc.pdf suggests that the 32-bit parts of rs2, after the left shift, is treated as a 64-bit integer. Bits 32 and above are used to do the saturating truncation. Use a cast to unsigned in o

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-06 Thread Eduardo Habkost
As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: > It is used to get the size of the specified file, also qemu_fd_getlength() > is introduced to unify the code with raw_getl

Re: [Qemu-devel] [PATCH v10 05/30] qapi: Plug leaks in test-qmp-*

2015-11-06 Thread Eric Blake
On 11/06/2015 08:21 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Make valgrind happy with the current state of the tests, so that >> it is easier to see if future patches introduce new memory problems >> without being drowned in noise. Many of the leaks were due to >> calling a second

Re: [Qemu-devel] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-06 Thread Eduardo Habkost
As this patch affects raw_getlength(), CCing the raw block driver maintainer and the qemu-block mailing list. On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote: > lseek can not work for all block devices as the man page says: > | Some devices are incapable of seeking and POSIX does no

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-06 Thread Dr. David Alan Gilbert
* Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: > > Where we have iterable, but non-postcopiable devices (e.g. htab > > or block migration), complete them before forming the 'package' > > but with the CPUs stopped. This stops them filling up the package. > > That helps and the migration suce

Re: [Qemu-devel] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-06 Thread Eduardo Habkost
On Tue, Nov 03, 2015 at 12:21:30AM +0800, Xiao Guangrong wrote: > On 11/03/2015 12:11 AM, Vladimir Sementsov-Ogievskiy wrote: > >On 02.11.2015 12:13, Xiao Guangrong wrote: > >>lseek can not work for all block devices as the man page says: > >>| Some devices are incapable of seeking and POSIX does n

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-06 Thread Paolo Bonzini
On 06/11/2015 16:33, Mark Cave-Ayland wrote: >>> >> >>> /* Ugly code */ >>> int64_t scaled = (uint64_t)(int64_t)src << scale; >>> >> >>> >> You mean >>> >> >>> >> int64_t scaled = (int64_t)((uint64_t)src << scale); >> > >> > No, that also looks like a typo. >> > >> > I mean:

Re: [Qemu-devel] [PATCH v10 07/30] qapi: Simplify error cleanup in test-qmp-*

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > By moving err into data, we can let test teardown take care > of cleaning up any collected error; it also gives us fewer > lines of code between repeated tests where init runs teardown > on our behalf. I think this paragraph is no longer valid: you aren't moving err anywhere

[Qemu-devel] Executed instruction count on host for translated code

2015-11-06 Thread Ayaz Akram
Hello, all ! I want to find out the number of executed translated instructions on the host system, for certain user mode programs. For that purpose, I am using hardware performance counters. I start them right before calling function tcg_qemu_tb_exec ( ), and stop them when function is returned. T

Re: [Qemu-devel] [PATCH 2/3] blockdev: acquire AioContext in hmp_commit()

2015-11-06 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 08:27:23PM +0300, Denis V. Lunev wrote: > From: Stefan Hajnoczi > > This one slipped through. Although we acquire AioContext when > committing all devices we don't for just a single device. > > AioContext must be acquired before calling bdrv_*() functions to > synchroniz

Re: [Qemu-devel] [PATCH 11/11] monitor: add missed aio_context_acquire into vm_completion call

2015-11-06 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 08:19:42PM +0300, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Kevin Wolf > CC: Luiz Capitulino > CC: Markus Armbruster > --- > monitor.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) Thanks, applied this patc

Re: [Qemu-devel] [PATCH v10 06/30] qapi: Simplify non-error testing in test-qmp-*

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > By using &error_abort, we can avoid a local err variable in > situations where we expect success. It also has the nice > effect that if the test breaks, the error message from > error_abort tends to be nicer than that of g_assert(). > > Signed-off-by: Eric Blake [Boring mec

Re: [Qemu-devel] [PATCH 09/11] migration: add missed aio_context_acquire for state writing/reading

2015-11-06 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 08:19:40PM +0300, Denis V. Lunev wrote: > aio_context should be locked in the similar way as was done in QMP > snapshot creation in the other case there are a lot of possible > troubles if native AIO mode is enabled for disk. > > qemu_fopen_bdrv and bdrv_fclose are used in

Re: [Qemu-devel] [PATCH v7 07/35] util: introduce qemu_file_get_page_size()

2015-11-06 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:09PM +0800, Xiao Guangrong wrote: > There are three places use the some logic to get the page size on > the file path or file fd > > Windows did not support file hugepage, so it will return normal page > for this case. And this interface has not been used on windows s

Re: [Qemu-devel] [PATCH v2 2/2] net: netmap: use error_setg_errno() in place of error_report()

2015-11-06 Thread Eric Blake
On 11/06/2015 08:13 AM, Vincenzo Maffione wrote: > This update was required to align error reporting of netmap backend > initialization to the modifications introduced by commit a30ecde. > > Signed-off-by: Vincenzo Maffione > --- > net/clients.h | 4 ++-- > net/netmap.c | 32 --

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-06 Thread Mark Cave-Ayland
On 05/11/15 09:25, Paolo Bonzini wrote: > On 05/11/2015 10:20, Richard Henderson wrote: >> >>> /* Ugly code */ >>> int64_t scaled = (uint64_t)(int64_t)src << scale; >> >> You mean >> >> int64_t scaled = (int64_t)((uint64_t)src << scale); > > No, that also looks like a typo. > > I mean:

[Qemu-devel] [PATCH] gt64xxx: fix decoding of ISD register

2015-11-06 Thread Paolo Bonzini
The GT64xxx's internal registers can be placed above the first 4 GiB in the address space, but not above the first 64 GiB. Correctly cast the register to a 64-bit integer, and mask away bits above bit 35. Datasheet at http://pdf.datasheetarchive.com/datasheetsmain/Datasheets-33/DSA-655889.pdf (b

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-06 Thread Bharata B Rao
On Fri, Nov 06, 2015 at 01:43:42PM +, Dr. David Alan Gilbert wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > * Bharata B Rao (bharata@gmail.com) wrote: > > > On Fri, Nov 6, 2015 at 2:39 PM, Dr. David Alan Gilbert > > > wrote: > > > > * Bharata B Rao (bhar...@linux.vnet.i

Re: [Qemu-devel] [PATCH v2 1/2] net: netmap: Fix compilation issue

2015-11-06 Thread Eric Blake
On 11/06/2015 08:13 AM, Vincenzo Maffione wrote: > Reorganization of struct NetClientOptions (commit e4ba22b) caused a > compilation failure of the netmap backend. This patch fixes the issue > by properly accessing the union field. Technically, it was 8d0bcba that missed converting net/netmap.c al

[Qemu-devel] [PATCH v9 11/15] qmp: Introduce blockdev-change-medium

2015-11-06 Thread Max Reitz
Introduce a new QMP command 'blockdev-change-medium' which is intended to replace the 'change' command for block devices. The existing function qmp_change_blockdev() is accordingly renamed to qmp_blockdev_change_medium(). Signed-off-by: Max Reitz --- blockdev.c| 7 --- inclu

[Qemu-devel] [PATCH v9 00/15] blockdev: BlockBackend and media

2015-11-06 Thread Max Reitz
Patch 11 of the last series broke the OS X build due to ui/cocoa.m directly referencing qmp_change_blockdev() (which was an internal function not directly mapped to any QMP command before, now it becomes an "external" function and is renamed qmp_blockdev_change_medium()). This v9 consists only of t

Re: [Qemu-devel] [PATCH 08/11] migration: implement bdrv_all_find_vmstate_bs and bdrv_unlock helpers

2015-11-06 Thread Denis V. Lunev
On 11/06/2015 06:18 PM, Stefan Hajnoczi wrote: On Wed, Nov 04, 2015 at 08:19:39PM +0300, Denis V. Lunev wrote: +BlockDriverState *bdrv_all_find_vmstate_bs(void) +{ +BlockDriverState *bs = NULL; + +while ((bs = bdrv_next(bs))) { +AioContext *ctx = bdrv_get_aio_context(bs); + +

Re: [Qemu-devel] [PATCH v10 05/30] qapi: Plug leaks in test-qmp-*

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > Make valgrind happy with the current state of the tests, so that > it is easier to see if future patches introduce new memory problems > without being drowned in noise. Many of the leaks were due to > calling a second init without tearing down the data from an earlier > visi

Re: [Qemu-devel] [PATCH 08/11] migration: implement bdrv_all_find_vmstate_bs and bdrv_unlock helpers

2015-11-06 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 08:19:39PM +0300, Denis V. Lunev wrote: > +BlockDriverState *bdrv_all_find_vmstate_bs(void) > +{ > +BlockDriverState *bs = NULL; > + > +while ((bs = bdrv_next(bs))) { > +AioContext *ctx = bdrv_get_aio_context(bs); > + > +aio_context_acquire(ctx); > +

Re: [Qemu-devel] [PATCH v10 04/30] qapi: Share test_init code in test-qmp-input*

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > Rather than duplicate the body of two functions just to > decide between qobject_from_jsonv() and qobject_from_json(), > exploit the fact that qobject_from_jsonv() intentionally > takes 'va_list *' instead of the more common 'va_list', and > that qobject_from_json() just call

Re: [Qemu-devel] [PATCH v3 3/3] target-i386: load the migrated vcpu's TSC rate

2015-11-06 Thread Eduardo Habkost
On Fri, Nov 06, 2015 at 10:32:44AM +0800, Haozhong Zhang wrote: > On 11/05/15 14:10, Eduardo Habkost wrote: > > On Mon, Nov 02, 2015 at 05:26:43PM +0800, Haozhong Zhang wrote: > > > Set vcpu's TSC rate to the migrated value if the user does not specify a > > > TSC rate by cpu option 'tsc-freq' and

[Qemu-devel] [PATCH v2 2/2] net: netmap: use error_setg_errno() in place of error_report()

2015-11-06 Thread Vincenzo Maffione
This update was required to align error reporting of netmap backend initialization to the modifications introduced by commit a30ecde. Signed-off-by: Vincenzo Maffione --- net/clients.h | 4 ++-- net/netmap.c | 32 2 files changed, 18 insertions(+), 18 deletions

[Qemu-devel] [PATCH v2 0/2] Fix compilation of netmap backend

2015-11-06 Thread Vincenzo Maffione
This patch series adds some fixes to the netmap net backend. It contains two changes: (1) Fix compilation issue of netmap.c introduced by the reorganization of struct NetClientOptions (2) Address the FIXME comment that was asking to use error_setg() in place of error_report(

[Qemu-devel] [PATCH v2 1/2] net: netmap: Fix compilation issue

2015-11-06 Thread Vincenzo Maffione
Reorganization of struct NetClientOptions (commit e4ba22b) caused a compilation failure of the netmap backend. This patch fixes the issue by properly accessing the union field. Signed-off-by: Vincenzo Maffione --- net/netmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/n

Re: [Qemu-devel] [PATCH v3 2/3] target-i386: calculate vcpu's TSC rate to be migrated

2015-11-06 Thread Eduardo Habkost
On Fri, Nov 06, 2015 at 10:32:24AM +0800, haozhong.zh...@intel.com wrote: > On 11/05/15 14:05, Eduardo Habkost wrote: > > On Thu, Nov 05, 2015 at 09:30:51AM +0800, Haozhong Zhang wrote: > > > On 11/04/15 19:42, Eduardo Habkost wrote: [...] > > > > > +env->tsc_khz_saved = r; > > > > > +}

Re: [Qemu-devel] [PULL 00/37] Block layer patches

2015-11-06 Thread Max Reitz
On 06.11.2015 09:17, Kevin Wolf wrote: > Am 05.11.2015 um 20:01 hat Peter Maydell geschrieben: >> On 5 November 2015 at 18:17, Kevin Wolf wrote: >>> The following changes since commit 8835b9df3bddf332c883c861d6a1defc12c4ebe9: >>> >>> Merge remote-tracking branch >>> 'remotes/mdroth/tags/qga-pul

Re: [Qemu-devel] [PATCH 1/3] block: add missed aio_context_acquire around bdrv_set_aio_context

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 6, 2015 at 2:51 PM, Denis V. Lunev wrote: > On 11/06/2015 05:44 PM, Stefan Hajnoczi wrote: >> >> On Fri, Nov 6, 2015 at 2:09 PM, Denis V. Lunev wrote: >>> >>> On 11/06/2015 04:35 PM, Stefan Hajnoczi wrote: On Wed, Nov 04, 2015 at 08:27:22PM +0300, Denis V. Lunev wrote: >

Re: [Qemu-devel] [PATCH Trivial V2] hw/intc/arm_gic: Remove the definition of NUM_CPU

2015-11-06 Thread Peter Maydell
On 5 November 2015 at 17:24, Wei Huang wrote: > arm_gic.c retrieves CPU number using either NUM_CPU(s) or s->num_cpu. > Such mixed-uses make source code inconsistent. This patch removes > NUM_CPU(s), which was defined for MPCore tweak long ago, and instead > favors s->num_cpu. The source is more c

Re: [Qemu-devel] [PATCH 1/3] block: add missed aio_context_acquire around bdrv_set_aio_context

2015-11-06 Thread Denis V. Lunev
On 11/06/2015 05:44 PM, Stefan Hajnoczi wrote: On Fri, Nov 6, 2015 at 2:09 PM, Denis V. Lunev wrote: On 11/06/2015 04:35 PM, Stefan Hajnoczi wrote: On Wed, Nov 04, 2015 at 08:27:22PM +0300, Denis V. Lunev wrote: It is required for bdrv_drain. What bug does this patch fix? Existing blk_set_a

Re: [Qemu-devel] [PATCH 14/16] hw/arm/virt: Wire up memory region to CPUs explicitly

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 14:45, Edgar E. Iglesias wrote: > On Thu, Nov 05, 2015 at 06:15:56PM +, Peter Maydell wrote: >> Wire up the system memory region to the CPUs explicitly >> by setting the QOM property. This doesn't change anything >> over letting it default, but will be needed for adding >

Re: [Qemu-devel] [PATCH 11/16] memory: Add address_space_init_shareable()

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 14:29, Edgar E. Iglesias wrote: > On Thu, Nov 05, 2015 at 06:15:53PM +, Peter Maydell wrote: >> +AddressSpace *address_space_init_shareable(MemoryRegion *root, const char >> *name) >> +{ >> +AddressSpace *as; >> + >> +QTAILQ_FOREACH(as, &address_spaces, address_

Re: [Qemu-devel] [PATCH 1/3] block: add missed aio_context_acquire around bdrv_set_aio_context

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 6, 2015 at 2:19 PM, Denis V. Lunev wrote: > On 11/06/2015 05:09 PM, Denis V. Lunev wrote: >> >> On 11/06/2015 04:35 PM, Stefan Hajnoczi wrote: >>> >>> On Wed, Nov 04, 2015 at 08:27:22PM +0300, Denis V. Lunev wrote: It is required for bdrv_drain. >>> >>> What bug does this pat

Re: [Qemu-devel] [PATCH for-2.5 v3 3/3] arm: highbank: Implement PSCI and dummy monitor

2015-11-06 Thread Peter Maydell
On 3 November 2015 at 04:30, Peter Crosthwaite wrote: > Firstly, enable monitor mode and PSCI, both are which are features of "both of which" > this board. > > In addition to PSCI, this board also uses SMC for cache maintainence > ops. This means we need a secure monitor to catch these and nop t

Re: [Qemu-devel] [PATCH for-2.5 v3 2/3] arm: highbank: Defeature CPU override

2015-11-06 Thread Peter Maydell
On 3 November 2015 at 04:30, Peter Crosthwaite wrote: > This board should not support CPU model override. This allows for > easier patching of the board with being able to rely on the CPU > type being correct. > > Signed-off-by: Peter Crosthwaite > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH for-2.5 v3 1/3] arm: boot: Add secure_board_setup flag

2015-11-06 Thread Peter Maydell
On 3 November 2015 at 04:30, Peter Crosthwaite wrote: > Add a flag that when set, will cause the primary CPU to start in secure > mode, even if the overall boot is non-secure. This is useful for when > there is a board-setup blob that needs to run from secure mode, but > device and secondary CPU i

Re: [Qemu-devel] [PATCH 14/16] hw/arm/virt: Wire up memory region to CPUs explicitly

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:56PM +, Peter Maydell wrote: > Wire up the system memory region to the CPUs explicitly > by setting the QOM property. This doesn't change anything > over letting it default, but will be needed for adding > a secure memory region later. > > Signed-off-by: Peter May

Re: [Qemu-devel] [PATCH 1/3] block: add missed aio_context_acquire around bdrv_set_aio_context

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 6, 2015 at 2:09 PM, Denis V. Lunev wrote: > On 11/06/2015 04:35 PM, Stefan Hajnoczi wrote: >> >> On Wed, Nov 04, 2015 at 08:27:22PM +0300, Denis V. Lunev wrote: >>> >>> It is required for bdrv_drain. >> >> What bug does this patch fix? >> >> Existing blk_set_aio_context() callers acqui

Re: [Qemu-devel] [PATCH 13/16] target-arm: Add QOM property for Secure memory region

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:55PM +, Peter Maydell wrote: > Add QOM property to the ARM CPU which boards can use to tell us what > memory region to use for secure accesses. Nonsecure accesses > go via the memory region specified with the base CPU class 'memory' > property. > > By default, if

  1   2   3   >