Re: [Qemu-devel] [RFC PATCH qemu] qmp: Add qom-list-properties to list QOM object properties

2018-02-21 Thread Paolo Bonzini
On 21/02/2018 04:36, Alexey Kardashevskiy wrote: > On 19/01/18 16:09, Alexey Kardashevskiy wrote: >> There is already 'device-list-properties' which does most of the job, >> however it does not handle everything returned by qom-list-types such >> as machines as they inherit directly from

Re: [Qemu-devel] [PATCH 2/2] qcow2: Avoid memory over-allocation on compressed images

2018-02-21 Thread Alberto Garcia
On Tue 20 Feb 2018 11:24:59 PM CET, Eric Blake wrote: I was also preparing a patch to change this, but you arrived first :-) > So, it's time to cut back on the waste. A compressed cluster > will NEVER occupy more than an uncompressed cluster (okay, gzip > DOES document that because the

Re: [Qemu-devel] [PATCH v2 8/8] qemu-doc: Make "-net" less prominent

2018-02-21 Thread Paolo Bonzini
On 21/02/2018 01:05, Thomas Huth wrote: > On 20.02.2018 19:37, Paolo Bonzini wrote: >> On 20/02/2018 18:40, Thomas Huth wrote: >>> "-net" is clearly a legacy option. Yet we still use it in almost all >>> examples in the qemu documentation, and many other spots in the network >>> chapter. We should

Re: [Qemu-devel] [PATCH] configure: fix sanitizers' test program to mend ASan detection

2018-02-21 Thread Marc-André Lureau
Hi On Wed, Feb 21, 2018 at 2:03 AM, Emilio G. Cota wrote: > Commit 218bb57 ("build-sys: check static linking of UBSAN", 2018-02-13) > adds a small test program to check whether ubsan works even when > configuring with --static. This added program is used to > detect all

Re: [Qemu-devel] [PATCH v4 5/5] usb-mtp: Advertise SendObjectInfo for write support

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 05:59:04PM -0500, Bandan Das wrote: > This patch implements a dummy ObjectInfo structure so that > it's easy to typecast the incoming data. If the metadata is > valid, write_pending is set. Also, the incoming filename > is utf-16, so, instead of depending on external

Re: [Qemu-devel] [PATCH v4 3/5] usb-mtp: Support delete of mtp objects

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 05:59:02PM -0500, Bandan Das wrote: > Write of existing objects by the initiator is acheived by > making a temporary buffer with the new changes, deleting the > old file and then writing a new file with the same name. > > Also, add a "readonly" property which needs to be

Re: [Qemu-devel] [PATCH 1/2] qcow2: Prefer byte-based calls into bs->file

2018-02-21 Thread Alberto Garcia
On Tue 20 Feb 2018 11:24:58 PM CET, Eric Blake wrote: > diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c > index d46b69d7f34..3fefeb3dc50 100644 > --- a/block/qcow2-refcount.c > +++ b/block/qcow2-refcount.c > @@ -2310,8 +2310,8 @@ write_refblocks: > on_disk_refblock = (void

Re: [Qemu-devel] [qemu-web PATCH] Add a blog post documenting Spectre/Meltdown options for QEMU 2.11.1

2018-02-21 Thread Paolo Bonzini
On 16/02/2018 12:57, Dr. David Alan Gilbert wrote: > It's a bit weird to end up pointing to them to a lkml post; > Paolo: Any ideas on anything better to say? IBRS is really that much slower than retpolines on pre-Skylake machines, so it's a hard call to tell people to use it. It looks like

Re: [Qemu-devel] [Bug 1750229] Re: virtio-blk-pci regression: softlock in guest kernel at module loading

2018-02-21 Thread Matwey V. Kornilov
Well, last_avail_idx equals to shadow_avail_idx and both of them are 1 at the qemu side. So, only one request is transferred. I wonder why, probably something is badly cached, but new avail_idx (which is supposed to become 2) is never shown up. 2018-02-20 15:49 GMT+03:00 Matwey V. Kornilov

[Qemu-devel] SSD virtio-scsi passthrough

2018-02-21 Thread Nitin Gupta
Dear Qemu Team Please let me know the qemu command for doing ssd virtio-scsi passthrough . i am able to do the pass through with virsh .but same command when i am trying with qemu , VM is not coming up Please let me know how can i proceed further . any help will be appreciated Regards nitin

Re: [Qemu-devel] [PATCH v4 4/5] usb-mtp: Introduce write support for MTP objects

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 05:59:03PM -0500, Bandan Das wrote: > Allow write operations on behalf of the initiator. The > precursor to write is the sending of the write metadata > that consists of the ObjectInfo dataset. This patch introduces > a flag that is set when the responder is ready to

[Qemu-devel] [PATCH v2 05/36] qcow2: Use BlockdevRef in qcow2_create2()

2018-02-21 Thread Kevin Wolf
Instead of passing a separate BlockDriverState* into qcow2_create2(), 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 v2 00/36] x-blockdev-create for protocols and qcow2

2018-02-21 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 v2 03/36] qcow2: Let qcow2_create() handle protocol layer

2018-02-21 Thread Kevin Wolf
Currently, qcow2_create() only parses the QemuOpts and then calls qcow2_create2() 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_create2() becomes the function that

[Qemu-devel] [PATCH v2 11/36] qdict: Introduce qdict_rename_keys()

2018-02-21 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 --- include/qapi/qmp/qdict.h | 6 +++ qobject/qdict.c | 34 ++ tests/check-qdict.c | 113

[Qemu-devel] [PATCH v2 17/36] gluster: Support .bdrv_co_create

2018-02-21 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to gluster, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 18 ++- block/gluster.c | 135 ++- 2 files changed, 108

[Qemu-devel] [PATCH v2 14/36] block: x-blockdev-create QMP command

2018-02-21 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 v2 26/36] nfs: Support .bdrv_co_create

2018-02-21 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 | 74

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-21 Thread Igor Mammedov
On Tue, 20 Feb 2018 17:17:58 -0800 Dan Williams wrote: > On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov wrote: > > On Sat, 17 Feb 2018 14:31:35 +0800 > > Haozhong Zhang wrote: > > > >> ACPI 6.2A Table 5-129 "SPA Range

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

2018-02-21 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 4/5] usb-mtp: Introduce write support for MTP objects

2018-02-21 Thread Daniel P . Berrangé
On Wed, Feb 21, 2018 at 12:11:00PM +0100, Gerd Hoffmann wrote: > > > +static void usb_mtp_write_data(MTPState *s) > > > +{ > > > +MTPData *d = s->data_out; > > > +MTPObject *parent = > > > +usb_mtp_object_lookup(s, s->dataset.parent_handle); > > > +char *path = NULL; > > > +

Re: [Qemu-devel] [PATCH] nbd: Honor server's advertised minimum block size

2018-02-21 Thread Eric Blake
On 02/16/2018 05:50 AM, Vladimir Sementsov-Ogievskiy wrote: 15.02.2018 06:29, Eric Blake wrote: Commit 79ba8c98 (v2.7) changed the setting of request_alignment to occur only during bdrv_refresh_limits(), rather than at at bdrv_open() time; but at the time, NBD was unaffected, because it still

Re: [Qemu-devel] [PATCH v2 2/5] keymap: use glib hash for kbd_layout_t

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 04:03:54PM +0100, Gerd Hoffmann wrote: > Drop home-grown lookup code, which is a strange mix of a lookup table > and a list. Use standard glib hash instead. > > Signed-off-by: Gerd Hoffmann > --- > ui/keymaps.c| 79 >

Re: [Qemu-devel] [PATCH 2/2] qcow2: Avoid memory over-allocation on compressed images

2018-02-21 Thread Eric Blake
On 02/21/2018 04:04 AM, Alberto Garcia wrote: On Tue 20 Feb 2018 11:24:59 PM CET, Eric Blake wrote: I was also preparing a patch to change this, but you arrived first :-) So, it's time to cut back on the waste. A compressed cluster will NEVER occupy more than an uncompressed cluster (okay,

[Qemu-devel] [PATCH v3 6/7] net: Remove the deprecated 'host_net_add' and 'host_net_remove' HMP commands

2018-02-21 Thread Thomas Huth
They are deprecated since QEMU v2.10, and so far nobody complained that these commands are still necessary for any reason - and since you can use 'netdev_add' and 'netdev_remove' instead, there also should not be any real reason. Since they are also standing in the way for the upcoming 'vlan'

[Qemu-devel] [PATCH v3 0/7] Improvements and clean-ups related to -net

2018-02-21 Thread Thomas Huth
"-net" is a legacy option that often causes confusion and misconfigurations for the users, since most people are not aware of the underlying "vlan" (i.e. hub) concept that is used for this parameter. The prefered way of configuring your network stack is to use "--netdev" instead, which gives you a

[Qemu-devel] [PATCH v3 3/7] net: Only show vhost-user in the help text if CONFIG_POSIX is defined

2018-02-21 Thread Thomas Huth
According to net/Makefile.objs we only link in the vhost-user code if CONFIG_POSIX has been set. So the help screen should also only show this information if CONFIG_POSIX has been defined. Reviewed-by: Paolo Bonzini Signed-off-by: Thomas Huth ---

[Qemu-devel] [PULL 00/22] re-factor softfloat and add fp16 functions

2018-02-21 Thread Alex Bennée
The following changes since commit a6e0344fa0e09413324835ae122c4cadd7890231: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180220-pull-request' into staging (2018-02-20 14:05:00 +) are available in the Git repository at: https://github.com/stsquad/qemu.git

[Qemu-devel] [PATCH 02/12] sdl: switch over to new display registry

2018-02-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 19 --- ui/sdl.c | 24 +--- ui/sdl2.c| 17 +++-- vl.c | 15 +-- 4 files changed, 29 insertions(+), 46 deletions(-) diff

[Qemu-devel] [PATCH 03/12] cocoa: switch over to new display registry

2018-02-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 12 vl.c | 3 --- ui/cocoa.m | 14 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index

[Qemu-devel] [PATCH 06/12] console: add and use qemu_display_find_default

2018-02-21 Thread Gerd Hoffmann
Using the new display registry instead of #ifdefs in vl.c. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + ui/console.c | 19 +++ vl.c | 15 +-- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v2] specs/qcow2: Fix documentation of the compressed cluster descriptor

2018-02-21 Thread Alberto Garcia
On Tue 20 Feb 2018 08:40:43 PM CET, Eric Blake wrote: >> Compressed Clusters Descriptor (x = 62 - (cluster_bits - 8)): > > I'm looking at how this works for different cluster sizes. If we have > 512-byte clusters, x is 61, and we DON'T have the 'number sectors' > field at all! Well, you can

Re: [Qemu-devel] [PATCH] tests/boot-serial-test: Fix problem with timeout due to dropped characters

2018-02-21 Thread Paolo Bonzini
On 16/02/2018 07:12, Thomas Huth wrote: > Commit 92b540dac9fc3a5 introduce a counter to handle the timeouts in a > better way. But in case ccnt reaches 512, the current read character is > ignored - and if that character is part of the string that we are looking > for, the test fails to match the

[Qemu-devel] [PULL 07/22] include/fpu/softfloat: implement float16_set_sign helper

2018-02-21 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index

[Qemu-devel] [PULL 06/22] include/fpu/softfloat: implement float16_chs helper

2018-02-21 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 1d34f2c3eb..f75aa59100 100644 --- a/include/fpu/softfloat.h

[Qemu-devel] [PULL 03/22] fpu/softfloat-types: new header to prevent excessive re-builds

2018-02-21 Thread Alex Bennée
The main culprit here is bswap.h which pulled in softfloat.h so it could use the types in its CPU_Float* and ldfl/stfql functions. As bswap.h is very widely included this added a compile dependency every time we touch softfloat.h. Move the typedefs for each float type into their own file so we

Re: [Qemu-devel] [PATCH] tests/boot-serial-test: Fix problem with timeout due to dropped characters

2018-02-21 Thread Thomas Huth
On 21.02.2018 12:05, Paolo Bonzini wrote: > On 16/02/2018 07:12, Thomas Huth wrote: >> Commit 92b540dac9fc3a5 introduce a counter to handle the timeouts in a >> better way. But in case ccnt reaches 512, the current read character is >> ignored - and if that character is part of the string that we

[Qemu-devel] [PULL 18/22] fpu/softfloat: re-factor int/uint to float

2018-02-21 Thread Alex Bennée
These are considerably simpler as the lower order integers can just use the higher order conversion function. As the decomposed fractional part is a full 64 bit rounding and inexact handling comes from the pack functions. Signed-off-by: Alex Bennée Reviewed-by: Richard

Re: [Qemu-devel] [PATCH] migration: do not transfer ram during bulk storage migration

2018-02-21 Thread Stefan Hajnoczi
On Tue, Feb 20, 2018 at 04:10:03PM +0100, Peter Lieven wrote: > this patch makes the bulk phase of a block migration to take > place before we start transferring ram. As the bulk block migration > can take a long time its pointless to transfer ram during that phase. > > Signed-off-by: Peter

Re: [Qemu-devel] [PATCH 0/2] Firmware blob and git submodule for Sam460ex

2018-02-21 Thread Peter Maydell
On 20 February 2018 at 20:44, Emilio G. Cota wrote: > On Tue, Feb 20, 2018 at 18:31:17 +, Peter Maydell wrote: >> On 20 February 2018 at 18:10, BALATON Zoltan wrote: >> > I've created a git repo for the Sam460ex u-boot sources and this adds >> > that as a

[Qemu-devel] [PATCH v2 04/36] qcow2: Pass BlockdevCreateOptions to qcow2_create2()

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

[Qemu-devel] [PATCH v2 09/36] test-qemu-opts: Test qemu_opts_append()

2018-02-21 Thread Kevin Wolf
Basic test for merging two QemuOptsLists. Signed-off-by: Kevin Wolf --- tests/test-qemu-opts.c | 128 + 1 file changed, 128 insertions(+) diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c index 5d5a3daa7b..6c3183390b

[Qemu-devel] [PATCH v2 01/36] block/qapi: Introduce BlockdevCreateOptions

2018-02-21 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 v2 02/36] block/qapi: Add qcow2 create options to schema

2018-02-21 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 v2 06/36] qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()

2018-02-21 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 v2 07/36] qcow2: Handle full/falloc preallocation in qcow2_create2()

2018-02-21 Thread Kevin Wolf
Once qcow2_create2() 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 Wolf

[Qemu-devel] [PATCH v2 08/36] util: Add qemu_opts_to_qdict_filtered()

2018-02-21 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 v2 27/36] sheepdog: QAPIfy "redundacy" create option

2018-02-21 Thread Kevin Wolf
The "redundacy" 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

[Qemu-devel] [PATCH v2 20/36] rbd: Remove non-schema options from runtime_opts

2018-02-21 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 --- block/rbd.c | 55

[Qemu-devel] [PATCH v2 19/36] rbd: Factor out qemu_rbd_connect()

2018-02-21 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 --- block/rbd.c | 100

[Qemu-devel] [PATCH v2 28/36] sheepdog: Support .bdrv_co_create

2018-02-21 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to sheepdog, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 24 +- block/sheepdog.c | 240 +++ 2 files changed, 189

[Qemu-devel] [PATCH v2 16/36] file-win32: Support .bdrv_co_create

2018-02-21 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 --- block/file-win32.c | 45 + 1 file changed, 37 insertions(+),

[Qemu-devel] [PATCH v2 29/36] ssh: Use QAPI BlockdevOptionsSsh object

2018-02-21 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 | 136

[Qemu-devel] [PATCH v2 33/36] file-posix: Fix no-op bdrv_truncate() with falloc preallocation

2018-02-21 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.

[Qemu-devel] [PATCH v2 31/36] ssh: Pass BlockdevOptionsSsh to connect_to_ssh()

2018-02-21 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

Re: [Qemu-devel] [PATCH v2 3/5] keymap: numpad keysyms and keycodes are fixed

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 04:03:55PM +0100, Gerd Hoffmann wrote: > No need to figure them at runtime from the keymap. > > Signed-off-by: Gerd Hoffmann > --- > ui/keymaps.c | 61 > +--- > 1 file changed, 9 insertions(+),

Re: [Qemu-devel] [PATCH v2 5/5] keymap: consider modifier state when picking a mapping

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 04:03:57PM +0100, Gerd Hoffmann wrote: > Pass the modifier state to the keymap lookup function. In case multiple > keysym -> keycode mappings exist look at the modifier state and prefer > the mapping where the modifier state matches. > > Signed-off-by: Gerd Hoffmann

Re: [Qemu-devel] [PATCH] sdl2: fix hotkey keyup

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 04:04:44PM +0100, Gerd Hoffmann wrote: > After some hotkey was pressed sdl2 doesn't forward the first modifier > keyup event to the guest, resulting in stuck modifier keys. > > Fix the logic in handle_keyup(). Also gui_key_modifier_pressed doesn't > need to be a global

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-21 Thread Dan Williams
On Wed, Feb 21, 2018 at 5:55 AM, Igor Mammedov wrote: > On Tue, 20 Feb 2018 17:17:58 -0800 > Dan Williams wrote: > >> On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov wrote: >> > On Sat, 17 Feb 2018 14:31:35 +0800 >> > Haozhong

[Qemu-devel] [PATCH v2 10/36] test-qemu-opts: Test qemu_opts_to_qdict_filtered()

2018-02-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/test-qemu-opts.c | 125 + 1 file changed, 125 insertions(+) diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c index 6c3183390b..2c422abcd4 100644 --- a/tests/test-qemu-opts.c +++

[Qemu-devel] [PATCH v2 24/36] rbd: Use qemu_rbd_connect() in qemu_rbd_do_create()

2018-02-21 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 v2 34/36] block: Fail bdrv_truncate() with negative size

2018-02-21 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 v2 21/36] rbd: Pass BlockdevOptionsRbd to qemu_rbd_connect()

2018-02-21 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 | 102 +++- 1 file changed, 52 insertions(+), 50

[Qemu-devel] [PATCH v3] specs/qcow2: Fix documentation of the compressed cluster descriptor

2018-02-21 Thread Alberto Garcia
This patch fixes several mistakes in the documentation of the compressed cluster descriptor: 1) the documentation claims that the cluster descriptor contains the number of sectors used to store the compressed data, but what it actually contains is the number of sectors *minus one* or, in

[Qemu-devel] [PATCH v2 25/36] nfs: Use QAPI options in nfs_client_open()

2018-02-21 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

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

2018-02-21 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(+)

Re: [Qemu-devel] [PATCH] Fix ast2500 protection register emulation

2018-02-21 Thread Cédric Le Goater
On 02/20/2018 03:19 PM, Hugo Landau wrote: >> I also gave it a test on an OpenBMC romulus image. Looks fine, but that's >> an old custom U-Boot. Which defconfig did you use for U-Boot HEAD ? > evb-ast2500_defconfig. ok > FYI, these changes are necessary, but not sufficient to get u-boot HEAD >

Re: [Qemu-devel] [PATCH v2 4/5] keymap: record multiple keysym -> keycode mappings

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 04:03:56PM +0100, Gerd Hoffmann wrote: > Sometimes the same keysym can be created using different key > combinations. Record them all in the reverse keymap, not only > the first one. > > Signed-off-by: Gerd Hoffmann > --- > ui/keymaps.c | 14

[Qemu-devel] [PATCH v2 13/36] block: Make bdrv_is_whitelisted() public

2018-02-21 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 --- include/block/block.h | 1 + block.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v2 15/36] file-posix: Support .bdrv_co_create

2018-02-21 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 --- qapi/block-core.json | 20 +- block/file-posix.c | 77

[Qemu-devel] [PATCH v2 12/36] qcow2: Use visitor for options in qcow2_create()

2018-02-21 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

[Qemu-devel] [PATCH v2 18/36] rbd: Fix use after free in qemu_rbd_set_keypairs() error path

2018-02-21 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. Signed-off-by: Kevin Wolf --- block/rbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/rbd.c b/block/rbd.c index

[Qemu-devel] [PATCH v2 23/36] rbd: Assing s->snap/image_name in qemu_rbd_open()

2018-02-21 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 --- block/rbd.c | 14

[Qemu-devel] [PATCH v2 22/36] rbd: Support .bdrv_co_create

2018-02-21 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to rbd, which enables image creation over QMP. Signed-off-by: Kevin Wolf --- qapi/block-core.json | 19 ++- block/rbd.c | 146 ++- 2 files changed, 116 insertions(+), 49

[Qemu-devel] [PATCH v2 30/36] ssh: QAPIfy host-key-check option

2018-02-21 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

[Qemu-devel] [PATCH v2 32/36] ssh: Support .bdrv_co_create

2018-02-21 Thread Kevin Wolf
This adds the .bdrv_co_create driver callback to ssh, which enables image creation over QMP. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- qapi/block-core.json | 16 - block/ssh.c | 92

Re: [Qemu-devel] [PATCH v2 1/5] keymap: make struct kbd_layout_t private to ui/keymaps.c

2018-02-21 Thread Daniel P . Berrangé
On Tue, Feb 20, 2018 at 04:03:53PM +0100, Gerd Hoffmann wrote: > Also use kbd_layout_t pointers instead of void pointers. > > Signed-off-by: Gerd Hoffmann > --- > ui/keymaps.h | 29 ++--- > ui/keymaps.c | 32 +--- > 2 files

Re: [Qemu-devel] [PATCH v3] specs/qcow2: Fix documentation of the compressed cluster descriptor

2018-02-21 Thread Eric Blake
On 02/21/2018 08:08 AM, Alberto Garcia wrote: This patch fixes several mistakes in the documentation of the compressed cluster descriptor: More things to consider, as followup patches: Note that both the L1 table, and the standard L2 descriptors, have a cap on bit 55 as the maximum host

Re: [Qemu-devel] [RFC PATCH v6 00/20] replay additions

2018-02-21 Thread Ciro Santilli
On Wed, Feb 21, 2018 at 6:41 AM, Pavel Dovgalyuk wrote: >> From: Ciro Santilli [mailto:ciro.santi...@gmail.com] >> On Tue, Feb 20, 2018 at 9:46 AM, Pavel Dovgalyuk wrote: >> > >> > Updated the branch on github. >> > You may try it. >> >> At

[Qemu-devel] [PATCH v2 1/3] qcow2: Prefer byte-based calls into bs->file

2018-02-21 Thread Eric Blake
We had only three sector-based stragglers left; convert them to use our preferred byte-based accesses. Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia --- v2: indentation fix --- block/qcow2-cluster.c | 5 ++--- block/qcow2-refcount.c | 6 +++--- 2

Re: [Qemu-devel] [PATCHv3 1/2] translator: merge max_insns into DisasContextBase

2018-02-21 Thread Emilio G. Cota
On Wed, Feb 21, 2018 at 13:05:45 -0800, Richard Henderson wrote: > On 02/21/2018 12:55 PM, Emilio G. Cota wrote: > > While at it, use int for both num_insns and max_insns to make > > sure we have same-type comparisons. > > > > Signed-off-by: Emilio G. Cota > > --- > >

[Qemu-devel] [PATCH v2 3/3] qcow2: Avoid memory over-allocation on compressed images

2018-02-21 Thread Eric Blake
When reading a compressed image, we were allocating s->cluster_data to 32*cluster_size + 512 (possibly over 64 megabytes, for an image with 2M clusters). Let's check out the history: Back when qcow2 was first written, we used s->cluster_data for everything, including copy_sectors() and

[Qemu-devel] [PATCH v2 0/3] qcow2: minor compression improvements

2018-02-21 Thread Eric Blake
Updates to v1: - fix whitespace [Berto] - fix g_try_malloc usage [Berto, Kevin] - improve comments [Berto, Kevin] - add a patch to avoid overflow on 512TB images with 2M clusters Eric Blake (3): qcow2: Prefer byte-based calls into bs->file qcow2: Don't allow overflow during cluster allocation

Re: [Qemu-devel] [PATCH v4 00/22] re-factor softfloat and add fp16 functions

2018-02-21 Thread Fam Zheng
On Mon, 02/19 13:56, Peter Maydell wrote: > On 17 February 2018 at 13:23, Alex Bennée wrote: > > Peter Maydell writes: > >> If you persuade git to use the --minimal, --patience or --histogram > >> git diff option when generating these patches

Re: [Qemu-devel] [PATCH] hw/acpi-build: build SRAT memory affinity structures for NVDIMM

2018-02-21 Thread Haozhong Zhang
On 02/21/18 14:55 +0100, Igor Mammedov wrote: > On Tue, 20 Feb 2018 17:17:58 -0800 > Dan Williams wrote: > > > On Tue, Feb 20, 2018 at 6:10 AM, Igor Mammedov wrote: > > > On Sat, 17 Feb 2018 14:31:35 +0800 > > > Haozhong Zhang

Re: [Qemu-devel] [PATCH 10/11] macio: move setting of CUDA timebase frequency to macio_common_realize()

2018-02-21 Thread David Gibson
On Mon, Feb 19, 2018 at 06:19:21PM +, Mark Cave-Ayland wrote: > This removes the last of the functionality from macio_init() in preparation > for its subsequent removal. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson

[Qemu-devel] [PATCH V4 0/3] tests: Add migration test for aarch64

2018-02-21 Thread Wei Huang
This patchset adds a migration test for aarch64. It leverages Dave Gilbert's recent patch "tests/migration: Add source to PC boot block" to create a new test case for aarch64. V3->V4: * Rename .s to .S, allowing assembly to include C-style header file * Move test defines into a new

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 11/13] s390-ccw: set cp_receive mask only when needed and consume pending service irqs

2018-02-21 Thread Thomas Huth
On 21.02.2018 20:35, Collin L. Walling wrote: > It is possible while waiting for multiple types of external > interrupts that we might have pending irqs remaining between > irq consumption and irq-type disabling. Those interrupts > could potentially propagate to the guest after IPL completes > and

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 12/13] s390-ccw: use zipl values when no boot menu options are present

2018-02-21 Thread Thomas Huth
On 21.02.2018 20:35, Collin L. Walling wrote: > If no boot menu options are present, then flag the boot menu to > use the zipl options that were set in the zipl configuration file > (and stored on disk by zipl). These options are found at some > offset prior to the start of the zipl boot menu

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/2] Firmware blob and git submodule for Sam460ex

2018-02-21 Thread Thomas Huth
On 21.02.2018 19:33, Peter Maydell wrote: > On 21 February 2018 at 17:06, BALATON Zoltan wrote: >> It's not that upstream u-boot has abandoned board support (it only removed >> support for the PPC440 CPU it once had). The board itself never had support >> in upstream u-boot,

Re: [Qemu-devel] [PATCH v6 27/28] migration/qmp: add command migrate-pause

2018-02-21 Thread Peter Xu
On Wed, Feb 14, 2018 at 06:56:59PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Feb 13, 2018 at 08:11:00PM +, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > It pauses an ongoing migration. Currently it only

Re: [Qemu-devel] [PATCH v6 21/28] migration: setup ramstate for resume

2018-02-21 Thread Peter Xu
On Wed, Feb 14, 2018 at 06:40:46PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Feb 13, 2018 at 06:17:51PM +, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > After we updated the dirty bitmaps of ramblocks, we also

Re: [Qemu-devel] [Resend][PATCH] qga: unset frozen state if no mount points are frozen

2018-02-21 Thread Chen Hanxiao
At 2018-02-16 02:41:25, "Michael Roth" wrote: >Quoting Chen Hanxiao (2018-02-08 19:35:42) >> From: Chen Hanxiao >> >> If we set mountpoints to qmp_guest_fsfreeze_freeze_list, >> we may got nothing to freeze as all mountpoints are >> not valid.

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 04/13] s390-ccw: update libc

2018-02-21 Thread Thomas Huth
On 21.02.2018 20:35, Collin L. Walling wrote: > Moved: > memcmp from bootmap.h to libc.h (renamed from _memcmp) > strlen from sclp.c to libc.h (renamed from _strlen) > > Added C standard functions: > isdigit > > Added non C-standard function: > uitoa > atoui > > Signed-off-by: Collin

[Qemu-devel] [PATCH qemu repost] qmp: Add qom-list-properties to list QOM object properties

2018-02-21 Thread Alexey Kardashevskiy
There is already 'device-list-properties' which does most of the job, however it does not handle everything returned by qom-list-types such as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE. This adds a new qom-list-properties command which prints properties of a specific

[Qemu-devel] [PATCH v3 1/5] keymap: make struct kbd_layout_t private to ui/keymaps.c

2018-02-21 Thread Gerd Hoffmann
Also use kbd_layout_t pointers instead of void pointers. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé --- ui/keymaps.h | 29 ++--- ui/keymaps.c | 32 +--- 2 files changed, 31

Re: [Qemu-devel] [RFC PATCH v6 00/20] replay additions

2018-02-21 Thread Pavel Dovgalyuk
> From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > > From: Ciro Santilli [mailto:ciro.santi...@gmail.com] > > On Wed, Feb 21, 2018 at 6:41 AM, Pavel Dovgalyuk wrote: > > >> From: Ciro Santilli [mailto:ciro.santi...@gmail.com] > > >> On Tue, Feb 20, 2018 at 9:46 AM, Pavel

[Qemu-devel] [PATCH v2 2/3] qcow2: Don't allow overflow during cluster allocation

2018-02-21 Thread Eric Blake
Our code was already checking that we did not attempt to allocate more clusters than what would fit in an INT64 (the physical maximimum if we can access a full off_t's worth of data). But this does not catch smaller limits enforced by various spots in the qcow2 image description: L1 and normal

[Qemu-devel] [PATCH v3 2/5] keymap: use glib hash for kbd_layout_t

2018-02-21 Thread Gerd Hoffmann
Drop home-grown lookup code, which is a strange mix of a lookup table and a list. Use standard glib hash instead. Signed-off-by: Gerd Hoffmann --- ui/keymaps.c| 73 - ui/trace-events | 2 +- 2 files changed, 32

[Qemu-devel] [PATCH V4 1/3] tests/migration: Convert the boot block compilation script into Makefile

2018-02-21 Thread Wei Huang
The x86 boot block header currently is generated with a shell script. To better support other CPUs (e.g. aarch64), we convert the script into Makefile. This allows us to 1) support cross-compilation easily, and 2) avoid creating a script file for every architecture. Signed-off-by: Wei Huang

  1   2   3   >