Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-24 Thread Greg Kurz
On Wed, 24 May 2017 12:14:02 +0200 Igor Mammedov wrote: > On Wed, 24 May 2017 11:28:57 +0200 > Greg Kurz wrote: > > > On Wed, 24 May 2017 15:07:54 +1000 > > David Gibson wrote: > > > > > On Tue, May 23, 2017 at 01:18:11PM +0200, Laurent Vivier wrote: > > > > If the OS is not started, QE

Re: [Qemu-devel] [PATCH] sockets: report error if UNIX socket path is too long

2017-05-24 Thread Eric Blake
On 05/24/2017 10:54 AM, Eric Blake wrote: > On 05/24/2017 10:42 AM, Daniel P. Berrange wrote: >> The 'struct sockaddr_un' only allows 108 bytes for the socket >> path. Currently QEMU uses snprintf() and so silently truncates >> the socket path provided by the user. This is undesirable because >> th

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-24 Thread Laurent Vivier
On 24/05/2017 17:54, Greg Kurz wrote: > On Wed, 24 May 2017 12:14:02 +0200 > Igor Mammedov wrote: > >> On Wed, 24 May 2017 11:28:57 +0200 >> Greg Kurz wrote: >> >>> On Wed, 24 May 2017 15:07:54 +1000 >>> David Gibson wrote: >>> On Tue, May 23, 2017 at 01:18:11PM +0200, Laurent Vivier wr

Re: [Qemu-devel] [PATCH 01/11] migration: Create savevm.h for functions exported from savevm.c

2017-05-24 Thread Laurent Vivier
On 18/05/2017 19:25, Juan Quintela wrote: > This removes last trace of migration functions from sysemu/sysemu.h. > > Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier > --- > include/sysemu/sysemu.h | 47 --- > migration/colo.c | 1

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-24 Thread Anton Nefedov
On 05/24/2017 05:20 PM, Alberto Garcia wrote: On Tue 23 May 2017 04:36:52 PM CEST, Eric Blake wrote: here's a patch series that rewrites the copy-on-write code in the qcow2 driver to reduce the number of I/O operations. And it competes with Denis and Anton's patches: https://lists.gnu.org/ar

[Qemu-devel] [PATCH 1/4] migration: keep bytes_xfer_prev init'd to zero

2017-05-24 Thread Felipe Franciosi
The first time migration_bitmap_sync() is called, bytes_xfer_prev is set to ram_state.bytes_transferred which is, at this point, zero. The next time migration_bitmap_sync() is called, an iteration has happened and bytes_xfer_prev is set to 'x' bytes. Most likely, more than one second has passed, so

[Qemu-devel] [PATCH 2/4] migration: set dirty_pages_rate before autoconverge logic

2017-05-24 Thread Felipe Franciosi
Currently, a "period" in the RAM migration logic is at least a second long and accounts for what happened since the last period (or the beginning of the migration). The dirty_pages_rate counter is calculated at the end this logic. If the auto convergence capability is enabled from the start of the

[Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-24 Thread Felipe Franciosi
The commit message from 070afca25 suggests that dirty_rate_high_cnt should be used more aggressively to start throttling after two iterations instead of four. The code, however, only changes the auto convergence behaviour to throttle after three iterations. This makes the behaviour more aggressive

[Qemu-devel] [PATCH 0/4] migration: autoconverge counter fixes

2017-05-24 Thread Felipe Franciosi
As discussed in the ML [1], there are some issues around the way ram.c accounts for transferred data and dirty pages for the auto convergence calculations. The patches in these series fix that by: - Keeping bytes_xfer_prev zeroed until it's used - Ensure bytes_xfer_* counters are accounted for the

[Qemu-devel] [PATCH 3/4] migration: set bytes_xfer_* outside of autoconverge logic

2017-05-24 Thread Felipe Franciosi
The bytes_xfer_now/prev counters are only used by the auto convergence logic. However, they are used alongside the dirty_pages_rate counter, which is calculated (and required) outside of this logic. The problem with this approach is that if the auto convergence capability is changed while a migrati

[Qemu-devel] [PULL 18/20] vhost-user-scsi: Introduce a vhost-user-scsi sample application

2017-05-24 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user-scsi backend sample application. It must be linked with libiscsi and libvhost-user. To use it, compile with: $ make vhost-user-scsi And run as follows: $ ./vhost-user-scsi -u vus.sock -i iscsi://uri_to_target/ $ qemu-system-x86_64

[Qemu-devel] [PULL 17/20] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-05-24 Thread Paolo Bonzini
From: Felipe Franciosi This commit introduces a vhost-user device for SCSI. This is based on the existing vhost-scsi implementation, but done over vhost-user instead. It also uses a chardev to connect to the backend. Unlike vhost-scsi (today), VMs using vhost-user-scsi can be live migrated. To u

[Qemu-devel] [PULL v2 00/20] Misc patches for 2017-05-19

2017-05-24 Thread Paolo Bonzini
The following changes since commit 56821559f0ba682fe6b367815572e6f974d329ab: Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging (2017-05-18 13:36:15 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

[Qemu-devel] [PATCH v2] sockets: improve error reporting if UNIX socket path is too long

2017-05-24 Thread Daniel P. Berrange
The 'struct sockaddr_un' only allows 108 bytes for the socket path. If the user supplies a path, QEMU uses snprintf() to silently truncate it when too long. This is undesirable because the user will then be unable to connect to the path they asked for. If the user doesn't supply a path, QEMU buil

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-24 Thread Alberto Garcia
On Wed 24 May 2017 06:09:42 PM CEST, Anton Nefedov wrote: > I agree; as mentioned we have similar patches and they don't conflict > much. We noticed a performance regression on HDD though, for the > presumably optimized case (random 4k write over a large backed image); > so the patches were put o

Re: [Qemu-devel] [PATCH 02/11] migration: Remove unneeded includes of migration/vmstate.h

2017-05-24 Thread Laurent Vivier
On 18/05/2017 19:25, Juan Quintela wrote: > Signed-off-by: Juan Quintela > Reviewed-by: Philippe Mathieu-Daudé > --- > hw/core/qdev.c | 1 - > include/hw/acpi/memory_hotplug.h | 1 - > include/hw/acpi/pcihp.h | 1 - > include/hw/pci/shpc.h| 1 - > include/n

Re: [Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-24 Thread Daniel P. Berrange
On Wed, May 24, 2017 at 05:10:03PM +0100, Felipe Franciosi wrote: > The commit message from 070afca25 suggests that dirty_rate_high_cnt > should be used more aggressively to start throttling after two > iterations instead of four. The code, however, only changes the auto > convergence behaviour to

Re: [Qemu-devel] [PATCH] block/gluster: glfs_lseek() workaround

2017-05-24 Thread Jeff Cody
On Wed, May 24, 2017 at 11:02:02AM +0200, Niels de Vos wrote: > On Tue, May 23, 2017 at 01:27:50PM -0400, Jeff Cody wrote: > > On current released versions of glusterfs, glfs_lseek() will sometimes > > return invalid values for SEEK_DATA or SEEK_HOLE. For SEEK_DATA and > > SEEK_HOLE, the returned

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-24 Thread Anton Nefedov
On 05/24/2017 07:20 PM, Alberto Garcia wrote: On Wed 24 May 2017 06:09:42 PM CEST, Anton Nefedov wrote: I agree; as mentioned we have similar patches and they don't conflict much. We noticed a performance regression on HDD though, for the presumably optimized case (random 4k write over a lar

Re: [Qemu-devel] [PATCH] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU

2017-05-24 Thread Richard Henderson
On 05/24/2017 01:54 AM, Thomas Huth wrote: feats[] = { +S390_FEAT_STFLE, +S390_FEAT_EXTENDED_IMMEDIATE, +S390_FEAT_LONG_DISPLACEMENT, +S390_FEAT_LONG_DISPLACEMENT_FAST, +S390_FEAT_STORE_CLOCK_FAST, +S390_FEAT_GENERAL_INSTRUCTIONS_EXT, +S390_

Re: [Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-24 Thread Felipe Franciosi
> On 24 May 2017, at 17:25, Daniel P. Berrange wrote: > > On Wed, May 24, 2017 at 05:10:03PM +0100, Felipe Franciosi wrote: >> The commit message from 070afca25 suggests that dirty_rate_high_cnt >> should be used more aggressively to start throttling after two >> iterations instead of four. The

Re: [Qemu-devel] [PATCH v2 3/3] scripts: Test script to look for -device crashes

2017-05-24 Thread Eduardo Habkost
On Tue, May 23, 2017 at 04:52:47PM +0200, Markus Armbruster wrote: > Beware, my review is rather superficial. > > Eduardo Habkost writes: > > > Test code to check if we can crash QEMU using -device. It will > > test all accel/machine/device combinations by default, which may > > take a few hours

Re: [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data

2017-05-24 Thread Anton Nefedov
If the guest tries to write data that results on the allocation of a new cluster, instead of writing the guest data first and then the data from the COW regions, write everything together using one single I/O operation. This can improve the write performance by 25% or more, depending on several f

Re: [Qemu-devel] [PATCH v6 11/18] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-05-24 Thread Daniel P. Berrange
On Thu, May 11, 2017 at 04:29:11PM +0200, Alberto Garcia wrote: > On Tue 25 Apr 2017 05:38:51 PM CEST, Daniel P. Berrange wrote: > > +switch (s->crypt_method_header) { > > +case QCOW_CRYPT_NONE: > > +if (encryptfmt) { > > +error_setg(errp, "No encryption in image header,

Re: [Qemu-devel] [PATCH v2] sockets: improve error reporting if UNIX socket path is too long

2017-05-24 Thread Eric Blake
On 05/24/2017 11:18 AM, Daniel P. Berrange wrote: > The 'struct sockaddr_un' only allows 108 bytes for the socket > path. > > If the user supplies a path, QEMU uses snprintf() to silently > truncate it when too long. This is undesirable because the user > will then be unable to connect to the path

Re: [Qemu-devel] [PATCH v1 04/13] qcow2: preallocation at image expand

2017-05-24 Thread Anton Nefedov
On 05/22/2017 10:29 PM, Eric Blake wrote: On 05/19/2017 04:34 AM, Anton Nefedov wrote: From: "Denis V. Lunev" This patch adds image preallocation at expand to provide better locality of QCOW2 image file and optimize this procedure for some distributed storages where this procedure is slow.

Re: [Qemu-devel] [svt-core] [PATCH] kvmclock: update system_time_msr address forcibly

2017-05-24 Thread Marcelo Tosatti
On Wed, May 24, 2017 at 06:54:09PM +0300, Roman Kagan wrote: > On Wed, May 24, 2017 at 05:07:24PM +0300, Denis Plotnikov wrote: > > Do an update of system_time_msr address every time before reading > > the value of tsc_timestamp from guest's kvmclock page. > > > > It should be done in a forcible m

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-24 Thread Michael Roth
Quoting Laurent Vivier (2017-05-24 11:02:30) > On 24/05/2017 17:54, Greg Kurz wrote: > > On Wed, 24 May 2017 12:14:02 +0200 > > Igor Mammedov wrote: > > > >> On Wed, 24 May 2017 11:28:57 +0200 > >> Greg Kurz wrote: > >> > >>> On Wed, 24 May 2017 15:07:54 +1000 > >>> David Gibson wrote: > >>>

[Qemu-devel] [PATCH] xics: add unrealize handler

2017-05-24 Thread Greg Kurz
Now that ICPState objects get finalized on CPU unplug, we should unregister reset handlers as well to avoid a QEMU crash at machine reset time. Signed-off-by: Greg Kurz --- hw/intc/xics.c |5 + hw/intc/xics_kvm.c |6 ++ 2 files changed, 11 insertions(+) diff --git a/hw/intc/

Re: [Qemu-devel] [PATCH 02/31] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-24 Thread Aurelien Jarno
On 2017-05-23 16:21, Richard Henderson wrote: > On 05/23/2017 10:28 AM, Aurelien Jarno wrote: > > > Something like this, as a delta patch. I confirm this patch is really needed, otherwise the executed instruction seems to be executed at the next instruction. > > Unfortunately it doesn't work. So

[Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters

2017-05-24 Thread Vladislav Yasevich
Add parameters that control RARP/GARP announcement timeouts. The parameters structure is added to the QAPI and a qmp command is added to set/get the parameter data. Based on work by "Dr. David Alan Gilbert" Signed-off-by: Vladislav Yasevich --- include/sysemu/sysemu.h | 7 migration/save

[Qemu-devel] [PATCH 04/12] net: Add a network device specific self-announcement ability

2017-05-24 Thread Vladislav Yasevich
Some network devices have a capability to do self annoucements (ex: virtio-new). Add infrustrcture that would allow devices to expose this ability. Signed-off-by: Vladislav Yasevich --- include/net/net.h | 2 ++ migration/savevm.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/incl

[Qemu-devel] [PATCH 02/12] migration: Introduce announcement timer

2017-05-24 Thread Vladislav Yasevich
Introdec an annoucement timer structure and initialization to be used by for self-annoucement. Based on the work by Germano Veit Michel Signed-off-by: Vlad Yasevich --- include/migration/vmstate.h | 13 + migration/savevm.c | 22 ++ 2 files changed, 35

[Qemu-devel] [PATCH 12/12] tests: Add a test for qemu self announcments

2017-05-24 Thread Vladislav Yasevich
We now expose qemu_announce_self through QMP and HMP. Add a test with some very basic packet validation (make sure we get a RARP). Signed-off-by: Vlad Yasevich --- tests/Makefile.include | 2 ++ tests/test-announce-self.c | 78 ++ 2 files changed

[Qemu-devel] [PATCH 00/12] self-announce updates

2017-05-24 Thread Vladislav Yasevich
This work a consolidation of the work by David Gilbert, Germano Veit Michel and myself. It started out with David wanting to parametirize self-announcments so that the user may control how often annoucment packets (RARPs) were generated by Qemu. At about the same time, Germano wanted to expose qe

[Qemu-devel] [PATCH 03/12] migration: Switch to using announcement timer

2017-05-24 Thread Vladislav Yasevich
Switch qemu_announce_self and virtio annoucements to use the announcement timer framework. This makes sure that both timers use the same timeouts and number of annoucement attempts Based on work by Dr. David Alan Gilbert Signed-off-by: Vladislav Yasevich --- hw/net/virtio-net.c| 2

[Qemu-devel] [PATCH 05/12] virtio-net: Allow qemu_announce_self to trigger virtio announcements

2017-05-24 Thread Vladislav Yasevich
Expose the virtio-net self annoucement capability and allow qemu_announce_self() to call it. Signed-off-by: Vladislav Yasevich --- hw/net/virtio-net.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c i

[Qemu-devel] [PATCH 07/12] migration: Allow for a limited number of announce timers

2017-05-24 Thread Vladislav Yasevich
We currently create a new announcement timer every time qemu_announce_self() is called. Since this is now a qmp command, this can lead to abuse. Limit the number of timers that are created. Give QMP interface and migration process 1 timer each. This way, QMP can't abuse the announce_self mecha

[Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp command

2017-05-24 Thread Vladislav Yasevich
Add a qmp command that can trigger guest announcements. Based on work of Germano Veit Michel Signed-off-by: Vladislav Yasevich --- migration/savevm.c | 14 ++ qapi-schema.json | 19 +++ 2 files changed, 33 insertions(+) diff --git a/migration/savevm.c b/migration

[Qemu-devel] [PATCH 08/12] announce_timer: Add ability to reset an existing

2017-05-24 Thread Vladislav Yasevich
It is now potentially possible to issue annouce-self command in a tight loop. Instead of doing nother, we can reset the timeout pararameters, especially since each instance may provide it's own values. This allows the user to extend or cut short currently runnig timer. Signed-off-by: Vladislav

[Qemu-devel] [PATCH 09/12] hmp: add announce paraters info/set

2017-05-24 Thread Vladislav Yasevich
Add HMP command to control and read annoucment parameters. Signed-off-by: Vladislav Yasevich --- hmp-commands-info.hx | 13 hmp-commands.hx | 14 + hmp.c| 86 hmp.h| 4 +++ monitor.c

[Qemu-devel] [PATCH 10/12] hmp: Add hmp_announce_self

2017-05-24 Thread Vladislav Yasevich
Add an HMP command to trigger self annocements. Signend-off-by: Vladislav Yasevich --- hmp-commands.hx | 14 ++ hmp.c | 5 + hmp.h | 1 + 3 files changed, 20 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index c8dd816..0efe479 100644 --- a/hm

[Qemu-devel] [PATCH 11/12] tests/test-hmp: Add announce parameter tests

2017-05-24 Thread Vladislav Yasevich
Add 2 new commands for announce parameters to the test. Signed-off-by: Vladislav Yasevich --- tests/test-hmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-hmp.c b/tests/test-hmp.c index 99e35ec..f3887d1 100644 --- a/tests/test-hmp.c +++ b/tests/test-hmp.c @@ -65,6 +65,8 @@ s

Re: [Qemu-devel] [PATCH 00/12] self-announce updates

2017-05-24 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Subject: [Qemu-devel] [PATCH 00/12] self-announce updates Message-id: 1495649128-10529-1-git-send-email-vyase...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under th

[Qemu-devel] [PATCH] [SLIRP] Fix total IP header length in forwarded TCP packets

2017-05-24 Thread Sjors Gielen
When forwarding TCP packets, the internal tcpiphdr struct length was wrongly used inside the IP header. This commit changes the behaviour to what is used by tcp_output.c, using the correct full IP header + payload length. Signed-off-by: Sjors Gielen --- slirp/tcp_subr.c | 4 ++-- 1 file changed,

Re: [Qemu-devel] [PATCH 00/12] self-announce updates

2017-05-24 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH 00/12] self-announce updates Message-id: 1495649128-10529-1-git-send-email-vyase...@redhat.com Ty

Re: [Qemu-devel] [PATCH 00/12] self-announce updates

2017-05-24 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 00/12] self-announce updates Message-id: 1495649128-10529-1-git-send-email-vyase...@redhat.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(g

Re: [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data

2017-05-24 Thread Alberto Garcia
On Wed 24 May 2017 06:43:31 PM CEST, Anton Nefedov wrote: >> +if (m->data_qiov) { >> +qemu_iovec_reset(&qiov); >> +qemu_iovec_add(&qiov, start_buffer, start->nb_bytes); >> +qemu_iovec_concat(&qiov, m->data_qiov, 0, data_bytes); >> +qemu_iovec_add(&qiov, end_buffe

[Qemu-devel] [PATCH v2 02/33] target/s390x: Move helper_ex to end of file

2017-05-24 Thread Richard Henderson
This will avoid needing forward declarations in following patches. Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 161 +++--- 1 file changed, 81 insertions(+), 80 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_hel

[Qemu-devel] [PATCH v2 00/33] target/s390x unwind patches

2017-05-24 Thread Richard Henderson
Changes from v1: * Drop major implementation change to EXECUTE; I'll pick that up later. * But there are some implementation errors for EXECUTE, which are not exhibited in real-life code. Mostly because those edge cases are not really useful. * Incorporate feedback from Aurelien. r

[Qemu-devel] [PATCH v2 07/33] target/s390x: Use unwind data for helper_clc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 29 + target/s390x/translate.c | 1 - 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 78a9ac1..50689bb 100644 --- a/target/s3

[Qemu-devel] [PATCH v2 08/33] target/s390x: Use unwind data for helper_clm

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 11 ++- target/s390x/translate.c | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 5068

[Qemu-devel] [PATCH v2 04/33] target/s390x: Use unwind data for helper_oc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 31 ++- target/s390x/translate.c | 1 - 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 7d6133b..b4b50d1 100644 --- a/target/

[Qemu-devel] [PATCH v2 09/33] target/s390x: Use unwind data for helper_srst

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 ++- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 3e75cae..33d83

[Qemu-devel] [PATCH v2 01/33] target/s390x: Use cpu_loop_exit_restore for tlb_fill

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 0c6a0d9..e3325a4 100644 --- a/target/s39

[Qemu-devel] [PATCH v2 11/33] target/s390x: Use unwind data for helper_mvpg

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/mem_helper.c | 9 + target/s390x/translate.c | 3 +-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/s390x/helper.h b/target/s

[Qemu-devel] [PATCH v2 03/33] target/s390x: Use unwind data for helper_nc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 31 ++- target/s390x/translate.c | 1 - 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 90b62fa..7d6133b 100644 --- a/target/

[Qemu-devel] [PATCH v2 05/33] target/s390x: Use unwind data for helper_xc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 44 target/s390x/translate.c | 1 - 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index b4b50d1..b71437a 100644

[Qemu-devel] [PATCH v2 12/33] target/s390x: Use unwind data for helper_mvst

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 5 +++-- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 1c36a47..e4b

[Qemu-devel] [PATCH v2 19/33] target/s390x: Use unwind data for helper_unpk

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 9 + target/s390x/translate.c | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index d4ee364.

[Qemu-devel] [PATCH v2 13/33] target/s390x: Use unwind data for helper_lam

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 ++- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index e4bfc6e..88e81

[Qemu-devel] [PATCH v2 06/33] target/s390x: Use unwind data for helper_mvc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 30 ++ target/s390x/translate.c | 1 - 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index b71437a..78a9ac1 100644 --- a/target/s

[Qemu-devel] [PATCH v2 20/33] target/s390x: Use unwind data for helper_tr

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 25 +++-- target/s390x/translate.c | 1 - 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 0701e10..b37a963 100644 --- a/target/s390x/

[Qemu-devel] [PATCH v2 22/33] target/s390x: Use unwind data for helper_trt

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 28 target/s390x/translate.c | 1 - 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_

[Qemu-devel] [PATCH v2 16/33] target/s390x: Use unwind data for helper_mvcle

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 7 --- target/s390x/translate.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 49cfc9b..8

[Qemu-devel] [PATCH v2 21/33] target/s390x: Use unwind data for helper_tre

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 15 --- target/s390x/translate.c | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index

[Qemu-devel] [PATCH v2 10/33] target/s390x: Use unwind data for helper_clst

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 5 +++-- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 33d83e5..af2

[Qemu-devel] [PATCH v2 26/33] target/s390x: Use unwind data for helper_testblock

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 +++ target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index b64c04e..7df2e5

[Qemu-devel] [PATCH v2 14/33] target/s390x: Use unwind data for helper_stam

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 ++- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 88e817a..2acc9

[Qemu-devel] [PATCH v2 17/33] target/s390x: Use unwind data for helper_clcle

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 6 +++--- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 8a095ad..f5

[Qemu-devel] [PATCH v2 24/33] target/s390x: Use unwind data for helper_lctl

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 9 + target/s390x/translate.c | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 68e3817.

[Qemu-devel] [PATCH v2 25/33] target/s390x: Use unwind data for helper_stctl

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 10 ++ target/s390x/translate.c | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 614c

[Qemu-devel] [PATCH v2 15/33] target/s390x: Use unwind data for helper_mvcl

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 7 --- target/s390x/translate.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2acc984..4

[Qemu-devel] [PATCH v2 18/33] target/s390x: Use unwind data for helper_cksm

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 11 ++- target/s390x/translate.c | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index f5a3

[Qemu-devel] [PATCH v2 23/33] target/s390x: Use unwind data for helper_lctlg

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 8 target/s390x/translate.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index ff12777..

[Qemu-devel] [PATCH v2 31/33] target/s390x: Fix EXECUTE with R1==0

2017-05-24 Thread Richard Henderson
The PoO specifies that when R1==0, no ORing into the insn loaded from storage takes place. Load a zero for this case. Signed-off-by: Richard Henderson --- target/s390x/insn-data.def | 4 ++-- target/s390x/translate.c | 14 +- 2 files changed, 15 insertions(+), 3 deletions(-) dif

[Qemu-devel] [PATCH v2 33/33] target/s390x: Implement CSPG

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/insn-data.def | 1 + target/s390x/translate.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 4c91f30..f818437 100644 --- a/target/s390x/insn-data.def +++ b/target/s390x/insn-da

[Qemu-devel] [PATCH v2 27/33] target/s390x: Use unwind data for helper_tprot

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 1 - target/s390x/translate.c | 1 - 2 files changed, 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 7df2e53..a8c85c9 100644 --- a/tar

[Qemu-devel] [PATCH v2 28/33] target/s390x: Use unwind data for helper_lra

2017-05-24 Thread Richard Henderson
Fix saving exception_index around mmu_translate; eliminate a dead store. Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 6 +++--- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.

[Qemu-devel] [PATCH v2 29/33] target/s390x: Use unwind data for helper_mvcs/mvcp

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 8 ++-- target/s390x/translate.c | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 17d8257.

[Qemu-devel] [PATCH v2 30/33] target/s390x: Fix some helper_ex problems

2017-05-24 Thread Richard Henderson
(1) The OR of the low bits or R1 into INSN were not being done consistently; it was forgotten along all but the SVC path. (2) The setting of ILEN was wrong on SVC path for EXRL. (3) The data load for ICM read too much. Fix these by consolidating data load at the beginning, using get_ilen to contro

[Qemu-devel] [PATCH v2 32/33] target/s390x: Use atomic operations for COMPARE SWAP PURGE

2017-05-24 Thread Richard Henderson
Also provide the cross-cpu tlb flushing required by the PoO. Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/insn-data.def | 2 +- target/s390x/mem_helper.c | 32 target/s390x/translate.c | 42

[Qemu-devel] [PATCH v2 1/5] qemu-io: Don't die on second open

2017-05-24 Thread Eric Blake
Most callback commands in qemu-io return 0 to keep the interpreter loop running, or 1 to quit immediately. However, open_f() just passed through the return value of openfile(), which has different semantics of returning 0 if a file was opened, or 1 on any failure. As a result of mixing the return

[Qemu-devel] [PATCH v2 0/5] more blkdebug tweaks

2017-05-24 Thread Eric Blake
I found a crasher and some odd behavior while rebasing my bdrv_get_block_status series, so I figured I'd get these things fixed first. This is based on top of Max's block branch. Since v1: - patch 1: patch open_f instead of openfile [Fam] - patch 2: drop redundant assignment - patch 3: new - patc

[Qemu-devel] [PATCH v2 4/5] block: Simplify use of BDRV_BLOCK_RAW

2017-05-24 Thread Eric Blake
The lone caller that cares about a return of BDRV_BLOCK_RAW (namely, io.c:bdrv_co_get_block_status) completely replaces the return value, so there is no point in passing BDRV_BLOCK_DATA. Signed-off-by: Eric Blake --- v2: fix subject, tweak commit message --- block/commit.c | 2 +- block/mir

[Qemu-devel] [PATCH v2 5/5] blkdebug: Support .bdrv_co_get_block_status

2017-05-24 Thread Eric Blake
Without a passthrough status of BDRV_BLOCK_RAW, anything wrapped by blkdebug appears 100% allocated as data. Better is treating it the same as the underlying file being wrapped. Update iotest 177 for the new expected output. Signed-off-by: Eric Blake --- v2: tweak commit message --- block/blk

[Qemu-devel] [PATCH v2 2/5] block: Guarantee that *file is set on bdrv_get_block_status()

2017-05-24 Thread Eric Blake
We document that *file is valid if the return is not an error and includes BDRV_BLOCK_OFFSET_VALID, but forgot to obey this contract when a driver (such as blkdebug) lacks a callback. Broken in commit 67a0fd2 (v2.6), when we added the file parameter. Enhance qemu-iotest 177 to cover this, using a

[Qemu-devel] [PATCH v2 3/5] block: Allow NULL file for bdrv_get_block_status()

2017-05-24 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file. This patch merely simplifies the callers by consolidating the logic in the common call point, while guaranteeing a non-NULL file to all the driver callbacks, for no semantic change. However, this will also set th

Re: [Qemu-devel] [PATCH] block/gluster: glfs_lseek() workaround

2017-05-24 Thread Jeff Cody
On Wed, May 24, 2017 at 11:02:02AM +0200, Niels de Vos wrote: > On Tue, May 23, 2017 at 01:27:50PM -0400, Jeff Cody wrote: > > On current released versions of glusterfs, glfs_lseek() will sometimes > > return invalid values for SEEK_DATA or SEEK_HOLE. For SEEK_DATA and > > SEEK_HOLE, the returned

Re: [Qemu-devel] [PATCH] block/gluster: glfs_lseek() workaround

2017-05-24 Thread Niels de Vos
On Wed, May 24, 2017 at 04:50:03PM -0400, Jeff Cody wrote: > On Wed, May 24, 2017 at 11:02:02AM +0200, Niels de Vos wrote: > > On Tue, May 23, 2017 at 01:27:50PM -0400, Jeff Cody wrote: > > > On current released versions of glusterfs, glfs_lseek() will sometimes > > > return invalid values for SEEK

Re: [Qemu-devel] [PATCH 02/31] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-24 Thread Richard Henderson
On 05/24/2017 10:54 AM, Aurelien Jarno wrote: It seems the problem arise if an interrupt happens when the TB containing the EXECUTE instruction is being executed. In that case at the end of the TB, the interruption code is translated with the ex_value set, which means with the wrong PC, wrong per

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-05-24 Thread Tomáš Golembiovský
On Wed, 12 Apr 2017 15:05:02 -0500 Michael Roth wrote: > On 04/03/2017 10:17 AM, Marc-André Lureau wrote: > > Hi > > > > On Fri, Mar 31, 2017 at 3:41 PM Eric Blake wrote: > > > >> On 03/31/2017 05:19 AM, Vinzenz 'evilissimo' Feenstra wrote: > >>> From: Vinzenz Feenstra > >>> > >>> Add a n

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-05-24 Thread Tomáš Golembiovský
On Wed, 24 May 2017 23:51:55 +0200 Tomáš Golembiovský wrote: > On Wed, 12 Apr 2017 15:05:02 -0500 > Michael Roth wrote: > > > On 04/03/2017 10:17 AM, Marc-André Lureau wrote: > > > Hi > > > > > > On Fri, Mar 31, 2017 at 3:41 PM Eric Blake wrote: > > > > > >> On 03/31/2017 05:19 AM, Vin

Re: [Qemu-devel] [PATCH v2] vhost-user: pass message as a pointer to process_message_reply()

2017-05-24 Thread Michael S. Tsirkin
On Wed, May 24, 2017 at 11:05:20AM +0200, Maxime Coquelin wrote: > process_message_reply() was recently updated to get full message > content instead of only its request field. > > There is no need to copy all the struct content into the stack, > so just pass its pointer as const. > > Cc: Zhiyong

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-05-24 Thread Eric Blake
On 05/24/2017 04:51 PM, Tomáš Golembiovský wrote: > So what about the following, would that be acceptable? > > > ## > # @GuestOSRelease: > # > # @content: > # POSIX systems the @kernel_version, @kernel_release and > # @machine_hardware correspond to the values release, version

Re: [Qemu-devel] [PATCH] pc: ACPI BIOS: use highest NUMA node for hotplug mem hole SRAT entry

2017-05-24 Thread Michael S. Tsirkin
On Wed, May 24, 2017 at 11:16:14AM +0200, Ladi Prosek wrote: > On Wed, May 24, 2017 at 11:07 AM, Laszlo Ersek wrote: > > On 05/24/17 10:09, Ladi Prosek wrote: > >> For reasons unknown, Windows won't online all memory, both at command > >> line and hot-plugged later, unless the hotplug mem hole SRA

[Qemu-devel] [PATCH 0/4] target/s390x Implement EXECUTE via TranslationBlock

2017-05-24 Thread Richard Henderson
This is the rewrite of EX that I posted last week, fixed with Aurelien's help, and adjusted to be applied on top of my v2 unwind patch set. It also splits the patch into more pieces to make it easier to debug, and keeps the direct implementation of the most common target insns. Which are in fact s

[Qemu-devel] [PATCH 1/4] target/s390x: Save current ilen during translation

2017-05-24 Thread Richard Henderson
Use this saved value instead of recomputing from next_pc difference. Signed-off-by: Richard Henderson --- target/s390x/translate.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 4bd16d9..5b8333f 100644 --- a/t

[Qemu-devel] [PATCH 2/4] target/s390x: End the TB after EXECUTE

2017-05-24 Thread Richard Henderson
This split will be required for implementing EXECUTE properly. Do this now as a separate step to aid comparison of before and after TB listings. Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 54 --- target/s390x/translate.c | 6 +++

[Qemu-devel] [PATCH 4/4] target/s390x: Re-implement a few EXECUTE target insns directly

2017-05-24 Thread Richard Henderson
While the previous patch is required for proper conformance, the vast majority of target insns are MVC and XC for implementing memmove and memset respectively. The next most common are CLC, TR, and SVC. Implementing these (and a few others for which we already have an implementation) directly is

<    1   2   3   >