Re: [Qemu-devel] [PATCH] fw_cfg_mem: add read memory region callback

2018-09-12 Thread Marc-André Lureau
Hi On Wed, Sep 12, 2018 at 9:22 AM Li Qiang wrote: > > The write/read should be paired, this can avoid the > NULL-deref while the guest reads the fw_cfg port. > > Signed-off-by: Li Qiang Do you have a reproducer and/or a backtrace? memory_region_dispatch_write() checks if ops->write != NULL. >

Re: [Qemu-devel] [PATCH V12 01/19] filter-rewriter: Add TCP state machine and fix memory leak in connection_track_table

2018-09-12 Thread Jason Wang
On 2018年09月03日 12:38, Zhang Chen wrote: We add almost full TCP state machine in filter-rewriter, except TCPS_LISTEN and some simplify in VM active close FIN states. Need to explain why it can be simplified. After a net connection is closed, we didn't clear its releated resources in connec

[Qemu-devel] Can I convert backing file to internal snapshot?

2018-09-12 Thread lampahome
I have two qcow2 A & B, and A is backing file of B. Can I convert both A&B to one image and containing data of both? ex: one new image will contain data of A and B. When I check it by qemu-img info, I can see one snapshot in the new image. thanks

Re: [Qemu-devel] [PATCH] util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb

2018-09-12 Thread Fam Zheng
On Wed, 09/05 11:33, Sergio Lopez wrote: > AIO Coroutines shouldn't by managed by an AioContext different than the > one assigned when they are created. aio_co_enter avoids entering a > coroutine from a different AioContext, calling aio_co_schedule instead. > > Scheduled coroutines are then entere

Re: [Qemu-devel] [PATCH] util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb

2018-09-12 Thread Fam Zheng
On Wed, 09/05 11:33, Sergio Lopez wrote: > AIO Coroutines shouldn't by managed by an AioContext different than the > one assigned when they are created. aio_co_enter avoids entering a > coroutine from a different AioContext, calling aio_co_schedule instead. > > Scheduled coroutines are then entere

Re: [Qemu-devel] [PATCH V12 19/19] docs: Add COLO status diagram to COLO-FT.txt

2018-09-12 Thread Jason Wang
On 2018年09月03日 12:39, Zhang Chen wrote: From: Zhang Chen This diagram make user better understand COLO. Suggested by Markus Armbruster. Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen --- docs/COLO-FT.txt | 34 ++ 1 file changed, 34 insertions(+) di

Re: [Qemu-devel] Can I convert backing file to internal snapshot?

2018-09-12 Thread Fam Zheng
On Wed, 09/12 15:35, lampahome wrote: > I have two qcow2 A & B, and A is backing file of B. > > Can I convert both A&B to one image and containing data of both? > > ex: > one new image will contain data of A and B. When I check it by qemu-img > info, I can see one snapshot in the new image. I be

Re: [Qemu-devel] [PATCH V12 00/19] COLO: integrate colo frame with block replication and COLO proxy

2018-09-12 Thread Jason Wang
On 2018年09月10日 16:16, Zhang Chen wrote: Hi All. Have any comments? Ping... Thanks Zhang Chen I've queued them with some tweaks on the commit log. Please refer the comment of patch 1 and send me a patch on top for a better comment. Thanks

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Tiwei Bie
On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: [...] > > I generally wonder how are restarts of the backend handled > with this approach: closing the VFIO device tends to reset > the whole device. Hi Michael, I missed this comment previously.. This is a good point! In this R

Re: [Qemu-devel] [PATCH v2 1/4] Fix segmentation fault when qemu_signal_init fails

2018-09-12 Thread Fam Zheng
On Fri, 09/07 21:38, Fei Li wrote: > Currently, when qemu_signal_init() fails it only returns a non-zero > value but without propagating any Error. But its callers need a > non-null err when runs error_report_err(err), or else 0->msg occurs. > > To avoid such segmentation fault, add a new Error pa

Re: [Qemu-devel] [PATCH v3 0/1] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2018-09-12 Thread Cédric Le Goater
On 07/30/2018 07:17 PM, Cédric Le Goater wrote: > This is a model of the PCIe Host Bridge (PHB3) controller found on a > Power8 processor. The Power8 processor comes in different flavors: > Venice, Murano, Naple, each having a different number of PHBs. Multi > chip is supported, each chip adding it

Re: [Qemu-devel] [PATCH] fw_cfg_mem: add read memory region callback

2018-09-12 Thread Li Qiang
Hi, Marc-André Lureau 于2018年9月12日周三 下午3:16写道: > Hi > > On Wed, Sep 12, 2018 at 9:22 AM Li Qiang wrote: > > > > The write/read should be paired, this can avoid the > > NULL-deref while the guest reads the fw_cfg port. > > > > Signed-off-by: Li Qiang > > Do you have a reproducer and/or a backtra

Re: [Qemu-devel] [PATCH v2 2/4] ui/vnc.c: polish vnc_init_func

2018-09-12 Thread Fam Zheng
On Fri, 09/07 21:39, Fei Li wrote: > Add a new Error parameter for vnc_display_init() to handle errors > in its caller: vnc_init_func(), just like vnc_display_open() does. > And let the call trace propagate the Error. > > Besides, make vnc_start_worker_thread() return a bool to indicate > whether

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

2018-09-12 Thread dovgaluk
Hi, Ciro! I found several issues in your command lines. Ciro Santilli писал 2018-08-08 02:13: OK, finally got some time to try it out, I'm using c42634d8e3428cfa60672c3ba89cabefc720cde9 from rr-180725. Replay works well as far as I can tell, so I moved to the reverse debugging: /home/ciro/bak

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

2018-09-12 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 v6 00/25] Fixing record/replay and adding reverse debugging

2018-09-12 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 v6 01/25] block: implement bdrv_snapshot_goto for blkreplay

2018-09-12 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 v6 08/25] replay: provide and accessor for rr filename

2018-09-12 Thread Pavel Dovgalyuk
This patch adds an accessor function for the name of the record/replay log file. Adding an accessor instead of making variable global, prevents accidental modification of this variable by other modules. Signed-off-by: Pavel Dovgalyuk --- include/sysemu/replay.h |2 ++ replay/replay.c

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

2018-09-12 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 v6 02/25] replay: disable default snapshot for record/replay

2018-09-12 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 v6 05/25] replay: finish record/replay before closing the disks

2018-09-12 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 v6 10/25] replay: introduce breakpoint at the specified step

2018-09-12 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 v6 11/25] replay: implement replay-seek command to proceed to the desired step

2018-09-12 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 v6 06/25] qcow2: introduce icount field for snapshots

2018-09-12 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 v6 09/25] replay: introduce info hmp/qmp command

2018-09-12 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 Acked-by: Dr. David Alan Gilbert --

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

2018-09-12 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 v6 07/25] migration: introduce icount field for snapshots

2018-09-12 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 v6 14/25] translator: fix breakpoint processing

2018-09-12 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 v6 13/25] replay: refine replay-time module

2018-09-12 Thread Pavel Dovgalyuk
This patch removes refactoring artifacts from the replay/replay-time.c Signed-off-by: Pavel Dovgalyuk --- replay/replay-time.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/replay/replay-time.c b/replay/replay-time.c index 17caf35..89860

Re: [Qemu-devel] [PATCH v2 4/4] qemu_thread_create: propagate the error to callers to handle

2018-09-12 Thread Fam Zheng
On Fri, 09/07 21:39, Fei Li wrote: > Make qemu_thread_create() return a Boolean to indicate if it succeeds > rather than failing with an error. And add an Error parameter to hold > the error message and let the callers handle it. > > Besides, directly return if thread->data is NULL to avoid the >

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

2018-09-12 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 v6 12/25] replay: flush events when exiting

2018-09-12 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 v6 21/25] replay: replay BH for IDE trim operation

2018-09-12 Thread Pavel Dovgalyuk
This patch makes IDE trim BH deterministic, because it affects the device state. Therefore its invocation should be replayed instead of running at the random moment. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Paolo Bonzini --- hw/ide/core.c |3 ++- 1 file changed, 2 insertions(+), 1 deleti

Re: [Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Jason Wang
On 2018年09月12日 16:01, Claudio wrote: Hello Michael, Jason and all, I am currently using latest mainline QEMU on x86_64 to run a QNX 7 guest. QNX 7 is not free software anymore unfortunately, with the the last open source versions in the 6.x range. I am using the official virtio-net guest dr

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

2018-09-12 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

[Qemu-devel] [PATCH v6 25/25] ui: fix virtual timers

2018-09-12 Thread Pavel Dovgalyuk
UI uses timers based on virtual clock for managing key queue. This is incorrect because this service is not related to the guest state, and its events should not be recorded and replayed. But these timers should stop when the guest is not executing. This patch changes using virtual clock to the new

[Qemu-devel] [PATCH v6 20/25] replay: wake up vCPU when replaying

2018-09-12 Thread Pavel Dovgalyuk
In record/replay icount mode vCPU thread and iothread synchronize the execution using the checkpoints. vCPU thread processes the virtual timers and iothread processes all others. When iothread wants to wake up sleeping vCPU thread, it sends dummy queued work. Therefore it could be the following seq

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

2018-09-12 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 v6 22/25] replay: add BH oneshot event for block layer

2018-09-12 Thread Pavel Dovgalyuk
Replay is capable of recording normal BH events, but sometimes there are single use callbacks scheduled with aio_bh_schedule_oneshot function. This patch enables recording and replaying such callbacks. Block layer uses these events for calling the completion function. Replaying these calls makes th

Re: [Qemu-devel] [PATCH v8 0/8] Take the image size into account when allocating the L2 cache

2018-09-12 Thread Leonid Bloch
Hi Kevin & All, Sorry it took so long to send a new version! I had some very urgent things popping up on several fronts. I will send the new version over this weekend. Thanks for the reminder, and sorry again. Leonid. ___ On 9/10/18 5:33 PM, Kevin Wolf wrote: Hi Leonid, Am 13.08.2018 um 0

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

2018-09-12 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 v6 23/25] timer: introduce new virtual clock

2018-09-12 Thread Pavel Dovgalyuk
Slirp and VNC modules use virtual clock for processing some events that are related to the guest execution speed. But virtual clock-related events are consideres to be deterministic and are recorded/replayed by icount mechanism. But slirp and VNC lie outside the recorded guest core (which includes

[Qemu-devel] [PATCH v6 24/25] slirp: fix ipv6 timers

2018-09-12 Thread Pavel Dovgalyuk
ICMP implementation for IPv6 uses timers based on virtual clock. This is incorrect because this service is not related to the guest state, and its events should not be recorded and replayed. This patch changes using virtual clock to the new virtual_ext clock. Signed-off-by: Pavel Dovgalyuk --- s

Re: [Qemu-devel] [PATCH v6 24/25] slirp: fix ipv6 timers

2018-09-12 Thread Samuel Thibault
Pavel Dovgalyuk, le mer. 12 sept. 2018 11:20:07 +0300, a ecrit: > ICMP implementation for IPv6 uses timers based on virtual clock. > This is incorrect because this service is not related to the guest state, > and its events should not be recorded and replayed. > This patch changes using virtual clo

[Qemu-devel] [PATCH] change get_image_size return type to int64_t

2018-09-12 Thread 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 directory root@hasw

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. I don't understand. Doesn't it mean that if you force the

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin via Qemu-devel
Fam Zheng 於 2018-09-12 17:34 寫道: > On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > > There is a rare case which the size of last > compressed cluster > is larger than the cluster size, which will cause the > file is > not aligned at the sector boundary. I don't under

Re: [Qemu-devel] [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK]

2018-09-12 Thread Alex Bennée
Marek Vasut writes: > On 09/11/2018 05:08 PM, Alex Bennée wrote: >> >> Marek Vasut writes: >> >>> On 09/11/2018 04:14 PM, Laurent Vivier wrote: Le 11/09/2018 à 16:06, Alex Bennée a écrit: >> >> I don't think so - it's an artefact of the way the buildroot toolchain >> is built. But the re

Re: [Qemu-devel] [PATCH] util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb

2018-09-12 Thread Kevin Wolf
Am 12.09.2018 um 09:41 hat Fam Zheng geschrieben: > On Wed, 09/05 11:33, Sergio Lopez wrote: > > AIO Coroutines shouldn't by managed by an AioContext different than the > > one assigned when they are created. aio_co_enter avoids entering a > > coroutine from a different AioContext, calling aio_co_s

Re: [Qemu-devel] [PATCH] fw_cfg_mem: add read memory region callback

2018-09-12 Thread Laszlo Ersek
On 09/12/18 10:02, Li Qiang wrote: > Hi, > > Marc-André Lureau 于2018年9月12日周三 下午3:16写道: > >> Hi >> >> On Wed, Sep 12, 2018 at 9:22 AM Li Qiang wrote: >>> >>> The write/read should be paired, this can avoid the >>> NULL-deref while the guest reads the fw_cfg port. >>> >>> Signed-off-by: Li Qiang

Re: [Qemu-devel] [PATCH 2/2] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Kevin Wolf
Am 11.09.2018 um 20:37 hat Jeff Cody geschrieben: > On Tue, Sep 11, 2018 at 02:22:31PM -0400, John Snow wrote: > > Once we load the image, will the header get rewritten into a compliant > > format? > > Hmm - I think in some code paths, but not all. I don't think the answer is > 'yes' universally,

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-12 Thread Paolo Bonzini
On 12/09/2018 03:31, Fam Zheng wrote: >>> >>> ctx is qemu_aio_context here, so there's no interaction with IOThread. >> In this case, it should be okay to have the reentrancy, what is the bug >> that this patch is fixing? > The same symptom as in the previous patch: virtio_scsi_handle_cmd_vq hangs.

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Wed, 09/12 17:52, yuchenlin wrote: > > Fam Zheng 於 2018-09-12 17:34 寫道: > > On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > > > There is a rare case which the size of last > > compressed cluster > is larger than the cluster size, which will cause the > > file is >

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. > > Signed-off-by: yuchenlin > --- > block/vmdk.c | 18 +

[Qemu-devel] [PATCH] sdl2: show console #0 unconditionally

2018-09-12 Thread Gerd Hoffmann
Otherwise sdl2 will show no window in case no graphical display device is present. Reproducer: qemu -nodefaults -display sdl -serial vc Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 0a9a18a964..2696b9

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-12 Thread Fam Zheng
On Wed, 09/12 13:11, Paolo Bonzini wrote: > On 12/09/2018 03:31, Fam Zheng wrote: > >>> > >>> ctx is qemu_aio_context here, so there's no interaction with IOThread. > >> In this case, it should be okay to have the reentrancy, what is the bug > >> that this patch is fixing? > > The same symptom as i

[Qemu-devel] [PATCH] usb-hub: clear suspend on detach

2018-09-12 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 5d9743ef93..dc368179d1 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -191,6 +191,10 @@ static void usb_hub_detach(USBPort *port1)

Re: [Qemu-devel] [PATCH v0 2/2] block: postpone the coroutine executing if the BDS's is drained

2018-09-12 Thread Denis Plotnikov
On 10.09.2018 15:41, Kevin Wolf wrote: Am 29.06.2018 um 14:40 hat Denis Plotnikov geschrieben: Fixes the problem of ide request appearing when the BDS is in the "drained section". Without the patch the request can come and be processed by the main event loop, as the ide requests are processe

[Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Li Qiang
To avoid NULL-deref for the devices without read callbacks Signed-off-by: Li Qiang --- memory.c | 4 1 file changed, 4 insertions(+) diff --git a/memory.c b/memory.c index 9b73892768..48d025426b 100644 --- a/memory.c +++ b/memory.c @@ -406,6 +406,10 @@ static MemTxResult memory_region_old

Re: [Qemu-devel] [PATCH] fw_cfg_mem: add read memory region callback

2018-09-12 Thread Li Qiang
Hi Laszlo, Laszlo Ersek 于2018年9月12日周三 下午6:36写道: > On 09/12/18 10:02, Li Qiang wrote: > > Hi, > > > > Marc-André Lureau 于2018年9月12日周三 下午3:16写道: > > > >> Hi > >> > >> On Wed, Sep 12, 2018 at 9:22 AM Li Qiang wrote: > >>> > >>> The write/read should be paired, this can avoid the > >>> NULL-deref

[Qemu-devel] [PATCH 2/3] display/edid: add region helper.

2018-09-12 Thread Gerd Hoffmann
Create a io region for an EDID data block. Signed-off-by: Gerd Hoffmann --- include/hw/display/edid.h | 4 hw/display/edid-region.c | 33 + hw/display/Makefile.objs | 1 + 3 files changed, 38 insertions(+) create mode 100644 hw/display/edid-region.c dif

[Qemu-devel] [PATCH 3/3] display/stdvga: add edid support.

2018-09-12 Thread Gerd Hoffmann
This patch adds edid support to the qemu stdvga. It is turned off by default and can be enabled with the new edid property. The patch also adds xres and yres properties to specify the video mode you want the guest use. Works only with edid enabled and updated guest driver. The mmio bar of the s

[Qemu-devel] [PATCH 1/3] display/edid: add edid generator to qemu.

2018-09-12 Thread Gerd Hoffmann
EDID is a metadata format to describe monitors. On physical hardware the monitor has an eeprom with that data block which can be read over i2c bus. On a linux system you can usually find the EDID data block in /sys/class/drm/$card/$connector/edid. xorg ships a edid-decode utility which you can u

Re: [Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2018 at 10:01:34AM +0200, Claudio wrote: > Hello Michael, Jason and all, > > I am currently using latest mainline QEMU on x86_64 to run a QNX 7 guest. > > QNX 7 is not free software anymore unfortunately, with the > the last open source versions in the 6.x range. > > I am using t

Re: [Qemu-devel] [PATCH 2/2] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Jeff Cody
On Wed, Sep 12, 2018 at 12:38:56PM +0200, Kevin Wolf wrote: > Am 11.09.2018 um 20:37 hat Jeff Cody geschrieben: > > On Tue, Sep 11, 2018 at 02:22:31PM -0400, John Snow wrote: > > > Once we load the image, will the header get rewritten into a compliant > > > format? > > > > Hmm - I think in some co

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-12 Thread Paolo Bonzini
On 12/09/2018 13:50, Fam Zheng wrote: >> I think it's okay if it is invoked. The sequence is first you stop the >> vq, then you drain the BlockBackends, then you switch AioContext. All >> that matters is the outcome when virtio_scsi_dataplane_stop returns. > Yes, but together with vIOMMU, it also

Re: [Qemu-devel] [PATCH v3 00/13] i386 + x86_64 mttcg

2018-09-12 Thread Paolo Bonzini
On 11/09/2018 22:28, Emilio G. Cota wrote: > v2: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg01122.html > > Changes since v2: > > - Add rth's R-b tag to the last patch > - Drop v2's first 10 patches, since Paolo already picked those up > - Move TCG temps + x86_64_hregs to DisasContex

[Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Claudio
Hello Michael, Jason and all, I am currently using latest mainline QEMU on x86_64 to run a QNX 7 guest. QNX 7 is not free software anymore unfortunately, with the the last open source versions in the 6.x range. I am using the official virtio-net guest driver from QNX 7. During initialization I

Re: [Qemu-devel] [PATCH 2/2] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Jeff Cody
On Wed, Sep 12, 2018 at 08:42:15AM -0400, Jeff Cody wrote: > On Wed, Sep 12, 2018 at 12:38:56PM +0200, Kevin Wolf wrote: > > Am 11.09.2018 um 20:37 hat Jeff Cody geschrieben: > > > On Tue, Sep 11, 2018 at 02:22:31PM -0400, John Snow wrote: > > > > Once we load the image, will the header get rewritt

[Qemu-devel] [PATCH] qom/object: add some interface asserts

2018-09-12 Thread Marc-André Lureau
An interface can't have any instance size or callback, or itself implement other interfaces (this is unsupported). Signed-off-by: Marc-André Lureau --- qom/object.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 75d1d48944..9222b2317

Re: [Qemu-devel] [PATCH v4 0/4] block/rbd: enable filename parsing on open

2018-09-12 Thread Jeff Cody
On Tue, Sep 11, 2018 at 06:32:29PM -0400, Jeff Cody wrote: > Changes from v3: > > > Patch 4: Typo fixed [Eric] > Added examples [Eric] > > Changes from v2: > = > > Patch 4: New, document deprecation. [Eric] > Patch 3,2: Add r-b's > > > Changes from v1:

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Peter Maydell
On 12 September 2018 at 13:32, Li Qiang wrote: > To avoid NULL-deref for the devices without read callbacks > > Signed-off-by: Li Qiang > --- > memory.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/memory.c b/memory.c > index 9b73892768..48d025426b 100644 > --- a/memory.c > +++ b

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

2018-09-12 Thread Marc-André Lureau
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. However, hostmem backends use inconsistent RAM naming, which can cause a n

[Qemu-devel] [PATCH 3/9] qdev: move qdev_prop_register_global_list() to tests

2018-09-12 Thread Marc-André Lureau
The function is only used by a test, move it there. Signed-off-by: Marc-André Lureau --- include/hw/qdev-properties.h | 1 - hw/core/qdev-properties.c | 9 - tests/test-qdev-global-props.c | 18 ++ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/

[Qemu-devel] [PATCH 4/9] qom/globals: move qdev globals to qom

2018-09-12 Thread Marc-André Lureau
Move the global properties handling to QOM. For now, this is just a simple moving & renaming and the globals are only applied to TYPE_DEVICE. The following patches will generalize the global handling to other object types. Signed-off-by: Marc-André Lureau --- include/hw/qdev-core.h | 20

[Qemu-devel] [PATCH 1/9] qom/user-creatable: add a few helper macros

2018-09-12 Thread Marc-André Lureau
Improve a bit code readability. Signed-off-by: Marc-André Lureau --- include/qom/object_interfaces.h | 4 qom/object.c| 4 ++-- qom/object_interfaces.c | 9 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/qom/object_interfaces.h b

[Qemu-devel] [PATCH 6/9] qom/object: set globals when initializing object

2018-09-12 Thread Marc-André Lureau
Set globals for all objects, although only TYPE_DEVICE & TYPE_USER_CREATABLE can have globals for now. Signed-off-by: Marc-André Lureau --- hw/core/qdev.c | 6 -- qom/object.c | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 47306

[Qemu-devel] [PATCH 2/9] accel: register global_props like machine globals

2018-09-12 Thread Marc-André Lureau
global_props is only used for Xen xen_compat_props. It's a static array of GlobalProperty, like machine globals in SET_MACHINE_COMPAT(). Let's register the globals the same way, without extra copy allocation. Signed-off-by: Marc-André Lureau --- include/hw/qdev-properties.h | 29

[Qemu-devel] [PATCH 5/9] qom/globals: generalize object_property_set_globals()

2018-09-12 Thread Marc-André Lureau
Handle calls of object_property_set_globals() with any object type, but only apply globals to TYPE_DEVICE & TYPE_USER_CREATABLE. Signed-off-by: Marc-André Lureau --- qom/globals.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/qom/globals.c b/qom/glob

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

2018-09-12 Thread Marc-André Lureau
hostmem-file and hostmem-memfd use the whole object path for the memory region name, but hostname-ram uses only the path component (the basename): qemu -m 1024 -object memory-backend-ram,id=mem,size=1G -numa node,memdev=mem -monitor stdio (qemu) info ramblock Block NamePSize

[Qemu-devel] [PATCH 8/9] hw/i386: add pc-i440fx-3.1 & pc-q35-3.1

2018-09-12 Thread Marc-André Lureau
The following patch is going to add compatiblity parameters. Signed-off-by: Marc-André Lureau --- include/hw/i386/pc.h | 5 - hw/i386/pc_piix.c| 15 --- hw/i386/pc_q35.c | 13 +++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/include/hw/i386/p

[Qemu-devel] [PATCH 7/9] tests: add user-creatable test to test-qdev-global-props

2018-09-12 Thread Marc-André Lureau
Add a TYPE_USER_CREATABLE object global property check. Rename the test, since it is no longer QDev-specific. Signed-off-by: Marc-André Lureau --- ...dev-global-props.c => test-global-props.c} | 128 -- tests/Makefile.include| 4 +- 2 files changed, 117

Re: [Qemu-devel] [PATCH v0 2/2] block: postpone the coroutine executing if the BDS's is drained

2018-09-12 Thread Kevin Wolf
Am 12.09.2018 um 14:03 hat Denis Plotnikov geschrieben: > On 10.09.2018 15:41, Kevin Wolf wrote: > > Am 29.06.2018 um 14:40 hat Denis Plotnikov geschrieben: > > > Fixes the problem of ide request appearing when the BDS is in > > > the "drained section". > > > > > > Without the patch the request ca

[Qemu-devel] [PULL 0/4] Block patches

2018-09-12 Thread Jeff Cody
The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452: Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100) are available in the Git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pu

[Qemu-devel] [PULL 4/4] block/rbd: add deprecation documentation for filename keyvalue pairs

2018-09-12 Thread Jeff Cody
Signed-off-by: Jeff Cody Message-id: 647f5b5ab7efd8bf567a504c832b1d2d6f719b23.1536704901.git.jc...@redhat.com Signed-off-by: Jeff Cody --- qemu-deprecated.texi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 1b9c007f12..8d28

[Qemu-devel] [PULL 2/4] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Jeff Cody
When we converted rbd to get rid of the older key/value-centric encoding format, we broke compatibility with image files with backing file strings encoded in the old format. This leaves a bit of an ugly conundrum, and a hacky solution. If the initial attempt to parse the "proper" options fails, i

[Qemu-devel] [PULL 3/4] block/rbd: add iotest for rbd legacy keyvalue filename parsing

2018-09-12 Thread Jeff Cody
This is a small test that will check for the ability to parse both legacy and modern options for rbd. The way the test is set up is for failure to occur, but without having to wait to timeout on a non-existent rbd server. The error messages in the success path show that the arguments were parsed.

[Qemu-devel] [PULL 1/4] block/rbd: pull out qemu_rbd_convert_options

2018-09-12 Thread Jeff Cody
Code movement to pull the conversion from Qdict to BlockdevOptionsRbd into a helper function. Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Jeff Cody Message-id: 5b49a980f2cde6610ab1df41bb0277d00b5db893.1536704901.git.jc...@redhat.com Signed-off-by: Jeff Cody --- block/rbd.c

[Qemu-devel] [PATCH] serial: fix DLL writes

2018-09-12 Thread Paolo Bonzini
Commit 0147883450fe84bb8de2d4a58381881f4262ce9b tries to handle word-sized writes to DLL/DLH, but due to a typo, this patch is causing tracebacks in all Linux kernels running the PXA serial driver, due to an unexpected DLL register value. Here is the surrounding code from drivers/tty/serial/pxa.c:

Re: [Qemu-devel] [PATCH] change get_image_size return type to int64_t

2018-09-12 Thread Richard Henderson
On 09/12/2018 02:14 AM, Li Zhijian wrote: > @@ -838,7 +838,8 @@ static void load_linux(PCMachineState *pcms, > FWCfgState *fw_cfg) > { > uint16_t protocol; > -int setup_size, kernel_size, initrd_size = 0, cmdline_size; > +int setup_size, kernel_size, cmdline_si

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Li Qiang
Peter Maydell 于2018年9月12日周三 下午8:55写道: > On 12 September 2018 at 13:32, Li Qiang wrote: > > To avoid NULL-deref for the devices without read callbacks > > > > Signed-off-by: Li Qiang > > --- > > memory.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/memory.c b/memory.c > >

Re: [Qemu-devel] [PATCH V1 RESEND 1/6] hmat acpi: Build Memory Subsystem Address Range Structure(s) in ACPI HMAT

2018-09-12 Thread Eric Blake
On 7/16/18 6:54 AM, Igor Mammedov wrote: + +#include "unistd.h" +#include "fcntl.h" +#include "qemu/osdep.h" +#include "sysemu/numa.h" +#include "hw/i386/pc.h" +#include "hw/i386/acpi-build.h" +#include "hw/acpi/acpi.h" +#include "hw/acpi/hmat.h" +#include "hw/acpi/aml-build.h" +#include "hw/nvr

Re: [Qemu-devel] What kind of situation to use internal or external snapshot?

2018-09-12 Thread Eric Blake
On 9/11/18 8:32 PM, lampahome wrote: as title, I know there're two snapshots in qemu, but I don't know when to use them well. What I know is internal snapshot will save the info of L1 and L2 table in the end of image but external snapshot won't because external snapshot create new file to save c

Re: [Qemu-devel] [PATCH 3/3] display/stdvga: add edid support.

2018-09-12 Thread Eric Blake
On 9/12/18 7:37 AM, Gerd Hoffmann wrote: This patch adds edid support to the qemu stdvga. It is turned off by default and can be enabled with the new edid property. The patch also adds xres and yres properties to specify the video mode you want the guest use. Works only with edid enabled and u

Re: [Qemu-devel] [PATCH 1/3] display/edid: add edid generator to qemu.

2018-09-12 Thread Eric Blake
On 9/12/18 7:36 AM, Gerd Hoffmann wrote: EDID is a metadata format to describe monitors. On physical hardware the monitor has an eeprom with that data block which can be read over i2c bus. On a linux system you can usually find the EDID data block in /sys/class/drm/$card/$connector/edid. xorg

Re: [Qemu-devel] [PATCH v0 2/2] block: postpone the coroutine executing if the BDS's is drained

2018-09-12 Thread Denis Plotnikov
On 12.09.2018 16:15, Kevin Wolf wrote: Am 12.09.2018 um 14:03 hat Denis Plotnikov geschrieben: On 10.09.2018 15:41, Kevin Wolf wrote: Am 29.06.2018 um 14:40 hat Denis Plotnikov geschrieben: Fixes the problem of ide request appearing when the BDS is in the "drained section". Without the pat

Re: [Qemu-devel] [PATCH v0 2/2] block: postpone the coroutine executing if the BDS's is drained

2018-09-12 Thread Kevin Wolf
Am 12.09.2018 um 16:53 hat Denis Plotnikov geschrieben: > On 12.09.2018 16:15, Kevin Wolf wrote: > > Am 12.09.2018 um 14:03 hat Denis Plotnikov geschrieben: > > > On 10.09.2018 15:41, Kevin Wolf wrote: > > > > Am 29.06.2018 um 14:40 hat Denis Plotnikov geschrieben: > > > > > Fixes the problem of id

Re: [Qemu-devel] [RFC PATCH 06/10] block: Allow changing the backing file on reopen

2018-09-12 Thread Alberto Garcia
On Thu 21 Jun 2018 03:06:22 PM CEST, Kevin Wolf wrote: >> > Actually, do we ever use bdrv_reopen() for flags other than >> > read-only? Maybe we should get rid of that flags nonsense and >> > simply make it a bdrv_reopen_set_readonly() taking a boolean. >> >> I think that's a good idea. There's h

Re: [Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Claudio
Thank you both for your responses, and ciao Paolo, On 09/12/2018 02:37 PM, Michael S. Tsirkin wrote: > On Wed, Sep 12, 2018 at 10:01:34AM +0200, Claudio wrote: >> Hello Michael, Jason and all, >> >> I am currently using latest mainline QEMU on x86_64 to run a QNX 7 guest. >> >> QNX 7 is not free

Re: [Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2018 at 05:16:38PM +0200, Claudio wrote: > Thank you both for your responses, > > and ciao Paolo, > > On 09/12/2018 02:37 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 12, 2018 at 10:01:34AM +0200, Claudio wrote: > >> Hello Michael, Jason and all, > >> > >> I am currently using la

  1   2   3   >