Re: [Qemu-devel] [RFC/PATCH] i386: Atomically update PTEs with mttcg

2018-12-13 Thread Richard Henderson
On 12/13/18 5:39 PM, Benjamin Herrenschmidt wrote: > At this point I'd rather not take chances and introduce more bugs, so > I'll post an updated variant with a few fixes but will postpone more > refactoring unless you really really want them now :) No, that's quite all right. Thanks for the

Re: [Qemu-devel] [PATCH v1 1/1] tcg: mips: Improve the add2/sub2 command to use TCG_TARGET_REG_BITS

2018-12-13 Thread Richard Henderson
On 12/12/18 2:58 PM, Alistair Francis wrote: > Instead of hard coding 31 for the shift right use > TCG_TARGET_REG_BITS - 1. > > Signed-off-by: Alistair Francis > --- > tcg/mips/tcg-target.inc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Queued. r~

Re: [Qemu-devel] [RFC/PATCH] i386: Atomically update PTEs with mttcg

2018-12-13 Thread Benjamin Herrenschmidt
On Thu, 2018-11-29 at 11:04 -0800, Richard Henderson wrote: > > While I know the existing code just updates the low 32-bits, I'd rather update > the whole entry, and make use of the old value returned from the cmpxchg. So I had to put this on the back burner for a bit, but I'm back to it now.

Re: [Qemu-devel] [PATCH v2 4/8] qcow2-threads: split out generic path

2018-12-13 Thread Paolo Bonzini
On 11/12/18 17:43, Vladimir Sementsov-Ogievskiy wrote: > +ThreadPool *pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); > + > +while (s->nb_threads >= QCOW2_MAX_THREADS) { > +qemu_co_queue_wait(>thread_task_queue, NULL); > +} > + > +s->nb_threads++; > +ret =

Re: [Qemu-devel] [PATCH v1 2/2] target/arm: defer setting up of aarch64 gdb until arm_cpu_realize

2018-12-13 Thread Richard Henderson
On 12/13/18 5:55 AM, Alex Bennée wrote: > If we setup earlier we miss the parsing of the aarch64 state of the > CPU. If the user has booted up with: > > qemu-system-aarch64 -cpu host,aarch64=off -enable-kvm > > we end up presenting an aarch64 view of the world via the gdbstub and > hilarity

Re: [Qemu-devel] [PATCH 2/2] avoid TABs in files that only contain a few

2018-12-13 Thread Richard Henderson
On 12/13/18 4:37 PM, Paolo Bonzini wrote: > Most files that have TABs only contain a handful of them. Change > them to spaces so that we don't confuse people. Acked-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 1/2] remove space-tab sequences

2018-12-13 Thread Richard Henderson
On 12/13/18 4:37 PM, Paolo Bonzini wrote: > There are not many, and they are all simple mistakes that ended up > being committed. Remove them. > > Signed-off-by: Paolo Bonzini Acked-by: Richard Henderson r~

[Qemu-devel] [PATCH 1/2] remove space-tab sequences

2018-12-13 Thread Paolo Bonzini
There are not many, and they are all simple mistakes that ended up being committed. Remove them. Signed-off-by: Paolo Bonzini --- bsd-user/x86_64/target_syscall.h | 2 +- crypto/aes.c | 28 ++-- disas/alpha.c | 8

[Qemu-devel] [PATCH 2/2] avoid TABs in files that only contain a few

2018-12-13 Thread Paolo Bonzini
Most files that have TABs only contain a handful of them. Change them to spaces so that we don't confuse people. disas, standard-headers, linux-headers and libdecnumber are imported from other projects and probably should be exempted from the check. Outside those, after this patch the following

[Qemu-devel] [PATCH 0/2] Fix TABs in many files

2018-12-13 Thread Paolo Bonzini
Space-tab sequences at the beginning of the line are always a mistake, so patch 1 fixes them. I am not touching space-tab in the middle of the line, many of which are in #define lines. In addition, about a third of the files with TABs have only a few of them and it's worth converting them for

[Qemu-devel] [PATCH] usb-mtp: Limit filename to object information size

2018-12-13 Thread Michael Hanselmann
The filename length in MTP metadata is specified by the guest. By trusting it directly it'd theoretically be possible to get the host to write memory parts outside the filename buffer into a filename. In practice though there are usually NUL bytes stopping the string operations. Also use the

Re: [Qemu-devel] [PATCH v3] log: Make glib logging go through QEMU

2018-12-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181213142719.592-1-cferg...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181213142719.592-1-cferg...@redhat.com Subject: [Qemu-devel] [PATCH v3] log: Make glib

Re: [Qemu-devel] [PATCH v1 1/2] target/arm: kvm64 make guest debug AA32 break point aware

2018-12-13 Thread Richard Henderson
On 12/13/18 8:55 AM, Alex Bennée wrote: > > Ard Biesheuvel writes: > >> Hi Alex, >> >> Thanks again for looking into this. >> >> On Thu, 13 Dec 2018 at 12:55, Alex Bennée wrote: > >> >>> >>> int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint >>> *bp) >>> { >>> +

Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block

2018-12-13 Thread Paolo Bonzini
On 13/12/18 19:21, Peter Maydell wrote: > On Thu, 13 Dec 2018 at 18:07, Paolo Bonzini wrote: >> On 13/12/18 19:01, Peter Maydell wrote: >>> I sent a patch to do this a little while back: >>> https://patchwork.kernel.org/patch/10561557/ >>> >>> It didn't get applied because Paolo disagreed with

Re: [Qemu-devel] [PATCH v1 1/2] target/arm: kvm64 make guest debug AA32 break point aware

2018-12-13 Thread Richard Henderson
On 12/13/18 5:55 AM, Alex Bennée wrote: > int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint *bp) > { > +CPUARMState *env = _CPU(cs)->env; > +int el = arm_current_el(env); > +bool is_aa64 = arm_el_is_aa64(env, el); This will assert for el == 0; for that you

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] qemu-io: Prefer stderr for error messages

2018-12-13 Thread Nir Soffer
On Thu, Dec 13, 2018 at 11:27 PM Eric Blake wrote: > On 12/13/18 11:44 AM, Nir Soffer wrote: > > >> The things is, qemu-io was never meant to be used by other > >> applications that need to process the results, it's a tool for testing > >> and debugging. If we had meant it to be used by other

Re: [Qemu-devel] [PATCH v2] Add getsockopt for settable SOL_IPV6 options

2018-12-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181213133733.8110-1-tom.des...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181213133733.8110-1-tom.des...@gmail.com Subject: [Qemu-devel] [PATCH v2] Add

Re: [Qemu-devel] [PATCH] hw/misc/tz-mpc: Fix value of BLK_MAX register

2018-12-13 Thread Richard Henderson
On 12/13/18 12:32 PM, Peter Maydell wrote: > In the TZ Memory Protection Controller, the BLK_MAX register is supposed > to return the maximum permitted value of the BLK_IDX register. Our > implementation incorrectly returned max+1 (ie the total number of > valid index values, since BLK_IDX is

Re: [Qemu-devel] [PATCH 0/3] Update deprecation notes for QMP 'cpu-add' & HMP 'cpu_add'

2018-12-13 Thread Eduardo Habkost
Queued. Thanks, and sorry for making the original series miss the 3.1 release. -- Eduardo

Re: [Qemu-devel] [PATCH 2/3] Update that HMP 'cpu_add' is deprecated in 4.0

2018-12-13 Thread Eduardo Habkost
On Thu, Dec 13, 2018 at 09:03:23PM +0100, Thomas Huth wrote: > On 2018-12-13 13:42, Kashyap Chamarthy wrote: > > Also fix the wrong spelling of it: s/cpu-add/cpu_add/ > > > > Signed-off-by: Kashyap Chamarthy > > --- > > qemu-deprecated.texi | 4 ++-- > > 1 file changed, 2 insertions(+), 2

Re: [Qemu-devel] [Qemu-block] Request for clarification on qemu-img convert behavior zeroing target host_device

2018-12-13 Thread Nir Soffer
On Thu, Dec 13, 2018 at 11:14 PM De Backer, Fred (Nokia - BE/Antwerp) < fred.de_bac...@nokia.com> wrote: > > Indeed, performance traces are important for issues like this. > See strace of both FC27 and FC29 attached > Looks like you traced only the main thread. All the I/O is done in other

Re: [Qemu-devel] [PULL 27/32] qapi: add #if conditions to generated code members

2018-12-13 Thread Eric Blake
On 12/13/18 12:43 PM, Markus Armbruster wrote: From: Marc-André Lureau Wrap generated enum and struct members and their supporting code with Git ate the line because it started with #. Not sure if you can sneak in a v2 pull request that puts something sane here... We do enum and struct

Re: [Qemu-devel] Loading snapshot with readonly qcow2 image

2018-12-13 Thread Eric Blake
On 12/13/18 12:33 PM, Michael Spradling wrote: My question is has anyone looked into loading snapshots from a backing file? I have attempted to look through the code and this looks to be difficult. If I attempt to add support for this is there any general advice to follow? Any other ideas?

Re: [Qemu-devel] [PATCH] Add getsockopt for settable SOL_IPV6 options

2018-12-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181213130611.7496-1-tom.des...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181213130611.7496-1-tom.des...@gmail.com Subject: [Qemu-devel] [PATCH] Add getsockopt

Re: [Qemu-devel] [PATCH] block: Replace qdict_put() by qdict_put_obj() where appropriate

2018-12-13 Thread Eric Blake
On 12/13/18 11:51 AM, Markus Armbruster wrote: Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/qobject.cocci \ --macro-file scripts/cocci-macro-file.h \ --dir block --in-place Signed-off-by: Markus Armbruster ---

Re: [Qemu-devel] [PATCH] vl: Use error_fatal to simplify obvious fatal errors (again)

2018-12-13 Thread Eric Blake
On 12/13/18 11:58 AM, Markus Armbruster wrote: Patch created mechanically by rerunning: $ spatch --in-place --sp-file scripts/coccinelle/use-error_fatal.cocci \ --macro-file scripts/cocci-macro-file.h vl.c Signed-off-by: Markus Armbruster --- vl.c | 7 ++- 1 file

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] qemu-io: Prefer stderr for error messages

2018-12-13 Thread Eric Blake
On 12/13/18 11:44 AM, Nir Soffer wrote: The things is, qemu-io was never meant to be used by other applications that need to process the results, it's a tool for testing and debugging. If we had meant it to be used by other programs, we would have given it a machine-friendly interface. The

Re: [Qemu-devel] [PATCH] error: Remove NULL checks on error_propagate() calls

2018-12-13 Thread Eric Blake
On 12/13/18 11:31 AM, Markus Armbruster wrote: Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \ --macro-file scripts/cocci-macro-file.h \ --dir . --in-place Whitespace tidied up manually. Signed-off-by:

[Qemu-devel] [PATCH v3 13/16] virtio: split virtio serial bits rom virtio-pci

2018-12-13 Thread Juan Quintela
Virtio console and qga tests also depend on CONFIG_VIRTIO_SERIAL. Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-pci.c| 75 --- hw/virtio/virtio-pci.h| 14 -

[Qemu-devel] [PATCH v3 15/16] virtio: split virtio crypto bits rom virtio-pci.h

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/virtio-crypto-pci.c | 14 ++ hw/virtio/virtio-pci.h| 14 -- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/virtio/virtio-crypto-pci.c b/hw/virtio/virtio-crypto-pci.c index

[Qemu-devel] [PATCH v3 07/16] virtio: split vhost user blk bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs| 1 + hw/virtio/vhost-user-blk-pci.c | 101 + hw/virtio/virtio-pci.c | 60 hw/virtio/virtio-pci.h | 18

[Qemu-devel] [PATCH v3 11/16] virtio: split virtio blk bits rom virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs| 1 + hw/virtio/virtio-blk-pci.c | 97 ++ hw/virtio/virtio-pci.c | 59 --- hw/virtio/virtio-pci.h | 14 --

[Qemu-devel] [PATCH v3 12/16] virtio: split virtio net bits rom virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs| 1 + hw/virtio/virtio-net-pci.c | 96 ++ hw/virtio/virtio-pci.c | 57 -- hw/virtio/virtio-pci.h | 14 --

[Qemu-devel] [PATCH v3 09/16] virtio: split vhost scsi bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs| 1 + hw/virtio/vhost-scsi-pci.c | 95 ++ hw/virtio/virtio-pci.c | 59 --- hw/virtio/virtio-pci.h | 19 4 files changed, 96

[Qemu-devel] [PATCH v3 16/16] virtio: virtio 9p really requires CONFIG_VIRTFS to work

2018-12-13 Thread Juan Quintela
Signed-off-by: Juan Quintela --- default-configs/virtio.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak index 5ae4a61018..ecb4420e74 100644 --- a/default-configs/virtio.mak +++ b/default-configs/virtio.mak @@ -1,7

[Qemu-devel] [PATCH v3 10/16] virtio: split virtio scsi bits from virtio-pci

2018-12-13 Thread Juan Quintela
Notice that we can't still run tests with it disabled. Both cdrom-test and drive_del-test use virtio-scsi without checking if it is enabled. Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-pci.c

[Qemu-devel] [PATCH v3 04/16] virtio: split virtio rng bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- Remove the "contributions after" clause. This is based on commit 59ccd20a9ac719cff82180429458728f03ec612f Author: KONRAD Frederic Date: Wed Apr 24 10:07:56 2013 +0200 Fix duplicated test entry (lvivier) ---

[Qemu-devel] [PATCH v3 14/16] virtio: split virtio gpu bits rom virtio-pci.h

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/display/virtio-gpu-pci.c | 14 ++ hw/display/virtio-vga.c | 1 + hw/virtio/virtio-pci.h | 14 -- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/display/virtio-gpu-pci.c

[Qemu-devel] [PATCH v3 05/16] virtio: split virtio balloon bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Thomas Huth Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs| 1 + hw/virtio/virtio-balloon-pci.c | 94 ++ hw/virtio/virtio-pci.c | 58 - hw/virtio/virtio-pci.h | 14

[Qemu-devel] [PATCH v3 08/16] virtio: split vhost user scsi bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs | 1 + hw/virtio/vhost-user-scsi-pci.c | 101 hw/virtio/virtio-pci.c | 58 -- hw/virtio/virtio-pci.h | 11 4 files changed,

[Qemu-devel] [PATCH v3 06/16] virtio: split virtio 9p bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- Also disable virtio9p test (lvivier) --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-9p-pci.c | 86 +++ hw/virtio/virtio-pci.c| 52 --- hw/virtio/virtio-pci.h|

[Qemu-devel] [PATCH v3 00/16] Virtio devices split from virtio-pci

2018-12-13 Thread Juan Quintela
Hi v3: - rebase to master - only compile them if CONFIG_PCI is set (thomas) Please review. Later, Juan. V2: - Rebase on top of master Please review. Later, Juan. [v1] >From previous verision (in the middle of make check tests): - split also the bits of virtio-pci.h (mst suggestion) - add

[Qemu-devel] [PATCH v3 02/16] virtio: split virtio input host bits from virtio-pci

2018-12-13 Thread Juan Quintela
For consistency with other devices, rename virtio_host_{initfn,pci_info} to virtio_input_host_{initfn,info}. Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- default-configs/virtio.mak| 1 + hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-input-host-pci.c | 45

[Qemu-devel] [PATCH v3 01/16] virtio: split vhost vsock bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- Updated copyright info Also split virtio-pci.h bits --- hw/virtio/Makefile.objs | 3 ++ hw/virtio/vhost-vsock-pci.c | 82 + hw/virtio/virtio-pci.c | 51 ---

[Qemu-devel] [PATCH v3 03/16] virtio: split virtio input bits from virtio-pci

2018-12-13 Thread Juan Quintela
Reviewed-by: Laurent Vivier Signed-off-by: Juan Quintela --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-input-pci.c | 154 +++ hw/virtio/virtio-pci.c | 113 - hw/virtio/virtio-pci.h | 22 - 4 files changed, 155

Re: [Qemu-devel] [PATCH v2] hw/s390/ccw.c: Don't take address of packed members

2018-12-13 Thread Thomas Huth
On 2018-12-13 13:02, Peter Maydell wrote: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang warn about this. > >

Re: [Qemu-devel] ping2 Re: [PATCH v4 0/8] dirty-bitmap: rewrite bdrv_dirty_iter_next_area

2018-12-13 Thread Denis Lunev
On 12/13/18 9:18 PM, John Snow wrote: > > On 12/13/18 6:07 AM, Vladimir Sementsov-Ogievskiy wrote: >> 12.12.2018 23:41, John Snow wrote: >>> >>> On 12/12/18 4:27 AM, Vladimir Sementsov-Ogievskiy wrote: ping. No dependencies, apply to master. >>> Sure thing. >>> >>> Staged to

Re: [Qemu-devel] [PATCH 3/3] Mention that QMP 'cpu-add' will be deprecated

2018-12-13 Thread Thomas Huth
On 2018-12-13 13:42, Kashyap Chamarthy wrote: > Signed-off-by: Kashyap Chamarthy > --- > qemu-deprecated.texi | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi > index 79743ab8bd..2505e1f47f 100644 > --- a/qemu-deprecated.texi > +++

Re: [Qemu-devel] [PATCH 2/3] Update that HMP 'cpu_add' is deprecated in 4.0

2018-12-13 Thread Thomas Huth
On 2018-12-13 13:42, Kashyap Chamarthy wrote: > Also fix the wrong spelling of it: s/cpu-add/cpu_add/ > > Signed-off-by: Kashyap Chamarthy > --- > qemu-deprecated.texi | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi >

Re: [Qemu-devel] [PATCH 1/3] qemu-deprecated.texi: Rename the HMP section

2018-12-13 Thread Thomas Huth
On 2018-12-13 13:42, Kashyap Chamarthy wrote: > So that it is consistent with the naming of QMP's > > Signed-off-by: Kashyap Chamarthy > --- > qemu-deprecated.texi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi > index

[Qemu-devel] [PULL 24/32] qapi: Add 'if' to implicit struct members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau The generated code is for now *unconditional*. Later patches generate the conditionals. Note that union discriminators may not have 'if' conditionals. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL 26/32] qapi: add 'if' to alternate members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Add 'if' key to alternate members: { 'alternate': 'TestIfAlternate', 'data': { 'alt': { 'type': 'TestStruct', 'if': 'COND' } } } Generated code is not changed by this patch but with "qapi: add #if conditions to generated code". Signed-off-by: Marc-André Lureau

[Qemu-devel] [Bug 1806824] Re: SIE-200 (TrustZone) MPC: BLK_MAX returns an incorrect value

2018-12-13 Thread Peter Maydell
Thanks for the bug report and the test program. The fix seems straightforward -- just adjust what we return for the register value. I've sent a patch: http://patchwork.ozlabs.org/patch/1013034/ ** Changed in: qemu Status: New => In Progress -- You received this bug notification because

[Qemu-devel] [PULL 16/32] qapi: change enum visitor and gen_enum* to take QAPISchemaMember

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau This will allow to add and access more properties associated with enum values/members, like the associated 'if' condition. We may want to have a specialized type QAPISchemaEnumMember, for now this will do. Modify gen_enum() and gen_enum_lookup() for the same reason.

[Qemu-devel] [PULL 18/32] qapi: factor out checking for keys

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Introduce a new helper function to check if the given keys are known, and if mandatory keys are present. The function will be reused in other places in the following code changes. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL 01/32] cutils: Add qemu_strtod() and qemu_strtod_finite()

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand Let's provide a wrapper for strtod(). Reviewed-by: Markus Armbruster Signed-off-by: David Hildenbrand Message-Id: <20181121164421.20780-2-da...@redhat.com> Signed-off-by: Markus Armbruster --- include/qemu/cutils.h | 2 ++ util/cutils.c | 65

Re: [Qemu-devel] [PULL 0/2] Tracing patches

2018-12-13 Thread Peter Maydell
On Wed, 12 Dec 2018 at 10:16, Stefan Hajnoczi wrote: > > The following changes since commit bb9bf94b3e8926553290bc9a7cb84315af422086: > > Merge remote-tracking branch > 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-12-11 > 19:18:58 +) > > are available in the Git

[Qemu-devel] [PULL 29/32] qapi: add 'If:' condition to struct members documentation

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20181213123724.4866-20-marcandre.lur...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi/doc.py | 4 ++-- tests/qapi-schema/doc-good.json | 3 ++-

[Qemu-devel] [PULL 19/32] qapi: improve reporting of unknown or missing keys

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Report the set of missing or unknown keys. And give a hint about the accepted keys. The error message for multiple meta type members (visible in tests/qapi-schema/double-type.err) is not improved. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

[Qemu-devel] [PULL 22/32] qapi-events: add 'if' condition to implicit event enum

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Add condition to QAPIEvent enum members based on the event 'if'. The generated code remains unconditional for now. Later patches generate the conditionals (also there is no additional coverage of this change in qapi-schema-test.out since the event_names enum is an

[Qemu-devel] [PULL 23/32] qapi: add a dictionary form for TYPE

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Wherever a struct/union/alternate/command/event member with NAME: TYPE form is accepted, desugar it to a NAME: { 'type': TYPE } form. This will allow to add new member details, such as 'if' in the following patch to introduce conditionals, or 'default' for default values

[Qemu-devel] [PULL 21/32] qapi: add 'if' to enum members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau QAPISchemaMember gains .ifcond for enum members: inherited classes, such as QAPISchemaObjectTypeMember, will thus have an ifcond member after this (those different types will also use the .ifcond to store the condition and generate conditional code in the following

[Qemu-devel] [PULL 25/32] qapi: add 'if' to union members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Add 'if' key to union members: { 'union': 'TestIfUnion', 'data': 'mem': { 'type': 'str', 'if': 'COND'} } The generated code remains unconditional for now. Later patches generate the conditionals. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

[Qemu-devel] [PULL 28/32] qapi: add 'If:' condition to enum values documentation

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Use a common function to generate the "If:..." line. While at it, get rid of the existing \n\n (no idea why it was there). Use a line-break in member description, this seems to look slightly better in the plaintext version. Signed-off-by: Marc-André Lureau Message-Id:

[Qemu-devel] [PULL 20/32] qapi: add a dictionary form with 'name' key for enum members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Desugar the enum NAME form to { 'name': NAME }. This will allow to add new enum members, such as 'if' in the following patch. Signed-off-by: Marc-André Lureau Message-Id: <20181213123724.4866-7-marcandre.lur...@redhat.com> Message-Id:

[Qemu-devel] [PULL 30/32] qapi: add condition to variants documentation

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20181213123724.4866-21-marcandre.lur...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- scripts/qapi/doc.py | 4 ++-- tests/qapi-schema/doc-good.json | 4 ++--

[Qemu-devel] [PULL 27/32] qapi: add #if conditions to generated code members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Wrap generated enum and struct members and their supporting code with We do enum and struct in a single patch because union tag enum and the associated variants tie them together, and dealing with that to split the patch doesn't seem worthwhile. Signed-off-by:

[Qemu-devel] [PULL 09/32] test-string-input-visitor: Add range overflow tests

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand Let's make sure that the range handling code can properly deal with ranges that end at the biggest possible number. Reviewed-by: Markus Armbruster Signed-off-by: David Hildenbrand Message-Id: <20181121164421.20780-10-da...@redhat.com> Signed-off-by: Markus Armbruster

[Qemu-devel] [PULL 31/32] qapi: add more conditions to SPICE

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Now that member can be made conditional, let's make SPICE chardev conditional: * spiceport, spicevmc Before and after the patch for !CONFIG_SPICE, the error is the same ('spiceport' is not a valid char driver name). Signed-off-by: Marc-André Lureau Reviewed-by:

[Qemu-devel] [PULL 11/32] json: Fix to reject duplicate object member names

2018-12-13 Thread Markus Armbruster
The JSON parser happily accepts duplicate object member names. The last value wins. Reproducer #1: $ qemu-system-x86_64 -qmp stdio {"QMP": {"version": {"qemu": {"micro": 93, "minor": 0, "major": 3}, "package": "v3.1.0-rc3-7-g87a45d86ed"}, "capabilities": []}}

[Qemu-devel] [PULL 12/32] tests/qapi: Cover commands with 'if' and union / alternate 'data'

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Forgotten in commit 967c885108f. Signed-off-by: Marc-André Lureau Message-Id: <20181208111606.8505-19-marcandre.lur...@redhat.com> Message-Id: <20181208111606.8505-21-marcandre.lur...@redhat.com> Reviewed-by: Markus Armbruster [Squashed, commit message adjusted]

[Qemu-devel] [PULL 14/32] qapi: break long lines at 'data' member

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Let's break the line before 'data'. While at it, improve a bit indentation/spacing. (I removed some alignment which are not helping much readability and become quickly inconsistent) Suggested-by: Markus Armbruster Signed-off-by: Marc-André Lureau Message-Id:

[Qemu-devel] [PULL 04/32] qapi: Use qemu_strtod_finite() in qobject-input-visitor

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand Let's use the new function. Just as current behavior, we have to consume the whole string (now it's just way clearer what's going on). Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: David Hildenbrand Message-Id:

[Qemu-devel] [PULL 10/32] docs: Update references to JSON RFC

2018-12-13 Thread Markus Armbruster
From: Eric Blake RFC8259 obsoletes RFC7159. Fix a couple of URLs to point to the newer version. Signed-off-by: Eric Blake Message-Id: <20181203175702.128701-1-ebl...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.txt | 2 +-

[Qemu-devel] [PULL 15/32] qapi: Do not define enumeration value explicitly

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau The generated C enumeration types explicitly set the enumeration constants to 0, 1, 2, ... That's exactly what you get when you don't supply values. Drop the explicit values. No change now, but it will avoid gaps in the values when we later add support for 'if'

[Qemu-devel] [PULL 08/32] test-string-input-visitor: Split off uint64 list tests

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand Basically copy all int64 list tests but adapt them to work on uint64 instead. The values for very big/very small values have to be adapted. Reviewed-by: Markus Armbruster Signed-off-by: David Hildenbrand Message-Id: <20181121164421.20780-9-da...@redhat.com>

[Qemu-devel] [PULL 32/32] qapi: add conditions to REPLICATION type/commands on the schema

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Add #if defined(CONFIG_REPLICATION) in generated code, and adjust the code accordingly. Made conditional: * xen-set-replication, query-xen-replication-status, xen-colo-do-checkpoint Before the patch, we first register the commands unconditionally in generated

[Qemu-devel] [PULL 13/32] qapi: rename QAPISchemaEnumType.values to .members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Rename QAPISchemaEnumType.values and related variables to members. Makes sense ever since commit 93bda4dd4 changed .values from list of string to list of QAPISchemaMember. Obvious no-op. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL 05/32] test-string-input-visitor: Add more tests

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand Test that very big/small values are not accepted and that ranges with only one element work. Also test that ranges are ascending and cannot have more than 65536 elements. Rename expect4 to expect5, as we will be moving that to a separate ulist test after the rework.

[Qemu-devel] [PULL 02/32] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand qemu_strtosz() & friends reject NaNs, but happily accept infinities. They shouldn't. Fix that. The fix makes use of qemu_strtod_finite(). To avoid ugly casts, change the @end parameter of qemu_strtosz() & friends from char ** to const char **. Also, add two test cases,

[Qemu-devel] [PULL 06/32] qapi: Rewrite string-input-visitor's integer and list parsing

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand The input visitor has some problems right now, especially - unsigned type "Range" is used to process signed ranges, resulting in inconsistent behavior and ugly/magical code - uint64_t are parsed like int64_t, so big uint64_t values are not supported and error messages

[Qemu-devel] [PULL 00/32] QAPI patches for 2018-12-13

2018-12-13 Thread Markus Armbruster
The following changes since commit c3ec0fa1a8e815ecfec9eabb9c20ee206c313e07: Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2018-12-12' into staging (2018-12-13 13:41:44 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git

[Qemu-devel] [PULL 03/32] qapi: Fix string-input-visitor to reject NaN and infinities

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand The string-input-visitor happily accepts NaN and infinities when parsing numbers (doubles). They shouldn't. Fix that. Also, add two test cases, testing if "NaN" and "inf" is properly rejected. Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: David

[Qemu-devel] [PULL 17/32] tests: print enum type members more like object type members

2018-12-13 Thread Markus Armbruster
From: Marc-André Lureau Commit 93bda4dd461 changed the internal representation of enum type members from str to QAPISchemaMember, but we still print only a string. Has been good enough, as the name is the member's only attribute of interest, but that's about to change. To prepare, print them

[Qemu-devel] [PULL 07/32] test-string-input-visitor: Use virtual walk

2018-12-13 Thread Markus Armbruster
From: David Hildenbrand We now support virtual walks, so use that instead. Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: David Hildenbrand Message-Id: <20181121164421.20780-8-da...@redhat.com> Signed-off-by: Markus Armbruster --- tests/test-string-input-visitor.c |

Re: [Qemu-devel] [PATCH v2 7/7] iotests: add iotest 236 for testing bitmap merge

2018-12-13 Thread John Snow
On 12/13/18 8:50 AM, Vladimir Sementsov-Ogievskiy wrote: > 13.12.2018 4:50, John Snow wrote: >> New interface, new smoke test. >> >> Signed-off-by: John Snow >> --- >> tests/qemu-iotests/236 | 123 + >> tests/qemu-iotests/236.out | 265

[Qemu-devel] [PATCH v1 1/1] sifive_u: Add clock DT node for GEM ethernet

2018-12-13 Thread Alistair Francis
From: Anup Patel The GEM ethernet on SiFive unleashed has fixed input clock of 125MHz as-per SiFive FU540 manual. This patch updates FDT generation for QEMU sifive_u machine to provide fixed-rate clock for GEM ethernet. Signed-off-by: Anup Patel Signed-off-by: Anup Patel Signed-off-by:

[Qemu-devel] [PATCH v1 1/1] sifive_u: Set 'clock-frequency' DT property for SiFive UART

2018-12-13 Thread Alistair Francis
From: Anup Patel The 'clock-frequency' DT property is required by U-Boot to compute the divider value. This patch sets the 'clock-frequency' DT property of the SiFive UART device tree node (similar to virt machine). Signed-off-by: Anup Patel Signed-off-by: Anup Patel Signed-off-by: Alistair

[Qemu-devel] [PATCH] hw/misc/tz-mpc: Fix value of BLK_MAX register

2018-12-13 Thread Peter Maydell
In the TZ Memory Protection Controller, the BLK_MAX register is supposed to return the maximum permitted value of the BLK_IDX register. Our implementation incorrectly returned max+1 (ie the total number of valid index values, since BLK_IDX is zero-based). Correct this off-by-one error. Since we

Re: [Qemu-devel] Loading snapshot with readonly qcow2 image

2018-12-13 Thread Michael Spradling
On Nov 30 08:58, Eric Blake wrote: > On 11/30/18 8:44 AM, Michael Spradling wrote: > > Hello, > > > > I would like to resume a snapshot via the command line option -loadvm > > with a read only QCOW2 file. For my use case, I would ideally like to > > load multiple instances of different snapshots

Re: [Qemu-devel] [PATCH v2 7/7] iotests: add iotest 236 for testing bitmap merge

2018-12-13 Thread John Snow
On 12/12/18 9:27 PM, Eric Blake wrote: > On 12/12/18 7:50 PM, John Snow wrote: >> New interface, new smoke test. >> >> Signed-off-by: John Snow >> --- >>   tests/qemu-iotests/236 | 123 + >>   tests/qemu-iotests/236.out | 265 + >>  

Re: [Qemu-devel] [PATCH v2 6/7] iotests: allow pretty-print for qmp_log

2018-12-13 Thread John Snow
On 12/12/18 9:20 PM, Eric Blake wrote: > On 12/12/18 7:50 PM, John Snow wrote: >> If iotests have lines exceeding >998 characters long, git doesn't >> want to send it plaintext to the list. We can solve this by allowing >> the iotests to use pretty printed QMP output that we can match against

Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block

2018-12-13 Thread Peter Maydell
On Thu, 13 Dec 2018 at 18:07, Paolo Bonzini wrote: > On 13/12/18 19:01, Peter Maydell wrote: > > I sent a patch to do this a little while back: > > https://patchwork.kernel.org/patch/10561557/ > > > > It didn't get applied because Paolo disagreed with having > > our tools enforcing what our

Re: [Qemu-devel] ping2 Re: [PATCH v4 0/8] dirty-bitmap: rewrite bdrv_dirty_iter_next_area

2018-12-13 Thread John Snow
On 12/13/18 6:07 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.12.2018 23:41, John Snow wrote: >> >> >> On 12/12/18 4:27 AM, Vladimir Sementsov-Ogievskiy wrote: >>> ping. No dependencies, apply to master. >>> >> >> Sure thing. >> >> Staged to jsnow/bitmaps. > > > Thank you! > > Oops, I've

[Qemu-devel] [PULL v2 00/46] Misc patches for 2018-12-13

2018-12-13 Thread Paolo Bonzini
The following changes since commit bb9bf94b3e8926553290bc9a7cb84315af422086: Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-12-11 19:18:58 +) are available in the Git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

Re: [Qemu-devel] [PULL 00/11] Monitor patches for 2018-12-12

2018-12-13 Thread Markus Armbruster
Peter Maydell writes: > On Wed, 12 Dec 2018 at 10:13, Markus Armbruster wrote: >> >> The following changes since commit bb9bf94b3e8926553290bc9a7cb84315af422086: >> >> Merge remote-tracking branch >> 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-12-11 >> 19:18:58

Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block

2018-12-13 Thread Paolo Bonzini
On 13/12/18 19:01, Peter Maydell wrote: > On Thu, 13 Dec 2018 at 17:57, Wainer dos Santos Moschetta > wrote: >> >> Eduardo Habkost pointed out a malformed block of comments on my >> patch [1] that I had ran checkpatch.pl and no warn/error was >> reported. Then I realized the script does not catch

Re: [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block

2018-12-13 Thread Peter Maydell
On Thu, 13 Dec 2018 at 17:57, Wainer dos Santos Moschetta wrote: > > Eduardo Habkost pointed out a malformed block of comments on my > patch [1] that I had ran checkpatch.pl and no warn/error was > reported. Then I realized the script does not catch such as > case (or it had a bug). > > It turns

[Qemu-devel] [PATCH] vl: Use error_fatal to simplify obvious fatal errors (again)

2018-12-13 Thread Markus Armbruster
Patch created mechanically by rerunning: $ spatch --in-place --sp-file scripts/coccinelle/use-error_fatal.cocci \ --macro-file scripts/cocci-macro-file.h vl.c Signed-off-by: Markus Armbruster --- vl.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH 1/1] checkpatch: check for malformed comment block.

2018-12-13 Thread Wainer dos Santos Moschetta
Currently scripts/checkpatch.pl does not check if multiline comments follow the QEMU's coding sytle. It is added a check for multiline comments that warns about: 1. block doesn't begin on its own line. 2. line in the block doesn't start with asterisk. 3. block doesn't end on its own

<    1   2   3   4   5   >