Re: [Qemu-devel] [PATCH 0/4] cpu: Implement cpu_generic_new()

2017-02-21 Thread Eduardo Habkost
On Fri, Feb 17, 2017 at 08:05:22PM +0100, Igor Mammedov wrote: > On Mon, 13 Feb 2017 14:28:15 + > Peter Maydell wrote: > > > This patchset adds a new function cpu_generic_new() > > which is similar to cpu_generic_init() except that it > > does not realize the

Re: [Qemu-devel] [PATCH v2 30/30] migration: fix id leak regression

2017-02-21 Thread Philippe Mathieu-Daudé
Hi Marc-André, There is no documentation in "hw/qdev-core.h" for qdev_get_dev_path() and his name doesn't suggest any Heap allocation (like many others). Is there a recommended way in Qemu codebase to give to the user/caller a hit to care about releasing memory? "Learn to Read the Source,

Re: [Qemu-devel] [PATCH 2/2] qapi: Improve qobject input visitor error reporting

2017-02-21 Thread Eric Blake
On 02/21/2017 05:00 AM, Markus Armbruster wrote: > Error messages refer to nodes of the QObject being visited by name. > Trouble is the names are sometimes less than helpful: > > * The name of the root QObject is whatever @name argument got passed > to the visitor, except NULL gets mapped to

Re: [Qemu-devel] [PATCH 2/3] cpu: implement get_crash_info through QOM properties

2017-02-21 Thread Eric Blake
On 02/21/2017 04:42 AM, Paolo Bonzini wrote: > Provide a generic implementation for all CPU subclasses. > > Signed-off-by: Paolo Bonzini > --- > include/qom/cpu.h | 1 - > qom/cpu.c | 11 --- > target/i386/cpu.c | 2 +- > 3 files changed, 5 insertions(+),

Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-02-21 Thread Daniel P. Berrange
On Tue, Feb 21, 2017 at 05:21:46PM +, Ketan Nilangekar wrote: > > > On 2/21/17, 5:59 AM, "Stefan Hajnoczi" wrote: > > On Mon, Feb 20, 2017 at 03:34:57AM -0800, ashish mittal wrote: > > On Mon, Feb 20, 2017 at 3:02 AM, Stefan Hajnoczi >

Re: [Qemu-devel] [PATCH v8 4/8] ACPI: Add Virtual Machine Generation ID support

2017-02-21 Thread Michael S. Tsirkin
On Tue, Feb 21, 2017 at 05:08:40PM +0100, Laszlo Ersek wrote: > On 02/21/17 15:14, Michael S. Tsirkin wrote: > > On Tue, Feb 21, 2017 at 10:58:05AM +0100, Laszlo Ersek wrote: > >> On 02/21/17 02:43, Michael S. Tsirkin wrote: > >>> On Mon, Feb 20, 2017 at 09:55:40PM +0100, Laszlo Ersek wrote: >

Re: [Qemu-devel] [PATCH 09/14] tests: Don't check qobject_type() before qobject_to_qstring()

2017-02-21 Thread Eric Blake
On 02/17/2017 02:38 PM, Markus Armbruster wrote: > qobject_to_qstring(obj) returns NULL when obj isn't a QString. Check > that instead of qobject_type(obj) == QTYPE_QSTRING. > > Signed-off-by: Markus Armbruster > --- > tests/check-qjson.c | 31

Re: [Qemu-devel] [PATCH] mttcg: Set jmp_env to handle exit from tb_gen_code

2017-02-21 Thread Pranith Kumar
Alex Bennée writes: > Pranith Kumar writes: > >> Alex Bennée writes: >> >>> Pranith Kumar writes: >>> tb_gen_code() can exit execution using cpu_exit_loop() when it cannot allocate new tb's. To handle this, we need to properly set the

Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings

2017-02-21 Thread Laszlo Ersek
On 02/21/17 17:25, Laszlo Ersek wrote: > On 02/21/17 13:57, Gerd Hoffmann wrote: >> On Fr, 2017-02-17 at 21:54 +0200, Michael S. Tsirkin wrote: >>> From: Paolo Bonzini >>> >>> The virtio-net change is necessary because it uses virtqueue_fill >>> and virtqueue_flush instead of

Re: [Qemu-devel] [PATCH V7 2/2] Add a new qmp command to do checkpoint, query xen replication status

2017-02-21 Thread Eric Blake
On 02/21/2017 08:07 AM, Markus Armbruster wrote: > Zhang Chen writes: > >> On 02/21/2017 07:15 PM, Markus Armbruster wrote: >>> Zhang Chen writes: >>> We can call this qmp command to do checkpoint outside of qemu. Xen colo

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Peter Maydell
On 21 February 2017 at 16:18, Paolo Bonzini wrote: > On 21/02/2017 14:57, Peter Maydell wrote: >>> -global is a qdev thing. >> ...which reminds me to ask: is there any hope for unifying >> our properties so we don't have both "qdev properties" and >> "qom properties" or are

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-21 Thread Paolo Bonzini
On 21/02/2017 17:21, Alex Williamson wrote: > On Tue, 21 Feb 2017 14:46:55 +0800 > Yongji Xie wrote: > >> At the moment ram device's memory regions are NATIVE_ENDIAN. This does >> not work on PPC64 because VFIO PCI device is little endian but PPC64 >> always defines

Re: [Qemu-devel] [PATCH v2 01/30] qtest: fix a memory leak

2017-02-21 Thread Philippe Mathieu-Daudé
On 02/21/2017 11:14 AM, Marc-André Lureau wrote: Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé --- qtest.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [Qemu-devel] [PATCH v2 13/30] tests: fix ipmi-kcs-test leak

2017-02-21 Thread Philippe Mathieu-Daudé
On 02/21/2017 11:14 AM, Marc-André Lureau wrote: Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- tests/ipmi-kcs-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ipmi-kcs-test.c

Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-02-21 Thread Jeff Cody
On Tue, Feb 21, 2017 at 05:39:12PM +, Daniel P. Berrange wrote: > On Tue, Feb 21, 2017 at 05:21:46PM +, Ketan Nilangekar wrote: > > > > > > On 2/21/17, 5:59 AM, "Stefan Hajnoczi" wrote: > > > > On Mon, Feb 20, 2017 at 03:34:57AM -0800, ashish mittal wrote: > >

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-21 Thread Peter Maydell
On 21 February 2017 at 16:34, Paolo Bonzini wrote: > > > On 21/02/2017 17:21, Alex Williamson wrote: >> On Tue, 21 Feb 2017 14:46:55 +0800 >> Yongji Xie wrote: >> >>> At the moment ram device's memory regions are NATIVE_ENDIAN. This does >>> not

Re: [Qemu-devel] [PATCH v2 14/30] tests: fix ipmi-bt-test leak

2017-02-21 Thread Philippe Mathieu-Daudé
On 02/21/2017 11:14 AM, Marc-André Lureau wrote: Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- tests/ipmi-bt-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ipmi-bt-test.c

Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings

2017-02-21 Thread Paolo Bonzini
On 21/02/2017 13:57, Gerd Hoffmann wrote: > This change breaks ovmf for me, although it isn't obvious to me why. > Bisect landed here, and reverting indeed makes things going again. > > Using q35 machine type, pcie virtio devices, with the rhel ovmf build >

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

2017-02-21 Thread Peter Maydell
On 21 February 2017 at 15:40, Jeff Cody wrote: > The following changes since commit a1cf5fac2b929ffa2abd1285401f2535ff8c6fea: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2017-02-21' > into staging (2017-02-21 13:58:50 +) > > are available in the git

Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-02-21 Thread Ketan Nilangekar
On 2/21/17, 5:59 AM, "Stefan Hajnoczi" wrote: On Mon, Feb 20, 2017 at 03:34:57AM -0800, ashish mittal wrote: > On Mon, Feb 20, 2017 at 3:02 AM, Stefan Hajnoczi wrote: > > On Sat, Feb 18, 2017 at 12:30:31AM +, Ketan Nilangekar wrote:

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Eduardo Habkost
On Tue, Feb 21, 2017 at 04:48:49PM +0100, Markus Armbruster wrote: > Peter Maydell writes: > > > On 21 February 2017 at 13:56, Markus Armbruster wrote: > >> -global is a qdev thing. > > > > ...which reminds me to ask: is there any hope for unifying >

Re: [Qemu-devel] [Qemu-arm] [PATCH 0/4] cpu: Implement cpu_generic_new()

2017-02-21 Thread Peter Maydell
On 21 February 2017 at 15:58, Eduardo Habkost wrote: > On Thu, Feb 16, 2017 at 04:40:43PM +, Peter Maydell wrote: >> I know it's only been a few days, but I just wanted to >> say that I'd appreciate it if we could manage relatively >> quick review on this one, since I

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Eduardo Habkost
On Fri, Feb 17, 2017 at 07:56:32PM +0100, Igor Mammedov wrote: > > Some callers call CPUClass->parse_features manually to convert > '-cpu cpufoo,featurestr' string to cpu type and featurestr > into a set of global properties. And theni do controlled > cpu creation with setting properties and

Re: [Qemu-devel] [PATCH 1/4] cpu: add cpu_generic_new()

2017-02-21 Thread Eduardo Habkost
On Mon, Feb 13, 2017 at 02:28:16PM +, Peter Maydell wrote: > From: Michael Davidsaver > > Add a new API cpu_generic_new() which creates a QOM CPU object > (including calling the CPU class parse_features method) but > does not realize it, and reimplement

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Eduardo Habkost
On Tue, Feb 21, 2017 at 05:59:53PM +, Peter Maydell wrote: > On 21 February 2017 at 16:18, Paolo Bonzini wrote: > > On 21/02/2017 14:57, Peter Maydell wrote: > >>> -global is a qdev thing. > >> ...which reminds me to ask: is there any hope for unifying > >> our properties

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-21 Thread Alex Williamson
On Tue, 21 Feb 2017 18:09:04 + Peter Maydell wrote: > On 21 February 2017 at 16:34, Paolo Bonzini wrote: > > > > > > On 21/02/2017 17:21, Alex Williamson wrote: > >> On Tue, 21 Feb 2017 14:46:55 +0800 > >> Yongji Xie

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-21 Thread Paolo Bonzini
On 21/02/2017 19:09, Peter Maydell wrote: > In this instance I don't understand the patch. The ram_device > mem-ops are there to deal with memory regions backed by a > lump of RAM, right? Lumps of memory are always the endianness > of the host CPU by definition, so DEVICE_NATIVE_ENDIAN and > no

[Qemu-devel] [PULL 2/3] monitor: add poll-* properties into query-iothreads result

2017-02-21 Thread Dr. David Alan Gilbert (git)
From: Pavel Hrdina IOthreads were recently extended by new properties that can enable/disable and configure aio polling. This will also allow other tools that uses QEMU to probe for existence of those new properties via query-qmp-schema. Signed-off-by: Pavel Hrdina

[Qemu-devel] [PULL 1/3] hmp: fix block_set_io_throttle

2017-02-21 Thread Dr. David Alan Gilbert (git)
From: Eric Blake Commit 7a9877a made the 'device' parameter to BlockIOThrottle optional, favoring 'id' instead. But it forgot to update the HMP usage to set has_device, which makes all attempts to change throttling via HMP fail with "Need exactly one of 'device' and 'id'"

[Qemu-devel] [PULL 0/3] hmp queue

2017-02-21 Thread Dr. David Alan Gilbert (git)
itory at: git://github.com/dagrh/qemu.git tags/pull-hmp-20170221 for you to fetch changes up to 854e67fea6a6f181163a5467fc9ba04de8d181bb: monitor: Fix crashes when using HMP commands without CPU (2017-02-21 18:29:01 +) HMP pull

Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-02-21 Thread Daniel P. Berrange
On Tue, Feb 21, 2017 at 01:06:58PM -0500, Jeff Cody wrote: > On Tue, Feb 21, 2017 at 05:39:12PM +, Daniel P. Berrange wrote: > > On Tue, Feb 21, 2017 at 05:21:46PM +, Ketan Nilangekar wrote: > > > > > > > > > On 2/21/17, 5:59 AM, "Stefan Hajnoczi" wrote: > > > > > >

[Qemu-devel] [PULL 3/3] monitor: Fix crashes when using HMP commands without CPU

2017-02-21 Thread Dr. David Alan Gilbert (git)
From: Thomas Huth When running certain HMP commands ("info registers", "info cpustats", "info tlb", "nmi", "memsave" or dumping virtual memory) with the "none" machine, QEMU crashes with a segmentation fault. This happens because the "none" machine does not have any CPUs by

[Qemu-devel] [PATCH 1/2] virtio: invalidate memory in vring_set_avail_event()

2017-02-21 Thread Stefan Hajnoczi
Remember to invalidate the avail event field so the memory pages are marked dirty. Cc: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index

[Qemu-devel] [PATCH 0/2] virtio: migration fixes for memory region cache

2017-02-21 Thread Stefan Hajnoczi
Bug fixes for the recently added memory region cache in virtio. This series fixes live migration, see patches for details. Stefan Hajnoczi (2): virtio: invalidate memory in vring_set_avail_event() virtio: add missing region cache init in virtio_load() hw/virtio/virtio.c | 15

[Qemu-devel] [PATCH 2/2] virtio: add missing region cache init in virtio_load()

2017-02-21 Thread Stefan Hajnoczi
Commit 97cd965c070152bc626c7507df9fb356bbe1cd81 ("virtio: use VRingMemoryRegionCaches for avail and used rings") switched to a memory region cache to avoid repeated map/unmap operations. The virtio_load() process is a little tricky because vring addresses are serialized in two separate places.

Re: [Qemu-devel] [PULL 12/23] virtio: use VRingMemoryRegionCaches for avail and used rings

2017-02-21 Thread Laszlo Ersek
On 02/21/17 19:08, Paolo Bonzini wrote: > > > On 21/02/2017 13:57, Gerd Hoffmann wrote: >> This change breaks ovmf for me, although it isn't obvious to me why. >> Bisect landed here, and reverting indeed makes things going again. >> >> Using q35 machine type, pcie virtio devices, with the rhel

[Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request

2017-02-21 Thread Alex Williamson
Currently we ignore this error, report it with error_reportf_err() Signed-off-by: Alex Williamson --- hw/vfio/pci.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 332f41d6627f..f2ba9b6cfafc 100644 ---

Re: [Qemu-devel] [PATCH v2 05/30] glib-compat: add g_test_add_data_func_full fallback

2017-02-21 Thread Eric Blake
On 02/21/2017 08:14 AM, Marc-André Lureau wrote: > Move the fallback from qtest_add_data_func_full() to glib-compat. > > Signed-off-by: Marc-André Lureau > --- > include/glib-compat.h | 21 + > tests/libqtest.c | 10 -- > 2 files

Re: [Qemu-devel] [PATCH 10/14] tests: Don't check qobject_type() before qobject_to_qint()

2017-02-21 Thread Eric Blake
On 02/17/2017 02:38 PM, Markus Armbruster wrote: > qobject_to_qint(obj) returns NULL when obj isn't a QInt. Check > that instead of qobject_type(obj) == QTYPE_QINT. > > Signed-off-by: Markus Armbruster > --- > tests/check-qjson.c | 24 +---

Re: [Qemu-devel] [PATCH v8 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"

2017-02-21 Thread Jeff Cody
On Tue, Feb 21, 2017 at 06:56:24PM +, Daniel P. Berrange wrote: > On Tue, Feb 21, 2017 at 01:06:58PM -0500, Jeff Cody wrote: > > On Tue, Feb 21, 2017 at 05:39:12PM +, Daniel P. Berrange wrote: > > > On Tue, Feb 21, 2017 at 05:21:46PM +, Ketan Nilangekar wrote: > > > > > > > > > > > >

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Peter Maydell
On 21 February 2017 at 18:28, Eduardo Habkost wrote: > Peter, do you think a wrapper for parse_features + object_new() > would still be necessary to avoid too much code duplication on > arm boards in 2.9, or can we live without it until we apply > Igor's series (probaly after

[Qemu-devel] [PATCH RFC v3 5/5] block: Crude initial implementation of -blockdev

2017-02-21 Thread Markus Armbruster
The new command line option -blockdev works like QMP command blockdev-add. The option argument may be given in JSON syntax, exactly as in QMP. Example usage: -blockdev '{"node-name": "foo", "driver": "raw", "file": {"driver": "file", "filename": "foo.img"} }' The JSON argument doesn't

[Qemu-devel] [PATCH RFC v3 1/5] tests: Fix gcov-files-test-qemu-opts-y, gcov-files-test-logging-y

2017-02-21 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- tests/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index e60bb6c..5591f60 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -94,7

[Qemu-devel] [PATCH RFC v3 0/5] block: Crude initial implementation of -blockdev

2017-02-21 Thread Markus Armbruster
Still missing: list support, better error messages, general polish This is based on * [PATCH v2 00/24] QemuOpts util/cutils: Fix and clean up number conversions" * [PATCH 00/14] qobject: Cleanups, mostly in tests * [PATCH 0/2] qapi: Improve qobject input visitor error reporting Branch

Re: [Qemu-devel] Qemu and Changed Block Tracking

2017-02-21 Thread John Snow
On 02/21/2017 07:43 AM, Peter Lieven wrote: > Hi, > > > is there anyone ever thought about implementing something like VMware > CBT in Qemu? > > > https://kb.vmware.com/selfservice/microsites/search.do?language=en_US=displayKC=1020128 > > > > Thanks, > Peter > > A bit outdated now,

Re: [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request

2017-02-21 Thread Auger Eric
Hi Alex, On 21/02/2017 20:10, Alex Williamson wrote: > Currently we ignore this error, report it with error_reportf_err() > > Signed-off-by: Alex Williamson Reviewed-by: Eric Auger Eric > --- > hw/vfio/pci.c |6 +- > 1 file changed,

[Qemu-devel] [PATCH v2 23/24] util/cutils: Change qemu_strtosz*() from int64_t to uint64_t

2017-02-21 Thread Markus Armbruster
This will permit its use in parse_option_size(). Cc: Dr. David Alan Gilbert Cc: Eduardo Habkost (maintainer:X86) Cc: Kevin Wolf (supporter:Block layer core) Cc: Max Reitz (supporter:Block layer core) Cc:

[Qemu-devel] [PATCH v2 0/3] Flatten simple unions where we still can

2017-02-21 Thread Markus Armbruster
Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on the wire, both pointless. They're best avoided in new code. But we can do more: we can flatten the simple unions that aren't used in QMP.

Re: [Qemu-devel] [PATCH v2 00/24] QemuOpts util/cutils: Fix and clean up number conversions

2017-02-21 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v2 00/24] QemuOpts util/cutils: Fix and clean up number conversions Message-id: 1487708048-2131-1-git-send-email-arm...@redhat.com === TEST SCRIPT BEGIN

[Qemu-devel] [PATCH v2 1/3] numa: Flatten simple union NumaOptions

2017-02-21 Thread Markus Armbruster
Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on the wire, both pointless. They're best avoided in new code. NumaOptions isn't new, but it's only used internally, not in QMP. Convert it to

[Qemu-devel] [PATCH v2 3/3] i386/cpu: net: Flatten simple union GuestPanicInformationType

2017-02-21 Thread Markus Armbruster
Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on the wire, both pointless. They're best avoided in new code. Fix up recent commit d187e08 accordingly. Cc: Anton Nefedov

Re: [Qemu-devel] [PATCH 1/2] vfio/platform: make the vfio-platform device non abstract

2017-02-21 Thread Auger Eric
Hi Sinan, On 21/02/2017 16:34, Sinan Kaya wrote: > On 2/21/2017 10:23 AM, Auger Eric wrote: >>> Note that the goal is to be able to instantiate any platform device by just >>> passing a compatible string and the object from the host. We don't want >>> to make changes to QEMU every time somebody

[Qemu-devel] [RFC v2 1/2] vfio/platform: make the vfio-platform device non abstract

2017-02-21 Thread Eric Auger
Up to now the vfio-platform device has been abstract and could not be instantiated. The integration of a new vfio platform device required to create a dummy derived device which only set the compatibility string. Following the few vfio-platform device integration we have seen the actual requested

[Qemu-devel] [RFC v2 2/2] hw/arm/sysbus-fdt: Allow device matching with compat string

2017-02-21 Thread Eric Auger
Up to now we have relied on the device type to identify a device tree node creation function. Since we would like the VFIO-PLATFORM device to be instantiable with different compatibility strings we introduce the capability to specialize the node creation depending on a manufacturer/model combo.

[Qemu-devel] [RFC v2 0/2] Allow direct vfio-platform device instantiation

2017-02-21 Thread Eric Auger
Up to now, supporting a new VFIO-PLATFORM device has requested to create a dummy derived device. The type of the derived device was used to match the device tree node creation function. Since the actual adaptation fits within this node creation function and not anywhere else at the moment, let's

Re: [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request

2017-02-21 Thread Philippe Mathieu-Daudé
On 02/21/2017 06:28 PM, Auger Eric wrote: Hi Alex, On 21/02/2017 20:10, Alex Williamson wrote: Currently we ignore this error, report it with error_reportf_err() Signed-off-by: Alex Williamson Reviewed-by: Eric Auger Eric Reviewed-by:

[Qemu-devel] [PATCH v2 2/3] net: Flatten simple union NetLegacyOptions

2017-02-21 Thread Markus Armbruster
Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on the wire, both pointless. They're best avoided in new code. NetLegacyOptions isn't new, but it's only used internally, not in QMP. Convert

[Qemu-devel] [PATCH RFC v3 3/5] qapi: Permit scalar type conversions in QObjectInputVisitor

2017-02-21 Thread Markus Armbruster
From: "Daniel P. Berrange" Currently the QObjectInputVisitor assumes that all scalar values are directly represented as the final types declared by the thing being visited. i.e. it assumes an 'int' is using QInt, and a 'bool' is using QBool, etc. This is good when

[Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-21 Thread Markus Armbruster
keyval_parse() parses KEY=VALUE,... into a QDict. Works like qemu_opts_parse(), except: * Returns a QDict instead of a QemuOpts (d'oh). * It supports nesting, unlike QemuOpts: a KEY is split into key components at '.' (dotted key convention; the block layer does something similar on top of

[Qemu-devel] [PATCH RFC v3 4/5] qapi: Factor qobject_input_get_autocast() out of methods

2017-02-21 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/qobject-input-visitor.c | 87 ++-- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c index 0bf6849..970bb37 100644 ---

[Qemu-devel] [PATCH] vfio/pci: Improve extended capability comments, skip masked caps

2017-02-21 Thread Alex Williamson
Since commit 4bb571d857d9 ("pci/pcie: don't assume cap id 0 is reserved") removes the internal use of extended capability ID 0, the comment here becomes invalid. However, peeling back the onion, the code is still correct and we still can't seed the capability chain with ID 0, unless we want to

Re: [Qemu-devel] [PATCH v2] Changing error message of QMP 'migrate_set_downtime' to seconds

2017-02-21 Thread Daniel Henrique Barboza
On 02/21/2017 12:47 PM, Markus Armbruster wrote: "Dr. David Alan Gilbert" writes: * Markus Armbruster (arm...@redhat.com) wrote: Daniel Henrique Barboza writes: On 02/21/2017 06:02 AM, Markus Armbruster wrote: Daniel Henrique Barboza

[Qemu-devel] [PULL v2 20/24] coroutine-lock: add limited spinning to CoMutex

2017-02-21 Thread Stefan Hajnoczi
From: 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

[Qemu-devel] [PATCH 2/2] update Linux headers to 4.11

2017-02-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/standard-headers/linux/input-event-codes.h | 2 +- include/standard-headers/linux/pci_regs.h | 8 + include/standard-headers/linux/virtio_ids.h| 1 + linux-headers/asm-arm/kvm.h| 15 +

[Qemu-devel] [PULL 01/11] hw: Default -drive to if=ide explicitly where it works

2017-02-21 Thread Markus Armbruster
Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused

[Qemu-devel] [PATCH 1/2] update-linux-headers: update for 4.11

2017-02-21 Thread Paolo Bonzini
The linux-headers/asm-arm/unistd.h file has been split in three sub-files, copy them along. However, building them requires setting ARCH rather than SRCARCH. SRCARCH defaults to $(ARCH) anyway; to avoid future occurrence of the same problem use ARCH for all architectures where SRCARCH=ARCH.

Re: [Qemu-devel] [PATCH v2] Changing error message of QMP 'migrate_set_downtime' to seconds

2017-02-21 Thread Daniel Henrique Barboza
On 02/21/2017 06:02 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: The previous error message was displaying the values in miliseconds, being misleading with the command that accepts the value in seconds: { "execute": "migrate_set_downtime",

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Igor Mammedov
On Mon, 20 Feb 2017 19:11:00 + Peter Maydell wrote: > On 20 February 2017 at 18:55, Igor Mammedov wrote: > > Peter Maydell wrote: [...] > > > its sole user netduino2 board has cpu_model hardcodded > > at board

Re: [Qemu-devel] [PATCH v4 3/5] slirp: Common lhost/fhost union

2017-02-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > The socket structure has a pair of unions for lhost and fhost > addresses; the unions are identical so split them out into > a separate union declaration. > > Signed-off-by: Dr.

Re: [Qemu-devel] [PATCH v4 5/5] slirp: VMStatify remaining except for loop

2017-02-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > This converts the remaining components, except for the top level > loop, to VMState. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Peter Maydell
On 21 February 2017 at 13:56, Markus Armbruster wrote: > -global is a qdev thing. ...which reminds me to ask: is there any hope for unifying our properties so we don't have both "qdev properties" and "qom properties" or are we doomed to two distinct sets of APIs forever?

[Qemu-devel] [PATCH v2 02/30] tests: fix qmp response leak

2017-02-21 Thread Marc-André Lureau
Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- tests/libqos/usb.c | 1 + tests/postcopy-test.c | 2 +- tests/pvpanic-test.c | 1 + tests/test-filter-mirror.c | 2 +-

[Qemu-devel] [PATCH v2 01/30] qtest: fix a memory leak

2017-02-21 Thread Marc-André Lureau
Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- qtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qtest.c b/qtest.c index 1446719e8d..6f4d26832a 100644 --- a/qtest.c +++ b/qtest.c @@ -240,6 +240,7 @@

[Qemu-devel] [PATCH v2 09/30] tests: fix vhost-user-test leaks

2017-02-21 Thread Marc-André Lureau
Spotted by ASAN. Signed-off-by: Marc-André Lureau --- tests/libqos/virtio-pci.h | 2 ++ tests/libqos/virtio-pci.c | 6 ++ tests/vhost-user-test.c | 11 +++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/libqos/virtio-pci.h

[Qemu-devel] [PATCH v2 30/30] migration: fix id leak regression

2017-02-21 Thread Marc-André Lureau
This leak was introduced in commit 581f08bac22bdd5e081ae07f68071a0fc3c5c2c7. (it stands out quickly with ASAN once the rest of the leaks are also removed from make check with this series) Cc: Dr. David Alan Gilbert Cc: Juan Quintela Signed-off-by:

[Qemu-devel] [PATCH 02/54] qcow2: Use BB for resizing in qcow2_amend_options()

2017-02-21 Thread Kevin Wolf
In order to able to conver bdrv_truncate() to take a BdrvChild and later to correctly check the resize permission here, we need to use a BlockBackend for resizing the image. Signed-off-by: Kevin Wolf --- block/qcow2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v2 29/30] tests: fix virtio-blk-test leaks

2017-02-21 Thread Marc-André Lureau
Use qvirtio_pci_device_find_slot() to avoid leaking the non-hp device. Add assert() to avoid further leaks in the future. Use qvirtio_pci_device_free() to correctly free QVirtioPCIDevice. Signed-off-by: Marc-André Lureau --- tests/libqos/virtio-pci.c | 1 +

[Qemu-devel] [PATCH 15/54] block: Involve block drivers in permission granting

2017-02-21 Thread Kevin Wolf
In many cases, the required permissions of one node on its children depends on what its parents require from it. For example, the raw format or most filter drivers only need to request consistent reads if that's something that one of their parents wants. In order to achieve this, this patch

[Qemu-devel] [PATCH 14/54] block: Let callers request permissions when attaching a child node

2017-02-21 Thread Kevin Wolf
When attaching a node as a child to a new parent, the required and shared permissions for this parent are checked against all other parents of the node now, and an error is returned if there is a conflict. This allows error returns to a function that previously always succeeded, and the same is

[Qemu-devel] [PATCH 48/54] nbd/server: Use real permissions for NBD exports

2017-02-21 Thread Kevin Wolf
NBD can't cope with device size changes, so resize must be forbidden, but otherwise we can tolerate anything. Depending on whether the export is writable or not, we only require consistent reads and writes. Signed-off-by: Kevin Wolf --- nbd/server.c | 11 +-- 1 file

[Qemu-devel] [PATCH 24/54] block: Add permissions to blk_new()

2017-02-21 Thread Kevin Wolf
We want every user to be specific about the permissions it needs, so we'll pass the initial permissions as parameters to blk_new(). A user only needs to call blk_set_perm() if it wants to change the permissions after the fact. The permissions are stored in the BlockBackend and applied whenever a

[Qemu-devel] [PATCH 53/54] block: Add Error parameter to bdrv_set_backing_hd()

2017-02-21 Thread Kevin Wolf
Not all callers of bdrv_set_backing_hd() know for sure that attaching the backing file will be allowed by the permission system. Return the error from the function rather than aborting. Signed-off-by: Kevin Wolf --- block.c | 27 ---

[Qemu-devel] [PATCH 27/54] block: Request real permissions in blk_new_open()

2017-02-21 Thread Kevin Wolf
We can figure out the necessary permissions from the flags that the caller passed. Signed-off-by: Kevin Wolf --- block/block-backend.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c

[Qemu-devel] [PATCH 38/54] backup: Use real permissions in backup block job

2017-02-21 Thread Kevin Wolf
The backup block job doesn't have very complicated requirements: It needs to read from the source and write to the target, but it's fine with either side being changed. The only restriction is that we can't resize the image because the job uses a cached value. qemu-iotests 055 needs to be changed

[Qemu-devel] [PATCH 43/54] stream: Use real permissions in streaming block job

2017-02-21 Thread Kevin Wolf
The correct permissions are relatively obvious here (and explained in code comments). For intermediate streaming, we need to reopen the top node read-write before creating the job now because the permissions system catches attempts to get the BLK_PERM_WRITE_UNCHANGED permission on a read-only

Re: [Qemu-devel] [PATCH] monitor: add poll-* properties into query-iothreads result

2017-02-21 Thread Dr. David Alan Gilbert
* Pavel Hrdina (phrd...@redhat.com) wrote: > IOthreads were recently extended by new properties that can > enable/disable and configure aio polling. This will also allow > other tools that uses QEMU to probe for existence of those new > properties via query-qmp-schema. > > Signed-off-by: Pavel

Re: [Qemu-devel] [PATCH] mttcg: Set jmp_env to handle exit from tb_gen_code

2017-02-21 Thread Alex Bennée
Pranith Kumar writes: > Alex Bennée writes: > >> Pranith Kumar writes: >> >>> tb_gen_code() can exit execution using cpu_exit_loop() when it cannot >>> allocate new tb's. To handle this, we need to properly set the jmp_env >>> pointer ahead of

Re: [Qemu-devel] [PATCH RFC v3 04/15] vfio: ccw: basic implementation for vfio_ccw driver

2017-02-21 Thread Cornelia Huck
On Tue, 21 Feb 2017 15:36:23 +0800 Dong Jia Shi wrote: > * Cornelia Huck [2017-02-20 19:31:13 +0100]: > > > On Fri, 17 Feb 2017 09:29:28 +0100 > > Dong Jia Shi wrote: > > > > > To make vfio support subchannel

Re: [Qemu-devel] Qemu and Changed Block Tracking

2017-02-21 Thread Eric Blake
On 02/21/2017 06:43 AM, Peter Lieven wrote: > Hi, > > > is there anyone ever thought about implementing something like VMware > CBT in Qemu? > > > https://kb.vmware.com/selfservice/microsites/search.do?language=en_US=displayKC=1020128 Yes; in fact, the work on persistent dirty bitmaps and on

Re: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model

2017-02-21 Thread Markus Armbruster
Peter Maydell writes: > On 21 February 2017 at 13:56, Markus Armbruster wrote: >> -global is a qdev thing. > > ...which reminds me to ask: is there any hope for unifying > our properties so we don't have both "qdev properties" and > "qom properties"

Re: [Qemu-devel] [PATCH] memory: make ram device read/write endian sensitive

2017-02-21 Thread Alex Williamson
On Tue, 21 Feb 2017 14:46:55 +0800 Yongji Xie wrote: > At the moment ram device's memory regions are NATIVE_ENDIAN. This does > not work on PPC64 because VFIO PCI device is little endian but PPC64 > always defines static macro TARGET_WORDS_BIGENDIAN. > > This fixes

Re: [Qemu-devel] [PATCH 0/2] fix segfaults caused by accessing CPU in empty machine

2017-02-21 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 17.02.2017 09:27, Ziyue Yang wrote: > > From: Ziyue Yang > > > > Many QEMU monitor commands, like "info lapic", "info tlb" and so on > > use mon_get_cpu or related wrappers to access CPU info without checking > > whether the CPU

Re: [Qemu-devel] [PATCH 13/14] monitor: Clean up handle_hmp_command() a bit

2017-02-21 Thread Eric Blake
On 02/17/2017 02:38 PM, Markus Armbruster wrote: > Leave checking qobject_type(req) to qmp_check_input_obj(). Rework > handling of json_parser_parse_err() failing without setting an error. > > Signed-off-by: Markus Armbruster > --- > monitor.c | 9 + > 1 file

[Qemu-devel] [PATCH 16/54] block: Default .bdrv_child_perm() for filter drivers

2017-02-21 Thread Kevin Wolf
Most filters need permissions related to read and write for their children, but only if the node has a parent that wants to use the same operation on the filter. The same is true for resize. This adds a default implementation that simply forwards all necessary permissions to all children of the

[Qemu-devel] [PATCH 20/54] vvfat: Implement .bdrv_child_perm()

2017-02-21 Thread Kevin Wolf
vvfat is the last remaining driver that can have children, but doesn't implement .bdrv_child_perm() yet. The default handlers aren't suitable here, so let's implement a very simple driver-specific one that protects the internal child from being used by other users as good as our permissions

[Qemu-devel] [PATCH 28/54] block: Allow error return in BlockDevOps.change_media_cb()

2017-02-21 Thread Kevin Wolf
Some devices allow a media change between read-only and read-write media. They need to adapt the permissions in their .change_media_cb() implementation, which can fail. So add an Error parameter to the function. Signed-off-by: Kevin Wolf --- block/block-backend.c | 20

[Qemu-devel] [PATCH 37/54] commit: Use real permissions for HMP 'commit'

2017-02-21 Thread Kevin Wolf
This is a little simpler than the commit block job because it's synchronous and only commits into the immediate backing file, but otherwise doing more or less the same. Signed-off-by: Kevin Wolf --- block/commit.c | 31 ++- 1 file changed, 26

[Qemu-devel] [PATCH 46/54] hmp: Request permissions in qemu-io

2017-02-21 Thread Kevin Wolf
The HMP command 'qemu-io' is a bit tricky because it wants to work on the original BlockBackend, but additional permissions could be required. The details are explained in a comment in the code, but in summary, just request whatever permissions the current qemu-io command needs. Signed-off-by:

[Qemu-devel] [PATCH 40/54] block: BdrvChildRole.attach/detach() callbacks

2017-02-21 Thread Kevin Wolf
Backing files are somewhat special compared to other kinds of children because they are attached and detached using bdrv_set_backing_hd() rather than the normal set of functions, which does a few more things like setting backing blockers, toggling the BDRV_O_NO_BACKING flag, setting

[Qemu-devel] [PATCH 54/54] block: Add Error parameter to bdrv_append()

2017-02-21 Thread Kevin Wolf
Aborting on error in bdrv_append() isn't correct. This patch fixes it and lets the callers handle failures. Test case 085 needs a reference output update. This is caused by the reversed order of bdrv_set_backing_hd() and change_parent_backing_link() in bdrv_append(): When the backing file of the

<    1   2   3   4   5   6   >