[Qemu-devel] [PATCH v8 0/6] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests

2019-04-22 Thread Aravinda Prasad
This patch set adds support for FWNMI in PowerKVM guests. System errors such as SLB multihit and memory errors that cannot be corrected by hardware is passed on to the kernel for handling by raising machine check exception (an NMI). Upon such machine check exceptions, if the address in error belon

[Qemu-devel] [PATCH v8 3/6] target/ppc: Handle NMI guest exit

2019-04-22 Thread Aravinda Prasad
Memory error such as bit flips that cannot be corrected by hardware are passed on to the kernel for handling. If the memory address in error belongs to guest then the guest kernel is responsible for taking suitable action. Patch [1] enhances KVM to exit guest with exit reason set to KVM_EXIT_NMI in

[Qemu-devel] [PATCH v8 1/6] ppc: spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2019-04-22 Thread Aravinda Prasad
This patch adds support in QEMU to handle "ibm,nmi-register" and "ibm,nmi-interlock" RTAS calls. The machine check notification address is saved when the OS issues "ibm,nmi-register" RTAS call. This patch also handles the case when multiple processors experience machine check at or about the same

[Qemu-devel] [PATCH v8 4/6] target/ppc: Build rtas error log upon an MCE

2019-04-22 Thread Aravinda Prasad
Upon a machine check exception (MCE) in a guest address space, KVM causes a guest exit to enable QEMU to build and pass the error to the guest in the PAPR defined rtas error log format. This patch builds the rtas error log, copies it to the rtas_addr and then invokes the guest registered machine c

[Qemu-devel] [PATCH v8 2/6] Wrapper function to wait on condition for the main loop mutex

2019-04-22 Thread Aravinda Prasad
Introduce a wrapper function to wait on condition for the main loop mutex. This function atomically releases the main loop mutex and causes the calling thread to block on the condition. This wrapper is required because qemu_global_mutex is a static variable. Signed-off-by: Aravinda Prasad --- cp

[Qemu-devel] [PATCH v8 5/6] ppc: spapr: Enable FWNMI capability

2019-04-22 Thread Aravinda Prasad
Enable the KVM capability KVM_CAP_PPC_FWNMI so that the KVM causes guest exit with NMI as exit reason when it encounters a machine check exception on the address belonging to a guest. Without this capability enabled, KVM redirects machine check exceptions to guest's 0x200 vector. This patch also d

[Qemu-devel] [PATCH v8 6/6] migration: Block migration while handling machine check

2019-04-22 Thread Aravinda Prasad
Block VM migration requests until the machine check error handling is complete as (i) these errors are specific to the source hardware and is irrelevant on the target hardware, (ii) these errors cause data corruption and should be handled before migration. Signed-off-by: Aravinda Prasad --- hw/p

Re: [Qemu-devel] [PATCH v2 for 4.1 0/2] avoid lseek on block_status

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
ping 08.04.2019 19:26, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > It's a continuation for > "[PATCH] qcow2: avoid lseek on block_status if possible" > https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06598.html > > performance results for block-status on tmpfs [tests originally by Kev

[Qemu-devel] [PATCH v5 2/3] block/stream: refactor stream_run: drop goto

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
The goto is unnecessary in the stream_run() since the common exit code was removed in the commit eb23654dbe43b549ea2a9ebff9d8e: "jobs: utilize job_exit shim". Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Alberto Garcia --- block/stream.c | 13 --

[Qemu-devel] [PATCH v5 3/3] block/stream: introduce a bottom node

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich The bottom node is the intermediate block device that has the base as its backing image. It is used instead of the base node while a block stream job is running to avoid dependency on the base that may change due to the parallel jobs. The change may take place due to a fil

[Qemu-devel] [PATCH v5 1/3] block: include base when checking image chain for block allocation

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich This patch is used in the 'block/stream: introduce a bottom node' that is following. Instead of the base node, the caller may pass the node that has the base as its backing image to the function bdrv_is_allocated_above() with a new parameter include_base = true and get rid

[Qemu-devel] [PATCH v5 0/3] block/stream: get rid of the base

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
This series introduces a bottom intermediate node that eliminates the dependency on the base that may change while stream job is running. It happens when stream/commit parallel jobs are running on the same backing chain. The base node of the stream job may be a top node of the parallel commit job a

[Qemu-devel] [PATCH] migration: Add error_desc for file channel errors

2019-04-22 Thread Yury Kotov
Currently, there is no information about error if outgoing migration was failed because of file channel errors. Example (QMP session): -> { "execute": "migrate", "arguments": { "uri": "exec:head -c 1" }} <- { "return": {} } ... -> { "execute": "query-migrate" } <- { "return": { "status": "failed" }

Re: [Qemu-devel] [PATCH 2/2] drm/i915/gvt: export mdev device version to sysfs for Intel vGPU

2019-04-22 Thread Zhenyu Wang
On 2019.04.19 04:35:59 -0400, Yan Zhao wrote: > This feature implements the version attribute for Intel's vGPU mdev > devices. > > version attribute is rw. It is queried by userspace software like libvirt > to check whether two vGPUs are compatible for live migration. > > It consists of two parts

[Qemu-devel] [PATCH for-4.1 00/24] Fix record/replay and add reverse debugging

2019-04-22 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 for-4.1 01/24] replay: add missing fix for internal function

2019-04-22 Thread Pavel Dovgalyuk
From: pbonz...@redhat.com This is a fix which was missed by patch 74c0b816adfc6aa1b01b4426fdf385e32e35cbac, which added current_step parameter to the replay_advance_current_step function. Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c |2 +- 1 file changed, 1 insertion(+), 1 d

[Qemu-devel] [PATCH for-4.1 08/24] migration: introduce icount field for snapshots

2019-04-22 Thread Pavel Dovgalyuk
From: 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 proceeding the recorded execution to the specific moment of the time. E.g., 'reverse step' action (

[Qemu-devel] [PATCH for-4.1 07/24] qcow2: introduce icount field for snapshots

2019-04-22 Thread Pavel Dovgalyuk
From: 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 Acked-by: Kevin Wolf -- v2: - documented format changes in docs/interop/qcow2.txt (sugges

[Qemu-devel] [PATCH for-4.1 02/24] block: implement bdrv_snapshot_goto for blkreplay

2019-04-22 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 Acked-by: Kevin Wolf --- block/blkreplay.c |8

[Qemu-devel] [PATCH for-4.1 04/24] replay: update docs for record/replay with block devices

2019-04-22 Thread Pavel Dovgalyuk
From: 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

[Qemu-devel] [PATCH for-4.1 10/24] qapi: introduce replay.json for record/replay-related stuff

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch adds replay.json file. It will be used for adding record/replay-related data structures and commands. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Markus Armbruster -- v10: - minor changes v13: - rebased to the new QAPI files --- MAINTAINERS |

[Qemu-devel] [PATCH for-4.1 15/24] replay: flush rr queue before loading the vmstate

2019-04-22 Thread Pavel Dovgalyuk
From: 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 flus

[Qemu-devel] [PATCH for-4.1 06/24] replay: finish record/replay before closing the disks

2019-04-22 Thread Pavel Dovgalyuk
From: 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 |

[Qemu-devel] [PATCH for-4.1 11/24] replay: introduce info hmp/qmp command

2019-04-22 Thread Pavel Dovgalyuk
From: 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 instruction count (number of recorded/replayed instructions). The instruction count can be used with the r

[Qemu-devel] [PATCH for-4.1 03/24] replay: disable default snapshot for record/replay

2019-04-22 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 Acked-by: Kevin Wolf --- vl.c | 10 -- 1 file changed, 8 insertions(+), 2 deletio

[Qemu-devel] [PATCH for-4.1 17/24] gdbstub: add reverse continue support in replay mode

2019-04-22 Thread Pavel Dovgalyuk
From: 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 b

[Qemu-devel] [PATCH for-4.1 09/24] replay: provide an accessor for rr filename

2019-04-22 Thread Pavel Dovgalyuk
From: 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 ++

[Qemu-devel] [PATCH for-4.1 05/24] replay: don't drain/flush bdrv queue while RR is working

2019-04-22 Thread Pavel Dovgalyuk
From: 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 deadlo

[Qemu-devel] [PATCH for-4.1 14/24] replay: refine replay-time module

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch removes refactoring artifacts from the replay/replay-time.c Signed-off-by: Pavel Dovgalyuk --- replay/replay-time.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/replay/replay-time.c b/replay/replay

[Qemu-devel] [PATCH for-4.1 19/24] replay: add BH oneshot event for block layer

2019-04-22 Thread Pavel Dovgalyuk
From: 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. Replay

[Qemu-devel] [PATCH for-4.1 13/24] replay: implement replay-seek command

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch adds hmp/qmp commands replay_seek/replay-seek that proceed the execution to the specified instruction count. The command automatically loads nearest snapshot and replays the execution to find the desired instruction count. Signed-off-by: Pavel Dovgalyuk Acked-by

[Qemu-devel] [PATCH for-4.1 12/24] replay: introduce breakpoint at the specified step

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch introduces replay_break, replay_delete_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. replay_break command has one argument - numb

[Qemu-devel] [PATCH for-4.1 16/24] gdbstub: add reverse step support in replay mode

2019-04-22 Thread Pavel Dovgalyuk
From: 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. Bu

[Qemu-devel] [PATCH for-4.1 20/24] replay: document development rules

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch introduces docs/devel/replay.txt which describes the rules that should be followed to make virtual devices usable in record/replay mode. Signed-off-by: Pavel Dovgalyuk -- v9: fixed external virtual clock description (reported by Artem Pisarenko) --- docs/deve

[Qemu-devel] [PATCH for-4.1 18/24] replay: describe reverse debugging in docs/replay.txt

2019-04-22 Thread Pavel Dovgalyuk
From: 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 ind

[Qemu-devel] [PATCH for-4.1 21/24] util/qemu-timer: refactor deadline calculation for external timers

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk icount-based record/replay uses qemu_clock_deadline_ns_all to measure the period until vCPU may be interrupted. This function takes in account the virtual timers, because they belong to the virtual devices that may generate interrupt request or affect the virtual machine sta

[Qemu-devel] [PATCH for-4.1 23/24] replay: rename step-related variables and functions

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch renames replay_get_current_step() and related variables to make these names consistent with hmp/qmp commands. Signed-off-by: Pavel Dovgalyuk --- blockdev.c|2 +- include/sysemu/replay.h |2 +- migration/savevm.c|2 +- repla

[Qemu-devel] [PATCH for-4.1 22/24] replay: fix replay shutdown

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch fixes shutdown of the replay process, which is terminated with the assert when shutdown event is read from the log. replay_finish_event reads new data_kind and therefore the value of data_kind should be preserved to be valid at qemu_system_shutdown_request call.

[Qemu-devel] [PATCH for-4.1 24/24] icount: clean up cpu_can_io before jumping to the next block

2019-04-22 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk Most of IO instructions can be executed only at the end of the block in icount mode. Therefore translator can set cpu_can_io flag when translating the last instruction. But when the blocks are chained, then this flag is not reset and may remain set at the beginning of the ne

Re: [Qemu-devel] [PATCH v14 0/2] support MAP_SYNC for memory-backend-file

2019-04-22 Thread Michael S. Tsirkin
On Mon, Apr 22, 2019 at 08:48:47AM +0800, Wei Yang wrote: > Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to > guarantee the write persistence to mmap'ed files supporting DAX (e.g., > files on ext4/xfs file system mounted with '-o dax'). > > A description of MAP_SYNC and MAP_SH

[Qemu-devel] [PATCH v2 1/2] Implement the pcxl and pcxl2 Fast TLB Insert instructions as used by NetBSD (and OpenBSD)

2019-04-22 Thread Nick Hudson
From: Nick Hudson See https://parisc.wiki.kernel.org/images-parisc/a/a9/Pcxl2_ers.pdf page 13-9 (195/206) Signed-off-by: Nick Hudson --- target/hppa/insns.decode | 3 +++ target/hppa/translate.c | 52 2 files changed, 55 insertions(+) diff

[Qemu-devel] [PATCH v2 0/2] HPPA fixes for NetBSD/hppa emulation

2019-04-22 Thread Nick Hudson
From: Nick Hudson Here are the required changes to allow qemu to emulate NetBSD/hppa. v2 changes: - remove old debug code Nick Hudson (2): Implement the pcxl and pcxl2 Fast TLB Insert instructions as used by NetBSD (and OpenBSD) Always return EXCP_DMAR for protection id trap as EXCP_DM

[Qemu-devel] [PATCH v2 2/2] Always return EXCP_DMAR for protection id trap as EXCP_DMP is considered legacy.

2019-04-22 Thread Nick Hudson
From: Nick Hudson "In PA-RISC 1.1 (Second Edition) and later revisions, processors must use traps 26, 27,and 28 which provide equivalent functionality" Signed-off-by: Nick Hudson --- target/hppa/mem_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/hppa/mem_

Re: [Qemu-devel] [PATCH v2 0/2] HPPA fixes for NetBSD/hppa emulation

2019-04-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190422123411.5178-1-nick.hud...@gmx.co.uk/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190422123411.5178-1-nick.hud...@gmx.co.uk Subject: [Qemu-devel] [PATCH v2 0/2] HPPA fi

Re: [Qemu-devel] [PATCH v3 1/3] block/qcow2-refcount: add trace-point to qcow2_process_discards

2019-04-22 Thread Eric Blake
On 4/19/19 9:05 AM, Vladimir Sementsov-Ogievskiy wrote: > Let's at least trace ignored failure. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-refcount.c | 7 ++- > block/trace-events | 3 +++ > 2 files changed, 9 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH v3 2/3] block/io: bdrv_pdiscard: support int64_t bytes parameter

2019-04-22 Thread Eric Blake
On 4/19/19 9:05 AM, Vladimir Sementsov-Ogievskiy wrote: > This fixes at least one overflow in qcow2_process_discards, which > passes 64bit region length to bdrv_pdiscard which bytes (or sectors in s/which/where/ > the past) parameter is int since it's introduction in 0b919fae. s/it's/its/ > >

Re: [Qemu-devel] [PATCH v3 3/3] iotests: test big qcow2 shrink

2019-04-22 Thread Eric Blake
On 4/19/19 9:05 AM, Vladimir Sementsov-Ogievskiy wrote: > This test checks bug in qcow2_process_discards, fixed by previous > commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > +# This test checks that qcow2_process_discards does not truncate a discard > +# request > 2G. > +# To rep

[Qemu-devel] [PATCH v3 1/3] edu: mmio: allow 64-bit access

2019-04-22 Thread Li Qiang
The edu spec says the MMIO area can be accessed by 64-bit. However currently the 'max_access_size' is not so the MMIO access dispatch can only access 32-bit one time. This patch fixes this to respect the spec. Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daude --- hw/misc/edu.c | 9 +++

[Qemu-devel] [PATCH v3 3/3] edu: uses uint64_t in dma operation

2019-04-22 Thread Li Qiang
The dma related variable dma.dst/src/cnt is dma_addr_t, it is uint64_t in x64 platform. Change these usage from uint32_to uint64_t to avoid trancation in edu_dma_timer. Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daude --- hw/misc/edu.c | 15 --- 1 file changed, 8 insertio

[Qemu-devel] [PATCH v3 2/3] edu: mmio: allow 64-bit access in read dispatch

2019-04-22 Thread Li Qiang
The edu spec says when address >= 0x80, the MMIO area can be accessed by 64-bit. Signed-off-by: Li Qiang --- Change since v2: Fix an error per Phillippe's advice hw/misc/edu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index 65fc32b928

[Qemu-devel] [PATCH v3 0/3] hw: edu: some fixes

2019-04-22 Thread Li Qiang
Recently I am considering write a driver for edu device. After reading the spec, I found these three small issue. Two first two related the MMIO access and the third is related the DMA operation. Change since v2: Fix an error in patch 2 Fix some commit message and title. Change since v1: Fix form

Re: [Qemu-devel] [PATCH 1/2] vfio/mdev: add version field as mandatory attribute for mdev device

2019-04-22 Thread Alex Williamson
On Fri, 19 Apr 2019 04:35:04 -0400 Yan Zhao wrote: > device version attribute in mdev sysfs is used by user space software > (e.g. libvirt) to query device compatibility for live migration of VFIO > mdev devices. This attribute is mandatory if a mdev device supports live > migration. The Subject

Re: [Qemu-devel] [PATCH v3 00/16] chardev: refactoring & many bugfixes related tcp_chr_wait_connected

2019-04-22 Thread Eric Blake
On 2/11/19 12:24 PM, Daniel P. Berrangé wrote: > This is a followup to > > v1: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg03344.html > v2: http://lists.nongnu.org/archive/html/qemu-devel/2019-01/msg05947.html > > This series comes out of a discussion between myself & Yongji Xie

[Qemu-devel] [PATCH 5/9] block/parallels: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 15bc97b759..2747400577 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -220,20 +220,18 @@ stat

[Qemu-devel] [PATCH 0/9] block: buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Hi all! We often need to do read/write with buffer, not qiov. Instead of creating qiov in such cases, let's introduce corresponding helpers. Vladimir Sementsov-Ogievskiy (9): block: introduce byte-based io helpers block/qcow2: use buffer-based io block/qcow: use buffer-based io block/qed:

[Qemu-devel] [PATCH 6/9] block/backup: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/block/backup.c b/block/backup.c index 9988753249..910ed764aa 100644 --- a/block/backup.c +++ b/block/backup.c @@ -107,7 +107,6 @@ static int coroutine_

[Qemu-devel] [PATCH 2/9] block/qcow2: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3ace3b2209..c3b2ea294d 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -4088,7 +4088,6 @@ qcow2_co_pwritev_compressed(Bl

[Qemu-devel] [PATCH 1/9] block: introduce byte-based io helpers

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int.h | 16 include/sysemu/block-backend.h | 19 +++ 2 files changed, 35 insertions(+) diff --git a/include/block/block_int.h b/include/block/block_int.h index 01e855a066..94d45c9708 100644

[Qemu-devel] [PATCH 9/9] qemu-img: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- qemu-img.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index aa6f81f1ea..c40a4e8b83 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1671,7 +1671,6 @@ static int coroutine_fn convert_co_read(

[Qemu-devel] [PATCH 3/9] block/qcow: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 10d2cf14b3..1bb8fd05e2 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -631,7 +631,6 @@ static coroutine_fn int q

[Qemu-devel] [PATCH 4/9] block/qed: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Move to _co_ versions of io functions qed_read_table() and qed_write_table(), as we use qemu_co_mutex_unlock() anyway. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qed-table.c | 12 +--- block/qed.c | 6 ++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git

[Qemu-devel] [PATCH 8/9] block/stream: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/stream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/stream.c b/block/stream.c index bfaebb861a..1a906fd860 100644 --- a/block/stream.c +++ b/block/stream.c @@ -42,12 +42,10 @@ static int coroutine_fn stream_po

[Qemu-devel] [PATCH 7/9] block/commit: use buffer-based io

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/commit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/commit.c b/block/commit.c index ba60fef58a..08204fa6f8 100644 --- a/block/commit.c +++ b/block/commit.c @@ -48,16 +48,15 @@ static int coroutine_fn commit_

Re: [Qemu-devel] [PATCH v3 3/3] iotests: test big qcow2 shrink

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
22.04.2019 16:59, Eric Blake wrote: > On 4/19/19 9:05 AM, Vladimir Sementsov-Ogievskiy wrote: >> This test checks bug in qcow2_process_discards, fixed by previous >> commit. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- > >> +# This test checks that qcow2_process_discards does not trun

[Qemu-devel] [PATCH v4 2/3] block/io: bdrv_pdiscard: support int64_t bytes parameter

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
This fixes at least one overflow in qcow2_process_discards, which passes 64bit region length to bdrv_pdiscard where bytes (or sectors in the past) parameter is int since its introduction in 0b919fae. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- include/block/block.h |

[Qemu-devel] [PATCH v4 3/3] iotests: test big qcow2 shrink

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
This test checks bug in qcow2_process_discards, fixed by previous commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Tested-by: Eric Blake --- tests/qemu-iotests/250 | 72 ++ tests/qemu-iotests/250.out | 21 +++ tests/qem

[Qemu-devel] [PATCH v4 1/3] block/qcow2-refcount: add trace-point to qcow2_process_discards

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
Let's at least trace ignored failure. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 7 ++- block/trace-events | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index e

[Qemu-devel] [PATCH v4 0/3] Fix overflow bug in qcow2 discard

2019-04-22 Thread Vladimir Sementsov-Ogievskiy
v4: now based on Kevin's block-next 01: add Eric's r-b 02: - s/which/where/ [Eric, hope, I fixed correct one which from two:)] - s/it's/its add Eric's r-b 03: - r-b and t-b by Eric - grammar - drop trace from test v3: don't filter mapping info from qemu-img map output, otherwise

[Qemu-devel] [Bug 1824768] Re: Qemu ARMv7 TCG MultiThreading for i386 guest doesn't work

2019-04-22 Thread TimeMaster
>> ./qemu-system-i386 -cdrom alpine.iso --accel tcg,thread=multi I tried both, with -smp 4 and without.. In stable Qemu release, there is just a guest kernel panic, in v4.0.0-rc3-dirty, there is also Illegal instruction error reported > on an x-gene system, compiled for aarch32. Yes, this should

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Jeff Moyer
Dan Williams writes: > On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig wrote: >> >> On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: >> > > > I'd either add a comment about avoiding retpoline overhead here or just >> > > > make ->flush == NULL mean generic_nvdimm_flush(). Just so

Re: [Qemu-devel] [PATCH] hvf: Add missing break statement

2019-04-22 Thread Philippe Mathieu-Daudé
On 4/22/19 5:42 AM, Chen Zhang via Qemu-devel wrote: > In target/i386/hvf/hvf.c, a break statement was probably missing in > `hvf_vcpu_exec()`, in handling EXIT_REASON_HLT. > > These lines seemed to be equivalent to `kvm_handle_halt()`. > Fixes: c97d6d2cdf97 > Signed-off-by: Chen Zhang > ---

Re: [Qemu-devel] [PATCH v2 1/3] edu: mmio: set 'max_access_size' to 8

2019-04-22 Thread Philippe Mathieu-Daudé
On 4/22/19 3:17 AM, Li Qiang wrote: > > > Philippe Mathieu-Daudé mailto:phi...@redhat.com>> 于 > 2019年4月21日周日 下午6:28写道: > > Hi Li, > > The patch title is not very descriptive, maybe "allow 64-bit access" > > > On 4/20/19 6:14 PM, Li Qiang wrote: > > The edu spec said, the MMIO

Re: [Qemu-devel] [PATCH v3 2/3] edu: mmio: allow 64-bit access in read dispatch

2019-04-22 Thread Philippe Mathieu-Daudé
On 4/22/19 4:11 PM, Li Qiang wrote: > The edu spec says when address >= 0x80, the MMIO area can > be accessed by 64-bit. > > Signed-off-by: Li Qiang Reviewed-by: Philippe Mathieu-Daude > --- > Change since v2: > Fix an error per Phillippe's advice > > hw/misc/edu.c | 6 +- > 1 file chang

Re: [Qemu-devel] [PATCH v2 3/3] edu: uses uint64_t in dma operation

2019-04-22 Thread Philippe Mathieu-Daudé
On 4/22/19 3:21 AM, Li Qiang wrote: > > > Philippe Mathieu-Daudé mailto:phi...@redhat.com>> 于 > 2019年4月21日周日 下午6:32写道: > > On 4/20/19 6:14 PM, Li Qiang wrote: > > The dma related variable is dma_addr_t, it is uint64_t in > > x64 platform. Change these usage from uint32_to uint64_t to

[Qemu-devel] [Bug 1615079] Re: GTK+ UI virtual consoles scrolling broken

2019-04-22 Thread Bug Report
VTE is required for this to work? if yes, the configure script should have info about the dependency -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1615079 Title: GTK+ UI virtual consoles scrolling

Re: [Qemu-devel] [PATCH v14 0/2] support MAP_SYNC for memory-backend-file

2019-04-22 Thread Eduardo Habkost
On Mon, Apr 22, 2019 at 08:34:51AM -0400, Michael S. Tsirkin wrote: > On Mon, Apr 22, 2019 at 08:48:47AM +0800, Wei Yang wrote: > > Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to > > guarantee the write persistence to mmap'ed files supporting DAX (e.g., > > files on ext4/xfs f

Re: [Qemu-devel] [PATCH] docs/interop/bitmaps: rewrite and modernize doc

2019-04-22 Thread John Snow
On 4/18/19 12:38 PM, Vladimir Sementsov-Ogievskiy wrote: > 18.04.2019 3:14, John Snow wrote: >> This just about rewrites the entirety of the bitmaps.rst document to >> make it consistent with the 4.0 release. I have added new features seen >> in the 4.0 release, as well as tried to clarify some

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Dan Williams
On Mon, Apr 22, 2019 at 8:59 AM Jeff Moyer wrote: > > Dan Williams writes: > > > On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig > > wrote: > >> > >> On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: > >> > > > I'd either add a comment about avoiding retpoline overhead here or >

[Qemu-devel] [PATCH v3 0/7] fw_cfg: Improve tracing

2019-04-22 Thread Philippe Mathieu-Daudé
Trivial series to improve fw_cfg tracing. Regards, Phil. Since v2: https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg02522.html - Split arch-specific code (1 patch per arch) (requested by Laszlo) Since v1: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg01598.html - Added arch-s

[Qemu-devel] [PATCH v3 4/7] hw/i386: Implement fw_cfg_arch_key_name()

2019-04-22 Thread Philippe Mathieu-Daudé
Implement fw_cfg_arch_key_name(), which returns the name of a i386-specific key. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/Makefile.objs | 2 +- hw/i386/fw_cfg.c | 38 ++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 hw/i38

[Qemu-devel] [PATCH v3 1/7] hw/nvram/fw_cfg: Add trace events

2019-04-22 Thread Philippe Mathieu-Daudé
Add trace events to dump the key content. Reviewed-by: Michael S. Tsirkin Reviewed-by: Laszlo Ersek Signed-off-by: Philippe Mathieu-Daudé --- v1 -> v3: - moved static fw_cfg_wellknown_keys[] in key_name() - split trace_key_name() (can return "unknown") from key_name() (can return NULL) Since

[Qemu-devel] [PATCH v3 2/7] hw/nvram/fw_cfg: Add fw_cfg_arch_key_name()

2019-04-22 Thread Philippe Mathieu-Daudé
Add fw_cfg_arch_key_name() which returns the name of an architecture-specific key. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/nvram/fw_cfg.c | 2 +- include/hw/nvram/fw_cfg.h | 11 +++ stubs/Makefile.objs | 1 + stubs/fw_cfg.c

[Qemu-devel] [PATCH v3 3/7] hw/i386: Extract fw_cfg definitions to local "fw_cfg.h"

2019-04-22 Thread Philippe Mathieu-Daudé
Extract the architecture-specific fw_cfg definitions to "fw_cfg.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.h | 20 hw/i386/pc.c | 7 +-- 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 hw/i386/fw_cfg.h diff --git a/hw/i386/fw

[Qemu-devel] [PATCH v3 5/7] hw/ppc: Implement fw_cfg_arch_key_name()

2019-04-22 Thread Philippe Mathieu-Daudé
Implement fw_cfg_arch_key_name(), which returns the name of a ppc-specific key. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/Makefile.objs | 2 +- hw/ppc/fw_cfg.c | 45 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 hw/

[Qemu-devel] [PATCH v3 6/7] hw/sparc: Implement fw_cfg_arch_key_name()

2019-04-22 Thread Philippe Mathieu-Daudé
Implement fw_cfg_arch_key_name(), which returns the name of a sparc32-specific key. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index ca1e3825d58..49251d62b35 100644 --- a/

[Qemu-devel] [PATCH v3 7/7] hw/sparc64: Implement fw_cfg_arch_key_name()

2019-04-22 Thread Philippe Mathieu-Daudé
Implement fw_cfg_arch_key_name(), which returns the name of a sparc64-specific key. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc64/sun4u.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 399f2d73c81..4230b17b873 100644

Re: [Qemu-devel] [RFC 0/3] VirtIO RDMA

2019-04-22 Thread Jason Gunthorpe
On Fri, Apr 19, 2019 at 01:16:06PM +0200, Hannes Reinecke wrote: > On 4/15/19 12:35 PM, Yuval Shaia wrote: > > On Thu, Apr 11, 2019 at 07:02:15PM +0200, Cornelia Huck wrote: > > > On Thu, 11 Apr 2019 14:01:54 +0300 > > > Yuval Shaia wrote: > > > > > > > Data center backends use more and more RDMA

Re: [Qemu-devel] [PATCH 1/2] add VirtIONet vhost_stopped flag to prevent multiple stops

2019-04-22 Thread Dan Streetman
On Sun, Apr 21, 2019 at 10:50 PM Jason Wang wrote: > > > On 2019/4/17 上午2:46, Dan Streetman wrote: > > From: Dan Streetman > > > > Buglink: https://launchpad.net/bugs/1823458 > > > > There is a race condition when using the vhost-user driver, between a guest > > shutdown and the vhost-user interf

Re: [Qemu-devel] [PATCH 1/2] add VirtIONet vhost_stopped flag to prevent multiple stops

2019-04-22 Thread Dan Streetman
On Fri, Apr 19, 2019 at 7:14 PM Michael S. Tsirkin wrote: > > On Tue, Apr 16, 2019 at 02:46:23PM -0400, Dan Streetman wrote: > > From: Dan Streetman > > > > Buglink: https://launchpad.net/bugs/1823458 > > > > There is a race condition when using the vhost-user driver, between a guest > > shutdown

[Qemu-devel] Review my proposal

2019-04-22 Thread amit kumar rathore
Sir, My proposal is still not review by my mentor. My mentor is JAN KISZKA .I already mail him but he not responding me. What I do now? How can I know my proposal is view or not. Sent from Mail for Windows 10

[Qemu-devel] [PATCH 3/3] accel: Remove unused AccelClass::available field

2019-04-22 Thread Eduardo Habkost
The field is not used anymore, we can remove it. Signed-off-by: Eduardo Habkost --- include/sysemu/accel.h | 1 - accel/accel.c | 5 - 2 files changed, 6 deletions(-) diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h index 5565e00a96..70e9e2f2a1 100644 --- a/include/syse

[Qemu-devel] [PATCH 0/3] Remove AccelClass::available field

2019-04-22 Thread Eduardo Habkost
The only user of AccelClass::available was the qtest accelerator, to make it unavailable on non-POSIX systems. We can drop the field if we simply not compile the accelerator code on those systems. Eduardo Habkost (3): qtest: Move accel code to accel/qtest.c qtest: Don't compile qtest accel on

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Jeff Moyer
Dan Williams writes: > On Mon, Apr 22, 2019 at 8:59 AM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> > On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig >> > wrote: >> >> >> >> On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: >> >> > > > I'd either add a comment about avoidi

[Qemu-devel] [PATCH 1/3] qtest: Move accel code to accel/qtest.c

2019-04-22 Thread Eduardo Habkost
QTest has two parts: the server (-qtest) and the accelerator (-machine accel=qtest). The accelerator depends on CONFIG_POSIX due to its usage of sigwait(), but the server doesn't. Move the accel code to accel/qtest.c. Later we will disable compilation of accel/qtest.c on non-POSIX systems. Sign

[Qemu-devel] [PATCH 2/3] qtest: Don't compile qtest accel on non-POSIX systems

2019-04-22 Thread Eduardo Habkost
qtest_available() will always return 0 on non-POSIX systems. It's simpler to just not compile the accelerator code on those systems instead of relying on the AccelClass::available function. Signed-off-by: Eduardo Habkost --- include/sysemu/qtest.h | 9 - accel/qtest.c | 1 - acc

Re: [Qemu-devel] [RHEL-8.1 virt 1/2] memory: Fix the memory region type assignment order

2019-04-22 Thread Eduardo Habkost
On Tue, Apr 09, 2019 at 08:08:02PM -0400, Gary R Hook wrote: > BZ: 1667249 > Branch: rhel-8.1.0 > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1667249 > Upstream Status: 4.0.0-rc1 > Build Info: > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=20980582 > Conflicts: None > > c

Re: [Qemu-devel] [RHEL-8.1 virt 2/2] target/i386: sev: Do not pin the ram device memory region

2019-04-22 Thread Eduardo Habkost
On Tue, Apr 09, 2019 at 08:08:03PM -0400, Gary R Hook wrote: > BZ: 1667249 > Branch: rhel-8.1.0 > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1667249 > Upstream Status: 4.0.0-rc1 > Build Info: > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=20980582 > Conflicts: None > > c

Re: [Qemu-devel] [PATCH 1/3] qtest: Move accel code to accel/qtest.c

2019-04-22 Thread Philippe Mathieu-Daudé
Hi Eduardo, On 4/22/19 11:04 PM, Eduardo Habkost wrote: > QTest has two parts: the server (-qtest) and the accelerator > (-machine accel=qtest). The accelerator depends on CONFIG_POSIX > due to its usage of sigwait(), but the server doesn't. > > Move the accel code to accel/qtest.c. Later we wi

Re: [Qemu-devel] [PATCH 1/3] qtest: Move accel code to accel/qtest.c

2019-04-22 Thread Eduardo Habkost
On Mon, Apr 22, 2019 at 11:56:18PM +0200, Philippe Mathieu-Daudé wrote: > Hi Eduardo, > > On 4/22/19 11:04 PM, Eduardo Habkost wrote: > > QTest has two parts: the server (-qtest) and the accelerator > > (-machine accel=qtest). The accelerator depends on CONFIG_POSIX > > due to its usage of sigwai

Re: [Qemu-devel] [PATCH 1/3] qtest: Move accel code to accel/qtest.c

2019-04-22 Thread Philippe Mathieu-Daudé
On 4/23/19 12:08 AM, Eduardo Habkost wrote: > On Mon, Apr 22, 2019 at 11:56:18PM +0200, Philippe Mathieu-Daudé wrote: >> Hi Eduardo, >> >> On 4/22/19 11:04 PM, Eduardo Habkost wrote: >>> QTest has two parts: the server (-qtest) and the accelerator >>> (-machine accel=qtest). The accelerator depend

  1   2   >