Re: [Qemu-devel] [Qemu-block] Some question about savem/qcow2 incremental snapshot

2018-05-28 Thread He, Junyan
Hi yang, Alibaba made this proposal for NVDimm snapshot optimization, can you give some advice about this discussion? Thanks -Original Message- From: Stefan Hajnoczi [mailto:stefa...@gmail.com] Sent: Monday, May 14, 2018 9:49 PM To: Kevin Wolf Cc: Stefan Hajnoczi ; Pankaj Gupta ; H

Re: [Qemu-devel] [PATCH 1/4] spapr: remove irq_hint parameter from spapr_irq_alloc()

2018-05-28 Thread Cédric Le Goater
On 05/28/2018 08:17 AM, Thomas Huth wrote: > On 25.05.2018 16:02, Greg Kurz wrote: >> On Fri, 18 May 2018 18:44:02 +0200 >> Cédric Le Goater wrote: >> >>> This IRQ number hint can possibly be used by the VIO devices if the >>> "irq" property is defined on the command line but it seems it is never

Re: [Qemu-devel] [PATCH v7 4/4] monitor: add lock to protect mon_fdsets

2018-05-28 Thread Peter Xu
On Thu, May 24, 2018 at 11:03:55AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > Similar to previous patch, but introduce a new global big lock for > > mon_fdsets. Take it where needed. > > The previous patch is "monitor: more comments on lock-free > fleids/funcs". Sure you mean tha

[Qemu-devel] [PATCH v4 00/19] reverse debugging

2018-05-28 Thread Pavel Dovgalyuk
GDB remote protocol supports reverse debugging of the targets. It includes 'reverse step' and 'reverse continue' operations. The first one finds the previous step of the execution, and the second one is intended to stop at the last breakpoint that would happen when the program is executed normally.

[Qemu-devel] [PATCH v4 02/19] replay: disable default snapshot for record/replay

2018-05-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch disables setting '-snapshot' option on by default in record/replay mode. This is needed for creating vmstates in record and replay modes. Signed-off-by: Pavel Dovgalyuk --- vl.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vl

[Qemu-devel] [PATCH v4 01/19] block: implement bdrv_snapshot_goto for blkreplay

2018-05-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch enables making snapshots with blkreplay used in block devices. This function is required to make bdrv_snapshot_goto without calling .bdrv_open which is not implemented. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c |8 1 file changed, 8 inse

[Qemu-devel] [PATCH v4 03/19] replay: update docs for record/replay with block devices

2018-05-28 Thread Pavel Dovgalyuk
This patch updates the description of the command lines for using record/replay with attached block devices. Signed-off-by: Pavel Dovgalyuk --- docs/replay.txt | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/replay.txt b/docs/replay.txt index 2e21e9c..f7de

[Qemu-devel] [PATCH v4 07/19] migration: introduce icount field for snapshots

2018-05-28 Thread Pavel Dovgalyuk
Saving icount as a parameters of the snapshot allows navigation between them in the execution replay scenario. This information can be used for finding a specific snapshot for rewinding the recorded execution to the specific moment of the time. E.g., 'reverse step' action needs to load the nearest

[Qemu-devel] [PATCH v4 04/19] replay: don't drain/flush bdrv queue while RR is working

2018-05-28 Thread Pavel Dovgalyuk
In record/replay mode bdrv queue is controlled by replay mechanism. It does not allow saving or loading the snapshots when bdrv queue is not empty. Stopping the VM is not blocked by nonempty queue, but flushing the queue is still impossible there, because it may cause deadlocks in replay mode. This

[Qemu-devel] [PATCH v4 08/19] replay: introduce info hmp/qmp command

2018-05-28 Thread Pavel Dovgalyuk
This patch introduces 'info replay' monitor command and corresponding qmp request. These commands request the current record/replay mode, replay log file name, and the execution step (number or recorded/replayed instructions). Signed-off-by: Pavel Dovgalyuk -- v2: - renamed info_replay qmp int

[Qemu-devel] [PATCH v4 06/19] qcow2: introduce icount field for snapshots

2018-05-28 Thread Pavel Dovgalyuk
This patch introduces the icount field for saving within the snapshot. It is required for navigation between the snapshots in record/replay mode. Signed-off-by: Pavel Dovgalyuk -- v2: - documented format changes in docs/interop/qcow2.txt (suggested by Eric Blake) --- block/qcow2-snapshot.c

[Qemu-devel] [PATCH v4 16/19] gdbstub: add reverse step support in replay mode

2018-05-28 Thread Pavel Dovgalyuk
GDB remote protocol supports two reverse debugging commands: reverse step and reverse continue. This patch adds support of the first one to the gdbstub. Reverse step is intended to step one instruction in the backwards direction. This is not possible in regular execution. But replayed execution is

[Qemu-devel] [PATCH v4 09/19] replay: introduce breakpoint at the specified step

2018-05-28 Thread Pavel Dovgalyuk
This patch introduces replay_break qmp and hmp commands. These commands allow stopping at the specified instruction. It may be useful for debugging when there are some known events that should be investigated. The commands have one argument - number of instructions executed since the start of the r

[Qemu-devel] [PATCH v4 10/19] replay: implement replay-seek command to proceed to the desired step

2018-05-28 Thread Pavel Dovgalyuk
This patch adds hmp/qmp commands replay_seek/replay-seek that proceed the execution to the specified step. The commands automatically loads nearest snapshot and replay the execution to find the desired step. Signed-off-by: Pavel Dovgalyuk -- v2: - renamed replay_seek qmp command into replay-se

[Qemu-devel] [PATCH v4 05/19] replay: finish record/replay before closing the disks

2018-05-28 Thread Pavel Dovgalyuk
After recent updates block devices cannot be closed on qemu exit. This happens due to the block request polling when replay is not finished. Therefore now we stop execution recording before closing the block devices. Signed-off-by: Pavel Dovgalyuk --- replay/replay.c |2 ++ vl.c|

[Qemu-devel] [PATCH v4 12/19] timer: remove replay clock probe in deadline calculation

2018-05-28 Thread Pavel Dovgalyuk
Ciro Santilli reported that commit a5ed352596a8b7eb2f9acce34371b944ac3056c4 breaks the execution replay. It happens due to the probing the clock for the new instances of iothread. However, this probing was made in replay mode for the timer lists that are empty. This patch removes clock probing in r

[Qemu-devel] [PATCH v4 13/19] replay: refine replay-time module

2018-05-28 Thread Pavel Dovgalyuk
This patch removes refactoring artifacts from the replay/replay-time.c Signed-off-by: Pavel Dovgalyuk --- replay/replay-time.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/replay/replay-time.c b/replay/replay-time.c index 6a7565e..40030b8 10

[Qemu-devel] [PATCH v4 11/19] replay: flush events when exiting

2018-05-28 Thread Pavel Dovgalyuk
This patch adds events processing when emulation finishes instead of just cleaning the queue. Now the bdrv coroutines will be in consistent state when emulator closes. It allows correct polling of the block layer at exit. Signed-off-by: Pavel Dovgalyuk --- replay/replay-events.c | 14 +--

[Qemu-devel] [PATCH v8 2/5] monitor: protect mon->fds with mon_lock

2018-05-28 Thread Peter Xu
mon->fds were protected by BQL. Now protect it by mon_lock so that it can even be used in monitor iothread. Reviewed-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Signed-off-by: Peter Xu --- monitor.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --g

[Qemu-devel] [PATCH v8 3/5] monitor: more comments on lock-free elements

2018-05-28 Thread Peter Xu
Add some explicit comments for both Readline and cpu_set/cpu_get helpers that they do not need the mon_lock protection. Signed-off-by: Peter Xu --- monitor.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index d6c3c08932..f23178951e 100644

[Qemu-devel] [PATCH v4 14/19] translator: fix breakpoint processing

2018-05-28 Thread Pavel Dovgalyuk
QEMU cannot pass through the breakpoints when 'si' command is used in remote gdb. This patch disables inserting the breakpoints when we are already single stepping though the gdb remote protocol. This patch also fixes icount calculation for the blocks that include breakpoints - instruction with bre

[Qemu-devel] [PATCH v4 15/19] replay: flush rr queue before loading the vmstate

2018-05-28 Thread Pavel Dovgalyuk
Non-empty record/replay queue prevents saving and loading the VM state, because it includes pending bottom halves and block coroutines. But when the new VM state is loaded, we don't have to preserve the consistency of the current state anymore. Therefore this patch just flushes the queue allowing t

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] spapr: remove irq_hint parameter from spapr_irq_alloc()

2018-05-28 Thread Thomas Huth
On 28.05.2018 09:06, Cédric Le Goater wrote: > On 05/28/2018 08:17 AM, Thomas Huth wrote: >> On 25.05.2018 16:02, Greg Kurz wrote: >>> On Fri, 18 May 2018 18:44:02 +0200 >>> Cédric Le Goater wrote: >>> This IRQ number hint can possibly be used by the VIO devices if the "irq" property is

[Qemu-devel] [Bug 1773743] [NEW] qemu-user -g xxx -E LD_PROFILE=xxx segfault

2018-05-28 Thread mou
Public bug reported: Here is two simple steps to reproduce the bug: $ qemu-x86_64 -E LD_PROFILE=libc.so.6 -E LD_PROFILE_OUTPUT=. -g 12345 -L / /bin/ls (libc.so and /bin/ls might change on your system, in this case we just need a binary with a profilable needed library) In a other window launch:

[Qemu-devel] [PATCH v4 19/19] replay: allow loading any snapshots before recording

2018-05-28 Thread Pavel Dovgalyuk
This patch enables using -loadvm in recording mode to allow starting the execution recording from any of the available snapshots. It also fixes loading of the record/replay state, therefore snapshots created in replay mode may also be used for starting the new recording. Signed-off-by: Pavel Dovga

[Qemu-devel] [PATCH v4 17/19] gdbstub: add reverse continue support in replay mode

2018-05-28 Thread Pavel Dovgalyuk
This patch adds support of the reverse continue operation for gdbstub. Reverse continue finds the last breakpoint that would happen in normal execution from the beginning to the current moment. Implementation of the reverse continue replays the execution twice: to find the breakpoints that were hit

[Qemu-devel] [PATCH v8 1/5] monitor: rename out_lock to mon_lock

2018-05-28 Thread Peter Xu
The out_lock is protecting a few Monitor fields. In the future the monitor code will start to run in multiple threads. We are going to turn it into a bigger lock to protect not only the out buffer but also most of the rest. Since at it, rearrange the Monitor struct a bit. Reviewed-by: Stefan Ha

[Qemu-devel] [PATCH v4 18/19] replay: describe reverse debugging in docs/replay.txt

2018-05-28 Thread Pavel Dovgalyuk
This patch updates the documentation and describes usage of the reverse debugging in QEMU+GDB. Signed-off-by: Pavel Dovgalyuk --- docs/replay.txt | 33 + 1 file changed, 33 insertions(+) diff --git a/docs/replay.txt b/docs/replay.txt index f7def53..086d3f8 1006

[Qemu-devel] [PATCH v8 0/5] monitor: let Monitor be thread safe

2018-05-28 Thread Peter Xu
v8: - some wording changes according to previous comments [Markus] - return -ENOENT too in stubs/fdset.c:monitor_fdset_get_fd() [Stefan] - refactor the fdset functions a bit, drop "ret" where proper [Markus] - one more patch to fix monitor_lock comment [Markus] - regular rebase and torturing v7: -

[Qemu-devel] [PATCH v8 5/5] monitor: add lock to protect mon_fdsets

2018-05-28 Thread Peter Xu
Introduce a new global big lock for mon_fdsets. Take it where needed. The monitor_fdset_get_fd() handling is a bit tricky: now we need to call qemu_mutex_unlock() which might pollute errno, so we need to make sure the correct errno be passed up to the callers. To make things simpler, we let moni

[Qemu-devel] [PATCH v8 4/5] monitor: fix comment for monitor_lock

2018-05-28 Thread Peter Xu
Fix typo in d622cb5879c. Meanwhile move these variables close to each other. monitor_qapi_event_state can be declared static, add that. Reported-by: Markus Armbruster Signed-off-by: Peter Xu --- monitor.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/monitor.c b/m

Re: [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-28 Thread Markus Armbruster
Eduardo Habkost writes: > On Fri, May 25, 2018 at 08:30:59AM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> > On Wed, May 23, 2018 at 05:53:34PM +0200, Markus Armbruster wrote: > [...] >> >> >> Worse, a machine type property that is static for all machine types now >> >> >> could

Re: [Qemu-devel] [PATCH 0/6] Update Linux headers to 4.17-rc6

2018-05-28 Thread Paolo Bonzini
On 25/05/2018 16:00, Michael S. Tsirkin wrote: > On Fri, May 25, 2018 at 02:27:49PM +0100, Peter Maydell wrote: >> This series updates our copy of the Linux kernel headers to 4.17-rc6. >> To do that we have to fix up some issues: >> * we had a hand-hacked definition of VIRTIO_GPU_CAPSET_VIRGL2 >>

Re: [Qemu-devel] [PULL 20/37] qcow2: Give the refcount cache the minimum possible size by default

2018-05-28 Thread Kevin Wolf
Am 25.05.2018 um 19:10 hat Peter Maydell geschrieben: > On 15 May 2018 at 16:40, Kevin Wolf wrote: > > From: Alberto Garcia > > > > The L2 and refcount caches have default sizes that can be overridden > > using the l2-cache-size and refcount-cache-size (an additional > > parameter named cache-siz

Re: [Qemu-devel] [PATCH 00/14] block: Make blockdev-create a job and stable API

2018-05-28 Thread Kevin Wolf
Am 25.05.2018 um 20:13 hat Eric Blake geschrieben: > On 05/25/2018 11:33 AM, Kevin Wolf wrote: > > This changes the x-blockdev-create QMP command so that it doesn't block > > the monitor and the main loop any more, but starts a background job that > > performs the image creation. > > > > The basic

[Qemu-devel] [PATCH] ARM: ACPI: Fix use-after-free due to memory realloc

2018-05-28 Thread Shannon Zhao
acpi_data_push uses g_array_set_size to resize the memory size. If there is no enough contiguous memory, the address will be changed. So previous pointer could not be used any more. It must update the pointer and use the new one. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 14

Re: [Qemu-devel] [PULL 20/37] qcow2: Give the refcount cache the minimum possible size by default

2018-05-28 Thread Alberto Garcia
On Mon 28 May 2018 10:38:55 AM CEST, Kevin Wolf wrote: >> > +if (!refcount_cache_size_set) { >> > +*refcount_cache_size = MIN_REFCOUNT_CACHE_SIZE * >> > s->cluster_size; >> >> ...but in the else clause down here, we don't have the cast, and >> Coverity complains that we evalua

Re: [Qemu-devel] [PATCH v5 43/49] docker: move debian-powerpc-cross to sid based build

2018-05-28 Thread Fam Zheng
On Fri, 05/25 15:19, Alex Bennée wrote: > The original Jessie based cross builder hasn't worked for a while. The > state of the libraries is still perilous for cross-building QEMU but > we can use it for building TCG tests. > > The debian-apt-fake.sh script can also be dropped as it is no longer >

Re: [Qemu-devel] [PATCH] ARM: ACPI: Fix use-after-free due to memory realloc

2018-05-28 Thread Auger Eric
Hi Shannon, On 05/28/2018 10:42 AM, Shannon Zhao wrote: > acpi_data_push uses g_array_set_size to resize the memory size. If there > is no enough contiguous memory, the address will be changed. So previous > pointer could not be used any more. It must update the pointer and use > the new one. > >

Re: [Qemu-devel] [PATCH v2 2/2] vl: Partial support for non-scalar properties with -object

2018-05-28 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Aug 14, 2017 at 01:24:17PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > On Fri, Aug 11, 2017 at 12:47:44PM -0500, Eric Blake wrote: >> >> On 08/11/2017 11:05 AM, Markus Armbruster wrote: >> >> > We've wanted -object to support non-

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] spapr: remove irq_hint parameter from spapr_irq_alloc()

2018-05-28 Thread Cédric Le Goater
On 05/28/2018 09:18 AM, Thomas Huth wrote: > On 28.05.2018 09:06, Cédric Le Goater wrote: >> On 05/28/2018 08:17 AM, Thomas Huth wrote: >>> On 25.05.2018 16:02, Greg Kurz wrote: On Fri, 18 May 2018 18:44:02 +0200 Cédric Le Goater wrote: > This IRQ number hint can possibly be use

[Qemu-devel] [Bug 1773753] [NEW] virsh managed save fails with qemu version v2.12.0-813-g5a5c383b13-dirty on powerpc

2018-05-28 Thread Satheesh Rajendran
Public bug reported: Host Env: IBM Power8 with Fedora28 base with compiled upstream kernel, qemu, libvirt. Host Kernel: 4.17.0-rc5-00069-g3acf4e395260 qemu-kvm(5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b): v2.12.0-813-g5a5c383b13-dirty libvirt(4804a4db33a37f828d033733bc47f6eff5d262c3): Guest Kern

Re: [Qemu-devel] release retrospective, next release timing, numbering

2018-05-28 Thread Paolo Bonzini
On 02/05/2018 11:10, Daniel P. Berrangé wrote: >> it would allow to postpone incompatible removals to relatively seldom >> major releases, add new features during more often minor releases, and >> fix bugs during regular patch releases. >> >> major releases can be scheduled every 1-2 years, for exa

[Qemu-devel] [Bug 1773753] Re: virsh managed save fails with qemu version v2.12.0-813-g5a5c383b13-dirty on powerpc

2018-05-28 Thread Satheesh Rajendran
To recover from the failed state it requires below steps to be run. # virsh destroy avocado-vt-vm1 Domain avocado-vt-vm1 destroyed # virsh undefine --managed-save avocado-vt-vm1 Domain avocado-vt-vm1 has been undefined -- You received this bug notification because you are a member of qemu- deve

Re: [Qemu-devel] [PATCH v2 2/2] vl: Partial support for non-scalar properties with -object

2018-05-28 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Aug 14, 2017 at 07:49:54AM +0200, Markus Armbruster wrote: >> Eric Blake writes: >> >> > On 08/11/2017 11:05 AM, Markus Armbruster wrote: >> >> We've wanted -object to support non-scalar properties for a while. >> >> Dan Berrange tried in "[PATCH v4 00/10]Pr

Re: [Qemu-devel] [PATCH v7 04/11] hmp: disable monitor in preconfig state

2018-05-28 Thread Igor Mammedov
On Fri, 25 May 2018 16:39:34 -0300 Eduardo Habkost wrote: > On Fri, May 25, 2018 at 08:05:30AM +0200, Markus Armbruster wrote: > > Eduardo Habkost writes: > > > > > On Thu, May 24, 2018 at 08:16:20PM +0200, Markus Armbruster wrote: > > >> Markus Armbruster writes: > > >> > > >> > Igor M

Re: [Qemu-devel] [PATCH v2 0/2] vl: Partial support for non-scalar properties with -object

2018-05-28 Thread Markus Armbruster
Daniel P. Berrangé writes: > Just a ping to say I'd like us to restart work this patch and try to get > it mergable for the 2.13 cycle, so I can rely it on for the ACL support > I've had out of tree since 2.6 :-) Fair enough. I'll see what I can do.

Re: [Qemu-devel] [PATCH v7 00/11] enable numa configuration before machine_init() from QMP

2018-05-28 Thread Igor Mammedov
On Thu, 24 May 2018 17:42:03 +0200 Markus Armbruster wrote: > Eduardo Habkost writes: > > > I'm queueing this version (including v8 of patches 5-7) on > > numa-next. > > > > Markus, Daniel: you were the people I remember expressing some > > concerns about the new preconfig mechanism. Do you ha

Re: [Qemu-devel] [Bug 1773753] [NEW] virsh managed save fails with qemu version v2.12.0-813-g5a5c383b13-dirty on powerpc

2018-05-28 Thread Peter Xu
On Mon, May 28, 2018 at 09:12:21AM -, Satheesh Rajendran wrote: > Public bug reported: > > Host Env: > IBM Power8 with Fedora28 base with compiled upstream kernel, qemu, libvirt. > > Host Kernel: 4.17.0-rc5-00069-g3acf4e395260 > > qemu-kvm(5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b): > v2.12.0

Re: [Qemu-devel] [PATCH 2/8] qcow: Switch get_cluster_offset to be byte-based

2018-05-28 Thread Kevin Wolf
Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the internal helper function > get_cluster_offset(), by changing n_start and n_end to by byte > offsets rather than sector indices within the cl

Re: [Qemu-devel] [RFC 3/3] acpi-build: allocate mcfg for multiple host bridges

2018-05-28 Thread Laszlo Ersek
On 05/23/18 09:32, Laszlo Ersek wrote: > On 05/23/18 01:40, Michael S. Tsirkin wrote: >> On Wed, May 23, 2018 at 12:42:09AM +0200, Laszlo Ersek wrote: >>> Hold on, >>> >>> On 05/22/18 21:51, Laszlo Ersek wrote: >>> It had taken years until the edk2 core gained a universal PciHostBridgeDxe

Re: [Qemu-devel] [PATCH 3/8] qcow: Switch qcow_co_readv to byte-based calls

2018-05-28 Thread Kevin Wolf
Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the internals of the qcow > driver read function, by iterating over offset/bytes instead of > sector_num/nb_sectors, and repurposing index_in_cl

Re: [Qemu-devel] [PATCH 4/8] qcow: Switch qcow_co_writev to byte-based calls

2018-05-28 Thread Kevin Wolf
Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the internals of the qcow > driver write function, by iterating over offset/bytes instead of > sector_num/nb_sectors, and repurposing index_in_c

Re: [Qemu-devel] [PATCH v2 20/20] arch_init: sort architectures

2018-05-28 Thread Laszlo Ersek
On 05/25/18 18:48, Michael S. Tsirkin wrote: > Sort alphabetically. Will help us see if anything is missing (e.g. tile > is not there now). > > Signed-off-by: Michael S. Tsirkin > --- > arch_init.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch_in

Re: [Qemu-devel] [PATCH 0/8] block: more byte-based cleanups: vectored I/O

2018-05-28 Thread Kevin Wolf
Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: > Based-on: <20180424192506.149089-1-ebl...@redhat.com> > ([PATCH v2 0/6] block: byte-based AIO read/write) > Based-on: <20180424220157.177385-1-ebl...@redhat.com> > ([PATCH] block: Merge .bdrv_co_writev{, _flags} in drivers) > > My quest continue

Re: [Qemu-devel] [PATCH v3] block: fix QEMU crash with scsi-hd and drive_del

2018-05-28 Thread Greg Kurz
On Fri, 25 May 2018 16:02:46 +0200 Kevin Wolf wrote: > Am 25.05.2018 um 13:53 hat Greg Kurz geschrieben: > > On Fri, 25 May 2018 10:37:15 +0200 > > Kevin Wolf wrote: > > > > > Am 25.05.2018 um 00:53 hat Greg Kurz geschrieben: > > > > Removing a drive with drive_del while it is being used to

[Qemu-devel] [PATCH v4] block: fix QEMU crash with scsi-hd and drive_del

2018-05-28 Thread Greg Kurz
Removing a drive with drive_del while it is being used to run an I/O intensive workload can cause QEMU to crash. An AIO flush can yield at some point: blk_aio_flush_entry() blk_co_flush(blk) bdrv_co_flush(blk->root->bs) ... qemu_coroutine_yield() and let the HMP command to run, free bl

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] spapr: remove irq_hint parameter from spapr_irq_alloc()

2018-05-28 Thread Greg Kurz
On Mon, 28 May 2018 11:20:36 +0200 Cédric Le Goater wrote: > On 05/28/2018 09:18 AM, Thomas Huth wrote: > > On 28.05.2018 09:06, Cédric Le Goater wrote: > >> On 05/28/2018 08:17 AM, Thomas Huth wrote: > >>> On 25.05.2018 16:02, Greg Kurz wrote: > On Fri, 18 May 2018 18:44:02 +0200 > >>

Re: [Qemu-devel] [PATCH 01/13] 9p: linux: Fix a couple Linux assumptions

2018-05-28 Thread Greg Kurz
On Sat, 26 May 2018 01:23:03 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > - Guard two Linux only headers. > - Define `ENOATTR` only if not only defined >(it's defined in system headers on Darwin). > > Signed-off-by: Keno Fischer > --- > fsdev/file-op-9p.h | 2 ++ > hw

[Qemu-devel] [PATCH] aspeed_scu: Implement RNG register

2018-05-28 Thread Joel Stanley
The ASPEED SoCs contain a single register that returns random data when read. This models that register so that guests can use it. Signed-off-by: Joel Stanley --- hw/misc/aspeed_scu.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_s

[Qemu-devel] [Bug 1773753] Re: virsh managed save fails with qemu version v2.12.0-813-g5a5c383b13-dirty on powerpc

2018-05-28 Thread Satheesh Rajendran
with above patch compiled on top of latest upstream fails with below error: # virsh managedsave avocado-vt-vm1 error: Failed to save domain avocado-vt-vm1 state error: internal error: guest unexpectedly quit rest of the behaviour same.. # virsh start avocado-vt-vm1 gets hung ---crtl+c --> t

Re: [Qemu-devel] [PATCH v2 1/1] sandbox: disable -sandbox if CONFIG_SECCOMP undefined

2018-05-28 Thread Yi Min Zhao
在 2018/5/25 下午5:36, Eduardo Otubo 写道: On 05/25/2018 06:23 AM, Yi Min Zhao wrote: 在 2018/5/24 下午9:40, Paolo Bonzini 写道: On 24/05/2018 09:53, Eduardo Otubo wrote: Thanks! But I have not got response from Paolo.  I have added him to CC list.   I'll just wait one more ACK and will send a pu

Re: [Qemu-devel] [PATCH 13/13] 9p: darwin: configure: Allow VirtFS on Darwin

2018-05-28 Thread Greg Kurz
On Sat, 26 May 2018 01:23:15 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > Signed-off-by: Keno Fischer > --- > Makefile.objs | 1 + > configure | 23 +++ > 2 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/Makefile.objs b/Makefile.objs

Re: [Qemu-devel] [PATCH 42/42] qemu-iotests: Test job-* with block jobs

2018-05-28 Thread Max Reitz
On 2018-05-17 15:50, Kevin Wolf wrote: > Am 15.05.2018 um 01:44 hat Max Reitz geschrieben: >> On 2018-05-09 18:26, Kevin Wolf wrote: >>> This adds a test case that tests the new job-* QMP commands with >>> mirror and backup block jobs. >>> >>> Signed-off-by: Kevin Wolf >>> --- >>> tests/qemu-iote

[Qemu-devel] [Bug 1773753] Re: virsh managed save fails with qemu version v2.12.0-813-g5a5c383b13-dirty on powerpc

2018-05-28 Thread Satheesh Rajendran
followed by further attempts saves the domains as reported but issue still same. #virsh managedsave avocado-vt-vm1 Domain avocado-vt-vm1 state saved by libvirt # virsh start avocado-vt-vm1 hung # virsh list --all IdName State --

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] spapr: remove irq_hint parameter from spapr_irq_alloc()

2018-05-28 Thread Cédric Le Goater
On 05/28/2018 02:09 PM, Greg Kurz wrote: > On Mon, 28 May 2018 11:20:36 +0200 > Cédric Le Goater wrote: > >> On 05/28/2018 09:18 AM, Thomas Huth wrote: >>> On 28.05.2018 09:06, Cédric Le Goater wrote: On 05/28/2018 08:17 AM, Thomas Huth wrote: > On 25.05.2018 16:02, Greg Kurz wrote:

Re: [Qemu-devel] What is the best git-way to add a new board?

2018-05-28 Thread Peter Maydell
On 28 May 2018 at 06:02, Philippe Mathieu-Daudé wrote: > 1/ how RISC-V boards got merged > > Add devices individually, > finally add the board and default-configs/Makefile rules at once. > > PRO: commits are easier to cherry-pick/rebase > CON: you can not test a single patch until applying the

Re: [Qemu-devel] [PATCH] aspeed_scu: Implement RNG register

2018-05-28 Thread Cédric Le Goater
Hello Joel, On 05/28/2018 02:46 PM, Joel Stanley wrote: > The ASPEED SoCs contain a single register that returns random data when > read. This models that register so that guests can use it. > > Signed-off-by: Joel Stanley > --- > hw/misc/aspeed_scu.c | 19 +++ > 1 file changed

Re: [Qemu-devel] [PULL 20/37] qcow2: Give the refcount cache the minimum possible size by default

2018-05-28 Thread Peter Maydell
On 28 May 2018 at 09:58, Alberto Garcia wrote: > On Mon 28 May 2018 10:38:55 AM CEST, Kevin Wolf wrote: >>> > +if (!refcount_cache_size_set) { >>> > +*refcount_cache_size = MIN_REFCOUNT_CACHE_SIZE * >>> > s->cluster_size; >>> >>> ...but in the else clause down here, we don't h

Re: [Qemu-devel] [PATCH 02/13] 9p: Avoid warning if FS_IOC_GETVERSION is not defined

2018-05-28 Thread Greg Kurz
On Sat, 26 May 2018 01:23:04 -0400 k...@juliacomputing.com wrote: > From: Keno Fischer > > Signed-off-by: Keno Fischer > --- > hw/9pfs/9p-local.c | 39 +++ > 1 file changed, 19 insertions(+), 20 deletions(-) > > diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-

Re: [Qemu-devel] [PULL 20/37] qcow2: Give the refcount cache the minimum possible size by default

2018-05-28 Thread Alberto Garcia
On Mon 28 May 2018 03:49:07 PM CEST, Peter Maydell wrote: > On 28 May 2018 at 09:58, Alberto Garcia wrote: >> On Mon 28 May 2018 10:38:55 AM CEST, Kevin Wolf wrote: > +if (!refcount_cache_size_set) { > +*refcount_cache_size = MIN_REFCOUNT_CACHE_SIZE * > s->clust

Re: [Qemu-devel] [PATCH] aspeed_scu: Implement RNG register

2018-05-28 Thread Joel Stanley
On 28 May 2018 at 23:17, Cédric Le Goater wrote: > Hello Joel, > > On 05/28/2018 02:46 PM, Joel Stanley wrote: >> The ASPEED SoCs contain a single register that returns random data when >> read. This models that register so that guests can use it. >> >> Signed-off-by: Joel Stanley >> --- >> hw/m

Re: [Qemu-devel] [RFC v2 1/6] hw/vfio: Retrieve valid iova ranges from kernel

2018-05-28 Thread Auger Eric
Hi Shameer, On 05/16/2018 05:20 PM, Shameer Kolothum wrote: > This makes use of the newly introduced iova cap chains added > to the type1 VFIO_IOMMU_GET_INFO ioctl. > > The retrieved iova info is stored in a list for later use. > > Signed-off-by: Shameer Kolothum > --- > hw/vfio/common.c

Re: [Qemu-devel] [RFC v2 6/6] hw/arm: Populate non-contiguous memory regions

2018-05-28 Thread Auger Eric
Hi Shameer, On 05/16/2018 05:20 PM, Shameer Kolothum wrote: > In case valid iova regions are non-contiguous, split the > RAM mem into a 1GB non-pluggable dimm and remaining as a > single pc-dimm mem. Please can you explain where does this split come from? Currently we have 254 GB non pluggable RA

Re: [Qemu-devel] [RFC v2 4/6] hw/arm: Changes required to accommodate non-contiguous DT mem nodes

2018-05-28 Thread Auger Eric
Hi Shameer, On 05/16/2018 05:20 PM, Shameer Kolothum wrote: > This makes changes to the DT mem node creation such that its easier > to add non-contiguous mem modeled as non-pluggable and a pc-dimm > mem later. See comments below. I think you should augment the description here with what the patch

Re: [Qemu-devel] [RFC v2 5/6] hw/arm: ACPI SRAT changes to accommodate non-contiguous mem

2018-05-28 Thread Auger Eric
Hi Shameer, On 05/16/2018 05:20 PM, Shameer Kolothum wrote: > This is in preparation for the next patch where initial ram is split > into a non-pluggable chunk and a pc-dimm modeled mem if the vaild valid > iova regions are non-contiguous. > > Signed-off-by: Shameer Kolothum > --- > hw/arm/vir

Re: [Qemu-devel] [RFC v2 3/6] hw/arm/virt: Add pc-dimm mem hotplug framework

2018-05-28 Thread Auger Eric
Hi Shameer, On 05/16/2018 05:20 PM, Shameer Kolothum wrote: > This will be used in subsequent patches to model a chunk of > memory as pc-dimm(cold plug) if the valid iova regions are > non-contiguous. This is not yet a full hotplug support. Please can you give more details about this restriction?

Re: [Qemu-devel] [RFC v2 0/6] hw/arm: Add support for non-contiguous iova regions

2018-05-28 Thread Auger Eric
Hi Shameer, On 05/16/2018 05:20 PM, Shameer Kolothum wrote: > When the kernel reports valid iova ranges as non-contiguous, > memory should be allocated to Guest in such a way that > reserved regions(holes) are not visible by Guest. > > This series retrieves the valid iova ranges based on the new

Re: [Qemu-devel] [RFC v2 2/6] hw/arm/virt: Enable dynamic generation of guest RAM memory regions

2018-05-28 Thread Auger Eric
Hi Shameer, On 05/16/2018 05:20 PM, Shameer Kolothum wrote: > Register ram_memory_region_init notifier to allocate memory region > from system memory. At this stage the commit message does not explain why you need a machine init done notifier. Also the commit title does not summarize the actual ch

[Qemu-devel] Cortex M0 emulation tasks

2018-05-28 Thread Stefan Hajnoczi
Hi, I took a look at what's required for ARM Cortex M0 emulation that we need for the micro:bit ARM board. The following notes are based on Appendix D3 of the ARMv6-M Architecture Reference Manual that Peter Maydell recommended. Several people can work on this since there are many smaller tasks.

Re: [Qemu-devel] [PATCH 3/4] spapr: introduce a generic IRQ frontend to the machine

2018-05-28 Thread Greg Kurz
On Fri, 18 May 2018 18:44:04 +0200 Cédric Le Goater wrote: > This proposal moves all the related IRQ routines of the sPAPR machine > behind a class interface to prepare for future changes in the IRQ > controller model. First of which is a reorganization of the IRQ number > space layout and a seco

Re: [Qemu-devel] [PATCH] aspeed_scu: Implement RNG register

2018-05-28 Thread Joel Stanley
On 28 May 2018 at 23:33, Joel Stanley wrote: > On 28 May 2018 at 23:17, Cédric Le Goater wrote: >> Hello Joel, >> >> On 05/28/2018 02:46 PM, Joel Stanley wrote: >>> The ASPEED SoCs contain a single register that returns random data when >>> read. This models that register so that guests can use i

[Qemu-devel] [PATCH v4 0/4] qdev: remove DeviceClass::init/exit()

2018-05-28 Thread Markus Armbruster
This lovely series got stuck after v3, so I took the liberty to respin it. v4: * PATCH 1+2 unchanged * PATCH 3+4 reshuffled a bit, missing documentation updates supplied Philippe's cover letter: Since v2: - rebased for 2.13 (Markus) - dropped 2 patches already merged (Gerd) - start senten

[Qemu-devel] [PATCH v4 3/4] qdev: Simplify the SysBusDeviceClass::init path

2018-05-28 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Instead of using SysBusDeviceClass::realize -> DeviceClass::realize -> DeviceClass::init -> sysbus_device_init -> SysBusDeviceClass::init Simplify the path by directly calling SysBusDeviceClass::init in SysBusDeviceClass::realize:

[Qemu-devel] [PATCH v4 1/4] hw/i2c/smbus: Use DeviceClass::realize instead of SMBusDeviceClass::init

2018-05-28 Thread Markus Armbruster
From: Philippe Mathieu-Daudé SMBusDeviceClass::init is no more used, remove it. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180419212727.26095-2-f4...@amsat.org> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- hw/i2c/smbus.c | 9 - hw/i2c/smbus_ee

[Qemu-devel] [PATCH v4 4/4] qdev: Remove DeviceClass::init() and ::exit()

2018-05-28 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Since no devices use it, we can safely remove it. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180419212727.26095-5-f4...@amsat.org> Reviewed-by: Markus Armbruster [Removal of DeviceClass::init() moved from previous patch, missing documentation updates supp

[Qemu-devel] [PATCH v4 2/4] hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init

2018-05-28 Thread Markus Armbruster
From: Philippe Mathieu-Daudé I2CSlaveClass::init is no more used, remove it. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180419212727.26095-3-f4...@amsat.org> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- hw/audio/wm8750.c | 8 +++- hw/display/ssd030

Re: [Qemu-devel] [PATCH] aspeed_scu: Implement RNG register

2018-05-28 Thread Cédric Le Goater
On 05/28/2018 04:29 PM, Joel Stanley wrote: > On 28 May 2018 at 23:33, Joel Stanley wrote: >> On 28 May 2018 at 23:17, Cédric Le Goater wrote: >>> Hello Joel, >>> >>> On 05/28/2018 02:46 PM, Joel Stanley wrote: The ASPEED SoCs contain a single register that returns random data when read

[Qemu-devel] [PATCH] qcow2: Fix Coverity warning when calculating the refcount cache size

2018-05-28 Thread Alberto Garcia
MIN_REFCOUNT_CACHE_SIZE is 4 and the cluster size is guaranteed to be at most 2MB, so the minimum refcount cache size (in bytes) is always going to fit in a 32-bit integer. Coverity doesn't know that, and since we're storing the result in a uint64_t (*refcount_cache_size) it thinks that we need th

Re: [Qemu-devel] [PATCH 4/4] spapr: introduce a new IRQ backend using fixed IRQ number ranges

2018-05-28 Thread Greg Kurz
On Fri, 18 May 2018 18:44:05 +0200 Cédric Le Goater wrote: > The proposed layout of the IRQ number space is organized as follow : > >RANGES DEVICES > >0x - 0x0FFFReserved for future use (IPI = 2) >0x1000 - 0x10001 EPOW >0x1001 - 0x10011 HOTPLUG >0

Re: [Qemu-devel] [PATCH v7 4/4] monitor: add lock to protect mon_fdsets

2018-05-28 Thread Markus Armbruster
Peter Xu writes: > On Thu, May 24, 2018 at 11:03:55AM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > Similar to previous patch, but introduce a new global big lock for >> > mon_fdsets. Take it where needed. >> >> The previous patch is "monitor: more comments on lock-free >> fleid

[Qemu-devel] [PATCH v2] aspeed_scu: Implement RNG register

2018-05-28 Thread Joel Stanley
The ASPEED SoCs contain a single register that returns random data when read. This models that register so that guests can use it. The random number data register has a corresponding control register, data returns a different number regardless of the state of the enabled bit, so the model follows

Re: [Qemu-devel] [RFC PATCH] mmio-exec: Make device return MemoryRegion rather than host pointer

2018-05-28 Thread Cédric Le Goater
On 05/28/2018 07:22 AM, Cédric Le Goater wrote: > On 04/26/2018 05:09 PM, Peter Maydell wrote: >> Our current interface for allowing a device to support execution from >> MMIO regions has the device return a pointer into host memory >> containing the contents to be used for execution. Unfortunatel

Re: [Qemu-devel] [PATCH v2] aspeed_scu: Implement RNG register

2018-05-28 Thread Cédric Le Goater
On 05/28/2018 05:22 PM, Joel Stanley wrote: > The ASPEED SoCs contain a single register that returns random data when > read. This models that register so that guests can use it. > > The random number data register has a corresponding control register, > data returns a different number regardless

Re: [Qemu-devel] [PATCH v4 0/4] qdev: remove DeviceClass::init/exit()

2018-05-28 Thread Paolo Bonzini
On 28/05/2018 16:45, Markus Armbruster wrote: > This lovely series got stuck after v3, so I took the liberty to respin > it. > > v4: > * PATCH 1+2 unchanged > * PATCH 3+4 reshuffled a bit, missing documentation updates supplied At long last! Queued,t hanks. Paolo

Re: [Qemu-devel] [PATCH v4 0/4] qdev: remove DeviceClass::init/exit()

2018-05-28 Thread Philippe Mathieu-Daudé
On 05/28/2018 12:39 PM, Paolo Bonzini wrote: > On 28/05/2018 16:45, Markus Armbruster wrote: >> This lovely series got stuck after v3, so I took the liberty to respin >> it. >> >> v4: >> * PATCH 1+2 unchanged >> * PATCH 3+4 reshuffled a bit, missing documentation updates supplied > > At long last!

Re: [Qemu-devel] [PATCH 4/4] spapr: introduce a new IRQ backend using fixed IRQ number ranges

2018-05-28 Thread Cédric Le Goater
On 05/28/2018 05:18 PM, Greg Kurz wrote: > On Fri, 18 May 2018 18:44:05 +0200 > Cédric Le Goater wrote: > >> The proposed layout of the IRQ number space is organized as follow : >> >>RANGES DEVICES >> >>0x - 0x0FFFReserved for future use (IPI = 2) >>0x1000 - 0x1000

Re: [Qemu-devel] [PATCH v2] Remove unwanted crlf conversion in serial

2018-05-28 Thread Paolo Bonzini
On 24/05/2018 07:36, Thomas Huth wrote: > On 23.05.2018 21:50, Patryk Olszewski wrote: >> This patch fixes bug in serial that made it almost impossible for guest >> to communicate with devices through host's serial. >> >> OPOST flag in c_oflag enables output processing letting other flags in >> c_o

Re: [Qemu-devel] [PATCH v2] Remove unwanted crlf conversion in serial

2018-05-28 Thread Paolo Bonzini
On 23/05/2018 21:50, Patryk Olszewski wrote: > This patch fixes bug in serial that made it almost impossible for guest > to communicate with devices through host's serial. > > OPOST flag in c_oflag enables output processing letting other flags in > c_oflag take effect. Usually in c_oflag ONLCR fla

Re: [Qemu-devel] [PATCH v2] aspeed_scu: Implement RNG register

2018-05-28 Thread Philippe Mathieu-Daudé
Hi Joel, On 05/28/2018 12:22 PM, Joel Stanley wrote: > The ASPEED SoCs contain a single register that returns random data when > read. This models that register so that guests can use it. > > The random number data register has a corresponding control register, > data returns a different number r

  1   2   >