[Qemu-devel] [PATCH 10/24] vhost: call vhost_log_put() on cleanup

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Make sure the log is being released on cleanup and the structure cleared. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index febf64f..237db77 100644 --- a/hw/virtio/vhost

[Qemu-devel] [PATCH 18/24] get_vhost_net() should be != null after vhost_user_init

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 1 + net/vhost-user.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f1dd367..22ea653 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -417,6 +417

[Qemu-devel] [PATCH 05/24] vhost: change some assert() for error_report() or silent fail

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Calling a vhost operation may fail, especially with disconnectable backends. Treat some that look harmless as recoverable errors (print error, or ignore on error code path). Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 32 +--- 1

[Qemu-devel] [PATCH 14/24] vhost: don't assume opaque is a fd, use backend cleanup

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index c3d3481..2c6535c 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1004,21 +10

Re: [Qemu-devel] [PATCH qemu v18 1/5] memory: Add reporting of supported page sizes

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 08:16, David Gibson wrote: >> for (addr = 0; addr < memory_region_size(mr); addr += granularity) { >> iotlb = mr->iommu_ops->translate(mr, addr, is_write); >> if (iotlb.perm != IOMMU_NONE) { > > Paolo, are you ok for me to make that small change and take this

[Qemu-devel] [PATCH 17/24] Revert "vhost-net: do not crash if backend is not present"

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Now that get_vhost_net() returns non-null after a successful vhost_net_init(), we no longer need to check this case. This reverts commit ecd34898596c60f79886061618dd7e01001113ad. Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 7 +-- 1 file changed, 1 ins

[Qemu-devel] [PATCH 21/24] char: add chr_wait_connected callback

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau A function to wait on the backend to be connected, to be used in the following patches. Signed-off-by: Marc-André Lureau --- include/sysemu/char.h | 8 qemu-char.c | 9 + 2 files changed, 17 insertions(+) diff --git a/include/sysemu/char.h b/

[Qemu-devel] [PATCH 15/24] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init()

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau vhost_net_init() calls vhost_dev_init() and in case of failure, calls vhost_dev_cleanup() directly. However, the structure is already partially cleaned on error. Calling vhost_dev_cleanup() again will call vhost_virtqueue_cleanup() on already clean queues, and causing pote

[Qemu-devel] [PATCH 23/24] vhost-user: wait until link is up

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau The chardev waits for an initial connection before starting qemu, vhost-user wants the backend negotiation to be completed. vhost-user is started in the net_vhost_user_event callback, which is synchronously called after the socket is connected. Signed-off-by: Marc-André L

Re: [Qemu-devel] [PATCHv2] rtl8139: save/load RxMulOk counter (again)

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 11:36, David Vrabel wrote: > On 21/06/16 08:35, Paolo Bonzini wrote: >> >> >> On 21/06/2016 03:44, Jason Wang wrote: >>> >>> >>> On 2016年06月21日 01:53, David Vrabel wrote: Commit 9d29cdeaaca3a0383af764000b71492c4fc67c6e (rtl8139: port TallyCounters to vmstate) introduced in

[Qemu-devel] [PATCH 22/24] char: add and use tcp_chr_wait_connected

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau Add a chr_wait_connected for the tcp backend, and use it in the open_socket() function. Signed-off-by: Marc-André Lureau --- qemu-char.c | 63 ++--- 1 file changed, 44 insertions(+), 19 deletions(-) diff --git a/q

Re: [Qemu-devel] [PATCH 0/5] Auto-fragment large transactions at the block layer

2016-06-21 Thread Stefan Hajnoczi
On Mon, Jun 20, 2016 at 05:39:24PM -0600, Eric Blake wrote: > We have max_transfer documented in BlockLimits, but while we > honor it during pwrite_zeroes, we were blindly ignoring it > during pwritev and preadv, leading to multiple drivers having > to implement fragmentation themselves. This seri

Re: [Qemu-devel] [RFC PATCH 1/1] OpenBIOS: Switch over to official OpenBIOS git repo

2016-06-21 Thread Stefan Hajnoczi
On Tue, Jun 21, 2016 at 01:40:42AM -0400, Jeff Cody wrote: > This update should preserve git history, and allow seamless switching > over to the official openbios git repo, rather than pulling from the > svn mirror. All prior history from the svn repository should still be > preserved (i.e., commi

[Qemu-devel] [PATCH 20/24] vhost: add assert() to check runtime behaviour

2016-06-21 Thread marcandre . lureau
From: Marc-André Lureau All these functions must be called only after the backend is connected. They are called from virtio-net.c, after either virtio or link status change. The check for nc->peer->link_down should ensure vhost_net_{start,stop}() are always called between vhost_user_{start,stop}

[Qemu-devel] [PATCH] milkymist: fix tmu2.c build failure (missing error.h include)

2016-06-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/milkymist-tmu2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/milkymist-tmu2.c b/hw/display/milkymist-tmu2.c index 356483f..9c00184 100644 --- a/hw/display/milkymist-tmu2.c +++ b/hw/display/milkymist-tmu2.c @@ -29,6 +29,7 @@ #include

Re: [Qemu-devel] [PATCH] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save"

2016-06-21 Thread Cornelia Huck
On Tue, 21 Jun 2016 11:02:11 +0100 Stefan Hajnoczi wrote: > This reverts commit 10a06fd65f667a972848ebbbcac11bdba931b544. > > Dataplane has used the same virtqueue code as non-dataplane since > commits e24a47c5b73e04f94030e2daa356c7582aebfca2 ("virtio-scsi: do not > use vring in dataplane") and

Re: [Qemu-devel] [PATCH 0/5] Auto-fragment large transactions at the block layer

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 12:23 hat Stefan Hajnoczi geschrieben: > On Mon, Jun 20, 2016 at 05:39:24PM -0600, Eric Blake wrote: > > We have max_transfer documented in BlockLimits, but while we > > honor it during pwrite_zeroes, we were blindly ignoring it > > during pwritev and preadv, leading to multiple dr

Re: [Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 11:47 hat Paolo Bonzini geschrieben: > > > On 21/06/2016 11:21, Kevin Wolf wrote: > > This series converts all I/O function in the core block layer up to > > bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter > > instead of a BlockDriverState. > > > > The or

Re: [Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 12:56, Kevin Wolf wrote: > Am 21.06.2016 um 11:47 hat Paolo Bonzini geschrieben: >> >> >> On 21/06/2016 11:21, Kevin Wolf wrote: >>> This series converts all I/O function in the core block layer up to >>> bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter >>> in

Re: [Qemu-devel] [PATCH] Revert "virtio: sync the dataplane vring state to the virtqueue before virtio_save"

2016-06-21 Thread Pavel Butsykin
On 21.06.2016 13:02, Stefan Hajnoczi wrote: This reverts commit 10a06fd65f667a972848ebbbcac11bdba931b544. Dataplane has used the same virtqueue code as non-dataplane since commits e24a47c5b73e04f94030e2daa356c7582aebfca2 ("virtio-scsi: do not use vring in dataplane") and 03de2f527499ae0c6d16a379

Re: [Qemu-devel] [PATCH RFC 4/7] hw/apci: fix pcihp io initialization

2016-06-21 Thread Igor Mammedov
On Tue, 21 Jun 2016 11:57:29 +0300 Marcel Apfelbaum wrote: > On 06/17/2016 12:04 PM, Igor Mammedov wrote: > > On Tue, 31 May 2016 20:48:35 +0300 > > Marcel Apfelbaum wrote: > > > >> The pm initialization code assigns the pcihp IO base and length to > >> -1 on error, but the later code will assum

Re: [Qemu-devel] [PATCH v3 18/35] target-*: Don't redefine cpu_exec()

2016-06-21 Thread Paolo Bonzini
On 18/07/2015 11:40, Peter Crosthwaite wrote: > This function needs to be converted to QOM hook and virtualised for > multi-arch. This rename interferes, as cpu-qom will not have access > to the renaming causing name divergence. This rename doesn't really do > anything anyway so just delete it. >

Re: [Qemu-devel] [PATCH RFC 6/7] hw/acpi: extend acpi pci hotplug support for pci express

2016-06-21 Thread Igor Mammedov
On Tue, 21 Jun 2016 12:05:12 +0300 Marcel Apfelbaum wrote: > On 06/20/2016 05:11 PM, Igor Mammedov wrote: > > On Tue, 31 May 2016 20:48:37 +0300 > > Marcel Apfelbaum wrote: > > > > subj doesn't match patch, it does opposite i.e. makes sure that > > pcie isn't counted in when building acpi hotplu

Re: [Qemu-devel] [PATCH RFC 7/7] hw/ich9: enable pci acpi hotplug

2016-06-21 Thread Igor Mammedov
On Tue, 21 Jun 2016 12:06:56 +0300 Marcel Apfelbaum wrote: > On 06/20/2016 05:27 PM, Igor Mammedov wrote: > > On Tue, 31 May 2016 20:48:38 +0300 > > Marcel Apfelbaum wrote: > > > >> Re-use the pci acpi hotplug code and enable it only for > >> the new machines using the 'acpi-pci-hotplug-with-bri

Re: [Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 13:01 hat Paolo Bonzini geschrieben: > On 21/06/2016 12:56, Kevin Wolf wrote: > > Am 21.06.2016 um 11:47 hat Paolo Bonzini geschrieben: > >> I still fail to understand what is the rationale for this change. The > >> API is weird; you read from a disk, not from an edge, and in fact

[Qemu-devel] [PULL 0/3] Travis updates

2016-06-21 Thread Alex Bennée
ull-travis-20160621-1 for you to fetch changes up to 23654d45f8ac08e3725831d812eb8dcf74e5a0a0: .travis.yml: disable Sparse testing (2016-06-08 17:47:22 +0100) This pull request contains: - disable sparse testing - add trusty bu

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

2016-06-21 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 to the list of approv

[Qemu-devel] [PULL 2/3] .travis.yml: add trusty GCE target

2016-06-21 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 --- .travis.yml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml

[Qemu-devel] [PULL 3/3] .travis.yml: disable Sparse testing

2016-06-21 Thread Alex Bennée
From: Paolo Bonzini On travis-ci.org, all builds fail with /usr/include/features.h:324:11: error: unable to open bits/predefs.h With "make docker-travis@ubuntu", they fail with /usr/include/features.h:374:13: error: unable to open sys/cdefs.h With "make docker-travis@fedora", finally, the

Re: [Qemu-devel] [PATCH 02/15] blockjob: Decouple the ID from the device name in the BlockJob struct

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 06:17:30 PM CEST, Max Reitz wrote: > I suppose this patch tries to "silently" (i.e. not visibly) introduce > this new ID for now? If so, there is one instance of job->id left that > should probably be changed to job->device (in block_job_complete()). I decided to leave that one

Re: [Qemu-devel] [PATCH RFC 6/7] hw/acpi: extend acpi pci hotplug support for pci express

2016-06-21 Thread Marcel Apfelbaum
On 06/21/2016 02:28 PM, Igor Mammedov wrote: On Tue, 21 Jun 2016 12:05:12 +0300 Marcel Apfelbaum wrote: On 06/20/2016 05:11 PM, Igor Mammedov wrote: On Tue, 31 May 2016 20:48:37 +0300 Marcel Apfelbaum wrote: subj doesn't match patch, it does opposite i.e. makes sure that pcie isn't counted

Re: [Qemu-devel] [PATCH RFC 7/7] hw/ich9: enable pci acpi hotplug

2016-06-21 Thread Marcel Apfelbaum
On 06/21/2016 02:30 PM, Igor Mammedov wrote: On Tue, 21 Jun 2016 12:06:56 +0300 Marcel Apfelbaum wrote: On 06/20/2016 05:27 PM, Igor Mammedov wrote: On Tue, 31 May 2016 20:48:38 +0300 Marcel Apfelbaum wrote: Re-use the pci acpi hotplug code and enable it only for the new machines using the

Re: [Qemu-devel] [PATCH RFC 4/7] hw/apci: fix pcihp io initialization

2016-06-21 Thread Marcel Apfelbaum
On 06/21/2016 02:19 PM, Igor Mammedov wrote: On Tue, 21 Jun 2016 11:57:29 +0300 Marcel Apfelbaum wrote: On 06/17/2016 12:04 PM, Igor Mammedov wrote: On Tue, 31 May 2016 20:48:35 +0300 Marcel Apfelbaum wrote: The pm initialization code assigns the pcihp IO base and length to -1 on error, bu

Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime

2016-06-21 Thread Peter Maydell
On 13 June 2016 at 10:25, Paolo Bonzini wrote: > On 13/06/2016 11:08, vija...@caviumnetworks.com wrote: >> --- a/vl.c >> +++ b/vl.c >> @@ -4044,6 +4044,9 @@ int main(int argc, char **argv, char **envp) >> } >> object_property_add_child(object_get_root(), "machine", >>

Re: [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type

2016-06-21 Thread Peter Maydell
On 17 June 2016 at 11:20, Vijay Kilari wrote: > On Fri, Jun 17, 2016 at 1:12 AM, Richard Henderson wrote: >> On 06/14/2016 04:36 AM, Peter Maydell wrote: >>> It would be better to delay the point at which we allocate >>> the data structures which care about page size, rather than >>> moving init

Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 13:53, Peter Maydell wrote: >>> >> object_property_add_child(object_get_root(), "machine", >>> >>OBJECT(current_machine), &error_abort); >>> >> + >>> >> +init_l1_page_table_param(); >> > >> > Please call this from cpu_exec_init_all instead. >

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

2016-06-21 Thread Peter Maydell
On 20 June 2016 at 22:06, Mark Cave-Ayland wrote: > Hi Peter, > > This update simply amends the MAINTAINERS entries for SPARC. Please pull. > > > ATB, > > Mark. > > > The following changes since commit 7e13ea57f47710de2c19f22b27b34ab9fb045700: > > Merge remote-tracking branch 'remotes/mwalle/tag

Re: [Qemu-devel] [PATCH v2 1/1] cpu: report hyperv feature words through qom

2016-06-21 Thread Paolo Bonzini
On 20/06/2016 17:29, Denis V. Lunev wrote: > +static int hyperv_handle_properties(CPUState *cs) > +{ > +X86CPU *cpu = X86_CPU(cs); > +CPUX86State *env = &cpu->env; > + > +if (cpu->hyperv_relaxed_timing) { > +env->features[FEAT_HYPERV_EAX] |= HV_X64_MSR_HYPERCALL_AVAILABLE; > +

[Qemu-devel] [PATCH] target-i386: avoid using locals outside their scope

2016-06-21 Thread Paolo Bonzini
x86_cpu_parse_featurestr has a "val = num;" assignment just before num goes out of scope. Push num up to fix the issue. Signed-off-by: Paolo Bonzini --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 2227f22..0b2

Re: [Qemu-devel] [PATCH] milkymist: fix tmu2.c build failure (missing error.h include)

2016-06-21 Thread Michael Walle
Am 2016-06-21 12:11, schrieb Gerd Hoffmann: Signed-off-by: Gerd Hoffmann Ouch, sorry. Must haved missed the opengl feature yesterday. Acked-by: Michael Walle --- hw/display/milkymist-tmu2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/milkymist-tmu2.c b/hw/display/milky

Re: [Qemu-devel] [PATCH 03/15] blockjob: Add block_job_get()

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 06:24:30 PM CEST, Max Reitz wrote: >> Currently the way to look for a specific block job is to iterate the >> list manually using block_job_next(). >> >> Since we want to be able to identify a job primarily by its ID it >> makes sense to have a function that does just that. >>

Re: [Qemu-devel] [PATCH v9 0/7] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-21 Thread Denis V. Lunev
On 06/17/2016 05:44 PM, Denis V. Lunev wrote: Changes from v8: - fixed comment in patch 3 - changed stub for trace_opt_parse() Changes from v7: - added missed qemu-option-trace.texi Changes from v6: - changed order of patches 1 & 2 Changes from v5: - added missed hunk into patch #7 Changes fr

[Qemu-devel] [PATCH v4 0/7] virtio-blk: multiqueue support

2016-06-21 Thread Stefan Hajnoczi
v4: * Rebased onto qemu.git/master * Included latest performance results v3: * Drop Patch 1 to batch guest notify for non-dataplane The Linux AIO completion BH and the virtio-blk batch notify BH changed order in the AioContext->first_bh list as a side-effect of moving the BH from hw/b

[Qemu-devel] [PATCH v4 5/7] virtio-blk: live migrate s->rq with multiqueue

2016-06-21 Thread Stefan Hajnoczi
Add a field for the virtqueue index when migrating the s->rq request list. The new field is only needed when num_queues > 1. Existing QEMUs are unaffected by this change and therefore virtio-blk migration stays compatible. Suggested-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- hw/bloc

[Qemu-devel] [PATCH v4 2/7] virtio-blk: multiqueue batch notify

2016-06-21 Thread Stefan Hajnoczi
The batch notification BH needs to know which virtqueues to notify when multiqueue is enabled. Use a bitmap to track the virtqueues with pending notifications. At this point there is only one virtqueue so hard-code virtqueue index 0. A later patch will switch to real virtqueue indices. Signed-o

[Qemu-devel] [PATCH v4 4/7] virtio-blk: associate request with a virtqueue

2016-06-21 Thread Stefan Hajnoczi
Multiqueue requires that each request knows to which virtqueue it belongs. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 20 +++- include/hw/virtio/virtio-blk.h | 4 +++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/hw/block/virtio-blk.c

[Qemu-devel] [PATCH v4 1/7] virtio-blk: add VirtIOBlockConf->num_queues

2016-06-21 Thread Stefan Hajnoczi
The num_queues field is always 1 for the time being. A later patch will make it a configurable device property so that multiqueue can be enabled. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 1 + include/hw/virtio/virtio-blk.h | 1 + 2 files changed, 2 insertions(+) diff

[Qemu-devel] [PATCH v4 3/7] virtio-blk: tell dataplane which vq to notify

2016-06-21 Thread Stefan Hajnoczi
Let the virtio_blk_data_plane_notify() caller decide which virtqueue to notify. This will allow the function to be used with multiqueue. Signed-off-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c | 4 ++-- hw/block/dataplane/virtio-blk.h | 2 +- hw/block/virtio-blk.c | 2 +- 3

[Qemu-devel] [PATCH v4 7/7] virtio-blk: add num-queues device property

2016-06-21 Thread Stefan Hajnoczi
Multiqueue virtio-blk can be enabled as follows: qemu -device virtio-blk-pci,num-queues=8 Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 15 +-- include/hw/virtio/virtio-blk.h | 1 - 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/block/vir

[Qemu-devel] [PATCH v4 6/7] virtio-blk: dataplane multiqueue support

2016-06-21 Thread Stefan Hajnoczi
Monitor ioeventfds for all virtqueues in the device's AioContext. This is not true multiqueue because requests from all virtqueues are processed in a single IOThread. In the future it will be possible to use multiple IOThreads when the QEMU block layer supports multiqueue. Signed-off-by: Stefan

Re: [Qemu-devel] [PATCH RFC 6/7] hw/acpi: extend acpi pci hotplug support for pci express

2016-06-21 Thread Igor Mammedov
On Tue, 21 Jun 2016 14:47:24 +0300 Marcel Apfelbaum wrote: > On 06/21/2016 02:28 PM, Igor Mammedov wrote: > > On Tue, 21 Jun 2016 12:05:12 +0300 > > Marcel Apfelbaum wrote: > > > >> On 06/20/2016 05:11 PM, Igor Mammedov wrote: > >>> On Tue, 31 May 2016 20:48:37 +0300 > >>> Marcel Apfelbaum wrot

Re: [Qemu-devel] [PATCH] target-i386: avoid using locals outside their scope

2016-06-21 Thread Igor Mammedov
On Tue, 21 Jun 2016 14:04:40 +0200 Paolo Bonzini wrote: > x86_cpu_parse_featurestr has a "val = num;" assignment just before num > goes out of scope. Push num up to fix the issue. > > Signed-off-by: Paolo Bonzini Reviewed-by: Igor Mammedov > --- > target-i386/cpu.c | 2 +- > 1 file changed,

Re: [Qemu-devel] [PATCH v4 0/7] virtio-blk: multiqueue support

2016-06-21 Thread Christian Borntraeger
On 06/21/2016 02:13 PM, Stefan Hajnoczi wrote: > v4: > * Rebased onto qemu.git/master > * Included latest performance results > > v3: > * Drop Patch 1 to batch guest notify for non-dataplane > >The Linux AIO completion BH and the virtio-blk batch notify BH changed > order >in the AioC

Re: [Qemu-devel] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 08:53:08 PM CEST, Eric Blake wrote: >> +static BlockJob *find_block_job(const char *id, const char *device, >> +AioContext **aio_context, Error **errp) > > Can this signature just be const char *id_or_device, rather than two > parameters,... But w

[Qemu-devel] cadence_uart: shouldn't assume qemu_chr_fe_write() returns non-negative value

2016-06-21 Thread Peter Maydell
This is something coverity spotted: in cadenc_uart_xmit(), the code assumes that qemu_chr_fe_write() always returns the number of bytes written, and subtracts it from the tx_count. However it can also return a negative value indicating an error. Could one of you fix this please? Skipping the adjus

Re: [Qemu-devel] [PATCH v9 00/10] IEEE 754-2008 support for Mips

2016-06-21 Thread Aleksandar Markovic
ping From: Aleksandar Markovic [aleksandar.marko...@rt-rk.com] Sent: Friday, June 10, 2016 2:57 AM To: qemu-devel@nongnu.org; qemu-...@nongnu.org; qemu-...@nongnu.org; Maciej Rozycki; pro...@gmail.com; kbast...@mail.uni-paderborn.de; mark.cave-ayl...@ilan

Re: [Qemu-devel] [PATCH 0/3] qmp: query-host-cpu command

2016-06-21 Thread Eduardo Habkost
On Tue, Jun 21, 2016 at 08:20:40AM +0200, David Hildenbrand wrote: > > Add QMP command to allow management software to query for > > CPU information for the running host. > > > > The data returned by the command is in the form of a dictionary > > of QOM properties. > > > > This series depends on

Re: [Qemu-devel] [PATCH] milkymist: fix tmu2.c build failure (missing error.h include)

2016-06-21 Thread Peter Maydell
On 21 June 2016 at 13:09, Michael Walle wrote: > Am 2016-06-21 12:11, schrieb Gerd Hoffmann: >> >> Signed-off-by: Gerd Hoffmann > > > > Ouch, sorry. Must haved missed the opengl feature yesterday. > > Acked-by: Michael Walle Thanks; applied to master as a buildfix. -- PMM

Re: [Qemu-devel] [PATCH 0/3] qmp: query-host-cpu command

2016-06-21 Thread David Hildenbrand
> On Tue, Jun 21, 2016 at 08:20:40AM +0200, David Hildenbrand wrote: > > > Add QMP command to allow management software to query for > > > CPU information for the running host. > > > > > > The data returned by the command is in the form of a dictionary > > > of QOM properties. > > > > > > This se

Re: [Qemu-devel] [PATCH v2 07/10] qdev: Eliminate "global not used" warning

2016-06-21 Thread Igor Mammedov
On Mon, 20 Jun 2016 12:53:00 -0300 Eduardo Habkost wrote: > qdev_prop_check_globals() tries to warn the user if a given > -global option was not used. But it does that only if the device > is not hotpluggable. > > The warning also makes it harder for management code or people > that write their

Re: [Qemu-devel] [PATCH v2 08/10] qdev: Eliminate GlobalProperty 'used' and 'user_provided' fields

2016-06-21 Thread Igor Mammedov
On Mon, 20 Jun 2016 12:53:01 -0300 Eduardo Habkost wrote: > Those fields are not used for anyting and not needed anymore. > > Signed-off-by: Eduardo Habkost Reviewed-by: Igor Mammedov > --- > Changes v1 -> v2: > * Remove "nouser" test case from test-qdev-global-props > --- > hw/core/qdev-pro

Re: [Qemu-devel] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 06:40:31 PM CEST, Max Reitz wrote: >> +error_setg(errp, "Block job '%s' not found", id ? id : device); > > This changes the error class if device is set. Not sure if that is > bad, but keeping the old behavior should be simple (unless you're sure > it's fine). You're ri

[Qemu-devel] [RFC 06/28] s390x/cpumodel: introduce CPU feature group definitions

2016-06-21 Thread David Hildenbrand
Let's use the generated groups to create feature group representations for the user. These groups can later be used to enable/disable multiple features in one shot and will be used to reduce the amount of reported features to the user if all subfeatures are in place. Acked-by: Cornelia Huck Signe

[Qemu-devel] [RFC 01/28] s390x/cpumodel: "host" and "qemu" as CPU subclasses

2016-06-21 Thread David Hildenbrand
This patch introduces two CPU models, "host" and "qemu". "qemu" is used as default when running under TCG. "host" is used as default when running under KVM. "host" cannot be used without KVM. Bot models are not migration safe. They inherit from the base s390x CPU, which is turned into an abstract c

[Qemu-devel] [RFC 00/28] s390x CPU models: exposing features

2016-06-21 Thread David Hildenbrand
This is our second attempt to implement CPU models for s390x. We realized that we also want to have features exposed via the CPU model. While doing that we realized that we want to have a better interface for libvirt. Unfortunately, CPU models on s390x are special and we have to take care of: - A

[Qemu-devel] [RFC 11/28] s390x/cpumodel: check and apply the CPU model

2016-06-21 Thread David Hildenbrand
We have to test if a configured CPU model is runnable in the current configuration, and if not report why that is the case. This is done by comparing it to the maximum supported model (host for KVM or z900 for TCG). Also, we want to do some base sanity checking for a configured CPU model. We'll ca

[Qemu-devel] [RFC 07/28] s390x/cpumodel: register defined CPU models as subclasses

2016-06-21 Thread David Hildenbrand
This patch adds the CPU model definitions that are known on s390x - like z900, zBC12 or z13. For each definition, introduce two CPU models: 1. Base model (e.g. z13-base): Minimum feature set we expect to be around on all z13 systems. These models are migration save and will never change. 2.

[Qemu-devel] [RFC 05/28] s390x/cpumodel: generate CPU feature group lists

2016-06-21 Thread David Hildenbrand
Feature groups will be very helpful to reduce the amount of features typically available in sane configurations. E.g. the MSA facilities introduced loads of subfunctions, which could - in theory - go away in the future, but we want to avoid reporting hundrets of features to the user if usually all

[Qemu-devel] [RFC 16/28] s390x/sclp: propagate the mha via sclp

2016-06-21 Thread David Hildenbrand
The mha is provided in the CPU model, so get any CPU and extract the value. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 1 + include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 14 ++ target-s390x/cpu_models.h | 1 + 4 files

[Qemu-devel] [RFC 03/28] s390x/cpumodel: introduce CPU features

2016-06-21 Thread David Hildenbrand
From: Michael Mueller The patch introduces s390x CPU features (most of them refered to as facilities) along with their discription and some functions that will be helpful when working with the features later on. Please note that we don't introduce all known CPU features, only the ones currently

[Qemu-devel] [RFC 12/28] s390x/sclp: factor out preparation of cpu entries

2016-06-21 Thread David Hildenbrand
Let's factor out the common code of "read cpu info" and "read scp info". This will make the introduction of new cpu entry fields easier. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) d

[Qemu-devel] [RFC 24/28] qmp: add QMP interface "query-cpu-model-comparison"

2016-06-21 Thread David Hildenbrand
Let's provide a standardized interface to compare two CPU models. query-cpu-model-compare takes two models and returns what it knows about their compability. If modelA is a subset of modelB or if both are identical, modelA will run in the same configuration as modelB. If modelA is however a super

[Qemu-devel] [RFC 17/28] s390x/sclp: propagate hmfai

2016-06-21 Thread David Hildenbrand
hmfai is provided on CPU models >= z196. Let's propagate it properly. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 1 + include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 14 ++ target-s390x/cpu_models.h | 1 + 4 files chang

[Qemu-devel] [RFC 15/28] s390x/sclp: propagate the ibc val(lowest and unblocked ibc)

2016-06-21 Thread David Hildenbrand
If we have a lowest ibc, we can indicate the ibc to the guest. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 2 ++ include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 21 + target-s390x/cpu_models.h | 12 4

[Qemu-devel] [RFC 14/28] s390x/sclp: indicate sclp features

2016-06-21 Thread David Hildenbrand
We have three different blocks in the SCLP read-SCP information response that indicate sclp features. Let's prepare propagation. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 9 + target-s390x/cpu_models.c | 14 ++ target-s390x/cpu

[Qemu-devel] [RFC 04/28] s390x/cpumodel: generate CPU feature lists for CPU models

2016-06-21 Thread David Hildenbrand
From: Michael Mueller This patch introduces the helper "gen-features" which allows to generate feature list definitions at compile time. Its flexibility is better and the error-proneness is lower when compared to static programming time added statements. The helper includes "target-s390x/cpu_fea

[Qemu-devel] [RFC 28/28] s390x/cpumodel: implement QMP interface "query-cpu-model-baseline"

2016-06-21 Thread David Hildenbrand
Let's implement that interface by reusing our conversion code and lookup code for cpu definitions. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu_models.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/target-s

[Qemu-devel] [RFC 10/28] s390x/cpumodel: let the CPU model handle feature checks

2016-06-21 Thread David Hildenbrand
If we have certain features enabled, we have to migrate additional state (e.g. vector registers or runtime-instrumentation registers). Let the CPU model control that unless we have no "host" CPU model in the KVM case. This will later on be the case for compatibility machines, so migration from QEMU

[Qemu-devel] [RFC 23/28] qmp: add QMP interface "query-cpu-model-expansion"

2016-06-21 Thread David Hildenbrand
Let's provide a standardized interface to expand CPU models, like the host model. To take care of all architectures, different detail levels for an expansion are introduced. Certain architectures might not support all detail levels. When the host CPU model is to be expanded, at least the accelera

[Qemu-devel] [RFC 18/28] update linux headers (CPU model)

2016-06-21 Thread David Hildenbrand
Update linux headers to include the new cpu model attributes Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- linux-headers/asm-s390/kvm.h | 40 1 file changed, 40 insertions(+) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s

[Qemu-devel] [RFC 21/28] s390x/kvm: disable host model for existing compat machines

2016-06-21 Thread David Hildenbrand
Compatibility machines that touch runtime-instrumentation should not be used with the CPU model. Otherwise the host model will look different, depending on the QEMU machine QEMU has been started with. So let's simply disable the host model for existing compatibility machines that all disable ri.

[Qemu-devel] [RFC 08/28] s390x/cpumodel: store the CPU model in the CPU instance

2016-06-21 Thread David Hildenbrand
A CPU model consists of a CPU definition, to which delta changes are applied - features added or removed (e.g. z13-base,vx=on). In addition, certain properties (e.g. cpu id) can later on change during migration but belong into the CPU model. This data will later be filled from the host model in the

[Qemu-devel] [RFC 25/28] qmp: add QMP interface "query-cpu-model-baseline"

2016-06-21 Thread David Hildenbrand
Let's provide a standardized interface to baseline two CPU models, to create a third, compatible one. For now, we allow two baseline modes. "stable" tries to create a better tested model, e.g. by minimizing CPU definition changes. "maximum" rather tries to get the maxmimum possible model, e.g. by

[Qemu-devel] [RFC 20/28] s390x/kvm: implement CPU model support

2016-06-21 Thread David Hildenbrand
Let's implement our two hooks so we can support CPU models. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu_models.c | 75 +++- target-s390x/cpu_models.h | 50 target-s390x/kvm.c| 295 ++ 3 file

[Qemu-devel] [RFC 22/28] s390x/kvm: let the CPU model control CMM(A)

2016-06-21 Thread David Hildenbrand
Starting with recent kernels, if the cmma attributes are available, we actually have hardware support. Enabling CMMA then means providing the guest VCPU with CMM, therefore enabling its CMM facility. Let's not blindly enable CMM anymore but let's control it using CPU models. For disabled CPU model

[Qemu-devel] [RFC 27/28] s390x/cpumodel: implement QMP interface "query-cpu-model-comparison"

2016-06-21 Thread David Hildenbrand
Let's implement that interface by reusing our convertion code implemented for expansion. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu_models.c | 84 +++ 1 file changed, 84 insertions(+) diff --git a/target-s390x/cpu_m

[Qemu-devel] [PATCH] aux: fix break that wanted to break two levels out

2016-06-21 Thread Paolo Bonzini
The last "ret = AUX_I2C_NACK;" is dead, because it is always overridden by AUX_I2C_ACK. What really the code wants is to jump out of the switch statement, and a "return" will not cut it because it would omit a debug printf. Change the logic so that we can break out of the while loop. For clarity

[Qemu-devel] [RFC 19/28] s390x/kvm: allow runtime-instrumentation for "none" machine

2016-06-21 Thread David Hildenbrand
To be able to query the correct host model for the "none" machine, let's allow runtime-instrumentation for that machine. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/

[Qemu-devel] [RFC 09/28] s390x/cpumodel: expose features and feature groups as properties

2016-06-21 Thread David Hildenbrand
Let's add all features and feature groups as properties to all CPU models. If the "host" CPU model is unknown, we can neither query nor change features. KVM will just continue to work like it did until now. We will not allow to enable features that were not part of the original CPU model, because

[Qemu-devel] [PATCH] xlnx_dp: fix iffy xlnx_dp_aux_push_tx_fifo

2016-06-21 Thread Paolo Bonzini
xlnx_dp_aux_push_tx_fifo takes an immediate uint8_t and a buffer length, which must be 1 because that is how many uint8_t's fit in a uint8_t. Sure enough, that is what xlnx_dp_write passes to it, but the function is just weird. Therefore, make xlnx_dp_aux_push_tx_fifo look like xlnx_dp_aux_push_rx

[Qemu-devel] [RFC 13/28] s390x/sclp: introduce sclp feature blocks

2016-06-21 Thread David Hildenbrand
The sclp "read cpu info" and "read scp info" commands can include features for the cpu info and configuration characteristics (extended), decribing some advanced features available in the configuration. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- include/hw/s390x/sclp.h | 12 ++

[Qemu-devel] [PATCH 2/2] trace: [bsd-user] Commandline arguments to control tracing

2016-06-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- bsd-user/main.c | 21 + 1 file changed, 21 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 9f592be..ce2cc17 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -30,6 +30,7 @@ #include "qemu/timer.h" #include "qemu/env

[Qemu-devel] [PATCH 1/2] trace: [linux-user] Commandline arguments to control tracing

2016-06-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- linux-user/main.c | 28 1 file changed, 28 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index f8a8764..b0d7d2b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -33,6 +33,7 @@ #include "qemu/envlist.h"

Re: [Qemu-devel] Qemu and heavily increased RSS usage

2016-06-21 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > Hi, > > while upgrading from Qemu 2.2.0 to Qemu 2.5.1.1 I noticed that the RSS memory > usage has heavily increased. > We use hugepages so the RSS memory does not include VM memory. In Qemu 2.2.0 > it used to be ~30MB per vServer > and increased to up to 30

[Qemu-devel] [RFC 02/28] s390x/cpumodel: expose CPU class properties

2016-06-21 Thread David Hildenbrand
Let's expose the description and migration safety, as class properties, this can be helpful in the future. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu.c| 1 + target-s390x/cpu.h| 1 + target-s390x/cpu_models.c | 18 ++ 3 files

[Qemu-devel] [PATCH v5 4/7] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-21 Thread Lluís Vilanova
Each vCPU gets a 'trace_dstate' bitmap to control the per-vCPU dynamic tracing state of events with the 'vcpu' property. Signed-off-by: Lluís Vilanova --- bsd-user/main.c |1 + include/qom/cpu.h|6 + linux-user/main.c|1 + qom/cpu.c|1

[Qemu-devel] [PATCH v5 1/7] trace: Identify events with the 'vcpu' property

2016-06-21 Thread Lluís Vilanova
A new event attribute 'cpu_id' is added to have a separate ID space ('TRACE_VCPU_*') for all events with the 'vcpu' property. These are later used to identify which events are enabled on each vCPU. Signed-off-by: Lluís Vilanova Reviewed-by: Stefan Hajnoczi --- scripts/tracetool/format/events_c

[Qemu-devel] [PATCH 0/2] trace: [*-user] Add commandline arguments to control tracing

2016-06-21 Thread Lluís Vilanova
Adds three commandline arguments to the main *-user programs, following what's already available in softmmu: * -trace-enable * -trace-events * -trace-file Signed-off-by: Lluís Vilanova --- Lluís Vilanova (2): trace: [linux-user] Commandline arguments to control tracing trace: [bsd-u

[Qemu-devel] [RFC 26/28] s390x/cpumodel: implement QMP interface "query-cpu-model-expansion"

2016-06-21 Thread David Hildenbrand
In order to expand CPU models, we create temporary cpus that handle the feature/group parsing. When converting the data structure back, we always fall back to the base cpu model, which is by definition migration safe. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cp

[Qemu-devel] [PATCH v5 7/7] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-21 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Stefan Hajnoczi --- hmp-commands-info.hx |6 +- hmp-commands.hx |7 +- monitor.c| 17 +- qapi/trace.json | 32 +-- qmp-commands.hx | 35 +++- trace/qmp.c | 148 ++

<    1   2   3   4   5   >