Re: [Qemu-devel] [PATCH] hw/misc/macio: Mark the macio devices with user_creatable = false

2018-03-07 Thread Mark Cave-Ayland
On 07/03/18 14:22, Thomas Huth wrote: The macio devices currently cause a crash when the user tries to instantiate them on a different machine: $ ppc64-softmmu/qemu-system-ppc64 -device macio-newworld Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222: qemu-system-ppc64: -device

[Qemu-devel] [PATCH v4 14/37] block: Make bdrv_is_whitelisted() public

2018-03-07 Thread Kevin Wolf
We'll use a separate source file for image creation, and we need to check there whether the requested driver is whitelisted. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block.h | 1 +

[Qemu-devel] [PATCH v4 15/37] block: x-blockdev-create QMP command

2018-03-07 Thread Kevin Wolf
This adds a synchronous x-blockdev-create QMP command that can create qcow2 images on a given node name. We don't want to block while creating an image, so this is not the final interface in all aspects, but BlockdevCreateOptionsQcow2 and .bdrv_co_create() are what they actually might look like

[Qemu-devel] [PATCH v4 23/37] rbd: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to rbd, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 19 ++- block/rbd.c | 150

[Qemu-devel] [PATCH v4 25/37] rbd: Use qemu_rbd_connect() in qemu_rbd_do_create()

2018-03-07 Thread Kevin Wolf
This is almost exactly the same code. The differences are that qemu_rbd_connect() supports BlockdevOptionsRbd.server and that the cache mode is set explicitly. Supporting 'server' is a welcome new feature for image creation. Caching is disabled by default, so leave it that way. Signed-off-by:

[Qemu-devel] [PATCH v4 34/37] file-posix: Fix no-op bdrv_truncate() with falloc preallocation

2018-03-07 Thread Kevin Wolf
If bdrv_truncate() is called, but the requested size is the same as before, don't call posix_fallocate(), which returns -EINVAL for length zero and would therefore make bdrv_truncate() fail. The problem can be triggered by creating a zero-sized raw image with 'falloc' preallocation mode.

Re: [Qemu-devel] [PATCH] tests/boot-serial: Check the 40p machine, too

2018-03-07 Thread Hervé Poussineau
Le 07/03/2018 à 13:15, Thomas Huth a écrit : The "40p" machine is using the Open Hack'Ware BIOS, just like the "prep" machine, so we can test it accordingly with the boot-serial tester, too. While we're at it, also change the strings that we are using for the "prep" machine, so that this test

Re: [Qemu-devel] [PATCH v5 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-03-07 Thread Laurent Vivier
Le 07/03/2018 à 18:45, Max Filippov a écrit : > On Wed, Mar 7, 2018 at 2:08 AM, Laurent Vivier wrote: >>> +static inline int guest_range_valid(unsigned long start, unsigned long len) >>> +{ >>> +if (len) >>> +return guest_addr_valid(len - 1) && start <=

Re: [Qemu-devel] [PATCHv1 00/14] Translation loop conversion for sh4/sparc/mips/s390x/openrisc targets

2018-03-07 Thread Mark Cave-Ayland
On 05/03/18 22:43, Emilio G. Cota wrote: On Mon, Mar 05, 2018 at 21:58:52 +, Mark Cave-Ayland wrote: I don't have enough knowledge of TCG internals to review this myself, however I can run it through my complete set of OpenBIOS test images for qemu-system-sparc and qemu-system-sparc64 if

Re: [Qemu-devel] [PATCH v11 21/28] sev/i386: add debug encrypt and decrypt commands

2018-03-07 Thread Dr. David Alan Gilbert
* Brijesh Singh (brijesh.si...@amd.com) wrote: > > > On 03/07/2018 11:27 AM, Dr. David Alan Gilbert wrote: > > [...] > > > > +{ > > > +SEVState *s = (SEVState *)handle; > > > + > > > +/* If policy does not allow debug then no need to register ops */ > > > +if (s->policy &

[Qemu-devel] [PATCH v4 01/37] block/qapi: Introduce BlockdevCreateOptions

2018-03-07 Thread Kevin Wolf
This creates a BlockdevCreateOptions union type that will contain all of the options for image creation. We'll start out with an empty struct type BlockdevCreateNotSupported for all drivers. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max

[Qemu-devel] [PATCH v4 33/37] ssh: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to ssh, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 16 +- block/ssh.c | 83 ++-- 2 files changed, 63 insertions(+),

[Qemu-devel] [PATCH v4 18/37] gluster: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to gluster, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- qapi/block-core.json | 18 ++- block/gluster.c | 135

[Qemu-devel] [PATCH v4 36/37] qemu-iotests: Test qcow2 over file image creation with QMP

2018-03-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/206 | 436 + tests/qemu-iotests/206.out | 209 ++ tests/qemu-iotests/group | 1 + 3 files changed, 646

Re: [Qemu-devel] [PATCH v4 05/37] qcow2: Pass BlockdevCreateOptions to qcow2_co_create()

2018-03-07 Thread Eric Blake
On 03/07/2018 12:59 PM, Kevin Wolf wrote: All of the simple options are now passed to qcow2_co_create() in a BlockdevCreateOptions object. Still missing: node-name and the encryption options. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz ---

Re: [Qemu-devel] [PATCH v4 33/37] ssh: Support .bdrv_co_create

2018-03-07 Thread Max Reitz
On 2018-03-07 19:59, Kevin Wolf wrote: > This adds the .bdrv_co_create driver callback to ssh, which enables > image creation over QMP. > > Signed-off-by: Kevin Wolf > --- > qapi/block-core.json | 16 +- > block/ssh.c | 83 >

[Qemu-devel] [PATCH v4 13/37] qcow2: Use visitor for options in qcow2_create()

2018-03-07 Thread Kevin Wolf
Instead of manually creating the BlockdevCreateOptions object, use a visitor to parse the given options into the QAPI object. This involves translation from the old command line syntax to the syntax mandated by the QAPI schema. Option names are still checked against qcow2_create_opts, so only the

Re: [Qemu-devel] [PATCH v2 5/7] qcow2: Check snapshot L1 table in qcow2_snapshot_goto()

2018-03-07 Thread Eric Blake
On 03/06/2018 10:14 AM, Alberto Garcia wrote: This function copies a snapshot's L1 table into the active one without validating it first. We now have a function to take care of this, so let's use it. Signed-off-by: Alberto Garcia Cc: Eric Blake ---

Re: [Qemu-devel] [PATCH v4 03/37] qcow2: Rename qcow2_co_create2() to qcow2_co_create()

2018-03-07 Thread Max Reitz
On 2018-03-07 19:59, Kevin Wolf wrote: > The functions originally known as qcow2_create() and qcow2_create2() > are now called qcow2_co_create_opts() and qcow2_co_create(), which > matches the names of the BlockDriver callbacks that they will implement > at the end of this patch series. > >

Re: [Qemu-devel] [PATCH v11 00/28] x86: Secure Encrypted Virtualization (AMD)

2018-03-07 Thread Brijesh Singh
Hi, I have root caused and fixed the build issue seen with mingw32 compiler, the patch is very trivial (see below). I am looking for direction on how to submit the fix, should I resubmit the whole series or just send the updated  patch marked as "Patch v11.1 ..." ? The "patch v11 11/28" included

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-iotests: fix 203 migration completion race

2018-03-07 Thread Max Reitz
On 2018-03-06 17:18, Stefan Hajnoczi wrote: > On Mon, Mar 05, 2018 at 05:04:52PM +0100, Max Reitz wrote: >> On 2018-03-05 16:59, Stefan Hajnoczi wrote: >>> There is a race between the test's 'query-migrate' QMP command after the >>> QMP 'STOP' event and completing the migration: >>> >>> The test

[Qemu-devel] [PATCH v4 02/37] block/qapi: Add qcow2 create options to schema

2018-03-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- qapi/block-core.json | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json

[Qemu-devel] [PATCH v4 08/37] qcow2: Handle full/falloc preallocation in qcow2_co_create()

2018-03-07 Thread Kevin Wolf
Once qcow2_co_create() can be called directly on an already existing node, we must provide the 'full' and 'falloc' preallocation modes outside of creating the image on the protocol layer. Fortunately, we have preallocated truncate now which can provide this functionality. Signed-off-by: Kevin

[Qemu-devel] [PATCH v4 10/37] test-qemu-opts: Test qemu_opts_append()

2018-03-07 Thread Kevin Wolf
Basic test for merging two QemuOptsLists. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- tests/test-qemu-opts.c | 128 + 1 file changed, 128 insertions(+)

[Qemu-devel] [PATCH v4 03/37] qcow2: Rename qcow2_co_create2() to qcow2_co_create()

2018-03-07 Thread Kevin Wolf
The functions originally known as qcow2_create() and qcow2_create2() are now called qcow2_co_create_opts() and qcow2_co_create(), which matches the names of the BlockDriver callbacks that they will implement at the end of this patch series. Signed-off-by: Kevin Wolf ---

[Qemu-devel] [PATCH v4 27/37] nfs: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to nfs, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 16 ++- block/nfs.c | 76

[Qemu-devel] [PATCH v4 28/37] sheepdog: QAPIfy "redundancy" create option

2018-03-07 Thread Kevin Wolf
The "redundancy" option for Sheepdog image creation is currently a string that can encode one or two integers depending on its format, which at the same time implicitly selects a mode. This patch turns it into a QAPI union and converts the string into such a QAPI object before interpreting the

Re: [Qemu-devel] [PATCH v4 00/37] x-blockdev-create for protocols and qcow2

2018-03-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180307185946.29366-1-kw...@redhat.com Subject: [Qemu-devel] [PATCH v4 00/37] x-blockdev-create for protocols and qcow2 === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH v4] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2018-03-07 Thread Max Reitz
On 2018-03-06 14:01, Alberto Garcia wrote: > This patch tweaks TestParallelOps in iotest 030 so it allocates data > in smaller regions (256KB/512KB instead of 512KB/1MB) and the > block-stream job in test_stream_commit() only needs to copy data that > is at the very end of the image. > > This way

Re: [Qemu-devel] [PATCH v11 00/28] x86: Secure Encrypted Virtualization (AMD)

2018-03-07 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20180307165038.88640-1-brijesh.si...@amd.com Subject: [Qemu-devel] [PATCH v11 00/28] x86:

[Qemu-devel] [PATCH v4 29/37] sheepdog: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to sheepdog, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 24 - block/sheepdog.c | 243

[Qemu-devel] [PATCH v4 32/37] ssh: Pass BlockdevOptionsSsh to connect_to_ssh()

2018-03-07 Thread Kevin Wolf
Move the parsing of the QDict options up to the callers, in preparation for the .bdrv_co_create implementation that directly gets a QAPI type. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/ssh.c | 34 +- 1 file

[Qemu-devel] [PATCH v4 20/37] rbd: Factor out qemu_rbd_connect()

2018-03-07 Thread Kevin Wolf
The code to establish an RBD connection is duplicated between open and create. In order to be able to share the code, factor out the code from qemu_rbd_open() as a first step. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/rbd.c | 100

[Qemu-devel] [PATCH v4 35/37] block: Fail bdrv_truncate() with negative size

2018-03-07 Thread Kevin Wolf
Most callers have their own checks, but something like this should also be checked centrally. As it happens, x-blockdev-create can pass negative image sizes to format drivers (because there is no QAPI type that would reject negative numbers) and triggers the check added by this patch.

[Qemu-devel] [PATCH v4 22/37] rbd: Pass BlockdevOptionsRbd to qemu_rbd_connect()

2018-03-07 Thread Kevin Wolf
With the conversion to a QAPI options object, the function is now prepared to be used in a .bdrv_co_create implementation. Signed-off-by: Kevin Wolf --- block/rbd.c | 115 +--- 1 file changed, 55 insertions(+), 60

[Qemu-devel] [Bug 1726733] Re: ‘qemu-img info replication:’ causes segfault

2018-03-07 Thread Fabiano Rosas
** Changed in: qemu Assignee: (unassigned) => Fabiano Rosas (farosas) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1726733 Title: ‘qemu-img info replication:’ causes segfault Status in

[Qemu-devel] [PATCH 2/2] arm: avoid heap-buffer-overflow in load_aarch64_image

2018-03-07 Thread Marc-André Lureau
Spotted by ASAN: elmarco@boraha:~/src/qemu/build (master *%)$ QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64 tests/boot-serial-test /aarch64/boot-serial/virt: ** (process:19740): DEBUG: 18:39:30.275: foo /tmp/qtest-boot-serial-cXaS94D

[Qemu-devel] [PATCH 1/2] arm: fix load ELF error leak

2018-03-07 Thread Marc-André Lureau
Spotted by ASAN: QTEST_QEMU_BINARY=aarch64-softmmu/qemu-system-aarch64 tests/boot-serial-test Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7ff8a9b0ca38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38) #1 0x7ff8a8ea7f75 in g_malloc0 ../glib/gmem.c:124 #2

[Qemu-devel] [PATCH v4 24/37] rbd: Assign s->snap/image_name in qemu_rbd_open()

2018-03-07 Thread Kevin Wolf
Now that the options are already available in qemu_rbd_open() and not only parsed in qemu_rbd_connect(), we can assign s->snap and s->image_name there instead of passing the fields by reference to qemu_rbd_connect(). Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz

[Qemu-devel] [PATCH v4 31/37] ssh: QAPIfy host-key-check option

2018-03-07 Thread Kevin Wolf
This makes the host-key-check option available in blockdev-add. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 63 +++-- block/ssh.c | 88

Re: [Qemu-devel] [PATCH v4 03/37] qcow2: Rename qcow2_co_create2() to qcow2_co_create()

2018-03-07 Thread Eric Blake
On 03/07/2018 12:59 PM, Kevin Wolf wrote: The functions originally known as qcow2_create() and qcow2_create2() are now called qcow2_co_create_opts() and qcow2_co_create(), which matches the names of the BlockDriver callbacks that they will implement at the end of this patch series.

Re: [Qemu-devel] [PATCH 0/2] vmmouse: convert qdev pointer property to QOM link relationship

2018-03-07 Thread Philippe Mathieu-Daudé
Hi Zihan Yang, On 03/07/2018 01:55 PM, Zihan Yang wrote: > Hi all, this is a bitesized patch from me a while ago, it seems a little > old but I wonder if there is any opinion about it? Is it still valid? For a single TYPE use, I'm not sure use a specific header is useful (patch #1). The 2nd

[Qemu-devel] [PATCH] ppc440_pcix: Add dummy implementation of BRDGOPT registers

2018-03-07 Thread BALATON Zoltan
I don't know what should be the correct implementation for these so these are just stored and returned as is without doing anything for now only to silence warnings when u-boot accesses these registers. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_pcix.c | 18

Re: [Qemu-devel] [PATCH] hw/sparc/sun4m: Fix implicit creation of "-drive if=scsi" devices

2018-03-07 Thread Mark Cave-Ayland
On 07/03/18 09:39, Thomas Huth wrote: The global hack for creating SCSI devices has recently been removed, but this apparently broke SCSI devices on some boards that were not ready for this change yet. For the sun4m machines you now get: $ sparc-softmmu/qemu-system-sparc -boot d -cdrom x.iso

[Qemu-devel] [PATCH v4 09/37] util: Add qemu_opts_to_qdict_filtered()

2018-03-07 Thread Kevin Wolf
This allows, given a QemuOpts for a QemuOptsList that was merged from multiple QemuOptsList, to only consider those options that exist in one specific list. Block drivers need this to separate format-layer create options from protocol-level options. Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH v4 00/37] x-blockdev-create for protocols and qcow2

2018-03-07 Thread Kevin Wolf
This series implements a minimal QMP command that allows to create an image file on the protocol level or an image format on a given block node. Eventually, the interface is going to change to some kind of an async command (possibly a (non-)block job), but that will require more work on the job

[Qemu-devel] [PATCH v4 07/37] qcow2: Use QCryptoBlockCreateOptions in qcow2_co_create()

2018-03-07 Thread Kevin Wolf
Instead of passing the encryption format name and the QemuOpts down, use the QCryptoBlockCreateOptions contained in BlockdevCreateOptions. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- block/qcow2.c | 62

[Qemu-devel] [PATCH v4 04/37] qcow2: Let qcow2_create() handle protocol layer

2018-03-07 Thread Kevin Wolf
Currently, qcow2_create() only parses the QemuOpts and then calls qcow2_co_create() for the actual image creation, which includes both the creation of the actual file on the file system and writing a valid empty qcow2 image into that file. The plan is that qcow2_co_create() becomes the function

[Qemu-devel] [PATCH v4 12/37] qdict: Introduce qdict_rename_keys()

2018-03-07 Thread Kevin Wolf
A few block drivers will need to rename .bdrv_create options for their QAPIfication, so let's have a helper function for that. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- include/qapi/qmp/qdict.h | 6

[Qemu-devel] [PATCH v4 06/37] qcow2: Use BlockdevRef in qcow2_co_create()

2018-03-07 Thread Kevin Wolf
Instead of passing a separate BlockDriverState* into qcow2_co_create(), make use of the BlockdevRef that is included in BlockdevCreateOptions. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz ---

[Qemu-devel] [PATCH v4 17/37] file-win32: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to file-win32, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- block/file-win32.c | 47

[Qemu-devel] [PATCH v4 16/37] file-posix: Support .bdrv_co_create

2018-03-07 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to file, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- qapi/block-core.json | 20 - block/file-posix.c | 79

Re: [Qemu-devel] [PATCH v11 21/28] sev/i386: add debug encrypt and decrypt commands

2018-03-07 Thread Dr. David Alan Gilbert
* Brijesh Singh (brijesh.si...@amd.com) wrote: > > > On 3/7/18 12:24 PM, Dr. David Alan Gilbert wrote: > > * Brijesh Singh (brijesh.si...@amd.com) wrote: > >> > >> On 03/07/2018 11:27 AM, Dr. David Alan Gilbert wrote: > >> > >> [...] > >> > +{ > +SEVState *s = (SEVState *)handle; >

Re: [Qemu-devel] [PATCH v2 3/7] qcow2: Check L1 table parameters in qcow2_expand_zero_clusters()

2018-03-07 Thread Eric Blake
On 03/06/2018 10:14 AM, Alberto Garcia wrote: This function iterates over all snapshots of a qcow2 file in order to expand all zero clusters, but it does not validate the snapshots' L1 tables first. We now have a function to take care of this, so let's use it. We can also take the opportunity

Re: [Qemu-devel] [PATCH] sparc: fix leon3 casa instruction when MMU is disabled

2018-03-07 Thread Mark Cave-Ayland
On 02/03/18 09:59, KONRAD Frederic wrote: From: KONRAD Frederic Since the commit af7a06bac7d3abb2da48ef3277d2a415772d2ae8: `casa [..](10), .., ..` (and probably others alternate space instructions) triggers a data access exception when the MMU is disabled. When

[Qemu-devel] [PATCH] virtio_net: flush uncompleted TX on reset

2018-03-07 Thread Greg Kurz
If the backend could not transmit a packet right away for some reason, the packet is queued for asynchronous sending. The corresponding vq element is tracked in the async_tx.elem field of the VirtIONetQueue, for later freeing when the transmission is complete. If a reset happens before

[Qemu-devel] [PATCH v4 30/37] ssh: Use QAPI BlockdevOptionsSsh object

2018-03-07 Thread Kevin Wolf
Create a BlockdevOptionsSsh object in connect_to_ssh() and take the options from there. 'host_key_check' is still processed separately because it's not in the schema yet. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/ssh.c | 137

[Qemu-devel] [PATCH v4 21/37] rbd: Remove non-schema options from runtime_opts

2018-03-07 Thread Kevin Wolf
Instead of the QemuOpts in qemu_rbd_connect(), we want to use QAPI objects. As a preparation, fetch those options directly from the QDict that .bdrv_open() supports in the rbd driver and that are not in the schema. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz

[Qemu-devel] [PATCH v4 37/37] qemu-iotests: Test ssh image creation over QMP

2018-03-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/207 | 261 + tests/qemu-iotests/207.out | 75 + tests/qemu-iotests/group | 1 + 3 files changed, 337 insertions(+)

[Qemu-devel] [Bug 1754038] Re: ARM M: Systick first wrap delayed (qemu-timers/icount prb?)

2018-03-07 Thread Peter Maydell
OK, I will see if I can find some time to investigate this. Can you attach your guest binary, please? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1754038 Title: ARM M: Systick first wrap delayed

[Qemu-devel] [PATCH v4 11/37] test-qemu-opts: Test qemu_opts_to_qdict_filtered()

2018-03-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- tests/test-qemu-opts.c | 125 + 1 file changed, 125 insertions(+) diff --git a/tests/test-qemu-opts.c

[Qemu-devel] [PATCH v4 19/37] rbd: Fix use after free in qemu_rbd_set_keypairs() error path

2018-03-07 Thread Kevin Wolf
If we want to include the invalid option name in the error message, we can't free the string earlier than that. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- block/rbd.c | 3 ++-

[Qemu-devel] [PATCH v4 05/37] qcow2: Pass BlockdevCreateOptions to qcow2_co_create()

2018-03-07 Thread Kevin Wolf
All of the simple options are now passed to qcow2_co_create() in a BlockdevCreateOptions object. Still missing: node-name and the encryption options. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/qcow2.c | 189

[Qemu-devel] [PATCH v4 26/37] nfs: Use QAPI options in nfs_client_open()

2018-03-07 Thread Kevin Wolf
Using the QAPI visitor to turn all options into QAPI BlockdevOptionsNfs simplifies the code a lot. It will also be useful for implementing the QAPI based .bdrv_co_create callback. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/nfs.c | 176

Re: [Qemu-devel] [PATCH v11 21/28] sev/i386: add debug encrypt and decrypt commands

2018-03-07 Thread Brijesh Singh
On 3/7/18 12:24 PM, Dr. David Alan Gilbert wrote: > * Brijesh Singh (brijesh.si...@amd.com) wrote: >> >> On 03/07/2018 11:27 AM, Dr. David Alan Gilbert wrote: >> >> [...] >> +{ +SEVState *s = (SEVState *)handle; + +/* If policy does not allow debug then no need to

Re: [Qemu-devel] [PATCH v4 22/37] rbd: Pass BlockdevOptionsRbd to qemu_rbd_connect()

2018-03-07 Thread Max Reitz
On 2018-03-07 19:59, Kevin Wolf wrote: > With the conversion to a QAPI options object, the function is now > prepared to be used in a .bdrv_co_create implementation. > > Signed-off-by: Kevin Wolf > --- > block/rbd.c | 115 >

Re: [Qemu-devel] [Qemu-block] block migration and MAX_IN_FLIGHT_IO

2018-03-07 Thread Peter Lieven
Am 07.03.2018 um 10:47 schrieb Stefan Hajnoczi: > On Wed, Mar 7, 2018 at 7:55 AM, Peter Lieven wrote: >> Am 06.03.2018 um 17:35 schrieb Peter Lieven: >>> Am 06.03.2018 um 17:07 schrieb Stefan Hajnoczi: On Mon, Mar 05, 2018 at 02:52:16PM +, Dr. David Alan Gilbert wrote:

Re: [Qemu-devel] [Qemu-block] Limiting coroutine stack usage

2018-03-07 Thread Peter Lieven
Am 06.03.2018 um 12:51 schrieb Stefan Hajnoczi: > On Tue, Feb 20, 2018 at 06:04:02PM +0100, Peter Lieven wrote: >> I remember we discussed a long time ago to limit the stack usage of all >> functions that are executed in a coroutine >> context to a very low value to be able to safely limit the

Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Samuel Thibault
Hello, Thanks for the Cc. I have applied it to my tree. I don't think there is any reason to avoid the same change for ingoing connections? Could one of your review the attached patch doing it? Samuel commit 99a9a5028e0e15aa3b17d6f884c1e5f48dccea90 Author: Samuel Thibault

Re: [Qemu-devel] [RFC PATCH v2 00/22] remove i386/pc dependency: generic SuperIO

2018-03-07 Thread Philippe Mathieu-Daudé
Hi Paolo, On 03/07/2018 01:52 PM, Paolo Bonzini wrote: > On 05/03/2018 22:19, Philippe Mathieu-Daudé wrote: >> Since v1: >> - complete rewrite, split out the PIIX devices for another series >> >> In this rewrite I extract the common SuperIO code from pc87312.c; use it in >> few MIPS boards; then

[Qemu-devel] [PATCH] nbd/server: Honor FUA request on NBD_CMD_TRIM

2018-03-07 Thread Eric Blake
The NBD spec states that since trim requests can affect disk contents, then they should allow for FUA semantics just like writes for ensuring the disk has settled before returning. As bdrv_[co_]pdiscard() does not (yet?) support a flags argument, we can't pass FUA down the block layer stack, and

Re: [Qemu-devel] [PATCH v2] pc-bios/s390-ccw: Move string arrays from bootmap header to .c file

2018-03-07 Thread Eric Blake
On 03/06/2018 12:18 AM, Thomas Huth wrote: bootmap.h can currently only be included once - otherwise the linker complains about multiple definitions of the "magic" strings. My first thought when reading that was "Huh? bootmap.h has a proper[*] double-inclusion header guard, and therefore a

Re: [Qemu-devel] [PATCH v11 00/28] x86: Secure Encrypted Virtualization (AMD)

2018-03-07 Thread Fam Zheng
On Thu, Mar 8, 2018 at 4:35 AM, Brijesh Singh wrote: > Hi, > > I have root caused and fixed the build issue seen with mingw32 compiler, > the patch is very trivial (see below). > > I am looking for direction on how to submit the fix, should I resubmit > the whole series or

Re: [Qemu-devel] [RFC PATCH qemu] slirp: Update forwarding IP address if guest receiver non-default IP

2018-03-07 Thread Samuel Thibault
Hello, Thomas Huth, on mer. 07 mars 2018 07:30:29 +0100, wrote: > On 07.03.2018 04:39, Alexey Kardashevskiy wrote: > > On 08/02/18 15:29, Alexey Kardashevskiy wrote: > >> On 01/02/18 20:36, Alexey Kardashevskiy wrote: > >>> If we run QEMU with -netdev user,id=USER0,hostfwd=tcp::-:22, it

Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/07/2018 07:34 PM, Samuel Thibault wrote: > Hello, > > Thanks for the Cc. > > I have applied it to my tree. I don't think there is any reason to > avoid the same change for ingoing connections? Could one of your review > the attached patch doing it? attached patch: Reviewed-by: Philippe

Re: [Qemu-devel] [PATCHv1 07/14] target/mips: convert to DisasContextBase

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/01/2018 07:53 PM, Emilio G. Cota wrote: > Cc: Aurelien Jarno > Cc: Yongbok Kim > Signed-off-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 346 >

[Qemu-devel] QEMU hackers in the Portland area next week

2018-03-07 Thread Michael Clark
Hi Folks, FYI. SiFive is hosting a RISC-V hackathon in Portland at the Embedded Linux Conference next week: Date: Monday, March 12 – Wednesday, March 14 Time: 10:30am Monday – 1:00pm Wednesday Location: Embedded Linux Conference, Hilton Portland Downtown, Skyline II, Floor 23 QEMU is being

[Qemu-devel] [PATCH v6 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-03-07 Thread Max Filippov
In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when mmap, munmap, mprotect, mremap or shmat is called for an address outside the guest address space. mmap and mprotect should return ENOMEM in such case. Change

Re: [Qemu-devel] [PATCH v2] block: make BDRV_POLL_WHILE() re-entrancy safe

2018-03-07 Thread Eric Blake
On 03/07/2018 06:46 AM, Stefan Hajnoczi wrote: Nested BDRV_POLL_WHILE() calls can occur. Currently assert(!wait_->wakeup) fails in AIO_WAIT_WHILE() when this happens. This patch converts the bool wait_->need_kick flag to an unsigned wait_->num_waiters counter. Nesting works correctly because

Re: [Qemu-devel] [PATCH] slirp: disable Nagle in outgoing connections

2018-03-07 Thread Samuel Thibault
Philippe Mathieu-Daudé, on mer. 07 mars 2018 19:57:28 -0300, wrote: > Reviewed-by: Philippe Mathieu-Daudé Thanks!

Re: [Qemu-devel] [PATCHv1 06/14] target/mips: convert to DisasJumpType

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/01/2018 07:53 PM, Emilio G. Cota wrote: > Cc: Aurelien Jarno > Cc: Yongbok Kim > Signed-off-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 186 >

Re: [Qemu-devel] [PATCH qemu] slirp/debug: Print IP addresses in human readable form

2018-03-07 Thread Samuel Thibault
Hello, Remember to Cc the maintainer, I just can't read qemu-devel fully to find slirp mails. Thomas Huth, on mer. 07 mars 2018 07:24:16 +0100, wrote: > >> diff --git a/slirp/arp_table.c b/slirp/arp_table.c > >> index 3547043..bac608f 100644 > >> --- a/slirp/arp_table.c > >> +++

Re: [Qemu-devel] [PATCHv1 08/14] target/mips: use *ctx for DisasContext

2018-03-07 Thread Philippe Mathieu-Daudé
On 03/01/2018 07:53 PM, Emilio G. Cota wrote: > No changes to the logic here; this is just to make the diff > that follows easier to read. > > While at it, remove the unnecessary 'struct' in > 'struct TranslationBlock'. > > Note that checkpatch complains with a false positive: > ERROR: space

Re: [Qemu-devel] [PATCH 0/2] block: fix nbd-server-stop crash after blockdev-snapshot-sync

2018-03-07 Thread Eric Blake
On 03/06/2018 02:48 PM, Stefan Hajnoczi wrote: The blockdev-snapshot-sync command uses bdrv_append() to update all parents to point at the external snapshot node. This breaks BlockBackend's blk_add/remove_aio_context_notifier(), which doesn't expect a BDS change. Patch 1 fixes this by tracking

Re: [Qemu-devel] [PATCH 0/2] vmmouse: convert qdev pointer property to QOM link relationship

2018-03-07 Thread Zihan Yang
Hi Philippe, Thanks for reviewing my patch. Yes I though about it, a specific header file with only several lines seems not worth it, but otherwise I would have to define redundant macro in vmmouse.c. Currently rebundant macro is ok but if we need some more macros, we would end on creating a

Re: [Qemu-devel] block migration and dirty bitmap reset

2018-03-07 Thread Fam Zheng
On Wed, 03/07 09:06, Peter Lieven wrote: > Hi, > > while looking at the code I wonder if the blk_aio_preadv and the > bdrv_reset_dirty_bitmap order must > be swapped in mig_save_device_bulk: > > qemu_mutex_lock_iothread(); > aio_context_acquire(blk_get_aio_context(bmds->blk)); >

[Qemu-devel] [PATCH v4 2/5] qmp: distinguish PC-DIMM and NVDIMM in MemoryDeviceInfoList

2018-03-07 Thread Haozhong Zhang
It may need to treat PC-DIMM and NVDIMM differently, e.g., when deciding the necessity of non-volatile flag bit in SRAT memory affinity structures. NVDIMMDeviceInfo, which inherits from PCDIMMDeviceInfo, is added to union type MemoryDeviceInfo to record information of NVDIMM devices. The

Re: [Qemu-devel] [PATCH] hw/misc/macio: Mark the macio devices with user_creatable = false

2018-03-07 Thread David Gibson
On Wed, Mar 07, 2018 at 03:22:54PM +0100, Thomas Huth wrote: > The macio devices currently cause a crash when the user tries to > instantiate them on a different machine: > > $ ppc64-softmmu/qemu-system-ppc64 -device macio-newworld > Unexpected error in qemu_chr_fe_init() at

Re: [Qemu-devel] [PATCH v6 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-03-07 Thread Laurent Vivier
Le 07/03/2018 à 22:50, Max Filippov a écrit : > In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger > than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when > mmap, munmap, mprotect, mremap or shmat is called for an address outside > the guest address space. mmap

[Qemu-devel] [PATCH v4 5/5] [DO NOT APPLY] test/acpi-test-data: add ACPI tables for dimmpxm test

2018-03-07 Thread Haozhong Zhang
Reviewers can use ACPI tables in this patch to run test_acpi_{piix4,q35}_tcg_dimm_pxm cases. Signed-off-by: Haozhong Zhang --- tests/acpi-test-data/pc/APIC.dimmpxm | Bin 0 -> 144 bytes tests/acpi-test-data/pc/DSDT.dimmpxm | Bin 0 -> 6803 bytes

[Qemu-devel] [PATCH v4 4/5] tests/bios-tables-test: add test cases for DIMM proximity

2018-03-07 Thread Haozhong Zhang
QEMU now builds one SRAT memory affinity structure for each PC-DIMM and NVDIMM device presented at boot time with the proximity domain specified in the device option 'node', rather than only one SRAT memory affinity structure covering the entire hotpluggable address space with the proximity domain

Re: [Qemu-devel] [PATCH v4 0/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-03-07 Thread Haozhong Zhang
On 03/08/18 10:33 +0800, Haozhong Zhang wrote: > (Patch 5 is only for reviewers to run test cases in patch 4) > > ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity > domain of a NVDIMM SPA range must match with corresponding entry in > SRAT table. > > The address ranges of

Re: [Qemu-devel] [PATCH] tests/boot-serial: Check the 40p machine, too

2018-03-07 Thread David Gibson
On Wed, Mar 07, 2018 at 01:15:15PM +0100, Thomas Huth wrote: > The "40p" machine is using the Open Hack'Ware BIOS, just like the "prep" > machine, so we can test it accordingly with the boot-serial tester, too. > While we're at it, also change the strings that we are using for the > "prep"

Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()

2018-03-07 Thread Fam Zheng
On Wed, 03/07 14:42, Stefan Hajnoczi wrote: > v3: > * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam] > v2: > * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd >from a BH in the IOThread [Fam] > > There are several race conditions in

Re: [Qemu-devel] [PATCH 1/4] eth: add speed and duplex definitions

2018-03-07 Thread Jason Baron via Qemu-devel
On 03/06/2018 01:15 PM, Michael S. Tsirkin wrote: > On Tue, Mar 06, 2018 at 12:53:14PM -0500, Jason Baron wrote: >> >> >> On 03/02/2018 12:54 PM, Michael S. Tsirkin wrote: >>> On Thu, Mar 01, 2018 at 10:46:33PM -0500, Jason Baron wrote: Pull in definitions for SPEED_UNKNOWN, DUPLEX_UNKNOWN,

[Qemu-devel] [PATCH v4 3/5] hw/acpi-build: build SRAT memory affinity structures for DIMM devices

2018-03-07 Thread Haozhong Zhang
ACPI 6.2A Table 5-129 "SPA Range Structure" requires the proximity domain of a NVDIMM SPA range must match with corresponding entry in SRAT table. The address ranges of vNVDIMM in QEMU are allocated from the hot-pluggable address space, which is entirely covered by one SRAT memory affinity

Re: [Qemu-devel] [PATCH v10 10/24] migration: In case of error just end the migration

2018-03-07 Thread Eric Blake
On 03/07/2018 05:52 AM, Daniel P. Berrangé wrote: On Wed, Mar 07, 2018 at 11:59:56AM +0100, Juan Quintela wrote: Signed-off-by: Juan Quintela --- migration/socket.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Daniel P. Berrangé

Re: [Qemu-devel] [RFC v10 00/24] Multifd

2018-03-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180307110010.2205-1-quint...@redhat.com Subject: [Qemu-devel] [RFC v10 00/24] Multifd === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Peter Xu
On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: [...] > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > > index bd40864f87..997c70dd7d 100644 > > --- a/chardev/char-socket.c > > +++ b/chardev/char-socket.c > > @@ -31,6 +31,7 @@ > > #include "qemu/option.h" > >

Re: [Qemu-devel] [PATCH v2] pc-bios/s390-ccw: Move string arrays from bootmap header to .c file

2018-03-07 Thread Thomas Huth
On 08.03.2018 00:11, Eric Blake wrote: > On 03/06/2018 12:18 AM, Thomas Huth wrote: >> bootmap.h can currently only be included once - otherwise the linker >> complains about multiple definitions of the "magic" strings. > > My first thought when reading that was "Huh? bootmap.h has a proper[*] >

  1   2   3   4   >