Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-02 Thread David Gibson
On Wed, Sep 26, 2018 at 11:42:13AM +0200, David Hildenbrand wrote: > The unplug and unplug_request handlers are special: They are not > executed when unrealizing a device, but rather trigger the removal of a > device from device_del() via object_unparent() - to effectively > unrealize a device. >

Re: [Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-10-02 Thread dovgaluk
Can you try applying this patch? https://www.mail-archive.com/qemu-devel@nongnu.org/msg563798.html I also encountered the problems with x86_64 replaying and found the misprint in the code which was fixed later, than sending the series to the mailing list. Pavel Dovgalyuk Artem Pisarenko пис

Re: [Qemu-devel] [PATCH] hw/pci-host/ppce500: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Cédric Le Goater
On 10/2/18 11:53 PM, Philippe Mathieu-Daudé wrote: > Move from the legacy SysBusDevice::init method to using DeviceState::realize. > > Signed-off-by: Philippe Mathieu-Daudé That patch was already reviewed by you and merged by David :) C. > --- > hw/pci-host/ppce500.c | 14 ++ > 1

Re: [Qemu-devel] [RFC PATCH 0/3] acceptance tests: Test firmware checking debug console output

2018-10-02 Thread Cleber Rosa
On 9/28/18 6:51 AM, Laszlo Ersek wrote: > Hi Phil, > > (+Daniel, +Kashyap) > > On 09/28/18 02:30, Philippe Mathieu-Daudé wrote: >> Hi, >> >> This RFC series add simple acceptance tests which boot SeaBIOS and >> EDK2 on Q35 and virt/aarch64. >> >> It is more of a proof of concept (to motivate t

Re: [Qemu-devel] [RFC PATCH 3/3] acceptance tests: Add EDK2 AAVMF boot and console checking test

2018-10-02 Thread Cleber Rosa
On 9/27/18 8:30 PM, Philippe Mathieu-Daudé wrote: > This test boots EDK2 AAVMF and check the debug console (PL011) reports enough > information on the initialized devices. > > Example: > > $ avocado --show=console run tests/acceptance/boot_firmware.py > --cit-parameter-file aarch64.cit >

Re: [Qemu-devel] [RFC PATCH 2/3] acceptance tests: Add EDK2 OVMF boot and debug console checking test

2018-10-02 Thread Cleber Rosa
On 9/27/18 8:30 PM, Philippe Mathieu-Daudé wrote: > This test boots OVMF and check the debug console (I/O port on the ISA bus) > report enough information on the initialized devices. > > Example: > > $ avocado --show=QMP,serial run tests/acceptance/boot_firmware.py > > Signed-off-by: Phil

Re: [Qemu-devel] [RFC PATCH 1/3] acceptance tests: Add SeaBIOS boot and debug console checking test

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/3/18 1:26 AM, Cleber Rosa wrote: [...] >> +:avocado: enable >> +:avocado: tags=x86_64,quick > > Eventually, we'll need to have a predictable definition to, at least, > some of the tags. I mean, I agree this *should* be a quick by test > (considering it's a functional test), but even

Re: [Qemu-devel] [PATCH v5 1/9] hw/core/clock-port: introduce clock port objects

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 4:24 PM, Damien Hedde wrote: > Introduce clock port objects: ClockIn and ClockOut. > > Theses ports may be used to distribute a clock from a object to several > other objects. The ClockIn object contains the current state of the > clock: the frequency. > > A ClockIn may be connected to

Re: [Qemu-devel] [PATCH v5 5/9] docs/clocks: add device's clock documentation

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 4:24 PM, Damien Hedde wrote: > Add the documentation about the clock inputs and outputs in devices. > > This is based on the original work of Frederic Konrad. > > Signed-off-by: Damien Hedde > --- > docs/devel/clock.txt | 163 +++ > 1 file chan

Re: [Qemu-devel] [PATCH v5 2/9] qdev: add clock input&output support to devices.

2018-10-02 Thread Philippe Mathieu-Daudé
Hi Damien, On 10/2/18 4:24 PM, Damien Hedde wrote: > Add functions to easily add input or output clocks to a device. > The clock port objects are added as children of the device. > > A function allows to connect two clocks together. > It should be called by some toplevel to make a connection betw

[Qemu-devel] [PATCH v2] bitmap: Update count after a merge

2018-10-02 Thread John Snow
From: Eric Blake We need an accurate count of the number of bits set in a bitmap after a merge. In particular, since the merge operation short-circuits a merge from an empty source, if you have bitmaps A, B, and C where B started empty, then merge C into B, and B into A, an inaccurate count meant

Re: [Qemu-devel] [PATCH v5 9/9] hw/arm/xilinx_zynq: connect uart clocks to slcr

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 4:24 PM, Damien Hedde wrote: > Add the connection between the slcr's output clocks and the uarts inputs. > > Signed-off-by: Damien Hedde > --- > hw/arm/xilinx_zynq.c | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/hw/arm/xilinx_zynq.c b/hw/

[Qemu-devel] [RFC PATCH 1/3] acceptance tests: Add SeaBIOS boot and debug console checking test

2018-10-02 Thread Cleber Rosa
On 9/27/18 8:30 PM, Philippe Mathieu-Daudé wrote: > This test boots SeaBIOS and check the debug console (I/O port on the ISA bus) > reports enough information on the initialized devices. > > Example: > > $ avocado --show=debugcon run tests/acceptance/boot_firmware.py > > Signed-off-by: Ph

Re: [Qemu-devel] [PATCH v5 8/9] hw/char/cadence_uart: add clock support

2018-10-02 Thread Philippe Mathieu-Daudé
Hi Damien, On 10/2/18 4:24 PM, Damien Hedde wrote: > Add bus interface and uart reference clock inputs. > > Note: it is hard to find out from the doc what is the behavior when only one > of the clock is disabled. > > The implemented behaviour is that register access needs both clock being > act

[Qemu-devel] [PATCH v4 3/6] block/dirty-bitmaps: allow clear on disabled bitmaps

2018-10-02 Thread John Snow
Similarly to merge, it's OK to allow clear operations on disabled bitmaps, as this condition only means that they are not recording new writes. We are free to clear it if the user requests it. Signed-off-by: John Snow --- block/dirty-bitmap.c | 1 - blockdev.c | 8 2 files cha

[Qemu-devel] [PATCH v4 1/6] block/dirty-bitmaps: add user_locked status checker

2018-10-02 Thread John Snow
Instead of both frozen and qmp_locked checks, wrap it into one check. frozen implies the bitmap is split in two (for backup), and shouldn't be modified. qmp_locked implies it's being used by another operation, like being exported over NBD. In both cases it means we shouldn't allow the user to modif

[Qemu-devel] [PATCH v4 4/6] block/dirty-bitmaps: prohibit enable/disable on locked/frozen bitmaps

2018-10-02 Thread John Snow
We're not being consistent about this. If it's in use by an operation, the user should not be able to change the behavior of that bitmap. Signed-off-by: John Snow --- blockdev.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.

[Qemu-devel] [PATCH v4 2/6] block/dirty-bitmaps: fix merge permissions

2018-10-02 Thread John Snow
In prior commits that made merge transactionable, we removed the assertion that merge cannot operate on disabled bitmaps. In addition, we want to make sure that we are prohibiting merges to "locked" bitmaps. Use the new user_locked function to check. Reported-by: Eric Blake Signed-off-by: John S

[Qemu-devel] [PATCH v4 0/6] dirty-bitmaps: fix QMP command permissions

2018-10-02 Thread John Snow
based on: jsnow/bitmaps staging branch This series builds on a previous standalone patch and adjusts the permission for all (or most) of the QMP bitmap commands. V4: - Replace "in-use" with "in use" - Replace "user_modifiable" version with "user_locked" - Remove more usages of frozen-and-or-lo

[Qemu-devel] [PATCH v4 5/6] block/backup: prohibit backup from using in use bitmaps

2018-10-02 Thread John Snow
If the bitmap is frozen, we shouldn't touch it. Signed-off-by: John Snow --- blockdev.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index d0febfca79..098d4c337f 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3512,10 +3512,10 @@ static Bl

[Qemu-devel] [PATCH v4 6/6] nbd: forbid use of frozen bitmaps

2018-10-02 Thread John Snow
Whether it's "locked" or "frozen", it's in use and should not be allowed for the purposes of this operation. Signed-off-by: John Snow --- nbd/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index c3dd402b45..940b7aa0cd 100644 --- a/nbd

Re: [Qemu-devel] [PATCH v5 7/9] hw/misc/zynq_slcr: add clock generation for uarts

2018-10-02 Thread Philippe Mathieu-Daudé
Hi Damien, On 10/2/18 4:24 PM, Damien Hedde wrote: > Add 2 clock outputs for each uart (uart0 & 1): > + the reference clock > + the bus interface clock > > The clock frequencies are computed using the internal pll & uart configuration > registers. > > All clocks depend on the main input clock (p

Re: [Qemu-devel] [PATCH v4 0/6] dirty-bitmaps: fix QMP command permissions

2018-10-02 Thread John Snow
On 10/02/2018 07:02 PM, John Snow wrote: > based on: jsnow/bitmaps staging branch > > This series builds on a previous standalone patch and adjusts > the permission for all (or most) of the QMP bitmap commands. > > V4: > - Replace "in-use" with "in use" > - Replace "user_modifiable" version

Re: [Qemu-devel] [PATCH v5 3/9] qdev-monitor: print the device's clock with info qtree

2018-10-02 Thread Philippe Mathieu-Daudé
Hi Damien, On 10/2/18 4:24 PM, Damien Hedde wrote: > This prints the clocks attached to a DeviceState when using "info qtree" > monitor > command. For every clock, it displays the direction, the name and if the > clock is forwarded. For input clock, it displays also the frequency. What would als

[Qemu-devel] [PATCH] hw/pci-host/ppce500: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/ppce500.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index eb75e080fc..b8f8c11

Re: [Qemu-devel] [PATCH] softfloat: Fix division

2018-10-02 Thread Emilio G. Cota
On Tue, Oct 02, 2018 at 14:53:47 -0500, Richard Henderson wrote: > The __udiv_qrnnd primitive that we nicked from gmp requires its > inputs to be normalized. We were not doing that. Because the > inputs are nearly normalized already, finishing that is trivial. > Inline div128to64 into its one use

[Qemu-devel] [PATCH 2/3] cputlb: serialize tlb updates with env->tlb_lock

2018-10-02 Thread Emilio G. Cota
Currently we rely on atomic operations for cross-CPU invalidations. There are two cases that these atomics miss: cross-CPU invalidations can race with either (1) vCPU threads flushing their TLB, which happens via memset, or (2) vCPUs calling tlb_reset_dirty on their TLB, which updates .addr_write w

[Qemu-devel] [PATCH 0/3] per-TLB lock

2018-10-02 Thread Emilio G. Cota
This series introduces a per-TLB lock. This removes existing UB (e.g. memset racing with cmpxchg on another thread while flushing), and in my opinion makes the TLB code simpler to understand. I had a bit of trouble finding the best place to initialize the mutex, since it has to be called before tl

[Qemu-devel] [PATCH 3/3] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-02 Thread Emilio G. Cota
Updates can come from other threads, so readers that do not take tlb_lock must use atomic_read to avoid undefined behaviour. Signed-off-by: Emilio G. Cota --- accel/tcg/softmmu_template.h | 16 ++-- include/exec/cpu_ldst.h | 2 +- include/exec/cpu_ldst_template.h | 2 +

[Qemu-devel] [PATCH v2 12/12] hw/mips/malta: Remove unuseful code

2018-10-02 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/mips/mips_malta.c | 13 - 1 file changed, 13 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 40041d5ec0..89ca6db94b 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1422

Re: [Qemu-devel] [PATCH 11/15] hw/sparc/sun4m: Replace 'empty_slot' by 'unimplemented_device'

2018-10-02 Thread Philippe Mathieu-Daudé
Hi Artyom, On 10/2/18 10:14 AM, Artyom Tarasenko wrote: > Hi Philippe, > > On Tue, Oct 2, 2018 at 12:10 AM Philippe Mathieu-Daudé > wrote: >> >> The TYPE_EMPTY_SLOT and TYPE_UNIMPLEMENTED_DEVICE are identical devices, >> however the later use more recent APIs and is more widely used. >> >> Repl

[Qemu-devel] [PATCH 1/3] exec: introduce tlb_init

2018-10-02 Thread Emilio G. Cota
Paves the way for the addition of a per-TLB lock. Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 8 accel/tcg/cputlb.c | 4 exec.c | 1 + 3 files changed, 13 insertions(+) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 5f781

[Qemu-devel] [PATCH v2 09/12] hw/sparc64/niagara: Model the I/O Bridge with the 'unimplemented_device'

2018-10-02 Thread Philippe Mathieu-Daudé
Since the I/O Bridge device is not implemented, Use the TYPE_UNIMPLEMENTED_DEVICE which suits better: if the user asks for 'unimp' warnings via the -d option then all accesses will generate logging. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko --- default-configs/sparc64

[Qemu-devel] [PATCH v2 11/12] hw/hppa/dino: Remove unuseful code

2018-10-02 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/hppa/dino.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index 564b938e3a..31e09942b5 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -488,17 +488,10 @@ PCIBus *dino_init(Memory

[Qemu-devel] [PATCH v2 10/12] hw/alpha/typhoon: Remove unuseful code

2018-10-02 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/alpha/typhoon.c | 13 - 1 file changed, 13 deletions(-) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index d74b5b55e1..8004afe45b 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -932,23 +932,10

[Qemu-devel] [PATCH v2 07/12] hw/mips/gt64xxx_pci: Convert gt64120_reset() function into Device reset method

2018-10-02 Thread Philippe Mathieu-Daudé
Convert the gt64120_reset() function into a proper Device reset method. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Cédric Le Goater --- hw/mips/gt64xxx_pci.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/hw/mips/gt64xx

[Qemu-devel] [PATCH v2 08/12] hw/mips/gt64xxx_pci: Mark as bridge device

2018-10-02 Thread Philippe Mathieu-Daudé
The gt64120 is currently listed as uncategorized device. Mark it as bridge device. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Cédric Le Goater --- hw/mips/gt64xxx_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xx

[Qemu-devel] [PATCH v2 02/12] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events

2018-10-02 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko Reviewed-by: Cédric Le Goater --- hw/timer/sun4v-rtc.c | 13 +++-- hw/timer/trace-events | 4 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/timer/sun4v-rtc.c b/hw/timer/sun4v-rtc.c index 3105

[Qemu-devel] [PATCH v2 06/12] hw/pci-host/bonito: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 9868e2eccc..9f33582706 10064

[Qemu-devel] [PATCH v2 05/12] hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé --- hw/sh4/sh_pci.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c index 4ec2e35500..379d0685ed 100644

[Qemu-devel] [PATCH v2 00/12] another SysBusDevice::init to Device::realize cleanup

2018-10-02 Thread Philippe Mathieu-Daudé
Peter suggested [1] another crusade for this merge window, then Cédric jumped on his horse [2]. My turn on my dromedary. since v1: - let the empty_slot - sh4_pci and bonito use DeviceState::realize instead of PCIDevice::realize - reword niagara-iob commit message v1: https://lists.gnu.org/archive

[Qemu-devel] [PATCH v2 01/12] trace-events: Fix copy/paste typo

2018-10-02 Thread Philippe Mathieu-Daudé
Missed while reviewing 5dd85b4b486. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Cédric Le Goater --- hw/timer/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/trace-events b/hw/timer/trace-events index fa4213df5b..ca9ad

[Qemu-devel] [PATCH v2 03/12] hw/timer/sun4v-rtc: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Cédric Le Goater --- hw/timer/sun4v-rtc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/timer/sun4v-rtc.

[Qemu-devel] [PATCH v2 04/12] hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Cédric Le Goater --- hw/ssi/xilinx_spi.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/ssi/xilinx_spi.c b/

Re: [Qemu-devel] [PATCH 06/15] hw/pci-host/bonito: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > Move from the legacy SysBusDevice::init method to using DeviceState::realize. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/bonito.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/hw/pci-host

Re: [Qemu-devel] [PATCH 05/15] hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 10:37 PM, Marcel Apfelbaum wrote: > Hi Philippe, Peter > > On 10/2/18 10:59 PM, Philippe Mathieu-Daudé wrote: >> On 10/2/18 3:13 PM, Peter Maydell wrote: >>> On 1 October 2018 at 23:09, Philippe Mathieu-Daudé >>> wrote: Move from the legacy SysBusDevice::init method to using

Re: [Qemu-devel] [PATCH v3] qemu-img.c: add help for each command

2018-10-02 Thread Eric Blake
On 9/25/18 10:39 AM, John Arbuckle wrote: Add the ability for the user to display help for a certain command. Example: qemu-img create --help What is printed is all the options available to this command and an example. Signed-off-by: John Arbuckle --- v3 changes: Fixed a bug that caused qemu-i

Re: [Qemu-devel] [PATCH v2] qemu-img.c: add help for each command

2018-10-02 Thread Eric Blake
On 9/15/18 11:10 AM, John Arbuckle wrote: Add the ability for the user to display help for a certain command. Example: qemu-img create --help What is printed is all the options available to this command and an example. Signed-off-by: John Arbuckle --- v2 changes: Removed block of string compar

Re: [Qemu-devel] [PATCH v6 00/27] qapi: add #if pre-processor conditions to generated code (part 2)

2018-10-02 Thread Marc-André Lureau
Hi On Fri, Jul 6, 2018 at 2:59 PM Marc-André Lureau wrote: > > Hi, > > This is the second part of the "add #if pre-processor conditions to > generated code" series, adding schema member conditions (roughly > 16-38/49). > > Members can be exploded as dictionnary with 'type'/'if' keys: > > { 'struc

Re: [Qemu-devel] [PATCH 05/15] hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Marcel Apfelbaum
Hi Philippe, Peter On 10/2/18 10:59 PM, Philippe Mathieu-Daudé wrote: On 10/2/18 3:13 PM, Peter Maydell wrote: On 1 October 2018 at 23:09, Philippe Mathieu-Daudé wrote: Move from the legacy SysBusDevice::init method to using DeviceState::realize. Comment says DeviceState::realize but the cod

Re: [Qemu-devel] [PATCH v3 00/18] fleecing-hook driver for backup

2018-10-02 Thread Eric Blake
On 10/1/18 5:29 AM, Vladimir Sementsov-Ogievskiy wrote: v2 was "[RFC v2] new, node-graph-based fleecing and backup" Hi all! These series introduce fleecing-hook driver. It's a filter-node, which do copy-before-write operation. Mirror uses filter-node for handling guest writes, let's move to fil

Re: [Qemu-devel] [Qemu-block] [PATCH] tests: Disable test-bdrv-drain and test-replication

2018-10-02 Thread John Snow
On 10/01/2018 09:20 AM, Peter Maydell wrote: > The test-bdrv-drain and test-replication tests have > intermittent errors which make my build testing process > fail way too often. Disable them both for the moment. > > Signed-off-by: Peter Maydell > --- > I'm having trouble making forward progre

Re: [Qemu-devel] [PATCH 05/15] hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 3:13 PM, Peter Maydell wrote: > On 1 October 2018 at 23:09, Philippe Mathieu-Daudé wrote: >> Move from the legacy SysBusDevice::init method to using DeviceState::realize. > > Comment says DeviceState::realize but the code is using > PCIDevice::realize ? > > I didn't realize pci device

[Qemu-devel] [PATCH] softfloat: Fix division

2018-10-02 Thread Richard Henderson
The __udiv_qrnnd primitive that we nicked from gmp requires its inputs to be normalized. We were not doing that. Because the inputs are nearly normalized already, finishing that is trivial. Inline div128to64 into its one user, because it is no longer a general-purpose routine. Fixes: cf07323d494

Re: [Qemu-devel] [PATCH 09/15] hw/mips/malta: Replace 'empty_slot' by 'unimplemented_device'

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 3:23 PM, Peter Maydell wrote: > On 1 October 2018 at 23:09, Philippe Mathieu-Daudé wrote: >> The TYPE_EMPTY_SLOT and TYPE_UNIMPLEMENTED_DEVICE are identical devices, >> however the later use more recent APIs and is more widely used. >> >> Replace 'empty_slot' by 'unimplemented_device' t

[Qemu-devel] [Bug 1795527] Re: Malformed audio and video output stuttering after upgrade to QEMU 3.0

2018-10-02 Thread Dr. David Alan Gilbert
Hi, Hmm - if you say that changing hte -achine back to pc-i440fx-2.11 is helping then it should be something related to one of the compatibility entries for the machine type; but I don't see anything obvious related to audio or timing. To narrow it down a little, is pc-i440fx-2.12 good or bad?

Re: [Qemu-devel] [PATCH] hw/s390x/s390-pci-bus: Convert sysbus init function to realize function

2018-10-02 Thread Philippe Mathieu-Daudé
On 10/2/18 9:48 AM, Thomas Huth wrote: > The SysBusDeviceClass->init() interface is considered as a legacy interface > and there are currently some efforts going on to get rid of it. Thus let's > convert the init function in the s390x code to realize() instead. > > Signed-off-by: Thomas Huth Rev

Re: [Qemu-devel] [PATCH] vhost-user: Don't ask for reply on postcopy mem table set

2018-10-02 Thread Maxime Coquelin
On 10/02/2018 04:09 PM, Ilya Maximets wrote: According to documentation, NEED_REPLY_MASK should not be set for VHOST_USER_SET_MEM_TABLE request in postcopy mode. This restriction was mistakenly applied to 'reply_supported' variable, which is local and used only for non-postcopy case. CC: Dr.

Re: [Qemu-devel] [PATCH v4 10/10] qmp: common 'id' handling & make QGA conform to QMP spec

2018-10-02 Thread Marc-André Lureau
Hi On Sat, Sep 1, 2018 at 4:06 PM Marc-André Lureau wrote: > > On Sat, Sep 1, 2018 at 12:59 PM, Markus Armbruster wrote: > > Marc-André Lureau writes: > > > >> Let qmp_dispatch() copy the 'id' field. That way any qmp client will > >> conform to the specification, including QGA. Furthermore, it

Re: [Qemu-devel] [PATCH v4 09/10] qga: process_event() simplification

2018-10-02 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 6:03 PM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > Simplify the code around qmp_dispatch(): > > - rely on qmp_dispatch/check_obj() for message checking > > - have a single send_response() point > > - constify send_response() argument > > > > It changes

Re: [Qemu-devel] ideas for improving TLB performance (help with TCG backend wanted)

2018-10-02 Thread Emilio G. Cota
On Tue, Oct 02, 2018 at 07:48:20 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > On Thu, Sep 20, 2018 at 01:19:51 +0100, Alex Bennée wrote: > >> If we are going to have an indirection then we can also drop the > >> requirement to scale the TLB according to the number of MMU indexes we

Re: [Qemu-devel] [PATCH] vhost-user: Don't ask for reply on postcopy mem table set

2018-10-02 Thread Dr. David Alan Gilbert
* Ilya Maximets (i.maxim...@samsung.com) wrote: > According to documentation, NEED_REPLY_MASK should not be set > for VHOST_USER_SET_MEM_TABLE request in postcopy mode. > This restriction was mistakenly applied to 'reply_supported' > variable, which is local and used only for non-postcopy case. >

[Qemu-devel] [PULL 24/80] change get_image_size return type to int64_t

2018-10-02 Thread Paolo Bonzini
From: Li Zhijian Previously, if the size of initrd >=2G, qemu exits with error: root@haswell-OptiPlex-9020:/home/lizj# /home/lizhijian/lkp/qemu-colo/x86_64-softmmu/qemu-system-x86_64 -kernel ./vmlinuz-4.16.0-rc4 -initrd large.cgz -nographic qemu: error reading initrd large.cgz: No such file or

[Qemu-devel] [PULL 53/80] test-char: fix random socket test failure

2018-10-02 Thread Paolo Bonzini
From: Marc-André Lureau Peter reported a test failure on FreeBSD with the new reconnect test: MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} gtester -k --verbose -m=quick tests/test-char TEST: tests/test-char... (pid=16190) /char/null:

[Qemu-devel] [PULL v4 00/80] Misc patches for 2018-09-30

2018-10-02 Thread Paolo Bonzini
The following changes since commit 3892f1f1a963e59dfe012cd9d461d33b2986fa3b: Merge remote-tracking branch 'remotes/dgibson/tags/libfdt-20181002' into staging (2018-10-02 09:54:44 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[Qemu-devel] Have multiple virtio-net devices, but only one of them receives all traffic

2018-10-02 Thread Ilya Maximets
> Hi, > > I'm using QEMU 3.0.0 and Linux kernel 4.15.0 on x86 machines. I'm > observing pretty weird behavior when I have multiple virtio-net > devices. My KVM VM has two virtio-net devices (vhost=off) and I'm > using a Linux bridge in the host. The two devices have different > MAC/IP addresses. >

Re: [Qemu-devel] racing between pause_all_vcpus() and qemu_cpu_stop()

2018-10-02 Thread Peter Maydell
On 2 October 2018 at 17:46, Paolo Bonzini wrote: > On 02/10/2018 12:34, Peter Maydell wrote: >> Maybe I just don't understand what you're suggesting should be >> done via run-on-cpu. But it seems to me that the problem here >> is that cpu_stop_current() should not call qemu_cpu_stop() >> immediate

Re: [Qemu-devel] [PATCH] tests: check-qjson: fix a memory leak

2018-10-02 Thread Eric Blake
On 10/2/18 11:26 AM, Li Qiang wrote: Spotted by ASAN. = ==17531==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1120 byte(s) in 28 object(s) allocated from: #0 0x7f9fb85eeb50 in __interceptor_malloc (/usr/lib/x86_

Re: [Qemu-devel] [PATCH] tests: check-qjson: fix a memory leak

2018-10-02 Thread Marc-André Lureau
Hi On Tue, Oct 2, 2018 at 8:27 PM Li Qiang wrote: > > Spotted by ASAN. > > = > ==17531==ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 1120 byte(s) in 28 object(s) allocated from: > #0 0x7f9fb85eeb50 in __intercept

[Qemu-devel] [PATCH 10/13] target/arm: Add v8M stack checks for T32 load/store single

2018-10-02 Thread Peter Maydell
Add v8M stack checks for the instructions in the T32 "load/store single" encoding class: these are the "immediate pre-indexed" and "immediate, post-indexed" LDR and STR instructions. Signed-off-by: Peter Maydell --- target/arm/translate.c | 23 ++- 1 file changed, 22 insertio

Re: [Qemu-devel] racing between pause_all_vcpus() and qemu_cpu_stop()

2018-10-02 Thread Paolo Bonzini
On 02/10/2018 12:34, Peter Maydell wrote: > On 2 October 2018 at 10:59, Paolo Bonzini wrote: >> On 02/10/2018 11:04, Peter Maydell wrote: >>> On 2 October 2018 at 09:58, Paolo Bonzini wrote: First, the reset code should indeed use run_on_cpu (it need not be safe i.e. stop-the-world

[Qemu-devel] [PATCH 08/13] target/arm: Add v8M stack checks for LDRD/STRD (imm)

2018-10-02 Thread Peter Maydell
Add the v8M stack checks for: * LDRD (immediate) * STRD (immediate) Loads and stores are more complicated than ADD/SUB/MOV, because we must ensure that memory accesses below the stack limit are not performed, so we can't simply do the check when we actually update SP. For these instructions, if

[Qemu-devel] [PATCH 13/13] target/arm: Add v8M stack checks for MSR to SP_NS

2018-10-02 Thread Peter Maydell
Updating the NS stack pointer via MSR to SP_NS should include a check whether the new SP value is below the stack limit. No other kinds of update to the various stack pointer and limit registers via MSR should perform a check. Signed-off-by: Peter Maydell --- target/arm/helper.c | 14 +++

[Qemu-devel] [PATCH 12/13] target/arm: Add v8M stack checks for VLDM/VSTM

2018-10-02 Thread Peter Maydell
Add the v8M stack checks for the VLDM/VSTM (aka VPUSH/VPOP) instructions. This code is currently unreachable because we haven't yet implemented M profile floating point support, but since the change is simple, we add it now because otherwise we're likely to forget to do it later. Signed-off-by: Pe

[Qemu-devel] [PATCH 11/13] target/arm: Add v8M stack checks for Thumb push/pop

2018-10-02 Thread Peter Maydell
Add v8M stack checks for the 16-bit Thumb push/pop encodings: STMDB, STMFD, LDM, LDMIA, LDMFD. Signed-off-by: Peter Maydell --- target/arm/translate.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 65df8d

[Qemu-devel] [PATCH 06/13] target/arm: Add v8M stack checks on exception entry

2018-10-02 Thread Peter Maydell
Add checks for breaches of the v8M stack limit when the stack pointer is decremented to push the exception frame for exception entry. Note that the exception-entry case is unique in that the stack pointer is updated to be the limit value if the limit is hit (per rule R_ZLZG). Signed-off-by: Peter

[Qemu-devel] [PATCH 09/13] target/arm: Add v8M stack checks for Thumb2 LDM/STM

2018-10-02 Thread Peter Maydell
Add the v8M stack checks for: * LDM (T2 encoding) * STM (T2 encoding) This includes the 32-bit encodings of the instructions listed in v8M ARM ARM rule R_YVWT as * LDM, LDMIA, LDMFD * LDMDB, LDMEA * POP (multiple registers) * PUSH (muliple registers) * STM, STMIA, STMEA * STMDB, STMFD We

[Qemu-devel] [PATCH 04/13] target/arm: Add v8M stack checks on ADD/SUB/MOV of SP

2018-10-02 Thread Peter Maydell
Add code to insert calls to a helper function to do the stack limit checking when we handle these forms of instruction that write to SP: * ADD (SP plus immediate) * ADD (SP plus register) * SUB (SP minus immediate) * SUB (SP minus register) * MOV (register) Signed-off-by: Peter Maydell ---

[Qemu-devel] [PATCH 07/13] target/arm: Add v8M stack limit checks on NS function calls

2018-10-02 Thread Peter Maydell
Check the v8M stack limits when pushing the frame for a non-secure function call via BLXNS. In order to be able to generate the exception we need to promote raise_exception() from being local to op_helper.c so we can call it from helper.c. Signed-off-by: Peter Maydell --- target/arm/internals.h

[Qemu-devel] [PATCH 01/13] target/arm: Define new TBFLAG for v8M stack checking

2018-10-02 Thread Peter Maydell
The Arm v8M architecture includes hardware stack limit checking. When certain instructions update the stack pointer, if the new value of SP is below the limit set in the associated limit register then an exception is taken. Add a TB flag that tracks whether the limit-checking code needs to be emitt

[Qemu-devel] [PATCH 00/13] target/arm: Implement v8M stack limit checks

2018-10-02 Thread Peter Maydell
This patchset implements the v8M stack limit checking feature, which is the last missing piece of the v8M architectural support. Note that the stack limit triggers when the SP value is changed to something below the limit, not when a load or store is performed below the limit. It's also done only

[Qemu-devel] [PATCH 05/13] target/arm: Add some comments in Thumb decode

2018-10-02 Thread Peter Maydell
Add some comments to the Thumb decoder indicating what bits of the instruction have been decoded at various points in the code. This is not an exhaustive set of comments; we're gradually adding comments as we work with particular bits of the code. Signed-off-by: Peter Maydell --- Specifically, I

[Qemu-devel] [PATCH 02/13] target/arm: Define new EXCP type for v8M stack overflows

2018-10-02 Thread Peter Maydell
Define EXCP_STKOF, and arrange for it to cause us to take a UsageFault with CFSR.STKOF set. Signed-off-by: Peter Maydell --- target/arm/cpu.h| 2 ++ target/arm/helper.c | 5 + 2 files changed, 7 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index d2c1d005ed7..318792823b

[Qemu-devel] [PATCH 03/13] target/arm: Move v7m_using_psp() to internals.h

2018-10-02 Thread Peter Maydell
We're going to want v7m_using_psp() in op_helper.c in the next patch, so move it from helper.c to internals.h. Signed-off-by: Peter Maydell --- target/arm/internals.h | 15 +++ target/arm/helper.c| 12 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/

[Qemu-devel] [PATCH] tests: check-qjson: fix a memory leak

2018-10-02 Thread Li Qiang
Spotted by ASAN. = ==17531==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1120 byte(s) in 28 object(s) allocated from: #0 0x7f9fb85eeb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50) #

Re: [Qemu-devel] [PATCH v2 08/11] aspeed/smc: add support for DMAs

2018-10-02 Thread Peter Maydell
On 2 October 2018 at 16:48, Cédric Le Goater wrote: > On 10/2/18 12:56 PM, Peter Maydell wrote: >> Rather than having the DMA device directly grab the system_memory >> MR like this, it's better to have the device have a MemoryRegion >> property, which the SoC sets with whatever the DMA device shou

Re: [Qemu-devel] [PATCH 1/1] qmp, hmp: make subsystem/system-vendor identities optional

2018-10-02 Thread Dr. David Alan Gilbert
* Denis V. Lunev (d...@openvz.org) wrote: > According to PCI specification subsystem id and subsystem vendor id are > optinal and could be abscent in Type1 header and can be found on > different offsets within Type0 and Type2 headers. > > Thus we should make this data optional in struct PciDeviceI

Re: [Qemu-devel] [PATCH 08/15] hw/mips/gt64xxx_pci: Mark as bridge device

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > The gt64120 is currently listed as uncategorized device. > Mark it as bridge device. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/mips/gt64xxx_pci.c | 1 + > 1 file changed, 1 insertion(+)

Re: [Qemu-devel] [PATCH 05/15] hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > Move from the legacy SysBusDevice::init method to using DeviceState::realize. > > Signed-off-by: Philippe Mathieu-Daudé one question below, Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/sh4/sh_pci.c | 20 +--- > 1 f

Re: [Qemu-devel] [PATCH v2 08/11] aspeed/smc: add support for DMAs

2018-10-02 Thread Cédric Le Goater
With the links, [ ... ] >> Otherwise, patch looks good, though I don't know enough about >> the device/SoC to review those details. > > For the moment the only use of these registers is in the Aspeed custom > u-boot of the SDK : https://github.com/openbmc/u-boot/blob/v2016.07-aspeed-openbmc/a

Re: [Qemu-devel] [PATCH v2 00/11] aspeed: misc fixes and enhancements (SMC)

2018-10-02 Thread Cédric Le Goater
On 9/25/18 2:30 PM, Peter Maydell wrote: > On 25 September 2018 at 13:20, Peter Maydell wrote: >> On 21 September 2018 at 17:19, Cédric Le Goater wrote: >>> Hello, >>> >>> This series adds a couple of cleanups and two main features to the >>> SMC controller of the Aspeed machines : >>> >>> - a '

Re: [Qemu-devel] [PATCH 04/15] hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > Move from the legacy SysBusDevice::init method to using DeviceState::realize. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/ssi/xilinx_spi.c | 9 +++-- > 1 file changed, 3 insertions(+

Re: [Qemu-devel] [PATCH 10/15] hw/sparc64/niagara: Replace 'empty_slot' by 'unimplemented_device'

2018-10-02 Thread Artyom Tarasenko
On Tue, Oct 2, 2018 at 3:24 PM Peter Maydell wrote: > > On 1 October 2018 at 23:09, Philippe Mathieu-Daudé wrote: > > The TYPE_EMPTY_SLOT and TYPE_UNIMPLEMENTED_DEVICE are identical devices, > > however the later use more recent APIs and is more widely used. > > > > Replace 'empty_slot' by 'unimp

Re: [Qemu-devel] [PATCH 02/15] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/timer/sun4v-rtc.c | 13 +++-- > hw/timer/trace-events | 4 > 2 files changed, 7 insertions(+), 10 deletions(-) > > diff --git a/hw/t

Re: [Qemu-devel] [PATCH 07/15] hw/mips/gt64xxx_pci: Convert gt64120_reset() function into Device reset method

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > Convert the gt64120_reset() function into a proper Device reset method. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/mips/gt64xxx_pci.c | 17 +++-- > 1 file changed, 3 insertion

Re: [Qemu-devel] [PATCH v2 04/11] hw/arm/aspeed: add a 'execute-in-place' property to boot directly from CE0

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:49 PM, Peter Maydell wrote: > On 21 September 2018 at 17:19, Cédric Le Goater wrote: >> The overhead for the OpenBMC firmware images using the a custom U-Boot >> is around 2 seconds, which is fine, but with a U-Boot from mainline, >> it takes an extra 50 seconds or so to reach Linux.

Re: [Qemu-devel] [PATCH 01/15] trace-events: Fix copy/paste typo

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > Missed while reviewing 5dd85b4b486. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/timer/trace-events | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/timer/trace

Re: [Qemu-devel] [PATCH 03/15] hw/timer/sun4v-rtc: Use DeviceState::realize rather than SysBusDevice::init

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:09 AM, Philippe Mathieu-Daudé wrote: > Move from the legacy SysBusDevice::init method to using DeviceState::realize. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/timer/sun4v-rtc.c | 10 +- > 1 file changed, 5 insertions

Re: [Qemu-devel] [PATCH v2 00/11] aspeed: misc fixes and enhancements (SMC)

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:57 PM, Peter Maydell wrote: > On 25 September 2018 at 15:10, Cédric Le Goater wrote: >> On 9/25/18 2:20 PM, Peter Maydell wrote: >>> On 21 September 2018 at 17:19, Cédric Le Goater wrote: Hello, This series adds a couple of cleanups and two main features to the S

Re: [Qemu-devel] [PATCH v2 08/11] aspeed/smc: add support for DMAs

2018-10-02 Thread Cédric Le Goater
On 10/2/18 12:56 PM, Peter Maydell wrote: > On 21 September 2018 at 17:19, Cédric Le Goater wrote: >> The FMC controller on the Aspeed SoCs support DMA to access the flash >> modules. It can operate in a normal mode, to copy to or from the flash >> module mapping window, or in a checksum calculati

  1   2   >