[PATCH v4 21/37] sm501: make SerialMM a child, export chardev property

2019-11-20 Thread Marc-André Lureau
Embed the SerialMM sybus device, and re-export its "chardev" property. That way, we can get rid of PROP_PTR "chr-state" and better track devices relationship. Signed-off-by: Marc-André Lureau --- hw/display/sm501.c | 33 - hw/sh4/r2d.c | 2 +- 2 files chang

[PATCH v4 26/37] leon3: use qemu_irq framework instead of callback as property

2019-11-20 Thread Marc-André Lureau
"set_pin_in" property is used to define a callback mechanism where the device says "call the callback function, passing it an opaque cookie and a 32-bit value". We already have a generic mechanism for doing that, which is the qemu_irq. So we should just use that. Signed-off-by: Marc-André Lureau

[PATCH v4 24/37] etraxfs: remove PROP_PTR usage

2019-11-20 Thread Marc-André Lureau
etraxfs_dma_client are not Object, so can't be exposed to user with QOM path. Let's remove property usage and move the constructor to the .c unit, simplifying some code on the way. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell --- hw/net/etraxfs_eth.c | 44 +++

[PATCH v4 32/37] omap-intc: remove PROP_PTR

2019-11-20 Thread Marc-André Lureau
Since clocks are not QOM objects, replace PROP_PTR of clocks with setters methods. (in theory there should probably be different methods for omap1 & omap2 intc, but this is left as a future improvement) Reviewed-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/arm/omap1.c| 4

[PATCH v4 27/37] leon3: use qdev gpio facilities for the PIL

2019-11-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/sparc/leon3.c | 6 -- target/sparc/cpu.h | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index cac987373e..1a89d44e57 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -230,8 +230,10 @@ s

[PATCH v4 30/37] cris: improve passing PIC interrupt vector to the CPU

2019-11-20 Thread Marc-André Lureau
Instead of accessing cpu interrupt vector directly from PIC, send the vector value over the qemu_irq. Suggested-by: Peter Maydell Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell --- hw/cris/axis_dev88.c | 4 hw/intc/etraxfs_pic.c | 26 +- target/cris/

[PATCH v4 25/37] dp8393x: replace PROP_PTR with PROP_LINK

2019-11-20 Thread Marc-André Lureau
Link property is the correct way to pass a MemoryRegion to a device for DMA purposes. Sidenote: as a sysbus device, this remains non-usercreatable even though we can drop the specific flag here. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé ---

Re: [PATCH 6/6] iotests: Test committing to short backing file

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2019 17:03, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/274| 131 + > tests/qemu-iotests/274.out| 150 ++ > tests/qemu-iotests/group | 1 + > tests/qemu-iotests/iotests.py | 2 +

[PATCH v4 33/37] omap-i2c: remove PROP_PTR

2019-11-20 Thread Marc-André Lureau
Since clocks are not QOM objects, replace PROP_PTR of clocks with setters methods. Reviewed-by: Peter Maydell Reviewed-by: Corey Minyard Signed-off-by: Marc-André Lureau --- hw/arm/omap1.c| 2 +- hw/arm/omap2.c| 8 hw/i2c/omap_i2c.c | 19 --- incl

[PATCH v3 0/4] net/virtio: fixes for failover

2019-11-20 Thread Jens Freimann
This series fixes bugs found by coverity and one reported by David Gilbert. v2->v3: * change patch description and subject of patch 3/4 Jens Freimann (4): net/virtio: fix dev_unplug_pending net/virtio: return early when failover primary alread added net/virtio: fix re-plugging of primary d

[PATCH v4 28/37] qdev: use g_strcmp0() instead of open-coding it

2019-11-20 Thread Marc-André Lureau
Minor code simplification. Signed-off-by: Marc-André Lureau --- hw/core/qdev.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index cf1ba28fe3..c79befc865 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -394,11 +394,8 @@ static Name

[PATCH v4 34/37] omap-gpio: remove PROP_PTR

2019-11-20 Thread Marc-André Lureau
Since clocks are not QOM objects, replace PROP_PTR of clocks with setters methods. Move/adapt the existing TODO comment about a clock framework. Reviewed-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/arm/omap1.c| 2 +- hw/arm/omap2.c| 13 +++-- hw/gpio/omap

[PATCH v3 4/4] net/virtio: return error when device_opts arg is NULL

2019-11-20 Thread Jens Freimann
This fixes CID 1407222. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 565d

[PATCH v3 1/4] net/virtio: fix dev_unplug_pending

2019-11-20 Thread Jens Freimann
.dev_unplug_pending is set up by virtio-net code indepent of failover support was set for the device or not. This gives a wrong result when we check for existing primary devices in migration code. Fix this by actually calling dev_unplug_pending() instead of just checking if the function pointer wa

[PATCH v4 29/37] RFC: mips/cps: fix setting saar property

2019-11-20 Thread Marc-André Lureau
There is no "saar" property. Note: I haven't been able to test this code. Help welcome. May fix commit 043715d1e0fbb3e3411be3f898c5b77b7f90327a ("target/mips: Update ITU to utilize SAARI and SAAR CP0 registers") Cc: Aleksandar Markovic Signed-off-by: Marc-André Lureau --- hw/mips/cps.c | 2 +-

[PATCH v3 3/4] net/virtio: fix re-plugging of primary device

2019-11-20 Thread Jens Freimann
failover_replug_primary was returning true on failure which lead to re-plug not working when a migration failed. Fix this by returning success when hotplug worked. This is a bug that was missed in last round of testing but was tested succesfully with this version. Also make sure we don't pass NU

Re: [PATCH for-4.2? 0/6] block: Fix resize (extending) of short overlays

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2019 17:03, Kevin Wolf wrote: > Consider the following scenario where the overlay is shorter than its > backing file: > > base.qcow2: > overlay.qcow2: > > When resizing (extending) overlay.qcow2, the new blocks should not stay > unallocated and make the addition

[PATCH v4 35/37] qdev: remove PROP_MEMORY_REGION

2019-11-20 Thread Marc-André Lureau
PROP_MEMORY_REGION was a derivative of PROP_PTR, added in commit ed03d749f3f513b8fb0287757cfda2cb6825f063 (qdev: add MemoryRegion property) and thankfully no longer needed since commit 3eff40dbf44896a8180c86c84dbdefb2eb173fbe (hw/misc: Remove mmio_interface device). Signed-off-by: Marc-André Lurea

Re: [PATCH v3 2/4] net/virtio: return early when failover primary alread added

2019-11-20 Thread Michael S. Tsirkin
in case you repost: >Subject: Re: [PATCH v3 2/4] net/virtio: return early when failover primary >alread added s/alread/already/ On Wed, Nov 20, 2019 at 04:49:49PM +0100, Jens Freimann wrote: > Bail out when primary device was already added before. > This avoids printing a wrong warning message

Re: qcow2 preallocation and backing files

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2019 18:18, Alberto Garcia wrote: > On Wed 20 Nov 2019 01:27:53 PM CET, Vladimir Semeeausntsov-Ogievskiy wrote: > >> 3. Also, the latter way is inconsistent with discard. Discarded >> regions returns zeroes, not clusters from backing. I think discard and >> truncate should behave in the same

[PATCH v4 36/37] qdev: remove QDEV_PROP_PTR

2019-11-20 Thread Marc-André Lureau
No longer used in the tree. The comment about user_creatable is still quite relevant, but there is already a similar comment in qdev-core.h. Reviewed-by: Peter Maydell Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties.c| 18 -- include/hw/qdev-properties.h | 22 --

[PATCH v4 37/37] qdev/qom: remove some TODO limitations now that PROP_PTR is gone

2019-11-20 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/core/qdev.c | 8 qom/qom-qmp-cmds.c | 10 -- 2 files changed, 18 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index c79befc865..c7b3f0dec5 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -736,14 +736,6 @@ void qdev_pr

Re: [RFC v5 031/126] xen: introduce ERRP_AUTO_PROPAGATE

2019-11-20 Thread Anthony PERARD
On Fri, Oct 11, 2019 at 07:04:17PM +0300, Vladimir Sementsov-Ogievskiy wrote: > diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c > --- a/hw/block/xen-block.c > +++ b/hw/block/xen-block.c > @@ -915,15 +903,15 @@ static void xen_block_device_create(XenBackendInstance > *backend, > g

Re: [PATCH] RFC: CODING_STYLE: describe "self" variable convention

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 1:54 PM, Marc-André Lureau wrote: Following the discussion in thread "[PATCH v3 13/33] serial: start making SerialMM a sysbus device", I'd like to recommend the usage of "self" variable to reference to the OOP-style method instance, as commonly done in various languages and in GObject

[PATCH v3 2/4] net/virtio: return early when failover primary alread added

2019-11-20 Thread Jens Freimann
Bail out when primary device was already added before. This avoids printing a wrong warning message during reboot. Fixes: 9711cd0dfc3f ("net/virtio: add failover support") Signed-off-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 4 1 file changed, 4 insertions

Re: [PATCH v3 0/4] net/virtio: fixes for failover

2019-11-20 Thread Michael S. Tsirkin
On Wed, Nov 20, 2019 at 04:49:47PM +0100, Jens Freimann wrote: > This series fixes bugs found by coverity and one reported by David > Gilbert. Looks good. Jason can you merge this pls? > v2->v3: > * change patch description and subject of patch 3/4 > > Jens Freimann (4): > net/virtio: fix d

Re: [PATCH 6/6] iotests: Test committing to short backing file

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2019 17:03, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf Tested-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v4 10/37] serial: realize the serial device

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 4:24 PM, Marc-André Lureau wrote: Instead of calling serial_realize_core(), use the QDev realize callback. Signed-off-by: Marc-André Lureau --- hw/char/serial-isa.c | 2 +- hw/char/serial-pci-multi.c | 2 +- hw/char/serial-pci.c | 2 +- hw/char/serial.c |

Re: [PATCH 6/6] iotests: Test committing to short backing file

2019-11-20 Thread Kevin Wolf
Am 20.11.2019 um 16:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > 20.11.2019 17:03, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf > > --- > > tests/qemu-iotests/274| 131 + > > tests/qemu-iotests/274.out| 150 ++ > >

Re: [PATCH for-5.0 v5 10/23] ppc/pnv: Loop on the threads of the chip to find a matching NVT

2019-11-20 Thread Greg Kurz
On Fri, 15 Nov 2019 17:24:23 +0100 Cédric Le Goater wrote: > CPU_FOREACH() loops on all the CPUs of the machine which is incorrect. > Each XIVE Presenter should scan only the HW threads of the chip it > belongs to. > > Signed-off-by: Cédric Le Goater > --- > include/hw/ppc/pnv.h | 2 ++ > hw/

[PATCH for 4.2?] tests/vm/centos: fix centos build target

2019-11-20 Thread Alex Bennée
To be able to run the docker tests centos has here we have to install python3 as well as the basic tools. Signed-off-by: Alex Bennée --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/centos b/tests/vm/centos index 53976f1c4c9..b9e851f2d33 100755 ---

Re: [PATCH v4 17/37] mips: inline serial_init()

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 4:24 PM, Marc-André Lureau wrote: The function is specific to mipssim, let's inline it. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 16 hw/mips/mips_mipssim.c | 15 --- include/hw/char/serial.h | 2 -- 3 files changed, 12 inse

Re: [PATCH v4 16/37] serial: make SerialIO a sysbus device

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 4:24 PM, Marc-André Lureau wrote: Make serial IO a proper sysbus device, similar to serial MM. Signed-off-by: Marc-André Lureau --- hw/char/serial.c | 59 include/hw/char/serial.h | 13 +++-- 2 files changed, 59 insertions(+),

Re: [PATCH 1/6] block: bdrv_co_do_pwrite_zeroes: 64 bit 'bytes' parameter

2019-11-20 Thread Alberto Garcia
On Wed 20 Nov 2019 03:03:14 PM CET, Kevin Wolf wrote: > bdrv_co_do_pwrite_zeroes() can already cope with maximum request sizes > by calling the driver in a loop until everything is done. Make the small > remaining change that is necessary to let it accept a 64 bit byte count. > > Signed-off-by: Kev

Re: [PATCH v2] virtio-pci: disable vring processing when bus-mastering is disabled

2019-11-20 Thread Michael Roth
Quoting no-re...@patchew.org (2019-11-20 00:12:11) > Patchew URL: > https://patchew.org/QEMU/20191120005003.27035-1-mdr...@linux.vnet.ibm.com/ > > > > Hi, > > This series failed the docker-quick@centos7 build test. Please find the > testing commands and > their output below. If you have Docke

[PATCH 5/4] iotests: add commit top->base cases to 274

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/274 | 20 tests/qemu-iotests/274.out | 63 ++ 2 files changed, 83 insertions(+) diff --git a/te

Re: [PATCH v4 28/37] qdev: use g_strcmp0() instead of open-coding it

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 4:24 PM, Marc-André Lureau wrote: Minor code simplification. Signed-off-by: Marc-André Lureau --- hw/core/qdev.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index cf1ba28fe3..c79befc865 100644 --- a/hw/core/qdev.c +++

Re: [PATCH] RFC: CODING_STYLE: describe "self" variable convention

2019-11-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 11/20/19 1:54 PM, Marc-André Lureau wrote: >> Following the discussion in thread "[PATCH v3 13/33] serial: start >> making SerialMM a sysbus device", I'd like to recommend the usage of >> "self" variable to reference to the OOP-style method instance, as >> co

Re: [PATCH 6/6] iotests: Test committing to short backing file

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2019 19:11, Kevin Wolf wrote: > Am 20.11.2019 um 16:41 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 20.11.2019 17:03, Kevin Wolf wrote: >>> Signed-off-by: Kevin Wolf >>> --- >>>tests/qemu-iotests/274| 131 + >>>tests/qemu-iotests/274.out| 15

Re: [PATCH v4 30/37] cris: improve passing PIC interrupt vector to the CPU

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 4:24 PM, Marc-André Lureau wrote: Instead of accessing cpu interrupt vector directly from PIC, send the vector value over the qemu_irq. Suggested-by: Peter Maydell Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell --- hw/cris/axis_dev88.c | 4 hw/intc/etraxfs_p

Re: [PATCH v3 0/6] Make the qemu_logfile handle thread safe.

2019-11-20 Thread Alex Bennée
Robert Foley writes: > This patch adds thread safety to the qemu_logfile handle. This now > allows changing the logfile while logging is active, and also solves > the issue of a seg fault while changing the logfile. > > This patch adds use of RCU for handling the swap out of the > old qemu_log

Re: [PATCH] RFC: CODING_STYLE: describe "self" variable convention

2019-11-20 Thread Marc-André Lureau
Hi On Wed, Nov 20, 2019 at 8:05 PM Philippe Mathieu-Daudé wrote: > > On 11/20/19 1:54 PM, Marc-André Lureau wrote: > > Following the discussion in thread "[PATCH v3 13/33] serial: start > > making SerialMM a sysbus device", I'd like to recommend the usage of > > "self" variable to reference to th

Re: qcow2 preallocation and backing files

2019-11-20 Thread Alberto Garcia
On Wed 20 Nov 2019 04:58:38 PM CET, Vladimir Sementsov-Ogievskiy wrote: >> But then PREALLOC_MODE_OFF implies that the L2 metadata should be >> preallocated (all clusters should be QCOW2_CLUSTER_ZERO_PLAIN), at >> least when there is a backing file. > > Kevin proposed a fix that alters PREALLOC_MOD

Re: [PATCH] RFC: CODING_STYLE: describe "self" variable convention

2019-11-20 Thread Marc-André Lureau
Hi On Wed, Nov 20, 2019 at 8:25 PM Alex Bennée wrote: > > > Philippe Mathieu-Daudé writes: > > > On 11/20/19 1:54 PM, Marc-André Lureau wrote: > >> Following the discussion in thread "[PATCH v3 13/33] serial: start > >> making SerialMM a sysbus device", I'd like to recommend the usage of > >> "s

Re: [PATCH] Add minimal Hexagon target - First in a series of patches - linux-user changes + linux-user/hexagon + skeleton of target/hexagon - Files in target/hexagon/imported are from another project

2019-11-20 Thread Alex Bennée
Taylor Simpson writes: > Is there a precedent for this? I'm OK with DEBUG_HEX, but I assumed > reviewers wouldn't approve > #ifdef FIXME > #define DEBUG_HEX > #endif We are trying to phase out this style of #define as it's prone to bitrot. What you can do if define a debug helper like: #def

Re: [PATCH for 4.2?] tests/vm/centos: fix centos build target

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 5:14 PM, Alex Bennée wrote: To be able to run the docker tests centos has here we have to install python3 as well as the basic tools. Signed-off-by: Alex Bennée --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/centos b/tests/vm/cent

Re: [PATCH v4 06/37] serial: initial qom-ification

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 4:24 PM, Marc-André Lureau wrote: Make SerialState a device (the following patches will introduce IO/MM sysbus serial devices) None of the serial_{,mm}_init() callers actually free the returned value (even if they did, it would be quite harmless), so we can change the object allocati

Re: [PATCH v2] virtio-pci: disable vring processing when bus-mastering is disabled

2019-11-20 Thread Dr. David Alan Gilbert
* Michael Roth (mdr...@linux.vnet.ibm.com) wrote: > Quoting no-re...@patchew.org (2019-11-20 00:12:11) > > Patchew URL: > > https://patchew.org/QEMU/20191120005003.27035-1-mdr...@linux.vnet.ibm.com/ > > > > > > > > Hi, > > > > This series failed the docker-quick@centos7 build test. Please find

Re: [PATCH v4 06/37] serial: initial qom-ification

2019-11-20 Thread Marc-André Lureau
Hi On Wed, Nov 20, 2019 at 8:42 PM Philippe Mathieu-Daudé wrote: > > On 11/20/19 4:24 PM, Marc-André Lureau wrote: > > Make SerialState a device (the following patches will introduce IO/MM > > sysbus serial devices) > > > > None of the serial_{,mm}_init() callers actually free the returned > > va

Re: qcow2 preallocation and backing files

2019-11-20 Thread Kevin Wolf
Am 20.11.2019 um 16:58 hat Vladimir Sementsov-Ogievskiy geschrieben: > 20.11.2019 18:18, Alberto Garcia wrote: > > On Wed 20 Nov 2019 01:27:53 PM CET, Vladimir Semeeausntsov-Ogievskiy wrote: > > > >> 3. Also, the latter way is inconsistent with discard. Discarded > >> regions returns zeroes, not c

[PATCH for-4.2 1/2] i386: Add new versions of Skylake/Cascadelake/Icelake without TSX

2019-11-20 Thread Eduardo Habkost
One of the mitigation methods for TAA[1] is to disable TSX support on the host system. Linux added a mechanism to disable TSX globally through the kernel command line, and many Linux distributions now default to tsx=off. This makes existing CPU models that have HLE and RTM enabled not usable anym

[PATCH for-4.2 0/2] i386: Add new versions of Skylake/Cascadelake/Icelake without TSX

2019-11-20 Thread Eduardo Habkost
Systems with TSX disabled due to TAA now make existing CPU models not usable. Add new versions with TSX disabled so people can still use them. See individual patch commit messages for additional details. I'm not 100% sure about the new -noTSX aliases, so I'm adding them in a separate patch. Edu

[PATCH for-4.2 2/2] i386: Add -noTSX aliases for hle=off, rtm=off CPU models

2019-11-20 Thread Eduardo Habkost
We have been trying to avoid adding new aliases for CPU model versions, but in the case of changes in defaults introduced by the TAA mitigation patches, the aliases might help avoid user confusion when applying host software updates. Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 5 +

Re: [PATCH] RFC: CODING_STYLE: describe "self" variable convention

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/20/19 5:35 PM, Marc-André Lureau wrote: Hi On Wed, Nov 20, 2019 at 8:05 PM Philippe Mathieu-Daudé wrote: On 11/20/19 1:54 PM, Marc-André Lureau wrote: Following the discussion in thread "[PATCH v3 13/33] serial: start making SerialMM a sysbus device", I'd like to recommend the usage of

Re: [PATCH] RFC: CODING_STYLE: describe "self" variable convention

2019-11-20 Thread Daniel P . Berrangé
On Wed, Nov 20, 2019 at 04:54:44PM +0400, Marc-André Lureau wrote: > Following the discussion in thread "[PATCH v3 13/33] serial: start > making SerialMM a sysbus device", I'd like to recommend the usage of > "self" variable to reference to the OOP-style method instance, as > commonly done in vario

[PATCH] pseries: disable migration-test if /dev/kvm cannot be used

2019-11-20 Thread Laurent Vivier
On ppc64, migration-test only works with kvm_hv, and we already have a check to verify the module is loaded. kvm_hv module can be loaded in memory and /sys/module/kvm_hv exists, but on some systems (like build systems) /dev/kvm can be missing (by administrators choice). And as kvm_hv exists test-

Re: [PATCH] Add minimal Hexagon target - First in a series of patches - linux-user changes + linux-user/hexagon + skeleton of target/hexagon - Files in target/hexagon/imported are from another project

2019-11-20 Thread Philippe Mathieu-Daudé
On 11/19/19 7:13 PM, Laurent Vivier wrote: Le 19/11/2019 à 18:22, Taylor Simpson a écrit : Thanks for all the feedback on the patch. I'll summarize my TODO list here. Please let me know if there's anything I missed. - Add a README file in the imported directory to make it clear that the code

Re: [PATCH v4 28/37] qdev: use g_strcmp0() instead of open-coding it

2019-11-20 Thread Eduardo Habkost
On Wed, Nov 20, 2019 at 05:25:47PM +0100, Philippe Mathieu-Daudé wrote: > On 11/20/19 4:24 PM, Marc-André Lureau wrote: > > Minor code simplification. > > > > Signed-off-by: Marc-André Lureau > > --- > > hw/core/qdev.c | 7 ++- > > 1 file changed, 2 insertions(+), 5 deletions(-) > > > > d

Re: [PATCH for-5.0 v5 11/23] ppc/pnv: Introduce a pnv_xive_is_cpu_enabled() helper

2019-11-20 Thread Greg Kurz
On Fri, 15 Nov 2019 17:24:24 +0100 Cédric Le Goater wrote: > and use this helper to exclude CPUs which are not enabled in the XIVE > controller. > > Signed-off-by: Cédric Le Goater > --- > hw/intc/pnv_xive.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/hw/intc/

Re: [PATCH for-5.0 v5 12/23] ppc/xive: Introduce a XiveFabric interface

2019-11-20 Thread Greg Kurz
On Fri, 15 Nov 2019 17:24:25 +0100 Cédric Le Goater wrote: > The XiveFabric QOM interface acts as the PowerBUS interface between > the interrupt controller and the system and should be implemented by > the QEMU machine. On HW, the XIVE sub-engine is responsible for the > communication with the ot

Re: [PATCH] Fix incorrect int->float conversions caught by clang -Wimplicit-int-float-conversion

2019-11-20 Thread Fangrui Song
On 2019-11-20, Juan Quintela wrote: Markus Armbruster wrote: Fangrui Song writes: The warning will be enabled by default in clang 10. It is not available for clang <= 9. qemu/migration/migration.c:2038:24: error: implicit conversion from 'long' to 'double' changes value from 922337203685477

Re: [PATCH] Add minimal Hexagon target - First in a series of patches - linux-user changes + linux-user/hexagon + skeleton of target/hexagon - Files in target/hexagon/imported are from another project

2019-11-20 Thread Alex Bennée
Aleksandar Markovic writes: > On Tuesday, November 19, 2019, Richard Henderson < > richard.hender...@linaro.org> wrote: > >> On 11/19/19 6:22 PM, Taylor Simpson wrote: >> > - Laurent suggested I split the patch into two parts: linux-user and >> target/hexagon. If I do that, which one should co

PCI memory sync question (kvm,dpdk,e1000,packet stalled)

2019-11-20 Thread ASM
Hi folks! I trying solve the problem, with packets stopping (e1000,tap,kvm). My studies led to the following: 1. From flatview_write_continue() I see, what e1000 writes the number "7" to the STAT register. 2. The driver from target OS reads STAT register with number "7" and writes to the register

Re: [PATCH] RFC: CODING_STYLE: describe "self" variable convention

2019-11-20 Thread Marc-André Lureau
Hi On Wed, Nov 20, 2019 at 9:05 PM Daniel P. Berrangé wrote: > > On Wed, Nov 20, 2019 at 04:54:44PM +0400, Marc-André Lureau wrote: > > Following the discussion in thread "[PATCH v3 13/33] serial: start > > making SerialMM a sysbus device", I'd like to recommend the usage of > > "self" variable t

[PATCH] target/i386: add VMX features to named CPU models

2019-11-20 Thread Paolo Bonzini
This allows using "-cpu Haswell,+vmx", which we did not really want to support in QEMU but was produced by Libvirt when using the "host-model" CPU model. This was produced from the output of scripts/kvm/vmxcap using the following very ugly Python script: bits = { 'INS/OUTS instruc

Re: [PATCH for-4.2 1/2] i386: Add new versions of Skylake/Cascadelake/Icelake without TSX

2019-11-20 Thread Paolo Bonzini
On 20/11/19 17:49, Eduardo Habkost wrote: > One of the mitigation methods for TAA[1] is to disable TSX > support on the host system. Linux added a mechanism to disable > TSX globally through the kernel command line, and many Linux > distributions now default to tsx=off. This makes existing CPU >

Re: [PATCH] pseries: disable migration-test if /dev/kvm cannot be used

2019-11-20 Thread Thomas Huth
On 20/11/2019 18.09, Laurent Vivier wrote: > On ppc64, migration-test only works with kvm_hv, and we already > have a check to verify the module is loaded. > > kvm_hv module can be loaded in memory and /sys/module/kvm_hv exists, > but on some systems (like build systems) /dev/kvm can be missing >

Re: [PATCH for-5.0 v5 13/23] ppc/pnv: Implement the XiveFabric interface

2019-11-20 Thread Greg Kurz
On Fri, 15 Nov 2019 17:24:26 +0100 Cédric Le Goater wrote: > The CAM line matching on the PowerNV machine now scans all chips of > the system and all CPUs of a chip to find a dispatched NVT in the > thread contexts. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > hw/ppc/p

Re: qcow2 preallocation and backing files

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2019 19:46, Kevin Wolf wrote: > Am 20.11.2019 um 16:58 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 20.11.2019 18:18, Alberto Garcia wrote: >>> On Wed 20 Nov 2019 01:27:53 PM CET, Vladimir Semeeausntsov-Ogievskiy wrote: >>> 3. Also, the latter way is inconsistent with discard. Discar

Re: [PATCH for 4.2?] tests/vm/centos: fix centos build target

2019-11-20 Thread Wainer dos Santos Moschetta
On 11/20/19 2:14 PM, Alex Bennée wrote: To be able to run the docker tests centos has here we have to install python3 as well as the basic tools. Signed-off-by: Alex Bennée --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Wainer dos Santos Moschetta

Re: [PATCH for-5.0 v5 14/23] ppc/spapr: Implement the XiveFabric interface

2019-11-20 Thread Greg Kurz
On Fri, 15 Nov 2019 17:24:27 +0100 Cédric Le Goater wrote: > The CAM line matching sequence in the pseries machine does not change > much apart from the use of the new QOM interfaces. There is an extra > indirection because of the sPAPR IRQ backend of the machine. Only the > XIVE backend implemen

Re: [PATCH] target/i386: add VMX features to named CPU models

2019-11-20 Thread Paolo Bonzini
On 20/11/19 18:50, Daniel P. Berrangé wrote: > On Wed, Nov 20, 2019 at 06:37:53PM +0100, Paolo Bonzini wrote: >> This allows using "-cpu Haswell,+vmx", which we did not really want to >> support in QEMU but was produced by Libvirt when using the "host-model" >> CPU model. > Can you say what is curr

Re: [PATCH] target/i386: add VMX features to named CPU models

2019-11-20 Thread Daniel P . Berrangé
On Wed, Nov 20, 2019 at 06:37:53PM +0100, Paolo Bonzini wrote: > This allows using "-cpu Haswell,+vmx", which we did not really want to > support in QEMU but was produced by Libvirt when using the "host-model" > CPU model. Can you say what is currently broken ? If I launch my current QEMU (I have

Re: [PATCH 2/6] block: truncate: Don't make backing file data visible

2019-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2019 17:03, Kevin Wolf wrote: > When extending the size of an image that has a backing file larger than > its old size, make sure that the backing file data doesn't become > visible in the guest, but the added area is properly zeroed out. > > The old behaviour made a difference in 'block_res

Re: [PATCH] target/i386: add VMX features to named CPU models

2019-11-20 Thread Daniel P . Berrangé
On Wed, Nov 20, 2019 at 06:57:20PM +0100, Paolo Bonzini wrote: > On 20/11/19 18:50, Daniel P. Berrangé wrote: > > On Wed, Nov 20, 2019 at 06:37:53PM +0100, Paolo Bonzini wrote: > >> This allows using "-cpu Haswell,+vmx", which we did not really want to > >> support in QEMU but was produced by Libvi

Re: [RFC][PATCH 2/3] docs/specs: Add specification of ivshmem device revision 2

2019-11-20 Thread Jan Kiszka
On 12.11.19 09:04, Michael S. Tsirkin wrote: On Mon, Nov 11, 2019 at 05:38:29PM +0100, Jan Kiszka wrote: On 11.11.19 17:11, Michael S. Tsirkin wrote: On Mon, Nov 11, 2019 at 03:27:43PM +, Daniel P. Berrangé wrote: On Mon, Nov 11, 2019 at 10:08:20AM -0500, Michael S. Tsirkin wrote: On Mon,

Re: [PATCH] target/i386: add VMX features to named CPU models

2019-11-20 Thread Kashyap Chamarthy
On Wed, Nov 20, 2019 at 06:57:20PM +0100, Paolo Bonzini wrote: > On 20/11/19 18:50, Daniel P. Berrangé wrote: > > On Wed, Nov 20, 2019 at 06:37:53PM +0100, Paolo Bonzini wrote: > >> This allows using "-cpu Haswell,+vmx", which we did not really want to > >> support in QEMU but was produced by Libvi

[PATCH 2/6] tests/Makefile.include: Fix missing test-qapi-emit-events.[ch]

2019-11-20 Thread Markus Armbruster
Commit 5d75648b56 "qapi: Generate QAPIEvent stuff into separate files" added tests/test-qapi-emit-events.[ch] to the set of generated files, but neglected to update tests/.gitignore and tests/Makefile.include. Commit a0af8cee3c "tests/.gitignore: ignore test-qapi-emit-events.[ch] for in-tree builds

[PATCH 4/6] qapi: Proper intermediate representation for modules

2019-11-20 Thread Markus Armbruster
Modules are represented only by their names so far. Introduce class QAPISchemaModule. So far, it merely wraps the name. The next patch will put it to more interesting use. Once again, arrays spice up the patch a bit. For any other type, @info points to the definition, which lets us map from @i

[PATCH 6/6] qapi: Simplify QAPISchemaModularCVisitor

2019-11-20 Thread Markus Armbruster
Since the previous commit, QAPISchemaVisitor.visit_module() is called just once. Simplify QAPISchemaModularCVisitor accordingly. Signed-off-by: Markus Armbruster --- scripts/qapi/commands.py | 2 +- scripts/qapi/events.py | 2 +- scripts/qapi/gen.py | 28 ++-- s

[PATCH 3/6] qapi: Generate command registration stuff into separate files

2019-11-20 Thread Markus Armbruster
Having to include qapi-commands.h just for qmp_init_marshal() is suboptimal. Generate it into separate files. This lets monitor/misc.c, qga/main.c, and the generated qapi-commands-FOO.h include less. Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.txt | 19 --- Ma

[PATCH 0/6] qapi: Module fixes and cleanups

2019-11-20 Thread Markus Armbruster
Kevin recently posted a minimally invasive fix for empty QAPI modules[*]. This is my attempt at a fix that also addresses the design weakness that led to the bug. Markus Armbruster (6): qapi: Tweak "command returns a nice type" check for clarity tests/Makefile.include: Fix missing test-qapi-e

[PATCH 1/6] qapi: Tweak "command returns a nice type" check for clarity

2019-11-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi/schema.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index cf0045f34e..cfb574c85d 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -711,10 +711,11

[PATCH 5/6] qapi: Fix code generation for empty modules

2019-11-20 Thread Markus Armbruster
When a sub-module doesn't contain any definitions, we don't generate code for it, but we do generate the #include. We generate code only for modules that get visited. QAPISchema.visit() visits only modules that have definitions. It can visit modules multiple times. Clean this up as follows. Col

Re: [PATCH for-5.0 v5 15/23] ppc/xive: Use the XiveFabric and XivePresenter interfaces

2019-11-20 Thread Greg Kurz
On Fri, 15 Nov 2019 17:24:28 +0100 Cédric Le Goater wrote: > Now that the machines have handlers implementing the XiveFabric and > XivePresenter interfaces, remove xive_presenter_match() and make use > of the 'match_nvt' handler of the machine. > > Signed-off-by: Cédric Le Goater > --- > hw/in

Re: [PATCH v9 QEMU 12/15] vfio: Add load state functions to SaveVMHandlers

2019-11-20 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Sequence during _RESUMING device state: > While data for this device is available, repeat below steps: > a. read data_offset from where user application should write data. > b. write data of data_size to migration region from data_offset. > c. write

Re: [PATCH] pseries: disable migration-test if /dev/kvm cannot be used

2019-11-20 Thread Greg Kurz
On Wed, 20 Nov 2019 18:09:55 +0100 Laurent Vivier wrote: > On ppc64, migration-test only works with kvm_hv, and we already > have a check to verify the module is loaded. > > kvm_hv module can be loaded in memory and /sys/module/kvm_hv exists, > but on some systems (like build systems) /dev/kvm c

Re: [PATCH for-4.2 1/2] i386: Add new versions of Skylake/Cascadelake/Icelake without TSX

2019-11-20 Thread Eduardo Habkost
On Wed, Nov 20, 2019 at 06:40:06PM +0100, Paolo Bonzini wrote: > On 20/11/19 17:49, Eduardo Habkost wrote: > > One of the mitigation methods for TAA[1] is to disable TSX > > support on the host system. Linux added a mechanism to disable > > TSX globally through the kernel command line, and many Li

[PATCH for-4.2? v2 0/6] block: Fix resize (extending) of short overlays

2019-11-20 Thread Kevin Wolf
See patch 2 for the description of the bug fixed. v2: - Switched order of bs->total_sectors update and zero write [Vladimir] - Fixed coding style [Vladimir] - Changed the commit message to contain what was in the cover letter - Test all preallocation modes - Test allocation status with qemu-io 'ma

[PATCH v2 5/6] iotests: Support job-complete in run_job()

2019-11-20 Thread Kevin Wolf
Automatically complete jobs that have a 'ready' state and need an explicit job-complete. Without this, run_job() would hang for such jobs. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 2 ++ 1 file changed, 2 ins

[PATCH v2 1/6] block: bdrv_co_do_pwrite_zeroes: 64 bit 'bytes' parameter

2019-11-20 Thread Kevin Wolf
bdrv_co_do_pwrite_zeroes() can already cope with maximum request sizes by calling the driver in a loop until everything is done. Make the small remaining change that is necessary to let it accept a 64 bit byte count. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Vladimir Sements

[PATCH v2 2/6] block: truncate: Don't make backing file data visible

2019-11-20 Thread Kevin Wolf
When extending the size of an image that has a backing file larger than its old size, make sure that the backing file data doesn't become visible in the guest, but the added area is properly zeroed out. Consider the following scenario where the overlay is shorter than its backing file: base.q

[PATCH v2 3/6] iotests: Add qemu_io_log()

2019-11-20 Thread Kevin Wolf
Add a function that runs qemu-io and logs the output with the appropriate filters applied. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/i

[PATCH v2 4/6] iotests: Fix timeout in run_job()

2019-11-20 Thread Kevin Wolf
run_job() accepts a wait parameter for a timeout, but it doesn't actually use it. The only thing that is missing is passing it to events_wait(), so do that now. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 2 +-

Re: [PATCH] target/i386: add VMX features to named CPU models

2019-11-20 Thread Eduardo Habkost
On Wed, Nov 20, 2019 at 06:37:53PM +0100, Paolo Bonzini wrote: > This allows using "-cpu Haswell,+vmx", which we did not really want to > support in QEMU but was produced by Libvirt when using the "host-model" > CPU model. I understand guest ABI compatibility is not a concern, but I don't remember

[PATCH v2 6/6] iotests: Test committing to short backing file

2019-11-20 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/274| 141 + tests/qemu-iotests/274.out| 227 ++ tests/qemu-iotests/group | 1 + tests/qemu-iotests/iotests.py | 2 +- 4 files changed, 370 insertions(+), 1 deletion(-) create

Re: [PATCH v3 07/33] serial: register vmsd with DeviceClass

2019-11-20 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > On Tue, Nov 19, 2019 at 2:35 PM Peter Maydell > wrote: > > > > On Tue, 19 Nov 2019 at 10:23, Marc-André Lureau > > wrote: > > > On Mon, Nov 18, 2019 at 6:22 PM Peter Maydell > > > wrote: > > > > Did you test whether migration still work

[PATCH 0/9] RFC: [for 5.0]: HMP monitor handlers cleanups

2019-11-20 Thread Maxim Levitsky
This patch series is bunch of cleanups to the hmp monitor code. This series only touched blockdev related hmp handlers. No functional changes expected other that light error message changes by the last patch. This was inspired by this bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1719169

[PATCH 2/9] monitor: rename device-hotplug.c to blockdev-hmp-cmds.c

2019-11-20 Thread Maxim Levitsky
These days device-hotplug.c only contains the hmp_drive_add In the next patch, rest of hmp_drive* functions will be moved there. Signed-off-by: Maxim Levitsky --- MAINTAINERS | 1 + Makefile.objs | 4 ++-- device-hotplug.c => blockdev-hmp-cmd

[PATCH 3/9] monitor: move hmp_drive_del and hmp_commit to blockdev-hmp-cmds.c

2019-11-20 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- blockdev-hmp-cmds.c | 97 - blockdev.c | 95 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/blockdev-hmp-cmds.c b/blockdev-hmp-cmds.c index 21ff6fa

<    1   2   3   4   >