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

2018-10-02 Thread Artem Pisarenko
I've added "-monitor stdio" option to command line of Test 1 and repeated entering command during execution: QEMU 3.0.50 monitor - type 'help' for more information (qemu) info replay Replaying execution 'icount_rr_capture.bin': current step = 311736195 (qemu) info replay Replaying execut

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

2018-10-02 Thread Thomas Huth
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 --- hw/s390x/s390-pci-bus.c | 34 +++

Re: [Qemu-devel] finishing the transition away from SysBus init methods

2018-10-02 Thread Thomas Huth
On 2018-09-27 10:11, Peter Maydell wrote: > I had a look at how many devices are still using the SysBus init > method (rather than the instance-init/realize pair), and it turns out > to be only 41, which I think is reasonably tractable for doing some > more conversions and completing this API trans

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

2018-10-02 Thread Peter Maydell
On 1 October 2018 at 19:12, Alex Bennée wrote: > I would have thought the reset code should be scheduled via safe async > work to run in the vCPU context. Why should the main loop get involved > at all here? The reset code is much older than the safe-async support for running things in the vCPU c

Re: [Qemu-devel] finishing the transition away from SysBus init methods

2018-10-02 Thread Peter Maydell
On 2 October 2018 at 08:52, Thomas Huth wrote: > On 2018-09-27 10:11, Peter Maydell wrote: >> I had a look at how many devices are still using the SysBus init >> method (rather than the instance-init/realize pair), and it turns out >> to be only 41, which I think is reasonably tractable for doing

Re: [Qemu-devel] [PULL 00/23] Block layer patches

2018-10-02 Thread Peter Maydell
On 1 October 2018 at 18:18, Kevin Wolf wrote: > The following changes since commit 07f426c35eddd79388a23d11cb278600d7e3831d: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180926' into > staging (2018-09-28 18:56:09 +0100) > > are available in the git repository at: > > git://r

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

2018-10-02 Thread Artyom Tarasenko
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. > > Replace 'empty_slot' by 'unimplemented_device' to simplify devices code > m

Re: [Qemu-devel] [RFC PATCH 13/15] hw/alpha/typhoon: Remove unuseful code

2018-10-02 Thread Thomas Huth
On 2018-10-02 00:09, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > 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 >

Re: [Qemu-devel] [RFC PATCH 14/15] hw/hppa/dino: Remove unuseful code

2018-10-02 Thread Thomas Huth
On 2018-10-02 00:09, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > 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 > @

Re: [Qemu-devel] [RFC PATCH 15/15] hw/mips/malta: Remove unuseful code

2018-10-02 Thread Thomas Huth
On 2018-10-02 00:09, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > 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 4ccfa87c35..b6633fa141 100644 > --- a/hw/mips/mips_ma

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

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

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

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

Re: [Qemu-devel] [PULL 00/15] target/xtensa: preparation for FLIX support

2018-10-02 Thread Peter Maydell
On 1 October 2018 at 19:18, Max Filippov wrote: > Hi Peter, > > please pull the following series that rearranges target/xtensa code in > preparation for FLIX support. > The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48: > > Merge remote-tracking branch 'remotes/xanclic/

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

2018-10-02 Thread Paolo Bonzini
On 02/10/2018 10:01, Peter Maydell wrote: > On 1 October 2018 at 19:12, Alex Bennée wrote: >> I would have thought the reset code should be scheduled via safe async >> work to run in the vCPU context. Why should the main loop get involved >> at all here? > The reset code is much older than the saf

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

2018-10-02 Thread Peter Maydell
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; just run it in the vCPU thread). It certainly > doesn't do this right now. I don't understand this part. We're resetting the entire world: surely we

Re: [Qemu-devel] [PATCH v8 2/6] monitor: resume the monitor earlier if needed

2018-10-02 Thread Marc-André Lureau
Hi Peter On Sat, Sep 29, 2018 at 8:05 AM Peter Xu wrote: > > On Fri, Sep 28, 2018 at 04:06:30PM +0400, Marc-André Lureau wrote: > > Hi > > > > On Wed, Sep 5, 2018 at 10:24 AM Peter Xu wrote: > > > > > > Currently when QMP request queue full we won't resume the monitor until > > > we have complet

Re: [Qemu-devel] [PATCH v2 10/15] gdbstub: add support for extended mode packet

2018-10-02 Thread Luc Michel
On 10/1/18 6:39 PM, Philippe Mathieu-Daudé wrote: > Hi Luc, > > On 01/10/2018 13:56, Luc Michel wrote: >> Add support for the '!' extended mode packet. This is required for the >> multiprocess extension. >> >> Signed-off-by: Luc Michel >> --- >> gdbstub.c | 3 +++ >> 1 file changed, 3 inserti

Re: [Qemu-devel] [RFC PATCH] ssi-sd: Make devices picking up backends unavailable with -device

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 12:40, Markus Armbruster wrote: > Thomas Huth writes: > >> On 2018-09-26 11:00, Markus Armbruster wrote: >>> Device models aren't supposed to go on fishing expeditions for >>> backends. They should expose suitable properties for the user to set. >>> For onboard devices, b

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

2018-10-02 Thread David Hildenbrand
On 01/10/2018 15:24, Igor Mammedov wrote: > On Fri, 28 Sep 2018 14:21:33 +0200 > David Hildenbrand wrote: > >> On 27/09/2018 15:01, Igor Mammedov wrote: >>> On Wed, 26 Sep 2018 11:42:13 +0200 >>> David Hildenbrand wrote: >>> The unplug and unplug_request handlers are special: They are no

Re: [Qemu-devel] [PATCH] qcow2: Fix cache-clean-interval documentation

2018-10-02 Thread Leonid Bloch
On 10/1/18 7:59 PM, Kevin Wolf wrote: > Am 01.10.2018 um 16:35 hat Eric Blake geschrieben: >> On 9/29/18 4:54 AM, Leonid Bloch wrote: >>> Fixing cache-clean-interval documentation following the recent change to >>> a default of 600 seconds on supported plarforms (only Linux currently). >>> >>> Sign

Re: [Qemu-devel] [PATCH] vhost-user: fix qemu crash caused by failed backend

2018-10-02 Thread Marc-André Lureau
Hi On Thu, Sep 27, 2018 at 7:37 PM Liang Li wrote: > > During live migration, when stopping vhost-user device, 'vhost_dev_stop' > will be called, 'vhost_dev_stop' will call a batch of 'vhost_user_read' > and 'vhost_user_write'. If a previous 'vhost_user_read' or 'vhost_user_write' > failed becaus

Re: [Qemu-devel] [PATCH v1 1/4] target/arm64: properly handle DBGVR RESS bits

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 12:20, Alex Bennée wrote: > This only fails with some (broken) versions of gdb but we should > treat the top bits of DBGBVR as RESS. As the hardware may have IMPDEF > approaches to writes to this register we apply the sign extension when > checking breakpoints. > > Signed-o

Re: [Qemu-devel] [PATCH v1 2/4] target/arm64: hold BQL when calling do_interrupt()

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 12:20, Alex Bennée wrote: > Fix the assertion failure when running interrupts. > > Signed-off-by: Alex Bennée > --- > target/arm/kvm64.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c > index 80ad07ed0c..346e1f1a73 10064

Re: [Qemu-devel] [PATCH v1 3/4] target/arm64: kvm debug set target_el when passing exception to guest

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 12:20, Alex Bennée wrote: > When we are debugging the guest all exception come our way but might "exceptions" > be for the guests own debug exceptions. We use the ->do_interrupt() "guest's" > infrastructure to do this however we are missing a full setup of the "to inje

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

2018-10-02 Thread Paolo Bonzini
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; just run it in the vCPU thread). It certainly >> doesn't do this right now. > > I don't understand th

Re: [Qemu-devel] [PATCH v1 4/4] tests/guest-debug: fix scoping of failcount

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 12:20, Alex Bennée wrote: > You should declare you are using a global version of a variable before > you attempt to modify it in a function. > > Signed-off-by: Alex Bennée > --- > tests/guest-debug/test-gdbstub.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/t

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

2018-10-02 Thread Alex Bennée
Peter Maydell writes: > On 1 October 2018 at 19:12, Alex Bennée wrote: >> I would have thought the reset code should be scheduled via safe async >> work to run in the vCPU context. Why should the main loop get involved >> at all here? > > The reset code is much older than the safe-async suppor

Re: [Qemu-devel] [PATCH v2 04/15] target/arm: Handle SVE vector length changes in system mode

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 20:23, Richard Henderson wrote: > SVE vector length can change when changing EL, or when writing > to one of the ZCR_ELn registers. > > For correctness, our implementation requires that predicate bits > that are inaccessible are never set. Which means noticing length > cha

Re: [Qemu-devel] [PATCH v2 03/15] target/arm: Pass in current_el to fp and sve_exception_el

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 20:23, Richard Henderson wrote: > We are going to want to determine whether sve is enabled > for EL other than current. > > Tested-by: Laurent Desnogues > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v2 05/15] target/arm: Adjust aarch64_cpu_dump_state for system mode SVE

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 20:23, Richard Henderson wrote: > Use the existing helpers to determine if (1) the fpu is enabled, > (2) sve state is enabled, and (3) the current sve vector length. > > Tested-by: Laurent Desnogues > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -

Re: [Qemu-devel] [PATCH v2 06/15] target/arm: Clear unused predicate bits for LD1RQ

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 20:23, Richard Henderson wrote: > The 16-byte load only uses 16 predicate bits. But while > reusing the other load infrastructure, we find other bits > that are set and trigger an assert. To avoid this and > retain the assert, zero-extend the predicate that we pass > to t

Re: [Qemu-devel] [PATCH 0/9] hostmem-ram: use whole path for region name with >= 3.1

2018-10-02 Thread Marc-André Lureau
Hi On Wed, Sep 12, 2018 at 4:57 PM Marc-André Lureau wrote: > > Hi, > > The migration code expects the RAM block name to match between the > source and destination. However the backend type may change, so it is > possible (so far) to migrate from a hostmem-file to a hostmem-memfd > for example.

Re: [Qemu-devel] [PATCH v2 07/15] target/arm: Rewrite helper_sve_ld1*_r using pages

2018-10-02 Thread Peter Maydell
On 26 September 2018 at 20:23, Richard Henderson wrote: > Uses tlb_vaddr_to_host for correct operation with softmmu. > Optimize for accesses within a single page or pair of pages. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

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

2018-10-02 Thread Peter Maydell
On 2 October 2018 at 11:00, Alex Bennée wrote: > > Peter Maydell writes: > >> On 1 October 2018 at 19:12, Alex Bennée wrote: >>> I would have thought the reset code should be scheduled via safe async >>> work to run in the vCPU context. Why should the main loop get involved >>> at all here? >> >

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

2018-10-02 Thread Peter Maydell
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; just run it in the vCPU thread). It certainly

Re: [Qemu-devel] [PATCH] target/arm: fix code comments error

2018-10-02 Thread Peter Maydell
On 27 September 2018 at 18:24, Dongjiu Geng wrote: > The parameter of kvm_arm_init_cpreg_list() is ARMCPU instead of > CPUState, so correct the note to make it match the code. > > Signed-off-by: Dongjiu Geng Applied to target-arm.next, thanks. -- PMM

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

2018-10-02 Thread Peter Maydell
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 calculation mode, to evaluate > the best clock settings

Re: [Qemu-devel] [PATCH v2 00/12] Various qemu command line options help improvements

2018-10-02 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 5:17 PM Paolo Bonzini wrote: > > On 07/09/2018 09:59, Marc-André Lureau wrote: > > Hi, > > > > This is a compilation of patches I have to improve command line help > > support. The "qemu-option" patches have already been sent earlier, I > > modified the first to fix an

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

2018-10-02 Thread Peter Maydell
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 >>> SMC controller of the Aspeed machines : >>> >>> -

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 Peter Maydell
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. A quick survey on > the number of reads perfor

Re: [Qemu-devel] [PATCH v5 2/3] target/s390x: exception on non-aligned LPSW(E)

2018-10-02 Thread Cornelia Huck
On Sat, 1 Sep 2018 20:33:21 -0400 Pavel Zbitskiy wrote: > Both LPSW and LPSWE should raise a specification exception when their > operand is not doubleword aligned. > > Signed-off-by: Pavel Zbitskiy > --- > target/s390x/translate.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH v4 0/9] s390x: instruction flags and AFP registers for TCG

2018-10-02 Thread Cornelia Huck
On Thu, 27 Sep 2018 15:02:54 +0200 David Hildenbrand wrote: > I wanted to add AFP-register control related checks for a long time. > However, doing these checks in each and every relevant handler is ugly. > > As I will need similar checks for vector instructions (yes, I'm looking into > that but

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

2018-10-02 Thread Artyom Tarasenko
On Tue, Oct 2, 2018 at 12:10 AM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Artyom Tarasenko > --- > hw/timer/sun4v-rtc.c | 13 +++-- > hw/timer/trace-events | 4 > 2 files changed, 7 insertions(+), 10 deletions(-) > > diff --git a/hw/ti

[Qemu-devel] [PATCH 0/2] improve block-latency-histogram-set

2018-10-02 Thread Vladimir Sementsov-Ogievskiy
Support QOM path for block-latency-histogram-set and drop x- prefix. Libvirt discussion: https://www.redhat.com/archives/libvir-list/2018-September/msg00011.html Vladimir Sementsov-Ogievskiy (2): qapi: support device id for x-block-latency-histogram-set qapi: drop x- from x-block-latency-hist

Re: [Qemu-devel] [PATCH v2 15/15] arm/xlnx-zynqmp: put APUs and RPUs in separate GDB groups

2018-10-02 Thread Philippe Mathieu-Daudé
Cc'ing more QOM involved people. On 01/10/2018 13:57, Luc Michel wrote: > Create two separate QOM containers for APUs and RPUs to indicate to the > GDB stub that those CPUs should be put in different processes. > > Signed-off-by: Luc Michel > --- > hw/arm/xlnx-zynqmp.c | 7 +-- > 1 file cha

[Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set

2018-10-02 Thread Vladimir Sementsov-Ogievskiy
Support modern way of device selecting. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 6 -- blockdev.c | 8 +--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index ac3b48ee54..4efd60d8ab 1006

[Qemu-devel] [PATCH 2/2] qapi: drop x- from x-block-latency-histogram-set

2018-10-02 Thread Vladimir Sementsov-Ogievskiy
Libvirt part is ready, let's drop x- prefix. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 4 ++-- blockdev.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 4efd60d8ab..e9c0079933 100644

Re: [Qemu-devel] [PULL 0/1] libfdt queue 20181002

2018-10-02 Thread Peter Maydell
ble in the Git repository at: > > git://github.com/dgibson/qemu.git tags/libfdt-20181002 > > for you to fetch changes up to 0b001b3094bcf80a5a0c3b7655029a10fb63f661: > > Update dtc/libfdt submodule to v1.4.7 (2018-10-02 13:53:26 +1000) > > -

Re: [Qemu-devel] [PATCH v2 15/15] arm/xlnx-zynqmp: put APUs and RPUs in separate GDB groups

2018-10-02 Thread Peter Maydell
On 2 October 2018 at 12:33, Philippe Mathieu-Daudé wrote: > Cc'ing more QOM involved people. > > On 01/10/2018 13:57, Luc Michel wrote: >> Create two separate QOM containers for APUs and RPUs to indicate to the >> GDB stub that those CPUs should be put in different processes. >> >> Signed-off-by:

Re: [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.

2018-10-02 Thread Remy NOEL
Hi On 8/30/18 1:28 PM, Gerd Hoffmann wrote: I'll take a look... Ping, any results? I'm wondering whenever we should just revert 93abfc88bd649de1933588bfc7175605331b3ea9. Retested hotplug with 93abfc88bd649de1933588bfc7175605331b3ea9 reverted. Works just fine with guest kernel loaded. Doesn'

Re: [Qemu-devel] [PATCH v2 0/9] target/arm: Rely on id regs instead of features

2018-10-02 Thread Peter Maydell
On 27 September 2018 at 22:13, Richard Henderson wrote: > There are more feature bits that could be converted, but I thought > I should show the work to this point to get feedback. > > This is the "v2" as compared to > http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg01849.html So havin

[Qemu-devel] [PATCH v2] secondary-vga: delete mmio subregions upon exit

2018-10-02 Thread remy . noel
From: "remy.noel" 93abfc88bd649de1933588bfc7175605331b3ea9 introduced a reference cycle in the vga-pci devices, preventing cleanup of the object upon hotblug. This patch allows to break the cycle. Signed-off-by: remy.noel --- hw/display/vga-pci.c | 5 + 1 file changed, 5 insertions(+) di

Re: [Qemu-devel] [PATCH 0/3] Fix access_with_adjusted_size() on big-endian

2018-10-02 Thread Peter Maydell
On 27 September 2018 at 01:24, Philippe Mathieu-Daudé wrote: > Hi, > > This series fix a bug I'v been hunting for a long time. > > With BE regions, if the guest used smaller access than the region > implementation, the shift value is negative, but since access_fn() > uses unsigned type for shift,

Re: [Qemu-devel] [PATCH 0/3] Fix access_with_adjusted_size() on big-endian

2018-10-02 Thread Philippe Mathieu-Daudé
On Tue, Oct 2, 2018 at 2:19 PM Peter Maydell wrote: > On 27 September 2018 at 01:24, Philippe Mathieu-Daudé wrote: > > Hi, > > > > This series fix a bug I'v been hunting for a long time. > > > > With BE regions, if the guest used smaller access than the region > > implementation, the shift value

Re: [Qemu-devel] [PATCH 0/3] Fix access_with_adjusted_size() on big-endian

2018-10-02 Thread Peter Maydell
On 2 October 2018 at 13:34, Philippe Mathieu-Daudé wrote: > On Tue, Oct 2, 2018 at 2:19 PM Peter Maydell wrote: >> On 27 September 2018 at 01:24, Philippe Mathieu-Daudé >> wrote: >> > Hi, >> > >> > This series fix a bug I'v been hunting for a long time. >> > >> > With BE regions, if the guest u

[Qemu-devel] [PATCH] hw/i386: add legacy cpu hotplug for pc-lite

2018-10-02 Thread wei . guo . simon
From: Simon Guo Currently pc-lite cpu hot plug will leads to error like: "acpi: device plug request for not supported device type: host-x86_64-cpu" . However pc_lite_machine_options() didn't setup flag legacy_cpu_hotplug correctly, which will leads to a later mess state, and causes the error abo

Re: [Qemu-devel] [PATCH v3 1/3] qapi: add x-debug-query-block-graph

2018-10-02 Thread Vladimir Sementsov-Ogievskiy
28.09.2018 19:31, Max Reitz wrote: On 23.08.18 17:46, Vladimir Sementsov-Ogievskiy wrote: Add a new command, returning block nodes (and their users) graph. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 91 +++ include/block/block.h

Re: [Qemu-devel] [RFC] [PATCH 0/3] qemu: arm: Migration between machines with different MIDR values

2018-10-02 Thread Peter Maydell
On 27 September 2018 at 02:13, wrote: > From: Manish Jaggi > > QEMU on arm systems use -machine virt -cpu host option for a VM. > Migration thus is limited between machines with same cpu. > > This is a limitation if migration is desired between cpus which are of same > family and have only few d

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

2018-10-02 Thread Peter Maydell
On 1 October 2018 at 23:09, Philippe Mathieu-Daudé wrote: > Missed while reviewing 5dd85b4b486. > > Signed-off-by: Philippe Mathieu-Daudé > --- > 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 f

Re: [Qemu-devel] [PATCH 2/2] qapi: drop x- from x-block-latency-histogram-set

2018-10-02 Thread Vladimir Sementsov-Ogievskiy
02.10.2018 14:33, Vladimir Sementsov-Ogievskiy wrote: Libvirt part is ready, let's drop x- prefix. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 4 ++-- blockdev.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json

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

2018-10-02 Thread Peter Maydell
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 devices had their own realize method: what's the difference

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

2018-10-02 Thread Peter Maydell
On 1 October 2018 at 23:09, Philippe Mathieu-Daudé wrote: > Convert the gt64120_reset() function into a proper Device reset method. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/mips/gt64xxx_pci.c | 17 +++-- > 1 file changed, 3 insertions(+), 14 deletions(-) Reviewed-by: Pet

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

2018-10-02 Thread Peter Maydell
On 1 October 2018 at 23:09, Philippe Mathieu-Daudé wrote: > The gt64120 is currently listed as uncategorized device. > Mark it as bridge device. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/mips/gt64xxx_pci.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Peter Maydell Should th

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

2018-10-02 Thread Peter Maydell
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' to simplify devices code > maintenance. > > Sign

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

2018-10-02 Thread Peter Maydell
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' to simplify devices code > maintenance. > > Sign

Re: [Qemu-devel] [PATCH v2 0/9] target/arm: Rely on id regs instead of features

2018-10-02 Thread Philippe Mathieu-Daudé
On 02/10/2018 14:30, Peter Maydell wrote: > On 27 September 2018 at 22:13, Richard Henderson > wrote: >> There are more feature bits that could be converted, but I thought >> I should show the work to this point to get feedback. >> >> This is the "v2" as compared to >> http://lists.nongnu.org/arch

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

2018-10-02 Thread Denis V. Lunev
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 PciDeviceId and skip reporting them via HMP if the information

Re: [Qemu-devel] [PATCH v9 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-10-02 Thread Tony Krowiak
On 09/27/2018 05:28 AM, Cornelia Huck wrote: On Wed, 26 Sep 2018 18:54:34 -0400 Tony Krowiak wrote: From: Tony Krowiak This patch series is the QEMU counterpart to the KVM/kernel support for guest dedicated crypto adapters. The KVM/kernel model is built on the VFIO mediated device framework

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

2018-10-02 Thread Ilya Maximets
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. David Alan Gilbert Fixes: 9bb38019942c ("vhost+po

[Qemu-devel] [PATCH v5 6/9] hw/misc/zynq_slcr: use standard register definition

2018-10-02 Thread Damien Hedde
Replace the zynq_slcr registers enum and macros using the hw/registerfields.h macros. Signed-off-by: Damien Hedde Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/zynq_slcr.c | 468 ++-- 1 file changed, 234 insertions(+), 234 deletions(-) diff --git a/hw/

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

2018-10-02 Thread Damien Hedde
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 between 2 (sub-)devices. Also add a function which forwards a por

Re: [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set

2018-10-02 Thread Vladimir Sementsov-Ogievskiy
02.10.2018 17:22, Eric Blake wrote: On 10/2/18 6:33 AM, Vladimir Sementsov-Ogievskiy wrote: Support modern way of device selecting. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   qapi/block-core.json | 6 --   blockdev.c   | 8 +---   2 files changed, 9 insertions(+), 5 deleti

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

2018-10-02 Thread Damien Hedde
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 changed, 163 insertions(+) create mode 100644 docs/devel/cl

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

2018-10-02 Thread Damien Hedde
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/arm/xilinx_zynq.c index f1496d2927..88f61c6a18 100644 --

Re: [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set

2018-10-02 Thread Nikolay Shirokovskiy
On 02.10.2018 17:22, Eric Blake wrote: > On 10/2/18 6:33 AM, Vladimir Sementsov-Ogievskiy wrote: >> Support modern way of device selecting. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >>   qapi/block-core.json | 6 -- >>   blockdev.c   | 8 +--- >>   2 files changed, 9

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

2018-10-02 Thread Damien Hedde
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 active. The bus interface control the mmios visibility The reference

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

2018-10-02 Thread Damien Hedde
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 a ClockOut so that it receives update, through the ca

[Qemu-devel] [PATCH v5 4/9] qdev-clock: introduce an init array to ease the device construction

2018-10-02 Thread Damien Hedde
Introduce a function and macro helpers to setup several clocks in a device from a static array description. An element of the array describes the clock (name and direction) as well as the related callback and an optional offset to store the created object pointer in the device state structure. Th

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

2018-10-02 Thread Damien Hedde
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. This is based on the original work of Frederic Konrad. Signed-off-by: Dami

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

2018-10-02 Thread Eric Blake
On 10/2/18 8:55 AM, Denis V. Lunev 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 s/optinal/optional/ s/abscent/absent/ different offsets within Type0 and Type2 headers. Thus we should make this

Re: [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set

2018-10-02 Thread Eric Blake
On 10/2/18 6:33 AM, Vladimir Sementsov-Ogievskiy wrote: Support modern way of device selecting. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 6 -- blockdev.c | 8 +--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/qapi/block-core.

[Qemu-devel] [PATCH v5 0/9] Clock framework API.

2018-10-02 Thread Damien Hedde
This series aims to add a way to model clocks in qemu between devices. This allows to model the clock tree of a platform allowing us to inspect clock configuration and detect problems such as disabled clock or bad configured pll. This series is a reroll of the v4 sent recently without the reset fe

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

2018-10-02 Thread Damien Hedde
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 (ps_clk), which is hard-coded to 33.33MHz (zcu102 evaluation board fre

Re: [Qemu-devel] [PATCH 2/2] qapi: drop x- from x-block-latency-histogram-set

2018-10-02 Thread Eric Blake
On 10/2/18 6:33 AM, Vladimir Sementsov-Ogievskiy wrote: Libvirt part is ready, let's drop x- prefix. A link to the libvirt list archives would be useful. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 4 ++-- blockdev.c | 2 +- 2 files changed, 3 insert

Re: [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set

2018-10-02 Thread Eric Blake
On 10/2/18 9:30 AM, Vladimir Sementsov-Ogievskiy wrote: -# @device: device name to set latency histogram for. +# @device: device name to set latency histogram for (better use @id). +# +# @id: The name or QOM path of the guest device. As long as we are renaming the command, there's no need to k

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

2018-10-02 Thread Igor Mammedov
On Tue, 2 Oct 2018 11:49:09 +0200 David Hildenbrand wrote: > On 01/10/2018 15:24, Igor Mammedov wrote: > > On Fri, 28 Sep 2018 14:21:33 +0200 > > David Hildenbrand wrote: > > > >> On 27/09/2018 15:01, Igor Mammedov wrote: > >>> On Wed, 26 Sep 2018 11:42:13 +0200 > >>> David Hildenbrand wro

Re: [Qemu-devel] [PATCH v9 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-10-02 Thread Pierre Morel
On 27/09/2018 00:54, Tony Krowiak wrote: A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The S390_FEAT_AP CPU model feature indicates whether AP instructions are available to the guest. This feature will

Re: [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set

2018-10-02 Thread Vladimir Sementsov-Ogievskiy
02.10.2018 17:35, Eric Blake wrote: > On 10/2/18 9:30 AM, Vladimir Sementsov-Ogievskiy wrote: > -# @device: device name to set latency histogram for. +# @device: device name to set latency histogram for (better use @id). +# +# @id: The name or QOM path of the guest device. >>> >

[Qemu-devel] [PATCH] target/arm: Correct condition for v8M callee stack push

2018-10-02 Thread Peter Maydell
In v7m_exception_taken() we were incorrectly using a "LR bit EXCRET.ES is 1" check when it should be 0 (compare the pseudocode ExceptionTaken() function). This meant we didn't stack the callee-saved registers when tailchaining from a NonSecure to a Secure exception. Cc: qemu-sta...@nongnu.org Sign

[Qemu-devel] [PATCH] target/arm: Don't read r4 from v8M exception stackframe twice

2018-10-02 Thread Peter Maydell
A cut-and-paste error meant we were reading r4 from the v8M callee-saves exception stack frame twice. This is harmless since it just meant we did two memory accesses to the same location, but it's unnecessary. Delete it. Signed-off-by: Peter Maydell --- target/arm/helper.c | 1 - 1 file changed,

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-10-02 Thread Tony Krowiak
On 09/27/2018 09:56 AM, Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated matrix

Re: [Qemu-devel] [PATCH] target/arm: Don't read r4 from v8M exception stackframe twice

2018-10-02 Thread Philippe Mathieu-Daudé
On 02/10/2018 17:03, Peter Maydell wrote: > A cut-and-paste error meant we were reading r4 from the v8M > callee-saves exception stack frame twice. This is harmless > since it just meant we did two memory accesses to the same > location, but it's unnecessary. Delete it. > > Signed-off-by: Peter Ma

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-02 Thread Tony Krowiak
On 09/28/2018 08:51 AM, Halil Pasic wrote: On 09/27/2018 02:52 PM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote: From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Kro

Re: [Qemu-devel] [PATCH 1/2] qapi: support device id for x-block-latency-histogram-set

2018-10-02 Thread Eric Blake
On 10/2/18 9:58 AM, Vladimir Sementsov-Ogievskiy wrote: -# @device: device name to set latency histogram for. +# @device: device name to set latency histogram for (better use @id). +# +# @id: The name or QOM path of the guest device. Hm. It all looks a bit weird. I've just duplicated block_

Re: [Qemu-devel] [PATCH v2 0/9] target/arm: Rely on id regs instead of features

2018-10-02 Thread Richard Henderson
On 10/2/18 7:30 AM, Peter Maydell wrote: > On 27 September 2018 at 22:13, Richard Henderson > wrote: >> There are more feature bits that could be converted, but I thought >> I should show the work to this point to get feedback. >> >> This is the "v2" as compared to >> http://lists.nongnu.org/archi

Re: [Qemu-devel] [PATCH v9 3/6] s390x/kvm: enable AP instruction interpretation for guest

2018-10-02 Thread Pierre Morel
On 27/09/2018 09:52, David Hildenbrand wrote: On 27/09/2018 00:54, Tony Krowiak wrote: From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is switched on for the guest, AP instruction

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

2018-10-02 Thread David Hildenbrand
>> Inside object_unparent(), the call flow of unrealize steps is defined. >> By moving the "real unplug" part into "do_unplug" and therefor >> essentially calling it when unrealizing, we could generalize this for >> all unplug handlers. >> I think, order of realization and therefore the order of ho

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

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

  1   2   >