Re: [Qemu-devel] [PATCH] blk: postpone request execution on a context protected with "drained section"

2019-01-09 Thread Denis Plotnikov
ping ping!!! On 18.12.2018 11:53, Denis Plotnikov wrote: > ping ping > > On 14.12.2018 14:54, Denis Plotnikov wrote: >> >> >> On 13.12.2018 15:20, Kevin Wolf wrote: >>> Am 13.12.2018 um 12:07 hat Denis Plotnikov geschrieben: On 12.12.2018 15:24, Kevin Wolf wrote: > Am 11.12.2018 um 17:55

[Qemu-devel] [PATCH v3] dump: Set correct vaddr for ELF dump

2019-01-09 Thread Jon Doron
vaddr needs to be equal to the paddr since the dump file represents the physical memory image. Without setting vaddr correctly, GDB would load all the different memory regions on top of each other to vaddr 0, thus making GDB showing the wrong memory data for a given address. Signed-off-by: Jon Do

Re: [Qemu-devel] [PATCH v3] dump: Set correct vaddr for ELF dump

2019-01-09 Thread Marc-André Lureau
On Wed, Jan 9, 2019 at 12:22 PM Jon Doron wrote: > > vaddr needs to be equal to the paddr since the dump file represents the > physical memory image. > > Without setting vaddr correctly, GDB would load all the different memory > regions on top of each other to vaddr 0, thus making GDB showing the

[Qemu-devel] [PATCH v15 0/6] Add support for TPM Physical Presence interface

2019-01-09 Thread Marc-André Lureau
Hi, The following patches implement the TPM Physical Presence Interface that allows a user to set a command via ACPI (sysfs entry in Linux) that, upon the next reboot, the firmware looks for and acts upon by sending sequences of commands to the TPM. A dedicated memory region is added to the TPM C

[Qemu-devel] [PATCH v15 1/6] tpm: add a "ppi" boolean property

2019-01-09 Thread Marc-André Lureau
The following patches implement the TPM Physical Presence Interface, make use of a new memory region and a fw_cfg entry. Enable PPI by default with >=4.0 machine type, to avoid migration issues. Signed-off-by: Marc-André Lureau Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé ---

[Qemu-devel] [PATCH v15 2/6] tpm: allocate/map buffer for TPM Physical Presence interface

2019-01-09 Thread Marc-André Lureau
From: Stefan Berger Implement a virtual memory device for the TPM Physical Presence interface. The memory is located at 0xFED45000 and used by ACPI to send messages to the firmware (BIOS) and by the firmware to provide parameters for each one of the supported codes. This interface should be used

[Qemu-devel] [PATCH v15 4/6] acpi: build TPM Physical Presence interface

2019-01-09 Thread Marc-André Lureau
From: Stefan Berger The TPM Physical Presence interface consists of an ACPI part, a shared memory part, and code in the firmware. Users can send messages to the firmware by writing a code into the shared memory through invoking the ACPI code. When a reboot happens, the firmware looks for the code

[Qemu-devel] [PATCH v15 3/6] acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg

2019-01-09 Thread Marc-André Lureau
From: Stefan Berger To avoid having to hard code the base address of the PPI virtual memory device we introduce a fw_cfg file etc/tpm/config that holds the base address of the PPI device, the version of the PPI interface and the version of the attached TPM. Signed-off-by: Stefan Berger [ Marc-A

[Qemu-devel] [PATCH v15 5/6] acpi: add ACPI memory clear interface

2019-01-09 Thread Marc-André Lureau
The interface is described in the "TCG Platform Reset Attack Mitigation Specification", chapter 6 "ACPI _DSM Function". According to Laszlo, it's not so easy to implement in OVMF, he suggested to do it in qemu instead. See specification documentation for more details, and next commit for memory cl

[Qemu-devel] [PATCH v15 6/6] tpm: clear RAM when "memory overwrite" requested

2019-01-09 Thread Marc-André Lureau
Note: the "Platform Reset Attack Mitigation" specification isn't explicit about NVDIMM, since they could have different usages. It uses the term "system memory" generally (and also "volatile memory RAM" in its introduction). For initial support, I propose to consider non-volatile memory as not bein

Re: [Qemu-devel] [PATCH] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0

2019-01-09 Thread Laurent Vivier
Le 08/01/2019 à 19:49, Peter Maydell a écrit : > Linux returns success if pwrite64() or pread64() are called with a > zero length NULL buffer, but QEMU was returning -TARGET_EFAULT. > > This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9 > for the write syscall, and long before that

Re: [Qemu-devel] [PATCH for-3.2 01/11] vhost-user: define conventions for vhost-user backends

2019-01-09 Thread Hoffmann, Gerd
Hi, > Unfortunately, vdev is not set before vhost_dev_start(). > > We could add the migration blocker there somehow? Sure. Just use migrate_add_blocker() to do that at any time (see qxl.c for an example). HTH, Gerd

Re: [Qemu-devel] [PATCH for-4.0] ui/console: Remove qemu_create_display_surface_guestmem()

2019-01-09 Thread Gerd Hoffmann
On Tue, Jan 08, 2019 at 01:02:02PM +, Peter Maydell wrote: > On Mon, 10 Dec 2018 at 14:31, Gerd Hoffmann wrote: > > > > On Thu, Nov 22, 2018 at 05:03:09PM +, Peter Maydell wrote: > > > The qemu_create_display_surface_guestmem() function was added in > > > commit a77549b3ffcc24c32ee4e but a

[Qemu-devel] Should the "props" be documented for QMP `object-add`?

2019-01-09 Thread Kashyap Chamarthy
I notice that the following QMP command: { "execute":"object-add", "arguments":{ "qom-type":"tls-creds-x509", "id":"objlibvirt_migrate_tls0", "props":{ "dir":"/etc/pki/qemu", "endpoint":"server", "verify-peer":true }

Re: [Qemu-devel] [PATCH v5 0/8] linux-user: Split do_syscall

2019-01-09 Thread Laurent Vivier
On 19/12/2018 05:21, Richard Henderson wrote: > Version 4 was back in August: > https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg03745.html > > Version 5 continues the file split via inclusion. This incorporates > Laurent's suggestion to have a "def" file that is included twice to > gener

Re: [Qemu-devel] [qemu-s390x] [PATCH 00/15] s390: vfio-ccw dasd ipl support

2019-01-09 Thread Cornelia Huck
On Tue, 8 Jan 2019 18:36:09 +0100 Halil Pasic wrote: > On Tue, 8 Jan 2019 11:37:56 -0500 > "Jason J. Herne" wrote: > > > On 12/12/18 9:34 AM, Cornelia Huck wrote: > > ... > > >> > > >> NOTE: It has been a while, but I've finally chased down my infamous > > >> "reset bug". > > >> On subsystem

Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/core: fix whitespace in a sentence

2019-01-09 Thread Laurent Vivier
On 24/12/2018 16:49, Wainer dos Santos Moschetta wrote: > Signed-off-by: Wainer dos Santos Moschetta > --- > hw/core/machine.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/core/machine.c b/hw/core/machine.c > index 4439ea663f..a0beeeb2a9 100644 > --- a/hw/core/mach

Re: [Qemu-devel] [Qemu-trivial] [PATCH] qom: Include qemu/fprintf-fn.h in cpu.h

2019-01-09 Thread Laurent Vivier
On 26/12/2018 01:37, Priit Laes wrote: > QOM cpu.h uses fprintf_function which requires Qemu's > qemu/fprintf-fn.h header. Include it. > > Signed-off-by: Priit Laes > --- > include/qom/cpu.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/qom/cpu.h b/include/qom/cpu.h > index 1

Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()

2019-01-09 Thread Cornelia Huck
On Tue, 8 Jan 2019 15:34:37 -0500 Tony Krowiak wrote: > On 1/8/19 12:06 PM, Cornelia Huck wrote: > > On Tue, 8 Jan 2019 17:50:21 +0100 > > Halil Pasic wrote: > > > >> On Tue, 8 Jan 2019 17:31:13 +0100 > >> Cornelia Huck wrote: > >> > >>> On Tue, 8 Jan 2019 11:08:56 -0500 > >>> Tony Krowiak

Re: [Qemu-devel] [Qemu-trivial] Whitespace cleanup: target/ppc/translate_init.inc.c

2019-01-09 Thread Laurent Vivier
Hi Jon, please cc: qemu-devel and MAINTAINERS when you send a patch. You can have the list of maintainers using a script in qemu directory: ./scripts/get_maintainer.pl .patch Thanks, Laurent On 03/01/2019 20:58, Jon Diekema wrote: > From: Jon Diekema > Date: Tue, 25 Dec 2018 04:03:04 -

Re: [Qemu-devel] [PATCH 2/2] MAINTAINERS: Remove myself as block maintainer

2019-01-09 Thread Thomas Huth
On 2019-01-08 20:12, Kevin Wolf wrote: > Am 08.01.2019 um 18:18 hat Markus Armbruster geschrieben: >> This patch series got stuck. >> >> Markus Armbruster writes: >> >>> Fam Zheng writes: >>> On Tue, 09/25 07:00, Markus Armbruster wrote: > Jeff Cody writes: > >> I'll not be invo

Re: [Qemu-devel] [Qemu-trivial] ppc: e6500 registers SPR 604 twice

2019-01-09 Thread Laurent Vivier
David, will you take this through your ppc branch? Thanks, Laurent On 04/01/2019 11:41, Roman Kapl wrote: >> Le 25/12/2018 à 10:50, Jon Diekema a écrit : >>>  From f399f28441e0aa79458d68996038ca3606fcb699 Mon Sep 17 00:00:00 2001 >>> From: Jon Diekema mailto:jon.diek...@ge.com>> >>> Date: Tue, 2

Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/audio/marvell: Don't include unnecessary i2c.h header file

2019-01-09 Thread Laurent Vivier
On 04/01/2019 16:02, Thomas Huth wrote: > This device does not use I2C, so no need to include the header file here. > > Signed-off-by: Thomas Huth > --- > hw/audio/marvell_88w8618.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c >

[Qemu-devel] [PATCH] qdev: fix -device scsi-hd,help regression

2019-01-09 Thread Marc-André Lureau
Since commit ea9ce8934, device_post_init() applies globals directly from machines and accelerator classes. There are cases, such as -device scsi-hd,help, where the machine is setup but there in no accelerator. Let's skip accelerator globals in this case. Fixes SEGV: #0 0x58ea04ff in ob

[Qemu-devel] Qemu migration with vhost-user-blk on top of local storage

2019-01-09 Thread wuzhouhui
Hi everyone, I'm working qemu with vhost target (e.g. spdk), and I attempt to migrate VM with 2 local storages. One local storage is a regular file, e.g. /tmp/c74.qcow2, and the other is a malloc bdev that spdk created. This malloc bdev will exported to VM via vhost-user-blk. When I execute follow

Re: [Qemu-devel] [Qemu-trivial] [PATCH] trivial: Don't include isa.h if it is not really necessary

2019-01-09 Thread Laurent Vivier
On 04/01/2019 16:32, Thomas Huth wrote: > These files don't seem to do anything related to ISA directly, so > there is no need to include isa.h here. > > Signed-off-by: Thomas Huth > --- > hw/display/ramfb-standalone.c | 1 - > hw/ide/pci.c | 1 - > hw/ide/piix.c

[Qemu-devel] [PATCH] spapr/vio: remove the "irq" property"

2019-01-09 Thread Cédric Le Goater
commit efe2add7cb7f ("spapr/vio: deprecate the "irq" property") was merged in QEMU version 3.0. The "irq" property" can be removed for QEMU version 4.0, 2 version later. Signed-off-by: Cédric Le Goater --- The machine uselessly allocates an IRQ number for the sPAPR NVRAM. This is harmless but

Re: [Qemu-devel] Should the "props" be documented for QMP `object-add`?

2019-01-09 Thread Philippe Mathieu-Daudé
Hi Kashyap, On 1/9/19 9:51 AM, Kashyap Chamarthy wrote: > I notice that the following QMP command: > > { > "execute":"object-add", > "arguments":{ > "qom-type":"tls-creds-x509", > "id":"objlibvirt_migrate_tls0", > "props":{ > "dir":"/etc/pki/qemu"

Re: [Qemu-devel] [Qemu-trivial] [PATCH] ioapic: use TYPE_FOO MACRO than constant string

2019-01-09 Thread Laurent Vivier
On 05/01/2019 03:38, Li Qiang wrote: > Make them more QOMConventional. > Cc:qemu-triv...@nongnu.org > > Signed-off-by: Li Qiang > --- > hw/i386/kvm/ioapic.c | 2 +- > hw/i386/pc.c | 4 ++-- > hw/intc/ioapic.c | 2 +- > include/hw/i386/ioapic.h | 3 +++ > 4 files changed,

Re: [Qemu-devel] [PATCH] spapr/vio: remove the "irq" property"

2019-01-09 Thread Thomas Huth
On 2019-01-09 11:30, Cédric Le Goater wrote: > commit efe2add7cb7f ("spapr/vio: deprecate the "irq" property") was > merged in QEMU version 3.0. The "irq" property" can be removed for > QEMU version 4.0, 2 version later. > > Signed-off-by: Cédric Le Goater > --- > > The machine uselessly alloca

Re: [Qemu-devel] [PATCH v3 1/9] qcow2.h: add missing include

2019-01-09 Thread Alberto Garcia
On Tue 08 Jan 2019 06:06:47 PM CET, Vladimir Sementsov-Ogievskiy wrote: > qcow2.h depends on block_int.h. Compilation isn't broken currently only > due to block_int.h always included before qcow2.h. Though, it seems > better to directly include block_int.h in qcow2.h. > > Signed-off-by: Vladimir Se

Re: [Qemu-devel] [PATCH] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0

2019-01-09 Thread Philippe Mathieu-Daudé
On 1/8/19 7:49 PM, Peter Maydell wrote: > Linux returns success if pwrite64() or pread64() are called with a > zero length NULL buffer, but QEMU was returning -TARGET_EFAULT. > > This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9 > for the write syscall, and long before that in 38d8

Re: [Qemu-devel] [PATCH v3] dump: Set correct vaddr for ELF dump

2019-01-09 Thread Laszlo Ersek
On 01/09/19 09:25, Marc-André Lureau wrote: > On Wed, Jan 9, 2019 at 12:22 PM Jon Doron wrote: >> >> vaddr needs to be equal to the paddr since the dump file represents the >> physical memory image. >> >> Without setting vaddr correctly, GDB would load all the different memory >> regions on top of

Re: [Qemu-devel] [PATCH] linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0

2019-01-09 Thread Laurent Vivier
On 08/01/2019 19:49, Peter Maydell wrote: > Linux returns success if pwrite64() or pread64() are called with a > zero length NULL buffer, but QEMU was returning -TARGET_EFAULT. > > This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9 > for the write syscall, and long before that in 38

Re: [Qemu-devel] [Qemu-trivial] [PATCH] ioapic: use TYPE_FOO MACRO than constant string

2019-01-09 Thread Laurent Vivier
On 05/01/2019 03:38, Li Qiang wrote: > Make them more QOMConventional. > Cc:qemu-triv...@nongnu.org > > Signed-off-by: Li Qiang > --- > hw/i386/kvm/ioapic.c | 2 +- > hw/i386/pc.c | 4 ++-- > hw/intc/ioapic.c | 2 +- > include/hw/i386/ioapic.h | 3 +++ > 4 files changed,

Re: [Qemu-devel] [PATCH] qdev: fix -device scsi-hd,help regression

2019-01-09 Thread Cornelia Huck
On Wed, 9 Jan 2019 14:23:11 +0400 Marc-André Lureau wrote: > Since commit ea9ce8934, device_post_init() applies globals directly > from machines and accelerator classes. > > There are cases, such as -device scsi-hd,help, where the machine is > setup but there in no accelerator. > > Let's skip

Re: [Qemu-devel] Should the "props" be documented for QMP `object-add`?

2019-01-09 Thread Kashyap Chamarthy
On Wed, Jan 09, 2019 at 11:31:18AM +0100, Philippe Mathieu-Daudé wrote: > Hi Kashyap, Hi, > On 1/9/19 9:51 AM, Kashyap Chamarthy wrote: [...] > > That said, in qapi/misc.json "@object-add" doesn't document any of the > > "props". Is it on purpose? Maybe because it is a 1:1 mapping of the > >

Re: [Qemu-devel] [PATCH v3 1/6] smbus: Add a helper to generate SPD EEPROM data

2019-01-09 Thread Philippe Mathieu-Daudé
Hi Zoltan, On 1/3/19 5:27 PM, BALATON Zoltan wrote: > There are several boards with SPD EEPROMs that are now using > duplicated or slightly different hard coded data. Add a helper to > generate SPD data for a memory module of given type and size that > could be used by these boards (either as is o

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2

2019-01-09 Thread Daniel P . Berrangé
On Thu, Jan 03, 2019 at 03:06:23PM +0100, Thomas Huth wrote: > On 2019-01-03 14:32, Philippe Mathieu-Daudé wrote: > > On 1/3/19 2:23 PM, Peter Maydell wrote: > >> On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic > >> wrote: > >>> MIPS queue for December 2018 - v2 > > [...] > >> Hi; I'm afraid thi

Re: [Qemu-devel] [PATCH] configure: Force the C standard to gnu11

2019-01-09 Thread Daniel P . Berrangé
On Mon, Jan 07, 2019 at 11:45:26AM +0100, Thomas Huth wrote: > Different versions of GCC and Clang use different versions of the C standard. > This repeatedly caused problems already, e.g. with duplicated typedefs: > > https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05829.html > > or wi

Re: [Qemu-devel] [PATCH] hax: Support for Linux hosts

2019-01-09 Thread Philippe Mathieu-Daudé
On 1/8/19 7:27 PM, Paolo Bonzini wrote: > On 08/01/19 18:12, Kamil Rytarowski wrote: >> On 25.11.2018 18:14, Paolo Bonzini wrote: >>> On 25/11/18 00:50, Kamil Rytarowski wrote: On 22.11.2018 08:24, Kamil Rytarowski wrote: > On 16.11.2018 13:52, Paolo Bonzini wrote: >> On 14/11/18 14:04

Re: [Qemu-devel] [PATCH v3 14/31] target/arm: Decode Load/store register (pac)

2019-01-09 Thread Richard Henderson
On 1/9/19 9:34 AM, Peter Maydell wrote: >> v3: Use do_gpr_ld; fix sextend typo; iss_valid only for !wback. > What was the sextend typo ? Operands to the sextract were reversed -- pos 10+x, len 0. r~

[Qemu-devel] [PATCH] throttle-groups: fix restart coroutine iothread race

2019-01-09 Thread Stefan Hajnoczi
The following QMP command leads to a crash when iothreads are used: { 'execute': 'device_del', 'arguments': {'id': 'data'} } The backtrace involves the queue restart coroutine where tgm->throttle_state is a NULL pointer because throttle_group_unregister_tgm() has already been called: (gdb) b

Re: [Qemu-devel] [PATCH v2] hw: pvrdma: fix memory leak in error path

2019-01-09 Thread Yuval Shaia
On Tue, Jan 08, 2019 at 07:02:28AM -0800, Li Qiang wrote: > Currently, pvrdma_qp_send() function leak the 'comp_ctx', > Since 'comp_ctx' is used after the two checks, just relocate > the allocation & initialization after the two check. > > Spotted by Coverity: CID 1398595 > > Fixes: 2b05705dc8 >

Re: [Qemu-devel] Should the "props" be documented for QMP `object-add`?

2019-01-09 Thread Daniel P . Berrangé
On Wed, Jan 09, 2019 at 09:51:13AM +0100, Kashyap Chamarthy wrote: > I notice that the following QMP command: > > { > "execute":"object-add", > "arguments":{ > "qom-type":"tls-creds-x509", > "id":"objlibvirt_migrate_tls0", > "props":{ > "dir":"/etc

Re: [Qemu-devel] Should the "props" be documented for QMP `object-add`?

2019-01-09 Thread Kashyap Chamarthy
On Wed, Jan 09, 2019 at 11:02:08AM +, Daniel P. Berrangé wrote: > On Wed, Jan 09, 2019 at 09:51:13AM +0100, Kashyap Chamarthy wrote: [...] > > That said, in qapi/misc.json "@object-add" doesn't document any of the > > "props". Is it on purpose? Maybe because it is a 1:1 mapping of the > > c

Re: [Qemu-devel] [PATCH] file-posix: add rough-block-status parameter

2019-01-09 Thread Kevin Wolf
Am 08.01.2019 um 20:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > bdrv_co_block_status digs bs->file for additional, more accurate search > for hole inside region, reported as DATA by bs since 5daa74a6ebc. > > This accuracy is not free: assume we have qcow2 disk. Actually, qcow2 > knows, wher

Re: [Qemu-devel] [PATCH] configure: Force the C standard to gnu11

2019-01-09 Thread Thomas Huth
On 2019-01-09 11:58, Daniel P. Berrangé wrote: > On Mon, Jan 07, 2019 at 11:45:26AM +0100, Thomas Huth wrote: >> Different versions of GCC and Clang use different versions of the C standard. >> This repeatedly caused problems already, e.g. with duplicated typedefs: >> >> https://lists.gnu.org/arch

Re: [Qemu-devel] [PATCH v6] s390x/pci: add common function measurement block

2019-01-09 Thread David Hildenbrand
On 08.01.19 18:29, Pierre Morel wrote: > On 07/01/2019 12:30, David Hildenbrand wrote: >> On 03.01.19 11:17, Pierre Morel wrote: >>> From: Yi Min Zhao >>> >>> Common function measurement block is used to report zPCI internal >>> counters of successful pcilg/stg/stb and rpcit instructions to >>> a

[Qemu-devel] [PATCH v4 for-4.0 0/7] vhost-user-blk: Add support for backend reconnecting

2019-01-09 Thread elohimes
From: Xie Yongji This patchset is aimed at supporting qemu to reconnect vhost-user-blk backend after vhost-user-blk backend crash or restart. The patch 1 uses exisiting wait/nowait options to make QEMU not do a connect on client sockets during initialization of the chardev. The patch 2 introduc

[Qemu-devel] [PATCH v4 for-4.0 1/7] char-socket: Enable "nowait" option on client sockets

2019-01-09 Thread elohimes
From: Xie Yongji Enable "nowait" option to make QEMU not do a connect on client sockets during initialization of the chardev. Then we can use qemu_chr_fe_wait_connected() to connect when necessary. Now it would be used for unix domain socket of vhost-user-blk device to support reconnect. Signed-

[Qemu-devel] [PATCH v4 for-4.0 5/7] vhost-user-blk: Add support to get/set inflight buffer

2019-01-09 Thread elohimes
From: Xie Yongji This patch adds support for vhost-user-blk device to get/set inflight buffer from/to backend. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --- hw/block/vhost-user-blk.c | 26 ++ include/hw/virtio/vhost-user-blk.h | 1 + 2 files changed,

[Qemu-devel] [PATCH v4 for-4.0 2/7] vhost-user: Support transferring inflight buffer between qemu and backend

2019-01-09 Thread elohimes
From: Xie Yongji This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Firstly, qemu uses VHOST_USER_GET_INFLIGHT_FD to get the shared buffer from backend. Then qemu should send it back t

[Qemu-devel] [PATCH v4 for-4.0 7/7] contrib/vhost-user-blk: enable inflight I/O tracking

2019-01-09 Thread elohimes
From: Xie Yongji This patch enables inflight I/O tracking for vhost-user-blk backend so that we could restart it safely. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --- contrib/vhost-user-blk/vhost-user-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/

[Qemu-devel] [PATCH v4 for-4.0 6/7] vhost-user-blk: Add support to reconnect backend

2019-01-09 Thread elohimes
From: Xie Yongji Since we now support the message VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart safely because it can track inflight I/O in shared memory. This patch allows qemu to reconnect the backend after connection closed. Signed-off-by: Xie Yongj

Re: [Qemu-devel] [PATCH] s390x/vfio-ap: Implement hot plug/unplug of vfio-ap device

2019-01-09 Thread Cornelia Huck
On Tue, 8 Jan 2019 23:13:39 +0100 David Hildenbrand wrote: > On 08.01.19 20:52, Tony Krowiak wrote: > > On 1/8/19 11:09 AM, David Hildenbrand wrote: > >> On 08.01.19 17:01, Tony Krowiak wrote: > >>> Introduces hot plug/unplug support for the vfio-ap device. Note that only > >>> one > >>> vfi

[Qemu-devel] [PATCH v4 for-4.0 3/7] libvhost-user: Introduce vu_queue_map_desc()

2019-01-09 Thread elohimes
From: Xie Yongji Introduce vu_queue_map_desc() which should be independent with vu_queue_pop(); Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu Reviewed-by: Marc-André Lureau --- contrib/libvhost-user/libvhost-user.c | 88 --- 1 file changed, 51 insertions(+), 37 de

Re: [Qemu-devel] [PATCH v7] s390x/pci: add common function measurement block

2019-01-09 Thread David Hildenbrand
On 08.01.19 18:37, Pierre Morel wrote: > From: Yi Min Zhao > > Common function measurement block is used to report zPCI internal > counters of successful pcilg/stg/stb and rpcit instructions to > a memory location provided by the program. > > This patch introduces a new ZpciFmb structure and sch

[Qemu-devel] [PATCH v4 for-4.0 4/7] libvhost-user: Support tracking inflight I/O in shared memory

2019-01-09 Thread elohimes
From: Xie Yongji This patch adds support for VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD message to set/get shared memory to/from qemu. Then we maintain a "bitmap" of all descriptors in the shared memory for each queue to track inflight I/O. Signed-off-by: Xie Yongji Signed-off-by

Re: [Qemu-devel] [PATCH v7] s390x/pci: add common function measurement block

2019-01-09 Thread David Hildenbrand
On 09.01.19 12:29, David Hildenbrand wrote: > On 08.01.19 18:37, Pierre Morel wrote: >> From: Yi Min Zhao >> >> Common function measurement block is used to report zPCI internal >> counters of successful pcilg/stg/stb and rpcit instructions to >> a memory location provided by the program. >> >> Th

Re: [Qemu-devel] [PATCH] configure: Force the C standard to gnu11

2019-01-09 Thread Daniel P . Berrangé
On Wed, Jan 09, 2019 at 12:25:43PM +0100, Thomas Huth wrote: > On 2019-01-09 11:58, Daniel P. Berrangé wrote: > > On Mon, Jan 07, 2019 at 11:45:26AM +0100, Thomas Huth wrote: > >> Different versions of GCC and Clang use different versions of the C > >> standard. > >> This repeatedly caused problem

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] MAINTAINERS: Remove myself as block maintainer

2019-01-09 Thread Niels de Vos
On Tue, Jan 08, 2019 at 08:12:16PM +0100, Kevin Wolf wrote: > Am 08.01.2019 um 18:18 hat Markus Armbruster geschrieben: > > This patch series got stuck. > > > > Markus Armbruster writes: > > > > > Fam Zheng writes: > > > > > >> On Tue, 09/25 07:00, Markus Armbruster wrote: > > >>> Jeff Cody wr

Re: [Qemu-devel] [RFC v2 0/4] QEMU changes to do PVH boot

2019-01-09 Thread Stefano Garzarella
Hi Liam, On Tue, Jan 8, 2019 at 3:47 PM Liam Merwick wrote: > QEMU sets the hvm_modlist_entry in load_linux() after the call to > load_elfboot() and then qboot loads it in boot_pvh_from_fw_cfg() > > But the current PVH patches don't handle initrd (they have > start_info.nr_modules == 1). Looking

Re: [Qemu-devel] [PATCH v9 16/18] xen: automatically create XenBlockDevice-s

2019-01-09 Thread Anthony PERARD
On Tue, Jan 08, 2019 at 02:49:01PM +, Paul Durrant wrote: > This patch adds create and destroy function for XenBlockDevice-s so that > they can be created automatically when the Xen toolstack instantiates a new > PV backend via xenstore. When the XenBlockDevice is created this way it is > also

[Qemu-devel] [PATCH v9 03/21] replay: disable default snapshot for record/replay

2019-01-09 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 v9 00/21] Fixing record/replay and adding reverse debugging

2019-01-09 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 v9 08/21] migration: introduce icount field for snapshots

2019-01-09 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 v9 02/21] block: implement bdrv_snapshot_goto for blkreplay

2019-01-09 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 v9 04/21] replay: update docs for record/replay with block devices

2019-01-09 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 3497585..2c2c

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

2019-01-09 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 v9 06/21] replay: finish record/replay before closing the disks

2019-01-09 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 v9 01/21] replay: add missing fix for internal function

2019-01-09 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 v9 10/21] qapi: introduce replay.json for record/replay-related stuff

2019-01-09 Thread 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 --- MAINTAINERS |1 + Makefile.objs |4 ++-- include/sysemu/replay.h |1 + qapi/misc.json | 18

[Qemu-devel] [PATCH v9 07/21] qcow2: introduce icount field for snapshots

2019-01-09 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 Acked-by: Kevin Wolf -- v2: - documented format changes in docs/interop/qcow2.txt (suggested by Eric Blake) ---

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

2019-01-09 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 v9 12/21] replay: introduce breakpoint at the specified step

2019-01-09 Thread 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 - number of instructions execu

[Qemu-devel] [PATCH v9 11/21] replay: introduce info hmp/qmp command

2019-01-09 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). User may use step number for replay_seek/replay_break commands and for c

[Qemu-devel] [PATCH v9 09/21] replay: provide and accessor for rr filename

2019-01-09 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 v9 14/21] replay: refine replay-time module

2019-01-09 Thread 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-time.c index 0df1693..6

[Qemu-devel] [PATCH v9 13/21] replay: implement replay-seek command to proceed to the desired step

2019-01-09 Thread Pavel Dovgalyuk
This patch adds hmp/qmp commands replay_seek/replay-seek that proceed the execution to the specified step. The command 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-see

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

2019-01-09 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 2c2c5f6..8447fdd 1006

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

2019-01-09 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

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

2019-01-09 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 v9 21/21] replay: document development rules

2019-01-09 Thread 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/devel/replay.txt | 46

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

2019-01-09 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

Re: [Qemu-devel] [PATCH v9 16/18] xen: automatically create XenBlockDevice-s

2019-01-09 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 09 January 2019 12:09 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; qemu-bl...@nongnu.org; xen- > de...@lists.xenproject.org; Kevin Wolf ; Max Reitz > ; Stefano Stabellini > Subject: Re: [PATCH v9 16/

[Qemu-devel] [PATCH v9 20/21] replay: init rtc after enabling the replay

2019-01-09 Thread Pavel Dovgalyuk
This patch postpones the call of 'configure_rtc' function. This call uses host clock to configure the rtc, but host clock access should be recorded when using icount record/replay mode. Therefore now rtc is configured after switching record/replay mode on. Signed-off-by: Pavel Dovgalyuk --- vl.c

Re: [Qemu-devel] [PATCH v2] qemu-io: Reinitialize optind to 1 (not 0) before parsing inner command.

2019-01-09 Thread Max Reitz
On 08.01.19 15:51, Eric Blake wrote: > On 1/8/19 6:16 AM, Kevin Wolf wrote: > > >> Unconditionally setting optind = 1 looks fine. I would, however, quote a >> different part of the glibc man page (in addition or instead of the >> paragraph you already quoted): >> >> The variable optind is t

Re: [Qemu-devel] [PATCH v3 1/6] smbus: Add a helper to generate SPD EEPROM data

2019-01-09 Thread BALATON Zoltan
On Wed, 9 Jan 2019, Philippe Mathieu-Daudé wrote: On 1/3/19 5:27 PM, BALATON Zoltan wrote: There are several boards with SPD EEPROMs that are now using duplicated or slightly different hard coded data. Add a helper to generate SPD data for a memory module of given type and size that could be use

Re: [Qemu-devel] [PATCH v2] qemu-io: Reinitialize optind to 1 (not 0) before parsing inner command.

2019-01-09 Thread Max Reitz
On 07.01.19 19:45, Eric Blake wrote: > On 1/7/19 12:14 PM, Max Reitz wrote: >> On 07.01.19 18:59, Eric Blake wrote: >>> On 1/7/19 11:50 AM, Max Reitz wrote: >>> >>> Note I didn't set optreset. It's not present in glibc and the "hard >>> reset" is not necessary in this context. >> >

Re: [Qemu-devel] [Qemu-block] [PATCH] file-posix: add rough-block-status parameter

2019-01-09 Thread Stefan Hajnoczi
On Tue, Jan 08, 2019 at 10:45:52PM +0300, Vladimir Sementsov-Ogievskiy wrote: > bdrv_co_block_status digs bs->file for additional, more accurate search > for hole inside region, reported as DATA by bs since 5daa74a6ebc. > > This accuracy is not free: assume we have qcow2 disk. Actually, qcow2 > kn

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] MAINTAINERS: Remove myself as block maintainer

2019-01-09 Thread Markus Armbruster
Niels de Vos writes: > On Tue, Jan 08, 2019 at 08:12:16PM +0100, Kevin Wolf wrote: >> Am 08.01.2019 um 18:18 hat Markus Armbruster geschrieben: >> > This patch series got stuck. >> > >> > Markus Armbruster writes: >> > >> > > Fam Zheng writes: >> > > >> > >> On Tue, 09/25 07:00, Markus Armbru

Re: [Qemu-devel] [PATCH v3 1/6] smbus: Add a helper to generate SPD EEPROM data

2019-01-09 Thread Philippe Mathieu-Daudé
On 1/9/19 1:15 PM, BALATON Zoltan wrote: > On Wed, 9 Jan 2019, Philippe Mathieu-Daudé wrote: >> On 1/3/19 5:27 PM, BALATON Zoltan wrote: >>> There are several boards with SPD EEPROMs that are now using >>> duplicated or slightly different hard coded data. Add a helper to >>> generate SPD data for a

Re: [Qemu-devel] Qemu migration with vhost-user-blk on top of local storage

2019-01-09 Thread Stefan Hajnoczi
On Wed, Jan 09, 2019 at 06:23:42PM +0800, wuzhouhui wrote: > Hi everyone, > > I'm working qemu with vhost target (e.g. spdk), and I attempt to migrate VM > with > 2 local storages. One local storage is a regular file, e.g. /tmp/c74.qcow2, > and > the other is a malloc bdev that spdk created. Thi

[Qemu-devel] [PATCH v1 3/3] s390x/pci: Reporting the host aperture to the guest

2019-01-09 Thread Pierre Morel
The S390 PCI driver in the guest needs to know the IOMMU aperture associated with the zPCI real device in the host through Start DMA and End DMA value in the response to the Get Function Group information query. Let's report these SDMA and EDMA using the value we got from the host through the real

Re: [Qemu-devel] [PATCH] configure: Force the C standard to gnu11

2019-01-09 Thread Thomas Huth
On 2019-01-09 12:44, Daniel P. Berrangé wrote: > On Wed, Jan 09, 2019 at 12:25:43PM +0100, Thomas Huth wrote: >> On 2019-01-09 11:58, Daniel P. Berrangé wrote: >>> On Mon, Jan 07, 2019 at 11:45:26AM +0100, Thomas Huth wrote: Different versions of GCC and Clang use different versions of the C

[Qemu-devel] [PATCH v1 1/3] vfio: Linux header placeholder

2019-01-09 Thread Pierre Morel
This is a place holder for VFIO.h as changed by the Linux patch associated with this QEMU series. Signed-off-by: Pierre Morel --- linux-headers/linux/vfio.h | 65 +++--- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/linux-headers/linux/vfi

[Qemu-devel] [PATCH v1 2/3] vfio/pci: Get real IOMMU information from container

2019-01-09 Thread Pierre Morel
When the vfio_iommu_type1 supports the VFIO_IOMMU_INFO_CAPABILITIES and the capability ID VFIO_IOMMU_INFO_CAP_DMA we can use an ioctl to retrieve this information from the real IOMMU device. Let's use this information to add the host window associated with the container. Signed-off-by: Pierre Mor

Re: [Qemu-devel] [PATCH 2/2] MAINTAINERS: Remove myself as block maintainer

2019-01-09 Thread Markus Armbruster
Thomas Huth writes: > On 2019-01-08 20:12, Kevin Wolf wrote: >> Am 08.01.2019 um 18:18 hat Markus Armbruster geschrieben: >>> This patch series got stuck. >>> >>> Markus Armbruster writes: >>> Fam Zheng writes: > On Tue, 09/25 07:00, Markus Armbruster wrote: >> Jeff Cody writ

[Qemu-devel] [PATCH v1 0/3] [RFC] get real IOMMU information from VFIO IOMMU

2019-01-09 Thread Pierre Morel
In the Z-Architecture, the IOMMU information may change on a device basis. until this patch series we used hardcoded values to define the IOMMU aperture we provide to the guest during PCI enumeration. Let's ask the host about the IOMMU specific configuration using VFIO capabilities. NOTES: 1- You

  1   2   3   4   >