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 : > vir

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 sanitizers, which breaks A

[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 receive

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 librari

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 se

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] [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 TYPE_OBJEC

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 compressi

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 Intel

[Qemu-devel] [PATCH v3 5/7] net: Remove the deprecated way of dumping network packets

2018-02-21 Thread Thomas Huth
"-net dump" has been marked as deprecated since QEMU v2.10, since it only works with the deprecated 'vlan' parameter (or hubs). Network dumping should be done with "-object filter-dump" nowadays instead. Since nobody complained so far about the deprecation message, let's finally get rid of "-net du

[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 1/7] net: Move error reporting from net_init_client/netdev to the calling site

2018-02-21 Thread Thomas Huth
It looks strange that net_init_client() and net_init_netdev() both take an "Error **errp" parameter, but then do the error reporting with "error_report_err(local_err)" on their own. Let's move the error reporting to the calling site instead to simplify this code a little bit. Reviewed-by: Eric Bla

[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' clean

[Qemu-devel] [PATCH v3 2/7] net: List available netdevs with "-netdev help"

2018-02-21 Thread Thomas Huth
Other options like "-chardev" or "-device" feature a nice help text with the available devices when being called with "help" or "?". Since it is quite useful, especially if you want to see which network backends have been compiled into the QEMU binary, let's provide such a help text for "-netdev",

[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-options.hx | 2 ++ 1 file changed, 2 insert

[Qemu-devel] [PATCH v3 4/7] net: Make net_client_init() static

2018-02-21 Thread Thomas Huth
The function is only used within net.c, so there's no need that this is a global function. While we're at it, also remove the unused prototype compute_mcast_idx() (the function has been removed in commit d9caeb09b107e91122d10ba4a08a). Reviewed-by: Paolo Bonzini Signed-off-by: Thomas Huth --- i

[Qemu-devel] [PATCH v3 7/7] net: Add a new convenience option "--nic" to configure default/on-board NICs

2018-02-21 Thread Thomas Huth
The legacy "-net" option can be quite confusing for the users since most people do not expect to get a "vlan" hub between their emulated guest hardware and the host backend. But so far, we are also not able to get rid of "-net" completely, since it is the only way to configure on-board NICs that ca

Re: [Qemu-devel] [PATCH 11/27] block: x-blockdev-create QMP command

2018-02-21 Thread Kevin Wolf
Am 15.02.2018 um 20:58 hat Eric Blake geschrieben: > On 02/08/2018 01:23 PM, Kevin Wolf wrote: > > 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 > > inter

Re: [Qemu-devel] [PATCH 19/19] mps2-an505: New board model: MPS2 with AN505 Cortex-M33 FPGA image

2018-02-21 Thread Igor Mammedov
On Tue, 20 Feb 2018 18:03:25 + Peter Maydell wrote: > Define a new board model for the MPS2 with an AN505 FPGA image > containing a Cortex-M33. Since the FPGA images for TrustZone > cores (AN505, and the similar AN519 for Cortex-M23) have a > significantly different layout of devices to the n

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

2018-02-21 Thread Mark Cave-Ayland
On 21/02/18 10:18, Thomas Huth wrote: "-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 u

[Qemu-devel] [PULL 05/22] include/fpu/softfloat: implement float16_abs helper

2018-02-21 Thread Alex Bennée
This will be required when expanding the MINMAX() macro for 16 bit/half-precision operations. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index f3b9008f7

[Qemu-devel] [PULL 01/22] fpu/softfloat: implement float16_squash_input_denormal

2018-02-21 Thread Alex Bennée
This will be required when expanding the MINMAX() macro for 16 bit/half-precision operations. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 433c5dad2d..3a4ab1355f 100644 --- a/fpu/softfloat.c +++ b/fpu/

[Qemu-devel] [PULL 02/22] include/fpu/softfloat: remove USE_SOFTFLOAT_STRUCT_TYPES

2018-02-21 Thread Alex Bennée
It's not actively built and when enabled things fail to compile. I'm not sure the type-checking is really helping here. Seeing as we "own" our softfloat now lets remove the cruft. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/include/fpu/softfloat.h b/include/fpu/softfl

[Qemu-devel] [PULL 10/22] fpu/softfloat: move the extract functions to the top of the file

2018-02-21 Thread Alex Bennée
This is pure code-motion during re-factoring as the helpers will be needed earlier. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 3a4ab1355f..297e48f5c9 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.

[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 don'

[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 +++ b/include/fpu/softfloat.h @@ -272,6 +272,15 @@ static inline float16 float16_

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 s

[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 f75aa59100..59c06ef192 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -281,6 +281

[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 tags/pull-softfloat-r

Re: [Qemu-devel] Call for GSoC & Outreachy 2018 mentors & project ideas

2018-02-21 Thread Stefan Hajnoczi
On Tue, Feb 20, 2018 at 11:13 AM, Paolo Bonzini wrote: > On 20/02/2018 11:36, Stefan Hajnoczi wrote: >> === Multi-CPU cluster support for GDB server in QEMU === >> >> There are many examples in modern computing where multiple CPU >> clusters are grouped together in a single SoC. This is common in

[Qemu-devel] [PULL 19/22] fpu/softfloat: re-factor scalbn

2018-02-21 Thread Alex Bennée
This is one of the simpler manipulations you could make to a floating point number. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 4313d3a602..a07b8556b0 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1663,6 +1663,39 @@ flo

[Qemu-devel] [PULL 04/22] target/*/cpu.h: remove softfloat.h

2018-02-21 Thread Alex Bennée
As cpu.h is another typically widely included file which doesn't need full access to the softfloat API we can remove the includes from here as well. Where they do need types it's typically for float_status and the rounding modes so we move that to softfloat-types.h as well. As a result of not havi

[Qemu-devel] [PULL 08/22] include/fpu/softfloat: add some float16 constants

2018-02-21 Thread Alex Bennée
This defines the same set of common constants for float 16 as defined for 32 and 64 bit floats. These are often used by target helper functions. I've also removed constants that are not used by anybody. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson

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

2018-02-21 Thread Gerd Hoffmann
> > +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; > > +int rc = -1; > > +mode_t mask = 0644; > > + > > +assert(d != NULL); >

[Qemu-devel] [PULL 09/22] fpu/softfloat: improve comments on ARM NaN propagation

2018-02-21 Thread Alex Bennée
Mention the pseudo-code fragment from which this is based. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index de2c5d5702..4be0fb21ba 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -445

[Qemu-devel] [PULL 16/22] fpu/softfloat: re-factor round_to_int

2018-02-21 Thread Alex Bennée
We can now add float16_round_to_int and use the common round_decomposed and canonicalize functions to have a single implementation for float16/32/64 round_to_int functions. Signed-off-by: Alex Bennée Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell diff --git a/fpu/softfloat.c b/fpu

[Qemu-devel] [PULL 12/22] fpu/softfloat: re-factor add/sub

2018-02-21 Thread Alex Bennée
We can now add float16_add/sub and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 add and sub functions. Signed-off-by: Alex Bennée Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé diff --git a/fpu/softfloat.c b/fpu/sof

[Qemu-devel] [PULL 13/22] fpu/softfloat: re-factor mul

2018-02-21 Thread Alex Bennée
We can now add float16_mul and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 versions. Signed-off-by: Alex Bennée Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 2190e7de56.

[Qemu-devel] [PULL 21/22] fpu/softfloat: re-factor compare

2018-02-21 Thread Alex Bennée
The compare function was already expanded from a macro. I keep the macro expansion but move most of the logic into a compare_decomposed. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 7a53c36da4..4bc425d7e4 100644 --- a/fpu/softflo

[Qemu-devel] [PULL 11/22] fpu/softfloat: define decompose structures

2018-02-21 Thread Alex Bennée
These structures pave the way for generic softfloat helper routines that will operate on fully decomposed numbers. Signed-off-by: Alex Bennée Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 297e48f5c9..568d95 100644

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 a

[Qemu-devel] [PULL 20/22] fpu/softfloat: re-factor minmax

2018-02-21 Thread Alex Bennée
Let's do the same re-factor treatment for minmax functions. I still use the MACRO trick to expand but now all the checking code is common. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/fpu/softfloat.c b/fpu/softfloat.c index a07b8556b0..7a53c36da4 100644 --- a/fpu/softf

[Qemu-devel] [PULL 14/22] fpu/softfloat: re-factor div

2018-02-21 Thread Alex Bennée
We can now add float16_div and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 versions. Signed-off-by: Alex Bennée Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell diff --git a/fpu/softfloat-macros.h b/fpu/softfloat-macros.h ind

[Qemu-devel] [PULL 22/22] fpu/softfloat: re-factor sqrt

2018-02-21 Thread Alex Bennée
This is a little bit of a departure from softfloat's original approach as we skip the estimate step in favour of a straight iteration. There is a minor optimisation to avoid calculating more bits of precision than we need however this still brings a performance drop, especially for float64 operatio

[Qemu-devel] QEMU & KVM are participating in Outreachy May-August 2018!

2018-02-21 Thread Stefan Hajnoczi
QEMU & KVM are participating in the Outreachy open source internship program that offers 12-week, paid, remote work internships for individuals from underrepresented groups in open source. The application period is from February 12 to March 22 2018. The internships themselves run May-August. Our

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

2018-02-21 Thread Alex Bennée
We share the common int64/uint64_pack_decomposed function across all the helpers and simply limit the final result depending on the final size. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 616c6cef07..da0c43c0e7 100644 --- a/fpu/

[Qemu-devel] [PULL 15/22] fpu/softfloat: re-factor muladd

2018-02-21 Thread Alex Bennée
We can now add float16_muladd and use the common decompose and canonicalize functions to have a single implementation for float16/32/64 muladd functions. Signed-off-by: Alex Bennée Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell diff --git a/fpu/softfloat-specialize.h b/fpu/softflo

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 Lieven

[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 Henderson diff --git a/fp

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

2018-02-21 Thread Thomas Huth
On 21.02.2018 11:41, Mark Cave-Ayland wrote: > On 21/02/18 10:18, Thomas Huth wrote: > >> "-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.

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

2018-02-21 Thread Paolo Bonzini
On 21/02/2018 11:41, Mark Cave-Ayland wrote: > 1) Does the new -nic syntax support multiple on-board NICs? I remember > seeing this on some of the ARM boards I was studying when trying to > implement something similar for SPARC. Yes, but they will be in different subnets if you do "-nic user -nic

Re: [Qemu-devel] [qemu-s390x] [PATCH 1/1] 390x/cpumodel: document S390FeatDef.bit not applicable

2018-02-21 Thread Halil Pasic
On 02/20/2018 05:25 PM, Cornelia Huck wrote: > On Tue, 20 Feb 2018 17:08:52 +0100 > David Hildenbrand wrote: > >> On 20.02.2018 17:07, Cornelia Huck wrote: >>> On Tue, 20 Feb 2018 17:04:19 +0100 >>> Christian Borntraeger wrote: >>> On 02/20/2018 04:55 PM, David Hildenbrand wrote: >>>

[Qemu-devel] [PATCH 00/12] ui: build sdl, gtk and curses as modules

2018-02-21 Thread Gerd Hoffmann
This patch series adds a registry for user interfaces (aka displays), adds support for user interface modules and allows to build sdl, gtk and curses as modules. Especially gtk cuts down the number of shared libraries qemu links against by a significant amount. Note one: Modules are disabled by d

[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 --git a/include/ui/c

[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 82bbea0242..b97d9ccae4 100644 --- a/

[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 a/include/ui/console.h

[Qemu-devel] [PATCH 01/12] console: add qemu display registry, add gtk

2018-02-21 Thread Gerd Hoffmann
Add a registry for user interfaces. Add qemu_display_init and qemu_display_early_init helper functions for display initialization. Hook up gtk ui as first user. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 32 ui/console.c | 34 ++

[Qemu-devel] [PATCH 09/12] configure: opengl doesn't depend on x11

2018-02-21 Thread Gerd Hoffmann
So remove x11 from pkg-config check and don't add x11 cflags/libs to opengl cflags/libs. Signed-off-by: Gerd Hoffmann --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 2934a4bcff..66c210026a 100755 --- a/configure +++ b/configure

[Qemu-devel] [PATCH 10/12] sdl: build as ui module

2018-02-21 Thread Gerd Hoffmann
Shared library dependencies dropped from qemu-system-*: libSDL2-2.0.so.0 => /lib64/libSDL2-2.0.so.0 Signed-off-by: Gerd Hoffmann --- configure| 2 +- Makefile.objs| 1 + ui/Makefile.objs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure in

[Qemu-devel] [PATCH 08/12] configure: add X11 vars to config-host.mak

2018-02-21 Thread Gerd Hoffmann
Simplifies handling the X11 dependency, also makes ui/Makefile.objs more readable. Signed-off-by: Gerd Hoffmann --- configure| 10 -- ui/Makefile.objs | 5 - 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure b/configure index ed45a3c4dd..2934a4bcff 10

[Qemu-devel] [PATCH 12/12] curses: build as ui module

2018-02-21 Thread Gerd Hoffmann
Also drop curses libs from libs_softmmu. Add CURSES_{CFLAGS,LIBS} variables so we can use them for linking the curses module. Shared library dependencies dropped from qemu-system-*: libncursesw.so.5 => /lib64/libncursesw.so.5 libtinfo.so.5 => /lib64/libtinfo.so.5 Signed-off-by: Gerd Hoffmann -

[Qemu-devel] [PATCH 04/12] curses: switch over to new display registry

2018-02-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 12 ui/curses.c | 14 +- vl.c | 17 ++--- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index b97d9ccae4..4794c98c9a

[Qemu-devel] [PATCH 11/12] gtk: build as ui module

2018-02-21 Thread Gerd Hoffmann
Also drop gtk and vte libs from libs_softmmu, so the libs are not pulled in unless the gtk module actually gets loaded. Shared library dependencies dropped from qemu-system-*: libEGL.so.1 => /lib64/libEGL.so.1 libGL.so.1 => /lib64/libGL.so.1 libXcomposite.so.1 => /lib64/libXcomposite.so.1 libXcur

[Qemu-devel] [PATCH 07/12] console: add ui module loading support

2018-02-21 Thread Gerd Hoffmann
If a requested user interface is not available, try loading it as module, simliar to block layer modules. Needed to keep things working when followup patches start to build user interfaces as modules. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 1 + ui/console.c | 6 ++

[Qemu-devel] [PATCH 05/12] egl-headless: switch over to new display registry

2018-02-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 3 --- ui/egl-headless.c| 20 +++- vl.c | 12 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 4794c98c9a..1832c7eccf 100644

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 def

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 submodule and a separate patch to add

[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 Reitz --- qapi/block-core.json | 62

[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 b/qapi/block-core.json index d256cefc79..74b864d64e 100644 ---

[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 ++ 1 file changed

[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 100644 --- a/tests/

[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 in

[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 i

[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 --- include/block/block.h | 1 + block.c | 47 +++

[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 a/include/block/block.

[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 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 +--- 2 files changed, 74 insert

[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 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 --- include/qemu/opt

[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 +++ b/tests/test-qemu-opts

[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: Kev

[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 insertions(+), 45 deletions(-)

[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 in

[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 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 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 valu

[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 +--- 2 files changed, 74 insertion

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 Structure" requires the proximity > >> domain of a NVDIMM SPA range must ma

[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 insertions(+), 75 deletions(-)

[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 1 file cha

[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 8474b0ba11..27fa11b473 100644 --- a/bloc

[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. Signed-off-b

[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(+), 8 deletions(-) diff --git a/block/fi

[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 deletions(-) diff --git a

[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 oth

[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 insertions(+) create mode 100755 tests/qemu-iote

[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 +- 1 file changed,

  1   2   3   >