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

2016-04-15 Thread H. Peter Anvin
On April 15, 2016 9:10:44 AM PDT, Hubert Kario wrote: >On Friday 15 April 2016 09:47:51 Eric Blake wrote: >> 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

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

2016-04-15 Thread H. Peter Anvin
On April 15, 2016 9:10:44 AM PDT, Hubert Kario wrote: >On Friday 15 April 2016 09:47:51 Eric Blake wrote: >> 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

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

2016-04-15 Thread Andrea Arcangeli
On Fri, Apr 15, 2016 at 06:23:30PM +0300, Kirill A. Shutemov wrote: > The same here. Freshly booted machine with 64GiB ram. I've checked > /proc/vmstat: huge pages were allocated I tried the test in a loop and I can't reproduce it here. Tested with gcc 4.9.3 and glibc 2.21 and glibc 2.22 so far,

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

2016-04-15 Thread Hubert Kario
On Friday 15 April 2016 09:47:51 Eric Blake wrote: > 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

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

2016-04-15 Thread Hubert Kario
On Friday 15 April 2016 08:56:59 H. Peter Anvin wrote: > On April 15, 2016 3:41:34 AM PDT, 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.

[Qemu-devel] [Bug 1571084] [NEW] Qemu 2.x dont build on last Gtk dev 3.0+

2016-04-15 Thread luigiburdo
Public bug reported: here the build exit ui/gtk.c: In function ‘gd_mouse_set’: ui/gtk.c:479:5: error: ‘gdk_display_get_device_manager’ is deprecated: Use 'gdk_display_get_default_seat' instead [-Werror=deprecated-declarations] mgr = gdk_display_get_device_manager(dpy); ^ In file

[Qemu-devel] [PATCH 5/5] Migration: migrate pending_events of spapr state

2016-04-15 Thread Jianjun Duan
In racing situations between hotplug events and migration operation, a rtas hotplug event could have not yet be delivered to the source guest when migration is started. In this case the pending_events of spapr state need be transmitted to the target so that the hotplug event can be finished on the

[Qemu-devel] [PATCH 3/5] vmstate: Define VARRAY with VMS_ALLOC

2016-04-15 Thread Jianjun Duan
From: Alexey Kardashevskiy This allows dynamic allocation for migrating arrays. Already existing VMSTATE_VARRAY_UINT32 requires an array to be pre-allocated, however there are cases when the size is not known in advance and there is no real need to enforce it. This defines

[Qemu-devel] [PATCH 2/5] Migration: Defined VMStateDescription struct for spapr_drc

2016-04-15 Thread Jianjun Duan
To manage hotplug/unplug of dynamic resources such as PCI cards, memory, and CPU on sPAPR guests, a firmware abstraction known as a Dynamic Resource Connector (DRC) is used to assign a particular dynamic resource to the guest, and provide an interface for the guest to manage configuration/removal

[Qemu-devel] [PATCH 1/5] spapr: ensure device trees are always associated with DRC

2016-04-15 Thread Jianjun Duan
There are possible racing situations involving hotplug events and guest migration. For cases where a hotplug event is migrated, or the guest is in the process of fetching device tree at the time of migration, we need to ensure the device tree is created and associated with the corresponding DRC

[Qemu-devel] [PATCH 4/5] Migration: migrate ccs_list in spapr state

2016-04-15 Thread Jianjun Duan
ccs_list in spapr state maintains the device tree related information on the rtas side for hotplugged devices. In racing situations between hotplug events and migration operation, a rtas hotplug event could be migrated from the source guest to target guest, or the source guest could have not yet

[Qemu-devel] [PATCH 0/5] migration: ensure hotplug and migration work together

2016-04-15 Thread Jianjun Duan
To make guest device (PCI, CPU and memory) hotplug work together with guest migration, spapr drc state needs be transmitted in migration. This patch defines the VMStateDescription struct for spapr drc state to enable it. To fix the potential racing between hotplug events on guest and guest

Re: [Qemu-devel] [PATCH] spapr: ensure device trees are always associated with DRC

2016-04-15 Thread Jianjun Duan
Please disregard this patch. It should be part of a sequence. Thanks, Jianjun On 04/15/2016 01:00 PM, Jianjun Duan wrote: There are possible racing situations involving hotplug events and guest migration. For cases where a hotplug event is migrated, or the guest is in the process of fetching

[Qemu-devel] [PATCH] spapr: ensure device trees are always associated with DRC

2016-04-15 Thread Jianjun Duan
There are possible racing situations involving hotplug events and guest migration. For cases where a hotplug event is migrated, or the guest is in the process of fetching device tree at the time of migration, we need to ensure the device tree is created and associated with the corresponding DRC

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

2016-04-15 Thread Alex Bennée
Alex Bennée writes: > 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: > > Benchmarks > == > > The benchmark is a simple boot and build

[Qemu-devel] [PATCH] target-i386: Set AMD alias bits after filtering CPUID data

2016-04-15 Thread Eduardo Habkost
QEMU complains about -cpu host on an AMD machine: warning: host doesn't support requested feature: CPUID.8001H:EDX [bit 0] For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24. KVM_GET_SUPPORTED_CPUID and and x86_cpu_get_migratable_flags() don't handle the AMD CPUID aliases bits, making

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

2016-04-15 Thread Stefan Weil
Am 15.04.2016 um 18:59 schrieb Peter Maydell: > On 15 April 2016 at 17:56, Stefan Weil wrote: >> AIX 4.3,5.1 uses 11/54, HP-UX 11.22 uses 11/246 for EAGAIN/EWOULDBLOCK >> according to that table. >> >> Is this relevant for QEMU? > > We still have support in configure for AIX. I

[Qemu-devel] [PULL 1/1] wxx: Fix broken TCP networking (regression)

2016-04-15 Thread Stefan Weil
It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. Reported-by: Michael Fritscher Tested-by: Michael Fritscher Reviewed-by: Peter Maydell Reviewed-by: Daniel P. Berrange

[Qemu-devel] [PULL 0/1] Wxx patch for 2.6

2016-04-15 Thread Stefan Weil
The following changes since commit c7b45f12828c1ba7105dbc029c63d7de68eaa91c: Merge remote-tracking branch 'remotes/armbru/tags/pull-backends-2016-04-15' into staging (2016-04-15 17:43:34 +0100) are available in the git repository at: git://qemu.weilnetz.de/qemu.git tags/pull-wxx-20160415

Re: [Qemu-devel] [PATCH] target-i386: add AMD CPUID.1:edx aliases to x86_cpu_get_migratable_flags

2016-04-15 Thread Radim Krčmář
2016-04-15 13:54-0300, Eduardo Habkost: > On Thu, Apr 14, 2016 at 10:55:07PM +0200, Radim Krčmář wrote: >> QEMU complains about -cpu host on an AMD machine: >> warning: host doesn't support requested feature: CPUID.8001H:EDX [bit >> 0] >> For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24.

Re: [Qemu-devel] [PULL 0/1] hostmem-file: plug a small leak

2016-04-15 Thread Peter Maydell
On 15 April 2016 at 17:33, Markus Armbruster wrote: > The following changes since commit 538a467329818ea831f602491ac62d7d7999102a: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into > staging (2016-04-15 10:49:04 +0100) > > are available in the

[Qemu-devel] [PULL 08/19] block/vpc: set errp in vpc_open

2016-04-15 Thread Kevin Wolf
From: Jeff Cody Add more useful error information to failure paths in vpc_open Signed-off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/vpc.c | 9 + 1 file changed, 9

[Qemu-devel] [PULL 16/19] qemu-iotests: 041: More robust assertion on quorum node

2016-04-15 Thread Kevin Wolf
From: Fam Zheng Block nodes are now assigned names automatically, therefore the test case is fragile in using fixed indices in result. Introduce a method in iotests.py and do the matching more sensibly. Signed-off-by: Fam Zheng Message-id:

[Qemu-devel] [PULL 12/19] qemu-iotests: drop unused _within_tolerance() filter

2016-04-15 Thread Kevin Wolf
From: Sascha Silbe _within_tolerance() isn't used anymore and possibly creates temporary files at predictable, world-writable locations. Get rid of it. If it's needed again in the future it can be revived easily and fixed up to use TEST_DIR and / or safely created

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

2016-04-15 Thread Alex Bennée
Richard Henderson writes: > On 04/15/2016 07:23 AM, Alex Bennée wrote: >> +#define atomic_bool_cmpxchg(ptr, old, new) \ >> +({ \ >> +typeof(*ptr) _old = (old), _new = (new);

[Qemu-devel] [PULL 14/19] qemu-iotests: tests: do not set unused tmp variable

2016-04-15 Thread Kevin Wolf
From: Sascha Silbe The previous commit removed the last usage of ${tmp} inside the tests themselves; the only remaining users are sourced by check. So we can now drop this variable from the tests. Signed-off-by: Sascha Silbe Reviewed-by: Bo

[Qemu-devel] [PULL 03/19] block/vpc: set errp in vpc_create

2016-04-15 Thread Kevin Wolf
From: Jeff Cody Add more useful error information to failure paths in vpc_create(). Signed-off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/vpc.c | 5 + 1 file changed, 5

[Qemu-devel] [PULL 13/19] qemu-iotests: common.rc: drop unused _do()

2016-04-15 Thread Kevin Wolf
From: Sascha Silbe _do() was never used and possibly creates temporary files at predictable, world-writable locations. Get rid of it. Signed-off-by: Sascha Silbe Reviewed-by: Bo Tu Message-id:

[Qemu-devel] [PULL 18/19] nbd: fix assert() on qemu-nbd stop

2016-04-15 Thread Kevin Wolf
From: Pavel Butsykin >From time to time qemu-nbd is crashing on the following assert: assert(state == TERMINATING); nbd_export_closed nbd_export_put main and the state at the moment of the crash is evaluated to TERMINATE. During shutdown process of the

[Qemu-devel] [PULL 19/19] nbd: Don't kill server on client that doesn't request TLS

2016-04-15 Thread Kevin Wolf
From: Eric Blake Upstream NBD documents (as of commit 4feebc95) that servers MAY choose to operate in a conditional mode, where it is up to the client whether to use TLS. For qemu's case, we want to always be in FORCEDTLS mode, because of the risk of man-in-the-middle

[Qemu-devel] [PULL 17/19] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

2016-04-15 Thread Kevin Wolf
From: Eric Blake The NBD Protocol states that NBD_REP_SERVER may set 'length > sizeof(namelen) + namelen'; in which case the rest of the packet is a UTF-8 description of the export. While we don't know of any NBD servers that send this description yet, we had better consume

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

2016-04-15 Thread Stefan Weil
Am 15.04.2016 um 11:15 schrieb Daniel P. Berrange: > On Thu, Apr 14, 2016 at 08:12:00PM +0100, Peter Maydell wrote: [...] >> (Incidentally the original intention in commit c61964406 >> was clearly that callers should need to check only EAGAIN and >> not EWOULDBLOCK, and for 2.7 we should look at

[Qemu-devel] [PULL 02/19] block: Fix blk_aio_write_zeroes()

2016-04-15 Thread Kevin Wolf
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_zeroes doesn't have a qiov, which this commit interprets as 0 bytes. Consequently,

[Qemu-devel] [PULL 06/19] block/vpc: Use the correct max sector count for VHD images

2016-04-15 Thread Kevin Wolf
From: Jeff Cody The old VHD_MAX_SECTORS value is incorrect, and is a throwback to the CHS calculations. The VHD specification allows images up to 2040 GiB, which (using 512 byte sectors) corresponds to a maximum number of sectors of 0xff00, rather than the old value of

[Qemu-devel] [PULL 11/19] Fix pflash migration

2016-04-15 Thread Kevin Wolf
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

[Qemu-devel] [PULL 00/19] Block layer patches for 2.6.0-rc3

2016-04-15 Thread Kevin Wolf
The following changes since commit 538a467329818ea831f602491ac62d7d7999102a: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2016-04-15 10:49:04 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[Qemu-devel] [PULL 15/19] qemu-iotests: place valgrind log file in scratch dir

2016-04-15 Thread Kevin Wolf
From: Sascha Silbe Do not place the valgrind log file at a predictable path in a world-writable location. Use the common scratch directory (${TEST_DIR}) instead. Signed-off-by: Sascha Silbe Reviewed-by: Bo Tu

[Qemu-devel] [PULL 10/19] 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)

[Qemu-devel] [PULL 07/19] block/vpc: make checks on max table size a bit more lax

2016-04-15 Thread Kevin Wolf
From: Jeff Cody The check on the max_table_size field not being larger than required is valid, and in accordance with the VHD spec. However, there have been VHD images encountered in the wild that have an out-of-spec max table size that is technically too large. There is no

[Qemu-devel] [PULL 05/19] block/vpc: use current_size field for XenConverter VHD images

2016-04-15 Thread Kevin Wolf
From: Jeff Cody XenConverter VHD images are another VHD image where current_size is different from the CHS values in the the format header. Use current_size as the default, by looking at the creator_app signature field. Signed-off-by: Jeff Cody Reviewed-by:

[Qemu-devel] [PULL 09/19] block/vpc: update comments to be compliant w/coding guidelines

2016-04-15 Thread Kevin Wolf
From: Jeff Cody Signed-off-by: Jeff Cody Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/vpc.c | 68 ++--- 1 file changed, 34 insertions(+), 34

[Qemu-devel] [PULL 01/19] qemu-io: Support 'aio_write -z'

2016-04-15 Thread Kevin Wolf
This allows testing blk_aio_write_zeroes(). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qemu-io-cmds.c | 65 +++--- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/qemu-io-cmds.c

[Qemu-devel] [PULL 04/19] vpc: use current_size field for XenServer VHD images

2016-04-15 Thread Kevin Wolf
From: Stefan Hajnoczi The vpc driver has two methods of determining virtual disk size. The correct one to use depends on the software that generated the image file. Add the XenServer creator_app signature so that image size is correctly detected for those images.

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

2016-04-15 Thread Peter Maydell
On 15 April 2016 at 17:56, Stefan Weil wrote: > AIX 4.3,5.1 uses 11/54, HP-UX 11.22 uses 11/246 for EAGAIN/EWOULDBLOCK > according to that table. > > Is this relevant for QEMU? We still have support in configure for AIX. I have no idea when anybody last tested it, so my money

[Qemu-devel] Simultaneous vhostfds= and ifname= options

2016-04-15 Thread Michał Dubiel
Hi guys, Qemu does not allow currently to use vhostfds= and ifname= options of -netdev tap... at the same time. In order to use vhostfds=, you have to also use fds= instead. May ask you what is rationale behind that? I am asking as we need this for the OpenContrail vRouter multiqueue support. We

Re: [Qemu-devel] [PATCH] target-i386: add AMD CPUID.1:edx aliases to x86_cpu_get_migratable_flags

2016-04-15 Thread Eduardo Habkost
On Thu, Apr 14, 2016 at 10:55:07PM +0200, Radim Krčmář wrote: > QEMU complains about -cpu host on an AMD machine: > warning: host doesn't support requested feature: CPUID.8001H:EDX [bit 0] > For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24. > > Host does support them, but

[Qemu-devel] [Bug 1570134] Re: While committing snapshot qemu crashes with SIGABRT

2016-04-15 Thread Matthew Schumacher
I just tested master, and it does the same as 2.6.0-rc The 2.6.0 branch crashes much faster than 2.5.x -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1570134 Title: While committing snapshot

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

2016-04-15 Thread H. Peter Anvin
On April 15, 2016 3:41:34 AM PDT, 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

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

2016-04-15 Thread Dr. David Alan Gilbert
* Kirill A. Shutemov (kir...@shutemov.name) wrote: > 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, > > > > > > > >

[Qemu-devel] [PULL 0/1] hostmem-file: plug a small leak

2016-04-15 Thread Markus Armbruster
The following changes since commit 538a467329818ea831f602491ac62d7d7999102a: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2016-04-15 10:49:04 +0100) are available in the git repository at: git://repo.or.cz/qemu/armbru.git

[Qemu-devel] [PULL 1/1] hostmem-file: plug a small leak

2016-04-15 Thread Markus Armbruster
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <146050-19241-1-git-send-email-marcandre.lur...@redhat.com> Reviewed-by: Igor Mammedov Signed-off-by: Markus Armbruster

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

2016-04-15 Thread Richard Henderson
On 04/15/2016 07:23 AM, Alex Bennée wrote: > +#define atomic_bool_cmpxchg(ptr, old, new) \ > +({ \ > +typeof(*ptr) _old = (old), _new = (new);\ > +bool r;

Re: [Qemu-devel] [PATCH 2/4] .travis.yml: reduce target list on core configure tweaks

2016-04-15 Thread Peter Maydell
On 15 April 2016 at 16:56, Alex Bennée wrote: > A number of configure options only really affect the core code and any > arch specific stuff should be flushed out by other builds: > > - trace-backends, log build is all targets, others can be less > - --disable-build,

[Qemu-devel] [PATCH 2/4] .travis.yml: reduce target list on core configure tweaks

2016-04-15 Thread Alex Bennée
A number of configure options only really affect the core code and any arch specific stuff should be flushed out by other builds: - trace-backends, log build is all targets, others can be less - --disable-build, ensuring disabling stuff doesn't break host - co-routine, default already built

[Qemu-devel] [PATCH 1/4] ./configure: accept stems to match a range of targets

2016-04-15 Thread Alex Bennée
This is useful if you want to build all targets of a given architecture or type. A simple submatch to an real target will add it to the list. Signed-off-by: Alex Bennée --- configure | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 0/4] Current Travis queue

2016-04-15 Thread Alex Bennée
Hi, The only addition is Stefan's libnfs-dev patch which will increase our coverage. However I would like to get some consensus about the configure hack for build stems. It doesn't provide globbing but IMHO stem support is good enough for the common build cases (and preferable to massive

[Qemu-devel] [PATCH 4/4] .travis.yml: add trusty GCE target

2016-04-15 Thread Alex Bennée
If we want to run our docker based tests we'll need to do them on a normal VM with docker support. Lets just enable the build on trusty for now to check against a newer Ubuntu. Signed-off-by: Alex Bennée -- v2 - use custom before_install to apt-get build-dep qemu -

[Qemu-devel] [PATCH 3/4] .travis.yml: add libnfs-dev for NFS block driver

2016-04-15 Thread Alex Bennée
From: Stefan Hajnoczi Let's ensure that block/nfs.o is built in Travis. This patch depends on the following build fixes: 1. block/nfs: add missing #include "qapi/error.h" 2. block/nfs: add missing #include "qemu/cutils.h" This patch also depends on Travis adding libnfs-dev

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

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

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

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

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

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

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

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

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

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

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

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()

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

[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 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()

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

[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 ---

[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

[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

[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()

[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

[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

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 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:

[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

[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 +

[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

[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

[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:

[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

[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 @@

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

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 >

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

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

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 > >

[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

[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

[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 ---

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

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

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

  1   2   >