[Qemu-devel] [Bug 1547526] Re: Java program does not execute on SPARC Solaris 8

2016-04-15 Thread Mark Cave-Ayland
*** This bug is a duplicate of bug 1450881 *** https://bugs.launchpad.net/bugs/1450881 ** This bug has been marked a duplicate of bug 1450881 qemu-system-sparc MUTEX_HELD assert and libC lock errors -- You received this bug notification because you are a member of qemu- devel-ml, which is

[Qemu-devel] [Bug 1450881] Re: qemu-system-sparc MUTEX_HELD assert and libC lock errors

2016-04-15 Thread Mark Cave-Ayland
Fix is included in the 2.6.0-rc2 release. ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1450881 Title: qemu-system-sparc MUTEX_HELD assert an

Re: [Qemu-devel] [RFC 2/4] target-ppc: derive all PPC machine classes to have PPCMachineClass as their superclass

2016-04-15 Thread David Gibson
On Thu, Apr 07, 2016 at 04:23:12PM +0100, Mark Cave-Ayland wrote: > Using a new DEFINE_PPC_MACHINE macro, make sure that all PPC machines now > derive from > the new PPCMachineClass. > Signed-off-by: Mark Cave-Ayland Hmm.. I'm a little bit dubious about this, since the timebase sync will be pre

Re: [Qemu-devel] [RFC 1/4] target-ppc: introduce PPCMachineClass and PPCMachineState

2016-04-15 Thread David Gibson
On Thu, Apr 07, 2016 at 04:23:11PM +0100, Mark Cave-Ayland wrote: > Introduce PPCMachineClass in anticipation of making it the superclass for > all PPC machines. > > Signed-off-by: Mark Cave-Ayland > --- > hw/ppc/ppc.c| 16 > include/hw/ppc/ppc.h| 16

Re: [Qemu-devel] [RFC 0/4] target-ppc: handle KVM timebase migration

2016-04-15 Thread David Gibson
On Thu, Apr 07, 2016 at 04:23:10PM +0100, Mark Cave-Ayland wrote: > This RFC series follows on from discussions in the "Migrating decrementer" > thread relating to handling migration of the timebase and decrementer > registers for both TCG and KVM. The aim is to provide a consistent virtual > clock

Re: [Qemu-devel] [RFC 3/4] target-ppc: synchronise tb_offset with KVM host on machine start

2016-04-15 Thread David Gibson
On Thu, Apr 07, 2016 at 04:23:13PM +0100, Mark Cave-Ayland wrote: > Recalculate the tb_offset between the guest and host, applying it to all CPUs > when (re)starting the virtual machine. This has the effect of providing a > near-seamless virtual timebase for KVM guests that support > KVM_REG_PPC_TB

[Qemu-devel] [PATCH v18 3/8] Link backup into block core

2016-04-15 Thread Changlong Xie
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody --- block/Makefile.objs | 2 +-

[Qemu-devel] [PATCH v18 5/8] auto complete active commit

2016-04-15 Thread Changlong Xie
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h | 3 ++- qemu-img.c

[Qemu-devel] [PATCH v18 2/8] Backup: clear all bitmap when doing block checkpoint

2016-04-15 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/backup.c| 17 + include/block/block_int.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/block/backup.c b/block/back

[Qemu-devel] [PATCH v18 1/8] unblock backup operations in backing file

2016-04-15 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 4bdc6b3..1e5a4fd 100644 --- a/block.c +++ b/block.c @@ -1255,6 +1255,23 @@ void bdrv_set_backing_hd(BlockDriver

[Qemu-devel] [PATCH v18 0/8] Block replication for continuous checkpoints

2016-04-15 Thread Changlong Xie
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt This patch series is

[Qemu-devel] [PATCH v18 4/8] docs: block replication's description

2016-04-15 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode 100644 docs/block-replication.txt

[Qemu-devel] [PATCH v18 7/8] Implement new driver for block replication

2016-04-15 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- block/Makefile.objs | 1 + block/replication.c | 625 +++ tests/.gitignore | 1 + tests/Makefi

[Qemu-devel] [PATCH v18 8/8] support replication driver in blockdev-add

2016-04-15 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie Reviewed-by: Eric Blake --- qapi/block-core.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/q

[Qemu-devel] [PATCH v18 6/8] Introduce new APIs to do replication operation

2016-04-15 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Signed-off-by: Changlong Xie --- Makefile.objs| 1 + qapi/block-core.json | 13 replication.c| 105 ++ replication.h| 176

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.6 1/2] qemu-io: Support 'aio_write -z'

2016-04-15 Thread Kevin Wolf
Am 15.04.2016 um 01:14 hat Max Reitz geschrieben: > On 13.04.2016 13:06, Kevin Wolf wrote: > > This allows testing blk_aio_write_zeroes(). > > > > Signed-off-by: Kevin Wolf > > --- > > qemu-io-cmds.c | 64 > > +++--- > > 1 file changed, 48 ins

[Qemu-devel] [PATCH for-2.6] block: Don't ignore flags in blk_aio_write_zeroes()

2016-04-15 Thread Kevin Wolf
Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(), which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be ignored). Reported-by: Max Reitz Signed-off-by: Kevin Wolf --- block/block-backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

Re: [Qemu-devel] [PATCH v14 11/19] qmp: Support explicit null during visits

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > Implement the new type_null() callback for the qmp input and > output visitors. While we don't yet have a use for this in QAPI > input (the generator will need some tweaks first), one usage > is already envisioned: when changing blockdev parameters, it > would be nice to have

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.6 2/2] block: Fix blk_aio_write_zeroes()

2016-04-15 Thread Kevin Wolf
Am 15.04.2016 um 01:30 hat Max Reitz geschrieben: > On 13.04.2016 13:06, Kevin Wolf wrote: > > Commit 57d6a428 broke blk_aio_write_zeroes() because in some write > > functions in the call path don't have an explicit length argument but > > reuse qiov->size instead. Which is great, except that write

[Qemu-devel] [PULL] qemu-sparc update

2016-04-15 Thread Mark Cave-Ayland
Hi Peter, This contains some register corruption fixes for qemu-system-sparc64. Please pull. ATB, Mark. The following changes since commit bc8995cafa0c36b9e4be682e9a60d59484b33500: Update version for v2.6.0-rc2 release (2016-04-14 17:30:28 +0100) are available in the git repository at:

Re: [Qemu-devel] [PATCH v4 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit

2016-04-15 Thread Aleksandar Markovic
Agreed. This looks much better, and is simpler and faster. Though, it looks to me that "fst" should be called "status" instead (just not to break consistency throughout SoftFloat library and in other places of assigning name "status" to the last argument of any function if its type is float_stat

[Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register

2016-04-15 Thread Thomas Huth
env->xer only holds the lower bits of the XER register nowadays, the SO, OV and CA bits are stored in separate variables (see the function cpu_write_xer() for details). Since the migration code currently only reads the "xer" variable, the upper bits are lost during migration. Fix it by using cpu_re

Re: [Qemu-devel] [PATCH v14 13/19] qmp: Tighten output visitor rules

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > Add a new qmp_output_visitor_reset(), which must be called before > reusing an exising QmpOutputVisitor on a new root object. Tighten > assertions to require that qmp_output_get_qobject() can only be > called after pairing a visit_end_* for every visit_start_* (rather > than

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-15 Thread Daniel P. Berrange
On Thu, Apr 14, 2016 at 07:46:17PM +0200, Stefan Weil wrote: > It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. > > Reported-by: Michael Fritscher > Signed-off-by: Stefan Weil > --- > > Networking with QEMU for Windows is currently not usable, > see bug report https://bugs.la

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-15 Thread Daniel P. Berrange
On Thu, Apr 14, 2016 at 08:12:00PM +0100, Peter Maydell wrote: > On 14 April 2016 at 18:46, Stefan Weil wrote: > > It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. > > > > Reported-by: Michael Fritscher > > Signed-off-by: Stefan Weil > > --- > > > > Networking with QEMU for Wi

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-15 Thread Michael Fritscher
Hello Samuel, > @Ipv6: I'll test it tomorrow. Interesting results: On my native windows builds with msys2 and mingw64, a time wget http://www.heise.de gives me (tested under native Win7) real 0m24.081s user 0m2.313s sys 0m9.620s or real 0m52.250s user 0m3.647s sys 0m21.117s The results are qui

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-04-15 Thread Paolo Bonzini
On 12/04/2016 10:20, Markus Armbruster wrote: > QOM replaced the static DeviceInfo. The static qdev property arrays > remain, but they're now stored into their DeviceClass's member props > dynamically, by the TypeInfo's class_init() method. > > The qdev properties so stored get mapped to QOM pr

Re: [Qemu-devel] [PATCH] Revert "acpi: mark PMTIMER as unlocked"

2016-04-15 Thread Paolo Bonzini
On 15/04/2016 08:43, Gerd Hoffmann wrote: > This reverts commit 7070e085d490c396f9237c8f10bf8b6e69cd0066. > > Commit message claims locking is not needed, but that appears > to not be true, seabios ehci driver runs into timekeeping problems > with this, see > https://bugzilla.redhat.com/sh

Re: [Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register

2016-04-15 Thread Mark Cave-Ayland
On 15/04/16 10:03, Thomas Huth wrote: > env->xer only holds the lower bits of the XER register nowadays, the > SO, OV and CA bits are stored in separate variables (see the function > cpu_write_xer() for details). Since the migration code currently only > reads the "xer" variable, the upper bits ar

Re: [Qemu-devel] [PATCH 0/2] ppc: Fixes for LSWX and LSWI instructions

2016-04-15 Thread Mark Cave-Ayland
On 14/04/16 16:14, Thomas Huth wrote: > These two patches fix the bad range checks in the LSWI and LSWX > instructions. > > To see the change in behavior for the lswx instruction, you can use the > "emulator" test from the kvm-unit-tests suite - code can be found here: > > https://git.kernel.org

Re: [Qemu-devel] [PULL] qemu-sparc update

2016-04-15 Thread Peter Maydell
On 15 April 2016 at 09:40, Mark Cave-Ayland wrote: > Hi Peter, > > This contains some register corruption fixes for qemu-system-sparc64. Please > pull. > > > ATB, > > Mark. > > > The following changes since commit bc8995cafa0c36b9e4be682e9a60d59484b33500: > > Update version for v2.6.0-rc2 relea

[Qemu-devel] RFC: virtio-rng and /dev/urandom

2016-04-15 Thread Cole Robinson
Libvirt currently rejects using host /dev/urandom as an input source for a virtio-rng device. The only accepted sources are /dev/random and /dev/hwrng. This is the result of discussions on qemu-devel around when the feature was first added (2013). Examples: http://lists.gnu.org/archive/html/qemu-d

Re: [Qemu-devel] [PATCH v4 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit

2016-04-15 Thread Leon Alrae
On 15/04/16 09:48, Aleksandar Markovic wrote: > Agreed. This looks much better, and is simpler and faster. Though, it looks > to me that "fst" should be called "status" instead (just not to break > consistency throughout SoftFloat library and in other places of assigning > name "status" to the l

Re: [Qemu-devel] efi var store migration assert (bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed.)

2016-04-15 Thread Paolo Bonzini
On 14/04/2016 17:30, Peter Maydell wrote: > On 4 April 2016 at 11:40, Paolo Bonzini wrote: >> >> >> On 01/04/2016 19:58, Dr. David Alan Gilbert wrote: >>> In the continuing journeys of trying to migrate a q35 guest with ovmf, >>> I've just hit this assert: >>> >>> qemu-system-x86_64: /root/git/q

Re: [Qemu-devel] [PATCH v14 14/19] qapi: Split visit_end_struct() into pieces

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > As mentioned in previous patches, we want to call visit_end_struct() > functions unconditionally, so that visitors can release resources > tied up since the matching visit_start_struct() without also having > to worry about error priority if more than one error occurs. > > Ev

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-04-15 Thread Cao jin
On 04/15/2016 06:06 PM, Paolo Bonzini wrote: Here's my try rewording the comment (sticking to GTK-Doc conventions even though I dislike them): /** * @qdev_property_add_static: * @dev: Device to add the property to * @prop: The qdev property definition * @err: location to store erro

[Qemu-devel] [PATCH 01/11] coroutine: use QSIMPLEQ instead of QTAILQ

2016-04-15 Thread Paolo Bonzini
CoQueue do not need to remove any element but the head of the list; processing is always strictly FIFO. Therefore, the simpler singly-linked QSIMPLEQ can be used instead. Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 2 +- include/qemu/coroutine_int.h | 4 ++-- util/qemu-cor

[Qemu-devel] [PATCH 03/11] coroutine: delete qemu_co_enter_next

2016-04-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 5 - util/qemu-coroutine-lock.c | 14 -- 2 files changed, 19 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index 63ae7fe..bb23be0 100644 --- a/include/qemu/coroutine.h +++ b/include/qem

[Qemu-devel] [PATCH 05/11] coroutine-lock: reschedule coroutine on the AioContext it was running on

2016-04-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/block/aio.h| 5 + include/qemu/coroutine.h | 18 ++ iothread.c | 16 stubs/iothread.c | 11 +++ tests/iothread.c | 16 trace-events |

[Qemu-devel] [PATCH 06/11] coroutine-lock: make CoMutex thread-safe

2016-04-15 Thread Paolo Bonzini
This uses the lock-free mutex described in the paper '"Blocking without Locking", or LFTHREADS: A lock-free thread library' by Gidenstam and Papatriantafilou. The same technique is used in OSv, and in fact the code is essentially a conversion to C of OSv's code. Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [RFC PATCH resend 00/11] Make CoMutex/CoQueue/CoRwlock thread-safe

2016-04-15 Thread Paolo Bonzini
[this time including the mailing list] This is yet another tiny bit of the multiqueue work, this time affecting the synchronization infrastructure for coroutines. Currently, coroutines synchronize between the main I/O thread and the dataplane iothread through the AioContext lock. However, for mu

[Qemu-devel] [PATCH 02/11] throttle-groups: restart throttled requests from coroutine context

2016-04-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/throttle-groups.c | 69 +++-- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/block/throttle-groups.c b/block/throttle-groups.c index 1938e90..53e910e 100644 --- a/block/throttle-groups.c +++ b/bloc

[Qemu-devel] [PATCH 07/11] coroutine-lock: add limited spinning to CoMutex

2016-04-15 Thread Paolo Bonzini
Running a very small critical section on pthread_mutex_t and CoMutex shows that pthread_mutex_t is much faster because it doesn't actually go to sleep. What happens is that the critical section is shorter than the latency of entering the kernel and thus FUTEX_WAIT always fails. With CoMutex there

[Qemu-devel] [PATCH 04/11] aio: introduce aio_co_schedule

2016-04-15 Thread Paolo Bonzini
This provides the infrastructure to start a coroutine on a remote AioContext. It will be used by CoMutex and CoQueue, so that coroutines don't jump from one context to another when they go to sleep on a mutex or waitqueue. aio_co_schedule is based on a lock-free multiple-producer, single-consumer

[Qemu-devel] [PATCH 09/11] coroutine-lock: place CoMutex before CoQueue in header

2016-04-15 Thread Paolo Bonzini
This will avoid forward references in the next patch. It is also more logical because CoQueue is not anymore the basic primitive. Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 79 1 file changed, 39 insertions(+), 40 deletions(-) d

[Qemu-devel] [PATCH 08/11] test-aio-multithread: add performance comparison with thread-based mutexes

2016-04-15 Thread Paolo Bonzini
Add two implementations of the same benchmark as the previous patch, but using pthreads. One uses a normal QemuMutex, the other is Linux only and implements a fair mutex based on MCS locks and futexes. This shows that the slower performance of the 5-thread case is due to the fairness of CoMutex, r

Re: [Qemu-devel] [PATCH v4 1/9] softfloat: Implement run-time-configurable meaning of signaling NaN bit

2016-04-15 Thread Aleksandar Markovic
Hi, Leon, There is one more subtle point here. The question is: Where to put declarations of two new functions? This is a new case in the organization of mips-specific source code files. File helpers.h does not seem to be a good place, cpu.h - maybe, but still looks clumsy to me. IMHO, my solu

[Qemu-devel] [PATCH 10/11] coroutine-lock: add mutex argument to CoQueue APIs

2016-04-15 Thread Paolo Bonzini
All that CoQueue needs in order to become thread-safe is help from an external mutex. Add this to the API. Signed-off-by: Paolo Bonzini --- block/backup.c | 2 +- block/io.c | 2 +- block/qcow2-cluster.c | 4 +--- block/sheepdog.c | 2 +- block/thr

[Qemu-devel] [PATCH 11/11] coroutine-lock: make CoRwlock thread-safe and fair

2016-04-15 Thread Paolo Bonzini
This adds a CoMutex around the existing CoQueue. Because the write-side can just take CoMutex, the old "writer" field is not necessary anymore. Instead of removing it altogether, count the number of pending writers during a read-side critical section and forbid further readers from entering. Sign

[Qemu-devel] [PATCH] Fix pflash migration

2016-04-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Pflash migration (e.g. q35 + EFI variable storage) fails with the assert: bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed. This avoids the problem by delaying the pflash update until after the device loads complete. Tested by: Migrating Q35/EF

Re: [Qemu-devel] [PATCH v14 15/19] qapi-commands: Wrap argument visit in visit_start_struct

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > The qmp-input visitor was playing rather fast and loose: when I guess (some of) its *users* are playing fast and loose, and the visitor itself lets them. The patch's title suggests "some of its users" == qapi-commands.py. > visiting a QDict, you could grab members of the r

Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom

2016-04-15 Thread Richard W.M. Jones
On Fri, Apr 15, 2016 at 06:41:34AM -0400, Cole Robinson wrote: > Libvirt currently rejects using host /dev/urandom as an input source for a > virtio-rng device. The only accepted sources are /dev/random and /dev/hwrng. > This is the result of discussions on qemu-devel around when the feature was >

Re: [Qemu-devel] [PATCH v14 16/19] qom: Wrap prop visit in visit_start_struct

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > The qmp-input visitor was playing rather fast and loose: when > visiting a QDict, you could grab members of the root dictionary > without first pushing into the dict. But we are about to tighten > the input visitor, at which point user_creatable_add_type() MUST > follow the

Re: [Qemu-devel] [libvirt] RFC: virtio-rng and /dev/urandom

2016-04-15 Thread Richard W.M. Jones
On Fri, Apr 15, 2016 at 12:46:46PM +0100, Richard W.M. Jones wrote: > On Fri, Apr 15, 2016 at 06:41:34AM -0400, Cole Robinson wrote: > > Libvirt currently rejects using host /dev/urandom as an input source for a > > virtio-rng device. The only accepted sources are /dev/random and /dev/hwrng. > > Th

Re: [Qemu-devel] [PATCH] hw/9pfs: Add CephFS support in VirtFS

2016-04-15 Thread Greg Kurz
Hi Jevon, More findings in fsdev/qemu-fsdev.c and hw/9pfs/Makefile.objs, see below. Cheers. -- Greg On Tue, 15 Mar 2016 00:02:48 +0800 Jevon Qiao wrote: > Ceph as a promising unified distributed storage system is widely used in the > world of OpenStack. OpenStack users deploying Ceph for blo

Re: [Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register

2016-04-15 Thread Thomas Huth
On 15.04.2016 12:17, Mark Cave-Ayland wrote: > On 15/04/16 10:03, Thomas Huth wrote: > >> env->xer only holds the lower bits of the XER register nowadays, the >> SO, OV and CA bits are stored in separate variables (see the function >> cpu_write_xer() for details). Since the migration code currentl

Re: [Qemu-devel] [PATCH] hid: Extend the event queue size to 1024

2016-04-15 Thread Dinar Valeev
On 04/14/2016 06:19 PM, Gerd Hoffmann wrote: > On Do, 2016-04-14 at 17:29 +0200, Alexander Graf wrote: >> On 04/14/2016 05:17 PM, Gerd Hoffmann wrote: >>> On Do, 2016-04-14 at 16:25 +0200, Alexander Graf wrote: We can currently buffer up to 16 events in our event queue for input devices.

Re: [Qemu-devel] [PATCH] Fix pflash migration

2016-04-15 Thread Laszlo Ersek
On 04/15/16 13:41, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Pflash migration (e.g. q35 + EFI variable storage) fails > with the assert: > > bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed. > > This avoids the problem by delaying the pflash updat

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.7 v2 06/17] gluster: Implement .bdrv_lockf

2016-04-15 Thread Niels de Vos
On Fri, Apr 15, 2016 at 11:27:56AM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > block/gluster.c | 30 ++ > 1 file changed, 30 insertions(+) The Gluster changes look good to me. Reviewed-by: Niels de Vos > > diff --git a/block/gluster.c b/block/gluste

Re: [Qemu-devel] [PATCH v14 17/19] qmp-input: Require struct push to visit members of top dict

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > Don't embed the root of the visit into the stack of current > containers being visited. That way, we no longer get confused I got confused pretty much every time I looked at this code... > on whether the first visit of a dictionary is to the dictionary > itself or to one o

Re: [Qemu-devel] [PATCH] hw/9pfs: Add CephFS support in VirtFS

2016-04-15 Thread Greg Kurz
One more nit in configure. See below. Cheers. -- Greg On Tue, 15 Mar 2016 00:02:48 +0800 Jevon Qiao wrote: > Ceph as a promising unified distributed storage system is widely used in the > world of OpenStack. OpenStack users deploying Ceph for block (Cinder) and > object (S3/Swift) are unsurpri

[Qemu-devel] [PATCH 1/2] Block: Cleanup vvfat.c to remove dead code.

2016-04-15 Thread Prerna Saxena
Commit 43dc2a64 replaced assert() with abort(), but didnt remove statements that followed these calls. So current code still has return values set after a call to abort(). Such statements will never execute and need to be cleaned up. Signed-off-by: Prerna Saxena --- block/vvfat.c | 17 +++---

[Qemu-devel] [PATCH 0/2] Cleanup and instrumenting qemu exits due to abort().

2016-04-15 Thread Prerna Saxena
Today, some calls to abort() do not have a preceding error string that might hint to the end user why QEMU died. Debugging such scenarios is painful today. This patchset attempts to clean up some dead code in vvfat.c; it also aims to improve qemu error-reporting by placing error messages that prec

[Qemu-devel] [PATCH 2/2] Debug : Add error messages before a call to debug().

2016-04-15 Thread Prerna Saxena
Qemu code has abort() calls in various places which raises a SIGABRT; This patch adds error messages before (most)calls to abort(), so that it is easier to determine why QEMU died. Signed-off-by: Prerna Saxena --- block.c| 1 + block/block-backend.c | 4 block/curl.c

Re: [Qemu-devel] post-copy is broken?

2016-04-15 Thread Kirill A. Shutemov
On Thu, Apr 14, 2016 at 12:22:30PM -0400, Andrea Arcangeli wrote: > Adding linux-mm too, > > On Thu, Apr 14, 2016 at 01:34:41PM +0100, Dr. David Alan Gilbert wrote: > > * Andrea Arcangeli (aarca...@redhat.com) wrote: > > > > > The next suspect is the massive THP refcounting change that went > > >

Re: [Qemu-devel] post-copy is broken?

2016-04-15 Thread Dr. David Alan Gilbert
* Kirill A. Shutemov (kir...@shutemov.name) wrote: > On Thu, Apr 14, 2016 at 12:22:30PM -0400, Andrea Arcangeli wrote: > > Adding linux-mm too, > > > > On Thu, Apr 14, 2016 at 01:34:41PM +0100, Dr. David Alan Gilbert wrote: > > > * Andrea Arcangeli (aarca...@redhat.com) wrote: > > > > > > > The n

Re: [Qemu-devel] [PATCH] hostmem-file: plug a small leak

2016-04-15 Thread Paolo Bonzini
On 15/04/2016 08:56, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 14/04/2016 17:44, Igor Mammedov wrote: >>> On Thu, 14 Apr 2016 15:24:10 +0200 >>> Paolo Bonzini wrote: >>> On 14/04/2016 13:34, Igor Mammedov wrote: > On Wed, 13 Apr 2016 18:57:40 +0200 > marcandre.lur..

Re: [Qemu-devel] [PATCH for-2.6] block: Don't ignore flags in blk_aio_write_zeroes()

2016-04-15 Thread Eric Blake
On 04/15/2016 02:27 AM, Kevin Wolf wrote: > Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(), > which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be > ignored). > > Reported-by: Max Reitz > Signed-off-by: Kevin Wolf > --- > block/block-backend.c | 3 ++- >

Re: [Qemu-devel] [PATCH v14 18/19] qapi: Simplify semantics of visit_next_list()

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > We have two uses of list visits in the entire code base: one in > spapr_drc (which completely avoids visit_next_list(), feeding in > integers from a different source than uint8List), and one in > qapi-visit.py Period here, convert the parenthesis to a sentence. >

[Qemu-devel] [RFC v1 00/12] Enable MTTCG for 32 bit arm on x86

2016-04-15 Thread Alex Bennée
Hi, This series finally completes the re-build of Fred's multi_tcg_v8 tree by enabling MTTCG for armv7 guests on x86 hosts. This applies on top of the previous series: - [RFC v2 00/11] Base enabling patches for MTTCG You can find the final tree at: https://github.com/stsquad/qemu/tree/mttcg

[Qemu-devel] [RFC v1 02/12] tcg/i386: Make direct jump patching thread-safe

2016-04-15 Thread Alex Bennée
From: Sergey Fedorov Ensure direct jump patching in i386 is atomic by: * naturally aligning a location of direct jump address; * using atomic_read()/atomic_set() for code patching. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- include/exec/exec-all.h | 2 +- tcg/i386/tc

[Qemu-devel] [RFC v1 04/12] atomic: introduce atomic_dec_fetch.

2016-04-15 Thread Alex Bennée
Useful for counting down. Signed-off-by: Alex Bennée --- include/qemu/atomic.h | 4 1 file changed, 4 insertions(+) diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 8f1d8d9..5dba7db 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.h @@ -131,6 +131,8 @@ #define

[Qemu-devel] [RFC v1 03/12] qemu-thread: add simple test-and-set spinlock

2016-04-15 Thread Alex Bennée
This is a temporary squashed patch of the following patches from Emilio's qht series. This includes: - include/processor.h: define cpu_relax() - qemu-thread: add simple test-and-set spinlock - qemu-thread: call cpu_relax() while spinning - qemu-thread: optimize spin_lock for uncontended lo

[Qemu-devel] [RFC v1 11/12] arm: atomically check the exclusive value in a STREX

2016-04-15 Thread Alex Bennée
From: KONRAD Frederic This mechanism replaces the existing load/store exclusive mechanism which seems to be broken for MTTCG. It follows the intention of the existing mechanism and stores the target address and data values during a load operation and checks that they remain unchanged before a sto

[Qemu-devel] [RFC v1 01/12] include: move CPU-related definitions out of qemu-common.h

2016-04-15 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini --- include/qemu-common.h | 24 include/qemu/timer.h | 1 + include/qom/cpu.h | 9 + include/sysemu/cpus.h | 13 + stubs/cpu-get-icount.c | 1 + translate-common.c | 1 + vl.c

[Qemu-devel] [RFC v1 05/12] atomic: introduce cmpxchg_bool

2016-04-15 Thread Alex Bennée
This allows for slightly neater code when checking for success of a cmpxchg operation. Signed-off-by: Alex Bennée --- include/qemu/atomic.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 5dba7db..94e7110 100644 --- a/include/q

[Qemu-devel] [RFC v1 00/12] Enable MTTCG for 32 bit arm on x86

2016-04-15 Thread Alex Bennée
Hi, The finally completes the re-build of Fred's multi_tcg_v8 tree by enabling MTTCG for armv7 guests on x86 hosts. This applies on top of the previous series: - [RFC v2 00/11] Base enabling patches for MTTCG You can find the final tree at: https://github.com/stsquad/qemu/tree/mttcg/enable-

Re: [Qemu-devel] [1/3] powerpc: scan_features() updates incorrect bits

2016-04-15 Thread Michael Ellerman
On Fri, 2016-15-04 at 02:06:13 UTC, Unknown sender due to SPF wrote: > The real LE feature entry in the ibm_pa_feature struct has the > wrong number of elements. Instead of checking for byte 5, bit 0, > we check for byte 0, bit 0, and we also incorrectly update cpu user > feature bit 5. > > Fixes:

[Qemu-devel] [RFC v1 09/12] translate-all: introduces tb_flush_safe.

2016-04-15 Thread Alex Bennée
From: KONRAD Frederic tb_flush is not thread safe we definitely need to exit VCPUs to do that. This introduces tb_flush_safe which just creates an async safe work which will do a tb_flush later. This is called when we run out of space. Signed-off-by: KONRAD Frederic [AJB: merge the various tb_f

[Qemu-devel] [RFC v1 06/12] cpus: pass CPUState to run_on_cpu helpers

2016-04-15 Thread Alex Bennée
CPUState is a fairly common pointer to pass to these helpers. This means if you need other arguments for the async_run_on_cpu case you end up having to do a g_malloc to stuff additional data into the routine. For the current users this isn't a massive deal but for MTTCG this gets cumbersome when th

[Qemu-devel] [RFC v1 07/12] cpus: introduce async_safe_run_on_cpu.

2016-04-15 Thread Alex Bennée
From: KONRAD Frederic We already had async_run_on_cpu but for some tasks we need to ensure all vCPUs have stopped running before updating shared structures. We call this safe work as it is safe to make the modifications. Work is scheduled with async_safe_run_on_cpu() which is passed the CPUState

[Qemu-devel] [RFC v1 08/12] cputlb: introduce tlb_flush_* async work.

2016-04-15 Thread Alex Bennée
From: KONRAD Frederic Some architectures allow to flush the tlb of other VCPUs. This is not a problem when we have only one thread for all VCPUs but it definitely needs to be an asynchronous work when we are in true multithreaded work. This patch doesn't do anything to protect other cputlb funct

[Qemu-devel] [RFC v1 12/12] cpus: default MTTCG to on for 32 bit ARM on x86

2016-04-15 Thread Alex Bennée
This makes multi-threading the default for 32 bit ARM on x86. It has been tested with Debian Jessie as well as my extended KVM unit tests which stress the SMC and TB invalidation code. Those tests can be found at: https://github.com/stsquad/kvm-unit-tests/tree/mttcg/current-tests-v5 Signed-off-

[Qemu-devel] [RFC v1 10/12] arm: use tlb_flush_page_all for tlbimva[a]

2016-04-15 Thread Alex Bennée
From: KONRAD Frederic Instead of flushing each individual vCPU use the tlb_flush_page_all functions which is async enabled for MTTCG. Signed-off-by: KONRAD Frederic Signed-off-by: Alex Bennée --- include/exec/exec-all.h | 3 +++ target-arm/helper.c | 12 ++-- 2 files changed, 5 i

Re: [Qemu-devel] [PATCH for-2.6] block: Don't ignore flags in blk_aio_write_zeroes()

2016-04-15 Thread Kevin Wolf
Am 15.04.2016 um 15:59 hat Eric Blake geschrieben: > On 04/15/2016 02:27 AM, Kevin Wolf wrote: > > Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(), > > which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be > > ignored). > > > > Reported-by: Max Reitz > > Sign

Re: [Qemu-devel] [PATCH v14 19/19] qapi: Change visit_type_FOO() to no longer return partial objects

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > Returning a partial object on error is an invitation for a careless > caller to leak memory. As no one outside the testsuite was actually > relying on these semantics, it is cleaner to just document and > guarantee that ALL pointer-based visit_type_FOO() functions always > l

[Qemu-devel] [PATCH for-2.6 v2] block: Don't ignore flags in blk_{, co, aio}_write_zeroes()

2016-04-15 Thread Kevin Wolf
Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(), which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be ignored). Commit fc1453cd introduced the same bug for blk_write_zeroes(). This is used for 'qemu-img convert' without has_zero_init (e.g. on a block device)

Re: [Qemu-devel] [PATCH v14 01/19] qapi: Consolidate object visitors

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > On 04/13/2016 06:48 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Rather than having two separate visitor callbacks with items >>> already broken out, pass the actual QAPISchemaObjectType object >>> to the visitor. This lets the visitor access things like >>> t

Re: [Qemu-devel] [PATCH] block: Inactivate all nodes at migration source

2016-04-15 Thread Kevin Wolf
Am 15.04.2016 um 05:11 hat Fam Zheng geschrieben: > qcow2 is not necessarily the top layer node. Since bdrv_inactivate() > doesn't recurse, we should ensure all block nodes are inactivated. > > Signed-off-by: Fam Zheng Hm, I don't think that's quite right. bdrv_inactivate_all() should be the opp

Re: [Qemu-devel] [PATCH for-2.6 v2] block: Don't ignore flags in blk_{, co, aio}_write_zeroes()

2016-04-15 Thread Eric Blake
On 04/15/2016 08:52 AM, Kevin Wolf wrote: > Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(), > which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be > ignored). > > Commit fc1453cd introduced the same bug for blk_write_zeroes(). This is > used for 'qemu-img co

Re: [Qemu-devel] post-copy is broken?

2016-04-15 Thread Kirill A. Shutemov
On Fri, Apr 15, 2016 at 02:42:33PM +0100, Dr. David Alan Gilbert wrote: > * Kirill A. Shutemov (kir...@shutemov.name) wrote: > > On Thu, Apr 14, 2016 at 12:22:30PM -0400, Andrea Arcangeli wrote: > > > Adding linux-mm too, > > > > > > On Thu, Apr 14, 2016 at 01:34:41PM +0100, Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH v14 02/19] qapi-visit: Add visitor.type classification

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > On 04/13/2016 07:49 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> We have three classes of QAPI visitors: input, output, and dealloc. >>> Currently, all implementations of these visitors have one thing in >>> common based on their visitor type: the implementatio

Re: [Qemu-devel] [PATCH v14 05/19] qmp-input: Clean up stack handling

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > On 04/13/2016 09:53 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Management of the top of stack was a bit verbose; creating a >>> temporary variable and adding some comments makes the existing >>> code more legible before the next few patches improve things. >>

Re: [Qemu-devel] [PATCH] Fix pflash migration

2016-04-15 Thread Kevin Wolf
Am 15.04.2016 um 14:19 hat Laszlo Ersek geschrieben: > On 04/15/16 13:41, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Pflash migration (e.g. q35 + EFI variable storage) fails > > with the assert: > > > > bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)

Re: [Qemu-devel] [PATCH v14 06/19] qmp-input: Don't consume input when checking has_member

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > On 04/13/2016 10:06 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Commit e8316d7 mistakenly passed consume=true >> >> in qmp_input_optional(), right? > > yes > >> >>> when checking if >>> an optional member was pre

Re: [Qemu-devel] [PATCH v3 12/13] q35: ioapic: add support for split irqchip and irqfd

2016-04-15 Thread Radim Krčmář
2016-04-15 11:31+0800, Peter Xu: > This patch allows Intel IR work with splitted irqchip. Two more fields > are added to IOAPICCommonState to support the translation process (For > future AMD IR support, we will need to provide another AMD-specific > callback for int_remap()). In split irqchip mode

Re: [Qemu-devel] [for-2.6] Re: [PATCH] qmp-commands.hx: document minimum speed for block jobs

2016-04-15 Thread Kevin Wolf
Am 14.04.2016 um 13:08 hat Sascha Silbe geschrieben: > Dear developers, > > Sascha Silbe writes: > > > The current rate limit implementation for block jobs is ineffective > > below a certain minimum rate. It will permit writes at least once per > > time slice. The resulting minimum write speed (

Re: [Qemu-devel] [PATCH v3] fw_cfg: RFQDN rules, documentation

2016-04-15 Thread Markus Armbruster
[Context restored] "Michael S. Tsirkin" writes: > On Thu, Apr 14, 2016 at 01:29:20PM +0200, Markus Armbruster wrote: >> The next use case to consider is a user picking a new name for a new >> interface between host and guest. I find the idea that such a user >> won't notice warnings farfetched.

Re: [Qemu-devel] [PATCH v14 00/19] qapi visitor cleanups (post-introspection cleanups subset E)

2016-04-15 Thread Markus Armbruster
Eric Blake writes: > This is now 2.7 material (it is too invasive for hard freeze). Yes. > Based on master, with no prerequisite patches. I had quite a few comments, but I guess that's more because of me than because of your patches :) Seriously, the patches feel close to ready. Most of my co

Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom

2016-04-15 Thread Eric Blake
On 04/15/2016 04:41 AM, Cole Robinson wrote: > Libvirt currently rejects using host /dev/urandom as an input source for a > virtio-rng device. The only accepted sources are /dev/random and /dev/hwrng. > This is the result of discussions on qemu-devel around when the feature was > first added (2013)

  1   2   >