Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] target/ppc: fmadd check for excp independently

2017-03-03 Thread Programmingkid
On Mar 3, 2017, at 4:59 AM, qemu-ppc-requ...@nongnu.org wrote: > > Current order of checking does not confirm with the spec > (ISA 3.0: MultiplyAddDP page-469). Change the order and make them > independent of each other. > > For example: a = infinity, b = zero, c = SNaN, this should set both >

Re: [Qemu-devel] [PATCH 0/5] A few VLAN-related bugfixes for RX packet abstraction

2017-03-03 Thread Jason Wang
On 2017年03月03日 20:06, Peter Maydell wrote: On 17 February 2017 at 03:04, Jason Wang wrote: On 2017年02月16日 20:29, Dmitry Fleytman wrote: This series fix a few issues related to processing of RX packets with VLAN headers. See commit messages of specific patches for information regarding affe

Re: [Qemu-devel] [PATCH 0/7] Introducing libtcg

2017-03-03 Thread Richard Henderson
On 03/01/2017 04:19 AM, Alessandro Di Federico wrote: This series of patches is a follow-up to the "Preparing the build system for libtcg" patch set. The first six patches' aim is to decouple and factor out some components so that introducing libtcg can be painless and smooth. The last patch ins

Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand

2017-03-03 Thread Nir Soffer
On Sat, Mar 4, 2017 at 12:15 AM, Nir Soffer wrote: > On Sat, Mar 4, 2017 at 12:02 AM, John Snow wrote: >> >> >> On 03/03/2017 04:38 PM, Nir Soffer wrote: >>> On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi wrote: RFCv1: * Publishing patch series with just raw support, no qcow2 ye

Re: [Qemu-devel] [PATCH for-2.9 0/6] disas: Fix various coverity nits

2017-03-03 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Subject: [Qemu-devel] [PATCH for-2.9 0/6] disas: Fix various coverity nits Message-id: 1488556233-31246-1-git-send-email-peter.mayd...@linaro.org Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script wi

Re: [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()

2017-03-03 Thread Eric Blake
On 03/03/2017 12:14 PM, Eric Blake wrote: > On 03/03/2017 11:25 AM, Greg Kurz wrote: >> We should pass O_NOFOLLOW otherwise openat() will follow symlinks and make >> QEMU vulnerable. >> >> O_PATH was used as an optimization: the fd returned by openat_dir() is only >> passed to openat() actually, so

[Qemu-devel] [PATCH v2] spapr_pci: allow control of BAR alignment through SLOF

2017-03-03 Thread Michael Roth
In certain cases, such as PCI-passthrough with VFIO, we cannot offload MMIO accesses to KVM unless the BAR alignment matches the host. This patch, in conjunction with a separately submitted patch for SLOF which allows for control of this via the device-tree, allows us to set this alignment via QEMU

Re: [Qemu-devel] [PATCH 0/3] ide: ahci: fix memory leak in device unit

2017-03-03 Thread John Snow
On 03/02/2017 05:08 AM, Li Qiang wrote: > As the pci ahci can be hotplug and unplug, in the ahci unrealize > function it should free all the resource once allocated in the > realized function. This patchset first add cleanup function in > core layer and then call it in the ahci unit. > > Li Qian

Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand

2017-03-03 Thread Nir Soffer
On Sat, Mar 4, 2017 at 12:02 AM, John Snow wrote: > > > On 03/03/2017 04:38 PM, Nir Soffer wrote: >> On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi wrote: >>> >>> RFCv1: >>> * Publishing patch series with just raw support, no qcow2 yet. Please >>> review >>>the command-line interface and

Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand

2017-03-03 Thread John Snow
On 03/03/2017 04:38 PM, Nir Soffer wrote: > On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi wrote: >> >> RFCv1: >> * Publishing patch series with just raw support, no qcow2 yet. Please >> review >>the command-line interface and let me know if you are happy with this >>approach. >> >>

Re: [Qemu-devel] [RFC 3/4] qemu-img: add max-size subcommand

2017-03-03 Thread Nir Soffer
On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi wrote: > The max-size subcommand calculates the maximum size required by a new > image file. This can be used by users or management tools that need to > allocate space on an LVM volume, SAN LUN, etc before creating or > converting an image file. >

Re: [Qemu-devel] -rtc clock=vm with -icount 1, sleep=off introduces unexpected delays in device interactions

2017-03-03 Thread Frédéric Konrad
Hi Jim, I think Alex and Paolo worked on an mttcg/icount issue. Not sure if its related or not. Fred On 03/03/2017 08:38 PM, Nutaro, James J. wrote: > My original problem seems to stem from something that changed in the way that > device emulation and instruction execution interact (I'm guessin

Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand

2017-03-03 Thread Nir Soffer
On Fri, Mar 3, 2017 at 3:51 PM, Stefan Hajnoczi wrote: > > RFCv1: > * Publishing patch series with just raw support, no qcow2 yet. Please review >the command-line interface and let me know if you are happy with this >approach. > > Users and management tools sometimes need to know the siz

Re: [Qemu-devel] [RFC PATCH] configure: remove --enable-replication/--disable-replication

2017-03-03 Thread Paolo Bonzini
> > I would actually prefer to remove many of the latter > > (‑‑enable‑vhost‑net, ‑‑enable‑vhost‑scsi, ‑‑enable‑vhost‑socket) and > > just use default‑configs. We are already doing it for ivshmem for > > example: > > Was there ever a conclusion here? The reason I ask is that I see that > current

Re: [Qemu-devel] [PULL 08/24] tcg: drop global lock during TCG code execution

2017-03-03 Thread Alex Bennée
Aaron Lindsay writes: > On Feb 27 14:39, Alex Bennée wrote: >> >> Laurent Desnogues writes: >> >> > Hello, >> > >> > On Fri, Feb 24, 2017 at 12:20 PM, Alex Bennée >> > wrote: >> >> From: Jan Kiszka >> >> >> >> This finally allows TCG to benefit from the iothread introduction: Drop >> >> the

Re: [Qemu-devel] [PATCH v2]util:Removed header qemu-common.h from path.c

2017-03-03 Thread Eric Blake
On 03/03/2017 02:22 PM, Suramya Shah wrote: > Signed-off-by: Suramya Shah Technically, this is v3 now (and your next submission will be v4). Also, if you use 'git send-email -v4' to send your patch, it would automatically put a space after the closing ] of the subject prefix (I think 'git am' doe

Re: [Qemu-devel] [PULL 08/24] tcg: drop global lock during TCG code execution

2017-03-03 Thread Aaron Lindsay
On Feb 27 14:39, Alex Bennée wrote: > > Laurent Desnogues writes: > > > Hello, > > > > On Fri, Feb 24, 2017 at 12:20 PM, Alex Bennée > > wrote: > >> From: Jan Kiszka > >> > >> This finally allows TCG to benefit from the iothread introduction: Drop > >> the global mutex while running pure TCG

Re: [Qemu-devel] [PATCH v3 04/13] sm501: QOMify

2017-03-03 Thread BALATON Zoltan
On Fri, 3 Mar 2017, Peter Maydell wrote: On 3 March 2017 at 01:03, BALATON Zoltan wrote: Adding vmstate saving is not in this patch because the state structure will be changed in further patches, then another patch will add vmstate descriptor after those changes. Signed-off-by: BALATON Zoltan

Re: [Qemu-devel] [RFC 0/4] qemu-img: add max-size subcommand

2017-03-03 Thread John Snow
On 03/03/2017 08:51 AM, Stefan Hajnoczi wrote: > RFCv1: > * Publishing patch series with just raw support, no qcow2 yet. Please review >the command-line interface and let me know if you are happy with this >approach. > > Users and management tools sometimes need to know the size requir

Re: [Qemu-devel] [PATCH v2 5/5] xen: use libxendevicemodel when available

2017-03-03 Thread Stefano Stabellini
On Fri, 3 Mar 2017, Stefano Stabellini wrote: > On Fri, 3 Mar 2017, Paul Durrant wrote: > > > -Original Message- > > > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > > > Sent: 02 March 2017 22:50 > > > To: Paul Durrant > > > Cc: xen-de...@lists.xenproject.org; qemu-devel@nongnu

Re: [Qemu-devel] [PATCH v2 5/5] xen: use libxendevicemodel when available

2017-03-03 Thread Stefano Stabellini
On Fri, 3 Mar 2017, Paul Durrant wrote: > > -Original Message- > > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > > Sent: 02 March 2017 22:50 > > To: Paul Durrant > > Cc: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org; Stefano > > Stabellini ; Anthony Perard > > > > Sub

Re: [Qemu-devel] [RFC PATCH] configure: remove --enable-replication/--disable-replication

2017-03-03 Thread Bruce Rogers
>>> On 2/6/2017 at 4:57 AM, wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> >> >> On 03/02/2017 07:00, Stefan Hajnoczi wrote: >> > On Thu, Feb 02, 2017 at 07:05:30AM ‑0800, Paolo Bonzini wrote: >> >> The replication feature is a small amount of code, does not >> >> require any external

[Qemu-devel] [PATCH v2]util:Removed header qemu-common.h from path.c

2017-03-03 Thread Suramya Shah
Signed-off-by: Suramya Shah --- fix of typo in v1 that broke compilation util/path.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/path.c b/util/path.c index 5479f76..7f9fc27 100644 --- a/util/path.c +++ b/util/path.c @@ -6,7 +6,6 @@ #include "qemu/osdep.h" #include #include -#incl

Re: [Qemu-devel] [PATCH 09/15] sheepdog: Implement bdrv_parse_filename()

2017-03-03 Thread Eric Blake
On 03/02/2017 03:44 PM, Markus Armbruster wrote: > This permits configuration with driver-specific options in addition to > pseudo-filename parsed as URI. For instance, > > --drive driver=sheepdog,host=fido,vdi=dolly > > instead of > > --drive driver=sheepdog,file=sheepdog://fido/dolly

Re: [Qemu-devel] [PATCH v2 07/14] sm501: Fix device endianness

2017-03-03 Thread BALATON Zoltan
On Fri, 3 Mar 2017, Peter Maydell wrote: On 3 March 2017 at 02:15, BALATON Zoltan wrote: Maybe it's not correct but works for everything I could test better than the original code (which was broken even for the SH images one can find) so I think we could just go with this until someone complain

Re: [Qemu-devel] [PATCH 14/15] qapi-schema: Rename SocketAddressFlat's variant tcp to inet

2017-03-03 Thread Markus Armbruster
Eric Blake writes: > On 03/02/2017 03:44 PM, Markus Armbruster wrote: >> QAPI type SocketAddressFlat differs from SocketAddress pointlessly: >> the discriminator value for variant InetSocketAddress is 'tcp' instead >> of 'inet'. Rename. >> >> The type is far only used by the Gluster block drive

Re: [Qemu-devel] [PATCH v4 25/28] qapi: Make input visitors detect unvisited list tails

2017-03-03 Thread Eric Blake
On 03/03/2017 01:50 PM, Markus Armbruster wrote: > Eric Blake writes: > >> On 03/03/2017 06:32 AM, Markus Armbruster wrote: >>> Fix the design flaw demonstrated in the previous commit: new method >>> check_list() lets input visitors report that unvisited input remains >>> for a list, exactly like

Re: [Qemu-devel] [PATCH] 9pfs: fix fd leak in local_opendir()

2017-03-03 Thread Philippe Mathieu-Daudé
On 03/03/2017 02:54 PM, Daniel P. Berrange wrote: On Fri, Mar 03, 2017 at 06:52:42PM +0100, Greg Kurz wrote: Coverity issue CID1371731 Signed-off-by: Greg Kurz --- hw/9pfs/9p-local.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index e31309a29

Re: [Qemu-devel] [PATCH] 9pfs: fail local_statfs() earlier

2017-03-03 Thread Philippe Mathieu-Daudé
On 03/03/2017 03:03 PM, Greg Kurz wrote: If we cannot open the given path, we can return right away instead of passing -1 to fstatfs() and close(). This will make Coverity happy. (Coverity issue CID1371729) Signed-off-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- hw/9pfs/9p-local

Re: [Qemu-devel] [PATCH v4 07/28] qmp: Clean up how we enforce capability negotiation

2017-03-03 Thread Eric Blake
On 03/03/2017 01:45 PM, Markus Armbruster wrote: >>> -rsp = qmp_dispatch(&qmp_commands, req); >>> +qdict = qdict_get_qdict(qobject_to_qdict(rsp), "error"); >>> +if (qdict) { >>> +if (mon->qmp.commands == &qmp_cap_negotiation_commands >>> +&& !g_strcmp0(qdict_get_try

Re: [Qemu-devel] [PATCH v4 13/28] qapi: Make QObject input visitor set *list reliably

2017-03-03 Thread Philippe Mathieu-Daudé
On 03/03/2017 09:32 AM, Markus Armbruster wrote: qobject_input_start_struct() sets *list, except when it fails because qobject_input_get_object() fails, i.e. the input object doesn't exist. All the other input visitor start_struct(), start_list(), start_alternate() always set *obj / *list. Chan

Re: [Qemu-devel] [PATCH v4 10/28] qmp: Improve QMP dispatch error messages

2017-03-03 Thread Philippe Mathieu-Daudé
Hi Markus, On 03/03/2017 09:32 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qapi/qmp-dispatch.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 23b0528..578c6d8 1006

Re: [Qemu-devel] [PATCH v4 05/28] qapi: Support multiple command registries per program

2017-03-03 Thread Eric Blake
On 03/03/2017 01:37 PM, Markus Armbruster wrote: > Eric Blake writes: > >> On 03/03/2017 06:32 AM, Markus Armbruster wrote: >>> The command registry encapsulates a single command list. Give the >>> functions using it a parameter instead. Define suitable command lists >>> in monitor, guest agent

Re: [Qemu-devel] [PATCH v2 05/11] translate-all: exit cpu_restore_state early if translating

2017-03-03 Thread Richard Henderson
On 03/03/2017 09:03 PM, Alex Bennée wrote: We *should* have retaddr == 0 for this case, which indicates that we should not attempt to restore state. Are you seeing a non-zero value? Actually looking at xtensa I see: Attempt to resolve CPU state @ 0x0 while translating So maybe I should che

Re: [Qemu-devel] [PATCH v4 25/28] qapi: Make input visitors detect unvisited list tails

2017-03-03 Thread Markus Armbruster
Eric Blake writes: > On 03/03/2017 06:32 AM, Markus Armbruster wrote: >> Fix the design flaw demonstrated in the previous commit: new method >> check_list() lets input visitors report that unvisited input remains >> for a list, exactly like check_struct() lets them report that >> unvisited input

Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert

2017-03-03 Thread Eric Blake
On 03/03/2017 01:47 PM, Eric Blake wrote: > On 03/03/2017 01:35 PM, Richard Henderson wrote: >> >> Which is exactly the point when you have a condition like (X > 0); >> letting the compiler have the same information for the production build >> that it would have gleaned from the debug build. >> >>

Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert

2017-03-03 Thread Eric Blake
On 03/03/2017 01:35 PM, Richard Henderson wrote: > > Which is exactly the point when you have a condition like (X > 0); > letting the compiler have the same information for the production build > that it would have gleaned from the debug build. > > But that's not the same as dropping the assert,

Re: [Qemu-devel] [PULL 0/2] submodule-update queue 20170303

2017-03-03 Thread James Hanley
I'm trying to clone clean and I'm getting the following when initing the submodules updated: jim@jim-VirtualBox:~/project/lg_4k_test/qemu_pristine$ ( git submodule sync; git submodule update --init --recursive ) Submodule 'dtc' (http://git.qemu-project.org/git/dtc.git) registered for path 'dtc' Su

Re: [Qemu-devel] [PATCH v4 07/28] qmp: Clean up how we enforce capability negotiation

2017-03-03 Thread Markus Armbruster
Eric Blake writes: > On 03/03/2017 06:32 AM, Markus Armbruster wrote: >> To enforce capability negotiation before normal operation, >> handle_qmp_command() inspects every command before it's handed off to >> qmp_dispatch(). This is a bit of a layering violation, and results in >> duplicated code

Re: [Qemu-devel] [PATCH 1/1] virtio-blk: fix race on guest notifiers

2017-03-03 Thread Halil Pasic
On 03/02/2017 05:21 PM, Paolo Bonzini wrote: > > > On 02/03/2017 16:55, Halil Pasic wrote: > blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context()); >> I'm wondering if synchronization is needed for batch_notify_vqs. I think >> the set_bit can be from the iothread, but the noti

Re: [Qemu-devel] [PATCH for-2.9 5/6] disas/cris: Avoid unintended sign extension

2017-03-03 Thread Philippe Mathieu-Daudé
On 03/03/2017 12:58 PM, Edgar E. Iglesias wrote: On Fri, Mar 03, 2017 at 03:50:32PM +, Peter Maydell wrote: In the cris disassembler we were using 'unsigned long' to calculate addresses which are supposed to be 32 bits. This meant that we might accidentally sign extend or calculate a value

Re: [Qemu-devel] [PATCH RESEND] qdev: Make "hotplugged" property read-only

2017-03-03 Thread Eduardo Habkost
On Mon, Feb 27, 2017 at 07:05:24PM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > The "hotplugged" property is user visible, but it was never meant > > to be set by the user. There are probably multiple ways to break > > or crash device code by overriding the property. For exampl

Re: [Qemu-devel] [PATCH v4 06/28] qapi-introspect: Mangle --prefix argument properly for C

2017-03-03 Thread Markus Armbruster
Eric Blake writes: > On 03/03/2017 06:32 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> scripts/qapi-introspect.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Reviewed-by: Eric Blake > > I'm guessing we haven't seen a use of a prefix that matters ye

Re: [Qemu-devel] [PATCH for-2.9 1/6] disas/hppa: Remove dead code

2017-03-03 Thread Philippe Mathieu-Daudé
On 03/03/2017 12:50 PM, Peter Maydell wrote: Coverity complains (CID 1302705) that the "fr0" part of the ?: in fput_fp_reg_r() is dead. This looks like cut-n-paste error from fput_fp_reg(); delete the dead code. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- disas/h

Re: [Qemu-devel] -rtc clock=vm with -icount 1, sleep=off introduces unexpected delays in device interactions

2017-03-03 Thread Nutaro, James J.
My original problem seems to stem from something that changed in the way that device emulation and instruction execution interact (I'm guessing). To reproduce the issue, I started a linux image with qemu-system-i386 -rtc clock=vm -monitor none -icount 1,sleep=off jack.img After booting, I run

Re: [Qemu-devel] [PATCH v4 05/28] qapi: Support multiple command registries per program

2017-03-03 Thread Markus Armbruster
Eric Blake writes: > On 03/03/2017 06:32 AM, Markus Armbruster wrote: >> The command registry encapsulates a single command list. Give the >> functions using it a parameter instead. Define suitable command lists >> in monitor, guest agent and test-qmp-commands. >> >> Signed-off-by: Markus Armb

Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert

2017-03-03 Thread Richard Henderson
On 03/03/2017 10:19 PM, Peter Maydell wrote: On 3 March 2017 at 11:05, Alex Bennée wrote: According to the commit that added it (c552d6c038f7cf4058d1fd5987118ffd41e0e050) it is meant to be a hint to the compiler. Reading the GCC notes however seems to contradict that. FWIW I did test it in bot

Re: [Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-03 Thread John Snow
On 03/03/2017 02:26 PM, Nir Soffer wrote: > On Fri, Mar 3, 2017 at 8:54 PM, John Snow wrote: >> Use the existing readline history function we are utilizing >> to provide persistent command history across instances of qmp-shell. >> >> This assists entering debug commands across sessions that may

Re: [Qemu-devel] [PATCH v2 02/11] target/i386/cpu.h: declare TCG_GUEST_DEFAULT_MO

2017-03-03 Thread Eduardo Habkost
On Thu, Mar 02, 2017 at 07:53:28PM +, Alex Bennée wrote: > This suppresses the incorrect warning when forcing MTTCG for x86 > guests on x86 hosts. A future patch will still warn when > TARGET_SUPPORT_MTTCG hasn't been defined for the guest (which is still > pending for x86). > > Reported-by: P

Re: [Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-03 Thread Nir Soffer
On Fri, Mar 3, 2017 at 8:54 PM, John Snow wrote: > Use the existing readline history function we are utilizing > to provide persistent command history across instances of qmp-shell. > > This assists entering debug commands across sessions that may be > interrupted by QEMU sessions terminating, whe

Re: [Qemu-devel] [PATCH] Removed header qemu-common.h from path.c

2017-03-03 Thread Eric Blake
[adding qemu-trivial in cc] On 03/03/2017 01:18 PM, Suramya Shah wrote: > Signed-off-by: Suramya Shah > --- It would have been nice to mention in the subject that this is v2 (v1 was here https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg00110.html), and then mention here after the --- tha

Re: [Qemu-devel] [PATCH] hppa: avoid anonymous unions in designated initializers.

2017-03-03 Thread Richard Henderson
On 03/04/2017 03:28 AM, Paolo Bonzini wrote: These cause compilation failures on CentOS 6 or other operating systems with older GCCs. Cc: Richard Henderson Cc: Peter Maydell Signed-off-by: Paolo Bonzini --- Peter, please consider applying this as a build fix, because the cento

[Qemu-devel] [PATCH] Removed header qemu-common.h from path.c

2017-03-03 Thread Suramya Shah
Signed-off-by: Suramya Shah --- util/path.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/path.c b/util/path.c index 5479f76..7f9fc27 100644 --- a/util/path.c +++ b/util/path.c @@ -6,7 +6,6 @@ #include "qemu/osdep.h" #include #include -#include "qemu-common.h" #include "qemu/cutil

Re: [Qemu-devel] [PATCH 2/3] target/ppc: fmadd: add macro for updating flags

2017-03-03 Thread Richard Henderson
On 03/03/2017 05:58 PM, Nikunj A Dadhania wrote: +#define FPU_MADDSUB_UPDATE(name, tp)\ +static void name(CPUPPCState *env, float64 arg1,\ + float64 arg2, float64 arg3,\ + unsig

Re: [Qemu-devel] [PATCH v4 25/28] qapi: Make input visitors detect unvisited list tails

2017-03-03 Thread Eric Blake
On 03/03/2017 06:32 AM, Markus Armbruster wrote: > Fix the design flaw demonstrated in the previous commit: new method > check_list() lets input visitors report that unvisited input remains > for a list, exactly like check_struct() lets them report that > unvisited input remains for a struct or uni

Re: [Qemu-devel] [PATCH 1/3] target/ppc: fmadd check for excp independently

2017-03-03 Thread Richard Henderson
On 03/03/2017 05:58 PM, Nikunj A Dadhania wrote: Current order of checking does not confirm with the spec (ISA 3.0: MultiplyAddDP page-469). Change the order and make them independent of each other. For example: a = infinity, b = zero, c = SNaN, this should set both VXIMZ and VXNAN Signed-off-b

Re: [Qemu-devel] [PULL 00/15] virtio, pc: fixes, features

2017-03-03 Thread Michael S. Tsirkin
On Fri, Mar 03, 2017 at 12:44:59PM +, Peter Maydell wrote: > On 2 March 2017 at 06:20, Michael S. Tsirkin wrote: > > dtc | 2 +- > > I just noticed this erroneous submodule update in here, unfortunately > after I pushed it to master :-( > > I'll fix up the

Re: [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()

2017-03-03 Thread Greg Kurz
On Fri, 3 Mar 2017 12:14:10 -0600 Eric Blake wrote: > On 03/03/2017 11:25 AM, Greg Kurz wrote: > > We should pass O_NOFOLLOW otherwise openat() will follow symlinks and make > > QEMU vulnerable. > > > > O_PATH was used as an optimization: the fd returned by openat_dir() is only > > passed to ope

Re: [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()

2017-03-03 Thread Greg Kurz
On Fri, 3 Mar 2017 17:54:35 + Mark Cave-Ayland wrote: > On 03/03/17 17:25, Greg Kurz wrote: > > > We should pass O_NOFOLLOW otherwise openat() will follow symlinks and make > > QEMU vulnerable. > > > > O_PATH was used as an optimization: the fd returned by openat_dir() is only > > passed to

Re: [Qemu-devel] [PATCH for-2.9 3/6] disas/m68k: Avoid unintended sign extension in get_field()

2017-03-03 Thread Laurent Vivier
Le 03/03/2017 à 16:50, Peter Maydell a écrit : > In get_field(), we take an 'unsigned char' value and shift it left, > which implicitly promotes it to 'signed int', before ORing it into an > 'unsigned long' type. If 'unsigned long' is 64 bits then this will > result in a sign extension and the top

[Qemu-devel] [PATCH v2] qmp-shell: add persistent command history

2017-03-03 Thread John Snow
Use the existing readline history function we are utilizing to provide persistent command history across instances of qmp-shell. This assists entering debug commands across sessions that may be interrupted by QEMU sessions terminating, where the qmp-shell has to be relaunched. Signed-off-by: John

Re: [Qemu-devel] [PATCH 00/15] block: A bunch of fixes for Sheepdog and Gluster

2017-03-03 Thread Peter Maydell
On 3 March 2017 at 18:37, Markus Armbruster wrote: > Peter Maydell writes: >> Did you find these by looking at our Coverity results, or >> cross-reference them against Coverity? (Coverity definitely >> found the gluster leaks, for instance.) > > Neither. I merely hacked myself a path through an

Re: [Qemu-devel] [PATCH v2 07/14] sm501: Fix device endianness

2017-03-03 Thread Peter Maydell
On 3 March 2017 at 02:15, BALATON Zoltan wrote: > Maybe it's not correct but works for everything I could test better than the > original code (which was broken even for the SH images one can find) so I > think we could just go with this until someone complains and provides a test > case. I've giv

Re: [Qemu-devel] [PATCH v4 24/28] test-qobject-input-visitor: Cover missing nested struct member

2017-03-03 Thread Eric Blake
On 03/03/2017 06:32 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > tests/test-qobject-input-visitor.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization lib

Re: [Qemu-devel] [PATCH 15/15] sheepdog: Support blockdev-add

2017-03-03 Thread Eric Blake
On 03/02/2017 03:44 PM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > qapi/block-core.json | 27 --- > 1 file changed, 24 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtual

Re: [Qemu-devel] [PATCH v4 07/28] qmp: Clean up how we enforce capability negotiation

2017-03-03 Thread Eric Blake
On 03/03/2017 06:32 AM, Markus Armbruster wrote: > To enforce capability negotiation before normal operation, > handle_qmp_command() inspects every command before it's handed off to > qmp_dispatch(). This is a bit of a layering violation, and results in > duplicated code. > > Before capability ne

Re: [Qemu-devel] [PATCH v3 04/13] sm501: QOMify

2017-03-03 Thread Peter Maydell
On 3 March 2017 at 01:03, BALATON Zoltan wrote: > Adding vmstate saving is not in this patch because the state structure > will be changed in further patches, then another patch will add > vmstate descriptor after those changes. > > Signed-off-by: BALATON Zoltan > +static void sm501_init(SM501St

Re: [Qemu-devel] [PATCH 14/15] qapi-schema: Rename SocketAddressFlat's variant tcp to inet

2017-03-03 Thread Eric Blake
On 03/02/2017 03:44 PM, Markus Armbruster wrote: > QAPI type SocketAddressFlat differs from SocketAddress pointlessly: > the discriminator value for variant InetSocketAddress is 'tcp' instead > of 'inet'. Rename. > > The type is far only used by the Gluster block drivers. Take care to > keep 'tc

Re: [Qemu-devel] [PATCH v3 13/13] ppc: Add SM501 device in config for ppc and ppcemb targets

2017-03-03 Thread Peter Maydell
On 13 December 2016 at 21:00, BALATON Zoltan wrote: > This is not used by default on any emulated machine yet but it is > still useful to have it compiled so it can be added from the command > line for clients that can use it (e.g. MorphOS has no driver for any > other emulated video cards but can

Re: [Qemu-devel] [PATCH 00/15] block: A bunch of fixes for Sheepdog and Gluster

2017-03-03 Thread Markus Armbruster
Peter Maydell writes: > On 2 March 2017 at 21:43, Markus Armbruster wrote: >> Bad error handling, memory leaks, and lack of blockdev-add support. >> >> Markus Armbruster (15): >> sheepdog: Defuse time bomb in sd_open() error handling >> sheepdog: Fix error handling in sd_snapshot_delete() >>

Re: [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter

2017-03-03 Thread Eduardo Habkost
On Tue, Feb 28, 2017 at 09:52:51AM +0100, Thomas Huth wrote: > If the user currently tries to use the -kernel parameter, simply nothing > happens, and the user might get confused that there is nothing loaded > to memory, but also no error message has been issued. Since there is no > real generic wa

Re: [Qemu-devel] [PATCH v3 12/13] sm501: Add vmstate descriptor

2017-03-03 Thread Peter Maydell
On 25 February 2017 at 23:53, BALATON Zoltan wrote: > Signed-off-by: BALATON Zoltan > --- > > v3: Added local_mem_size_index to vmstate, add vmstate for sysbus version too > > hw/display/sm501.c | 100 > - > 1 file changed, 99 insertions(+), 1

Re: [Qemu-devel] [PATCH v3 11/13] sm501: Add some more missing registers

2017-03-03 Thread Peter Maydell
On 10 December 2016 at 02:05, BALATON Zoltan wrote: > This is to allow clients to initialise these without failing as long > as no 2D engine function is called that would use the written value. > Saved values are not used yet (may get used when more of 2D engine is > added sometimes) and clients n

Re: [Qemu-devel] [PATCH 13/15] qapi-schema: Rename GlusterServer to SocketAddressFlat

2017-03-03 Thread Eric Blake
On 03/03/2017 11:05 AM, Markus Armbruster wrote: > Eric Blake writes: > >>> +# @SocketAddressFlatType: >>> +# >>> +# Available SocketAddressFlat types >>> +# >>> +# @tcp: Internet address >>> +# >>> +# @unix: Unix domain socket >>> +# >>> +# Since: 2.9 >> >> I probably would have listed 'sinc

Re: [Qemu-devel] [PATCH v4 06/28] qapi-introspect: Mangle --prefix argument properly for C

2017-03-03 Thread Eric Blake
On 03/03/2017 06:32 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > scripts/qapi-introspect.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake I'm guessing we haven't seen a use of a prefix that matters yet, but that an upcoming patch tri

Re: [Qemu-devel] git master build failure in 9pfs

2017-03-03 Thread Eric Blake
On 03/03/2017 12:15 PM, Greg Kurz wrote: > > O_PATH | O_NOFOLLOW is a special case as described in the last paragraph > of O_PATH in the man page: > > If pathname is a symbolic link and the O_NOFOLLOW flag is also > specified, then the call returns a file descriptor

Re: [Qemu-devel] [PATCH v3 08/13] sm501: Fix hardware cursor

2017-03-03 Thread Peter Maydell
On 4 December 2016 at 18:01, BALATON Zoltan wrote: > Signed-off-by: BALATON Zoltan > --- > > v3: simplify return expression in get_bpp In my review on v2 I asked for the commit message to say clearly what the bugs being fixed here are. It's a lot easier to review a patch if I know what it's supp

Re: [Qemu-devel] [PATCH v3 06/13] sm501: Add emulation of chip connected via PCI

2017-03-03 Thread Peter Maydell
On 25 February 2017 at 18:31, BALATON Zoltan wrote: > Only the display controller part is created automatically on PCI > > Signed-off-by: BALATON Zoltan > --- > > v2: Split off removing dependency on base address to separate patch > v3: Added reset function and PCI ID constant definitions in pci_

Re: [Qemu-devel] [PATCH v4 05/28] qapi: Support multiple command registries per program

2017-03-03 Thread Eric Blake
On 03/03/2017 06:32 AM, Markus Armbruster wrote: > The command registry encapsulates a single command list. Give the > functions using it a parameter instead. Define suitable command lists > in monitor, guest agent and test-qmp-commands. > > Signed-off-by: Markus Armbruster > --- > include/qap

Re: [Qemu-devel] [PATCH v3 04/13] sm501: QOMify

2017-03-03 Thread Peter Maydell
On 3 March 2017 at 01:03, BALATON Zoltan wrote: > Adding vmstate saving is not in this patch because the state structure > will be changed in further patches, then another patch will add > vmstate descriptor after those changes. > > Signed-off-by: BALATON Zoltan > --- Reviewed-by: Peter Maydell

Re: [Qemu-devel] [PATCH v3 03/13] sm501: Add missing arbitration control register

2017-03-03 Thread Peter Maydell
On 3 December 2016 at 15:32, BALATON Zoltan wrote: > Signed-off-by: BALATON Zoltan > --- > hw/display/sm501.c | 8 > 1 file changed, 8 insertions(+) Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v3 02/13] sm501: Use defined constants instead of literal values where available

2017-03-03 Thread Peter Maydell
On 3 March 2017 at 00:21, BALATON Zoltan wrote: > Signed-off-by: BALATON Zoltan > --- > > v3: Fix initial value of misc_control register as Peter Maydell suggested > Also use M_BYTE constant from cutils.h > Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH] 9pfs: fail local_statfs() earlier

2017-03-03 Thread Eric Blake
On 03/03/2017 12:03 PM, Greg Kurz wrote: > If we cannot open the given path, we can return right away instead of > passing -1 to fstatfs() and close(). This will make Coverity happy. > > (Coverity issue CID1371729) > > Signed-off-by: Greg Kurz > --- > hw/9pfs/9p-local.c |3 +++ > 1 file cha

Re: [Qemu-devel] git master build failure in 9pfs

2017-03-03 Thread Greg Kurz
On Fri, 3 Mar 2017 12:11:36 -0600 Eric Blake wrote: > On 03/03/2017 10:43 AM, Greg Kurz wrote: > > >>> +#ifndef O_PATH > >>> +#define O_PATH 0 > >>> +#endif > >> > >> Isn't the use of O_PATH required in order to fix the recent > >> security vulnerability in 9p ? If so, then defining it

Re: [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()

2017-03-03 Thread Eric Blake
On 03/03/2017 11:25 AM, Greg Kurz wrote: > We should pass O_NOFOLLOW otherwise openat() will follow symlinks and make > QEMU vulnerable. > > O_PATH was used as an optimization: the fd returned by openat_dir() is only > passed to openat() actually, so we don't really need to reach the underlying >

Re: [Qemu-devel] [PATCH] 9pfs: fail local_statfs() earlier

2017-03-03 Thread Daniel P. Berrange
On Fri, Mar 03, 2017 at 07:03:47PM +0100, Greg Kurz wrote: > If we cannot open the given path, we can return right away instead of > passing -1 to fstatfs() and close(). This will make Coverity happy. > > (Coverity issue CID1371729) > > Signed-off-by: Greg Kurz > --- > hw/9pfs/9p-local.c |3

Re: [Qemu-devel] git master build failure in 9pfs

2017-03-03 Thread Eric Blake
On 03/03/2017 10:43 AM, Greg Kurz wrote: >>> +#ifndef O_PATH >>> +#define O_PATH 0 >>> +#endif >> >> Isn't the use of O_PATH required in order to fix the recent >> security vulnerability in 9p ? If so, then defining it to >> 0 means the QEMU is silently becoming vulnerable once again >> whi

Re: [Qemu-devel] [PATCH v2 10/11] target/arm/helper: make it clear the EC field is also in hex

2017-03-03 Thread Peter Maydell
On 2 March 2017 at 19:53, Alex Bennée wrote: > ..just like the rest of the displayed ESR register. Otherwise people > might scratch their heads if a not obviously hex number is displayed > for the EC field. > > Signed-off-by: Alex Bennée > --- > target/arm/helper.c | 2 +- > 1 file changed, 1 in

Re: [Qemu-devel] [PATCH v2 11/11] hw/intc/arm_gic: modernise the DPRINTF

2017-03-03 Thread Peter Maydell
On 2 March 2017 at 19:53, Alex Bennée wrote: > While I was debugging the icount issues I realised a bunch of the > messages look quite similar. I've fixed this by including __func__ in > the debug print. At the same time I move the a modern if (GATE) style > printf which ensures the compiler can c

Re: [Qemu-devel] [PATCH] [RFT] target/arm/arm-powerctl: Fix psci info return values

2017-03-03 Thread Peter Maydell
On 3 March 2017 at 12:32, Andrew Jones wrote: > The power state spec section 5.1.5 AFFINITY_INFO defines the > affinity info return values as > > 0 ON > 1 OFF > 2 ON_PENDING > > I grepped QEMU for power_state to ensure that no assumptions > of OFF=0 were being made. > > Signed-off-by: Andrew

[Qemu-devel] [PATCH] 9pfs: fail local_statfs() earlier

2017-03-03 Thread Greg Kurz
If we cannot open the given path, we can return right away instead of passing -1 to fstatfs() and close(). This will make Coverity happy. (Coverity issue CID1371729) Signed-off-by: Greg Kurz --- hw/9pfs/9p-local.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/9pfs/9p-local.c b/hw

Re: [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()

2017-03-03 Thread Mark Cave-Ayland
On 03/03/17 17:25, Greg Kurz wrote: > We should pass O_NOFOLLOW otherwise openat() will follow symlinks and make > QEMU vulnerable. > > O_PATH was used as an optimization: the fd returned by openat_dir() is only > passed to openat() actually, so we don't really need to reach the underlying > file

Re: [Qemu-devel] [PATCH] 9pfs: fix fd leak in local_opendir()

2017-03-03 Thread Daniel P. Berrange
On Fri, Mar 03, 2017 at 06:52:42PM +0100, Greg Kurz wrote: > Coverity issue CID1371731 > > Signed-off-by: Greg Kurz > --- > hw/9pfs/9p-local.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c > index e31309a29c58..fe930300445a 100644 > --- a/hw

[Qemu-devel] [PATCH] 9pfs: fix fd leak in local_opendir()

2017-03-03 Thread Greg Kurz
Coverity issue CID1371731 Signed-off-by: Greg Kurz --- hw/9pfs/9p-local.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index e31309a29c58..fe930300445a 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -435,6 +435,7 @@ static int local_

Re: [Qemu-devel] [PATCH] spapr: ensure that all threads within core are on the same NUMA node

2017-03-03 Thread Igor Mammedov
On Fri, 24 Feb 2017 10:26:56 +0100 Igor Mammedov wrote: > Threads within a core shouldn't be on different > NUMA nodes, so if user has misconfgured command > line, fail QEMU at start up to force user fix it. > > For now use the first thread on the core as source > of core's node-id. Later when c

Re: [Qemu-devel] [PATCH v2 00/11] MTTCG fixups for 2.9

2017-03-03 Thread Frederic Konrad
Hi All, I've a strangeness with the "drop iolock" patch. It seems it has an impact on the MMIO execution patch-set I'm working on: Basically modifying the memory tree is causing a Bad Ram Address error. I wonder if this can't happen with hotplug/unplug model as well. I'll look into this. Shoot i

Re: [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()

2017-03-03 Thread Daniel P. Berrange
On Fri, Mar 03, 2017 at 06:25:30PM +0100, Greg Kurz wrote: > We should pass O_NOFOLLOW otherwise openat() will follow symlinks and make > QEMU vulnerable. > > O_PATH was used as an optimization: the fd returned by openat_dir() is only > passed to openat() actually, so we don't really need to reach

[Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()

2017-03-03 Thread Greg Kurz
We should pass O_NOFOLLOW otherwise openat() will follow symlinks and make QEMU vulnerable. O_PATH was used as an optimization: the fd returned by openat_dir() is only passed to openat() actually, so we don't really need to reach the underlying filesystem. O_NOFOLLOW | O_PATH isn't an option: if

Re: [Qemu-devel] [PATCH] ppc/spapr: QOM'ify sPAPRRTCState

2017-03-03 Thread Cédric Le Goater
On 03/03/2017 05:54 PM, Thomas Huth wrote: > On 03.03.2017 15:49, Cédric Le Goater wrote: >> On 03/03/2017 03:13 PM, Thomas Huth wrote: >>> On 03.03.2017 14:37, Cédric Le Goater wrote: Also use an 'Object *' under the sPAPR machine to hold the RTC object. >>> >>> The change from TYPE_SYS_

Re: [Qemu-devel] [PATCH] qmp: allow setting properties to empty string in qmp-shell

2017-03-03 Thread John Snow
On 03/02/2017 07:24 AM, Daniel P. Berrange wrote: > The qmp-shell property parser currently rejects attempts to > set string properties to the empty string eg > > (QEMU) migrate-set-parameters tls-hostname= > Error while parsing command line: Expected a key=value pair, got > 'tls-hostname=

  1   2   3   4   >