[Qemu-devel] [PATCH v10 01/14] block/backup: fix backup_cow_with_offload for last cluster

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
We shouldn't try to copy bytes beyond EOF. Fix it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/backup.c b/block/backup.c index 2baf7bed65..16ca9a3944 100644 --- a/block/backup.c +

[Qemu-devel] [PATCH v10 12/14] block: add lock/unlock range functions

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
Introduce lock/unlock range functionality, based on serialized requests. This is needed to refactor backup, dropping local tracked-request-like synchronization. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block_int.h | 4 block/io.c

[Qemu-devel] [PATCH v10 02/14] block/backup: split shareable copying part from backup_do_cow

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
Split copying logic which will be shared with backup-top filter. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 47 --- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/block/backup.c b/block/backup.c index 16ca9a3944..

[Qemu-devel] [PATCH v10 09/14] iotests: 257: drop unused Drive.device field

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
After previous commit Drive.device is actually unused. Drop it together with .name property. While being here reuse .node in qmp commands instead of writing 'drive0' twice. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/257 | 37 +++---

[Qemu-devel] [PATCH v10 11/14] block/io: refactor wait_serialising_requests

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
Split out do_wait_serialising_requests with additional possibility to not actually wait but just check, that there is something to wait for. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/io.c | 24 1 file changed, 16 insertions(+), 8 delet

[Qemu-devel] [PATCH v10 06/14] block: move block_copy from block/backup.c to separate file

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
Split block_copy to separate file, to be cleanly shared with backup-top filter driver in further commits. It's a clean movement, the only change is drop "static" from interface functions. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 67 ++

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.2 v5 1/2] kvm: s390: split too big memory section on several memslots

2019-08-30 Thread Christian Borntraeger
On 30.08.19 11:41, Igor Mammedov wrote: > On Thu, 29 Aug 2019 14:41:13 +0200 > Christian Borntraeger wrote: > >> On 29.08.19 14:31, Igor Mammedov wrote: >>> On Thu, 29 Aug 2019 14:07:44 +0200 >>> Christian Borntraeger wrote: >>> On 29.08.19 14:04, Igor Mammedov wrote: > On Thu,

[Qemu-devel] [PATCH v10 10/14] iotests: 257: drop device_add

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
SCSI devices are unused in test, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/257 | 8 --- tests/qemu-iotests/257.out | 44 -- 2 files changed, 52 deletions(-) diff --git a/tests/qemu-iotests/2

Re: [Qemu-devel] [PATCH v8 01/13] vfio: KABI for migration interface

2019-08-30 Thread Alex Williamson
On Fri, 30 Aug 2019 07:25:59 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, August 29, 2019 4:51 AM > > > > On Tue, 27 Aug 2019 00:25:41 +0530 > > Kirti Wankhede wrote: > > > > > - Defined MIGRATION region type and sub-type. > > >

[Qemu-devel] [PATCH] pseries: do not allow memory-less/cpu-less NUMA node

2019-08-30 Thread Laurent Vivier
When we hotplug a CPU on memory-less/cpu-less node, the linux kernel crashes. This happens because linux kernel needs to know the NUMA topology at start to be able to initialize the distance lookup table. On pseries, the topology is provided by the firmware via the existing CPUs and memory inform

[Qemu-devel] [PATCH v10 05/14] block/backup: fix block-comment style

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
We need to fix comment style around block-copy functions before further moving them to separate file to satisfy checkpatch. But do more: fix all comments style. Also, seems like doubled first asterisk is not forbidden, but drop it too for consistency. Signed-off-by: Vladimir Sementsov-Ogievskiy -

Re: [Qemu-devel] [PATCH v8 01/13] vfio: KABI for migration interface

2019-08-30 Thread Alex Williamson
On Fri, 30 Aug 2019 08:06:32 + "Tian, Kevin" wrote: > > From: Tian, Kevin > > Sent: Friday, August 30, 2019 3:26 PM > > > [...] > > > How does QEMU handle the fact that IOVAs are potentially dynamic while > > > performing the live portion of a migration? For example, each time a > > > gue

[Qemu-devel] [PATCH v10 14/14] block/backup: use backup-top instead of write notifiers

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
Drop write notifiers and use filter node instead. = Changes = 1. Add filter-node-name argument for backup qmp api. We have to do it in this commit, as 257 needs to be fixed. 2. There are no more write notifiers here, so is_write_notifier parameter is dropped from block-copy paths. 3. Intersecti

Re: [Qemu-devel] [PATCH] pseries: do not allow memory-less/cpu-less NUMA node

2019-08-30 Thread Daniel P . Berrangé
On Fri, Aug 30, 2019 at 06:13:45PM +0200, Laurent Vivier wrote: > When we hotplug a CPU on memory-less/cpu-less node, the linux kernel > crashes. > > This happens because linux kernel needs to know the NUMA topology at > start to be able to initialize the distance lookup table. > > On pseries, th

[Qemu-devel] [PATCH v10 13/14] block: introduce backup-top filter driver

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
Backup-top filter caches write operations and does copy-before-write operations. The driver will be used in backup instead of write-notifiers. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup-top.h | 37 +++ block/backup-top.c | 244 +++

[Qemu-devel] [PATCH v10 08/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
After backup-top filter appearing it's not possible to see dirty bitmaps in top node, so use node-name instead. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/124| 83 tests/qemu-iotests/257| 49 ++--- tests/qemu-iotests/257.out| 364 +++

Re: [Qemu-devel] [PATCH v8 09/11] Adding info [tb-list|tb|coverset] commands to HMP.

2019-08-30 Thread Alex Bennée
vandersonmr writes: > These commands allow the exploration of TBs > generated by the TCG. Understand which one > hotter, with more guest/host instructions... > and examine their guest, host and IR code. > > The goal of this command is to allow the dynamic exploration > of TCG behavior and code

Re: [Qemu-devel] [PATCH v8 10/11] monitor: adding new info cfg command

2019-08-30 Thread Alex Bennée
vandersonmr writes: > Adding "info cfg id depth" commands to HMP. > This command allow the exploration a TB > neighbors by dumping [and opening] a .dot > file with the TB CFG neighbors colorized > by their hotness. > > The goal of this command is to allow the dynamic exploration > of TCG behavi

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

2019-08-30 Thread Greg Kurz
On Fri, 30 Aug 2019 14:44:07 +0530 Aravinda Prasad wrote: > This patch adds support in QEMU to handle "ibm,nmi-register" > and "ibm,nmi-interlock" RTAS calls and sets the default > value of SPAPR_CAP_FWNMI_MCE to SPAPR_CAP_ON for machine > type 4.2. > > The machine check notification address is

Re: [Qemu-devel] [PATCH v5 2/2] hw/vfio/common: Fail on VFIO/HW nested paging detection

2019-08-30 Thread Alex Williamson
On Fri, 30 Aug 2019 10:06:56 +0200 Auger Eric wrote: > Hi Alex, > > On 8/29/19 8:14 PM, Alex Williamson wrote: > > On Thu, 29 Aug 2019 11:01:41 +0200 > > Eric Auger wrote: > > > >> As of today, VFIO only works along with vIOMMU supporting > >> caching mode. The SMMUv3 does not support this m

Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: do not allow memory-less/cpu-less NUMA node

2019-08-30 Thread Greg Kurz
On Fri, 30 Aug 2019 17:34:13 +0100 Daniel P. Berrangé wrote: > On Fri, Aug 30, 2019 at 06:13:45PM +0200, Laurent Vivier wrote: > > When we hotplug a CPU on memory-less/cpu-less node, the linux kernel > > crashes. > > > > This happens because linux kernel needs to know the NUMA topology at > > st

[Qemu-devel] [Bug 1841990] Re: instruction 'denbcdq' misbehaving

2019-08-30 Thread Philippe Mathieu-Daudé
This seems related to this change: commit ef96e3ae9698d6726a8113f448c82985a9f31ff5 Author: Mark Cave-Ayland Date: Wed Jan 2 09:14:22 2019 + target/ppc: move FP and VMX registers into aligned vsr register array The VSX register array is a block of 64 128-bit registers where the

Re: [Qemu-devel] [PATCH v2 2/8] exec: Factor out core logic of check_watchpoint()

2019-08-30 Thread Philippe Mathieu-Daudé
On 8/30/19 3:21 AM, Richard Henderson wrote: > On 8/29/19 10:26 AM, Philippe Mathieu-Daudé wrote: >>> -wp->hitaddr = vaddr; >>> +wp->hitaddr = MAX(addr, wp->vaddr); >> >> When is addr > wp->vaddr? > > Both the watchpoint and the access are arbitrary ranges. > > wp:[

Re: [Qemu-devel] Cryptic errors from PIP install if missing openssl-devel

2019-08-30 Thread Eduardo Habkost
On Thu, Aug 29, 2019 at 11:31:25AM +1000, David Gibson wrote: > If I attempt to run "make check-acceptance" on my POWER9, RHEL8.1 > machine when the openssl-devel package isn't installed, I get the > following very cryptic error: > > VENV/home/dwg/qemu/build/rhel8/tests/venv > PIP /hom

Re: [Qemu-devel] [PATCH 1/5] nbd: Improve per-export flag handling in server

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
23.08.2019 17:37, Eric Blake wrote: > When creating a read-only image, we are still advertising support for > TRIM and WRITE_ZEROES to the client, even though the client should not > be issuing those commands. But seeing this requires looking across > multiple functions: > > All callers to nbd_ex

Re: [Qemu-devel] [PATCH 2/5] nbd: Prepare for NBD_CMD_FLAG_FAST_ZERO

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
23.08.2019 17:37, Eric Blake wrote: > Commit fe0480d6 and friends added BDRV_REQ_NO_FALLBACK as a way to > avoid wasting time on a preliminary write-zero request that will later > be rewritten by actual data, if it is known that the write-zero > request will use a slow fallback; but in doing so, co

Re: [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-30 Thread John Snow
On 8/30/19 6:07 AM, Christophe de Dinechin wrote: > > John Snow writes: > >> On 8/29/19 12:45 PM, Christophe de Dinechin wrote: >>> > [...] > >>> Sorry for catching up late, this mail thread happened during my PTO. >>> >>> I remember bringing up at the time [1] that the correct solution needs

Re: [Qemu-devel] [PATCH 3/5] nbd: Implement client use of NBD FAST_ZERO

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
23.08.2019 17:37, Eric Blake wrote: > The client side is fairly straightforward: if the server advertised > fast zero support, then we can map that to BDRV_REQ_NO_FALLBACK > support. A server that advertises FAST_ZERO but not WRITE_ZEROES > is technically broken, but we can ignore that situation a

[Qemu-devel] [PATCH] tests/acceptance: Do not install paramiko module by default

2019-08-30 Thread Philippe Mathieu-Daudé
The paramiko Python module has many dependencies. Some of them are not pure Python, such cryptography module which requires to be built and linked with OpenSSL. When native libraries and header are missing on the host, the error reported is not very helpful: $ make check-venv VENVtests/ve

Re: [Qemu-devel] [PATCH 4/5] nbd: Implement server use of NBD FAST_ZERO

2019-08-30 Thread Vladimir Sementsov-Ogievskiy
23.08.2019 17:37, Eric Blake wrote: > The server side is fairly straightforward: we can always advertise > support for detection of fast zero, and implement it by mapping the > request to the block layer BDRV_REQ_NO_FALLBACK. > > Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1

2019-08-30 Thread Alistair Francis
On Fri, Aug 30, 2019 at 2:06 AM Alex Bennée wrote: > > > Alistair Francis writes: > > > On Thu, Aug 29, 2019 at 5:05 AM liuzhiwei wrote: > >> > >> On 2019/8/29 上午5:34, Alistair Francis wrote: > >> > On Wed, Aug 28, 2019 at 12:04 AM liuzhiwei wrote: > >> >> Change-Id: I3cf891bc400713b95f47ecca82

Re: [Qemu-devel] [PATCH] memory: fetch pmem size in get_file_size()

2019-08-30 Thread Eduardo Habkost
On Fri, Aug 30, 2019 at 10:30:56AM +0100, Stefan Hajnoczi wrote: > Neither stat(2) nor lseek(2) report the size of Linux devdax pmem > character device nodes. Commit 314aec4a6e06844937f1677f6cba21981005f389 > ("hostmem-file: reject invalid pmem file sizes") added code to > hostmem-file.c to fetch

Re: [Qemu-devel] [edk2-rfc] [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-30 Thread Laszlo Ersek
On 08/30/19 16:48, Igor Mammedov wrote: > (01) On boot firmware maps and initializes SMI handler at default SMBASE > (3) > (using dedicated SMRAM at 3 would allow us to avoid save/restore > steps and make SMM handler pointer not vulnerable to DMA attacks) > > (02) QEMU hotplug

[Qemu-devel] [PATCH v2] ui: add an embedded Barrier client

2019-08-30 Thread Laurent Vivier
This allows to receive mouse and keyboard events from a Barrier server. This is enabled by adding the following parameter on the command line ... -object input-barrier,id=$id,name=$name ... Where $name is the name declared in the screens section of barrier.conf The barrier server (barriers)

Re: [Qemu-devel] [PATCH] tests/acceptance: Do not install paramiko module by default

2019-08-30 Thread Eduardo Habkost
On Fri, Aug 30, 2019 at 08:40:33PM +0200, Philippe Mathieu-Daudé wrote: > The paramiko Python module has many dependencies. Some of them > are not pure Python, such cryptography module which requires to > be built and linked with OpenSSL. > > When native libraries and header are missing on the hos

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/2] Alignment checks cleanup

2019-08-30 Thread Nir Soffer
On Wed, Aug 28, 2019 at 11:14 PM John Snow wrote: > > > On 8/27/19 2:59 PM, Nir Soffer wrote: > > While working on 4k support, I noticed that there is lot of code using > > BDRV_SECTOR_SIZE (512) for checking alignment. I wonder how this can > work with > > 4k storage. > > > > Lets start by clean

[Qemu-devel] [PATCH 01/10] qcrypto: add suport for amend options

2019-08-30 Thread Maxim Levitsky
This adds the qcrypto_amend_options and corresponding crypto driver callbacks for the for encrypted key managedment Signed-off-by: Maxim Levitsky --- crypto/block.c | 31 +++ crypto/blockpriv.h | 8 include/crypto/block.h | 22 ++

[Qemu-devel] [PATCH 05/10] block/crypto: implement the encryption key management

2019-08-30 Thread Maxim Levitsky
This implements the encryption key management using the generic code in qcrypto layer (currently only for qemu-img amend) This code adds another 'write_func' because the initialization write_func works directly on the underlying file, because during the creation, there is no open instance of the l

[Qemu-devel] [PATCH 00/10] RFC crypto/luks: encryption key managment using amend interface

2019-08-30 Thread Maxim Levitsky
This patch series is continuation of my work to add encryption key managment to luks/qcow2 with luks. This patch series is based on patch series I sent earlier called 'RFC crypto/luks: preparation for encryption key managment' Let me hear what you think. This is still an RFC, so please don't kill

[Qemu-devel] [PATCH 02/10] qcrypto-luks: extend the create options for upcoming encryption key management

2019-08-30 Thread Maxim Levitsky
Now you can specify which slot to put the encryption key to Plus add 'active' option which will let user erase the key secret instead of adding it. Check that it is true for creation Signed-off-by: Maxim Levitsky --- block/crypto.c | 2 ++ block/crypto.h | 16 ++

[Qemu-devel] [PATCH 03/10] qcrypto-luks: implement the encryption key management

2019-08-30 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 366 +++- 1 file changed, 364 insertions(+), 2 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index ba20d55246..21325fbc79 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks

[Qemu-devel] [PATCH 07/10] block: add x-blockdev-amend qmp command

2019-08-30 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- block/Makefile.objs | 2 +- block/amend.c | 116 ++ include/block/block_int.h | 23 ++-- qapi/block-core.json | 26 + qapi/job.json | 4 +- 5 files changed, 163 insertions(+)

[Qemu-devel] [PATCH 04/10] block: amend: add 'force' option

2019-08-30 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- block.c | 4 +++- block/qcow2.c | 1 + include/block/block.h | 1 + include/block/block_int.h | 1 + qemu-img-cmds.hx | 4 ++-- qemu-img.c| 8 +++- qemu-img.texi | 6 +- 7 files change

[Qemu-devel] [PATCH 06/10] qcow2: implement crypto amend options

2019-08-30 Thread Maxim Levitsky
--- block/qcow2.c | 79 --- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 376bb416fd..8dff4c6b5f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -171,6 +171,25 @@ static ssize_t qcow2_crypto_hdr

[Qemu-devel] [PATCH 08/10] block/crypto: implement blockdev-amend

2019-08-30 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- block/crypto.c | 86 +--- qapi/block-core.json | 4 +-- 2 files changed, 68 insertions(+), 22 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index dbd95a99ba..9cb668ff0e 100644 --- a/block/crypto.c +++ b/

[Qemu-devel] [PATCH 09/10] block/qcow2: implement blockdev-amend

2019-08-30 Thread Maxim Levitsky
Currently only for changing crypto parameters Signed-off-by: Maxim Levitsky --- block/qcow2.c| 71 qapi/block-core.json | 4 +-- 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 8dff4c6b5f..3

[Qemu-devel] [PATCH 10/10] iotests : add tests for encryption key management

2019-08-30 Thread Maxim Levitsky
Note that currently I add tests 300-302, which are placeholders to ease the rebase. In final version of these patches I will update these. Signed-off-by: Maxim Levitsky --- tests/qemu-iotests/087.out | 6 +- tests/qemu-iotests/134.out | 2 +- tests/qemu-iotests/158.out |

Re: [Qemu-devel] [PATCH v6 15/30] riscv: hart: Add a "hartid-base" property to RISC-V hart array

2019-08-30 Thread Alistair Francis
On Tue, Aug 27, 2019 at 8:12 AM Bin Meng wrote: > > At present each hart's hartid in a RISC-V hart array is assigned > the same value of its index in the hart array. But for a system > that has multiple hart arrays, this is not the case any more. > > Add a new "hartid-base" property so that hartid

Re: [Qemu-devel] [PATCH 1/5] nbd: Improve per-export flag handling in server

2019-08-30 Thread Eric Blake
On 8/30/19 1:00 PM, Vladimir Sementsov-Ogievskiy wrote: > 23.08.2019 17:37, Eric Blake wrote: >> When creating a read-only image, we are still advertising support for >> TRIM and WRITE_ZEROES to the client, even though the client should not >> be issuing those commands. But seeing this requires lo

Re: [Qemu-devel] [PATCH 1/5] nbd: Improve per-export flag handling in server

2019-08-30 Thread Eric Blake
On 8/30/19 6:10 PM, Eric Blake wrote: > On 8/30/19 1:00 PM, Vladimir Sementsov-Ogievskiy wrote: >> 23.08.2019 17:37, Eric Blake wrote: >>> When creating a read-only image, we are still advertising support for >>> TRIM and WRITE_ZEROES to the client, even though the client should not >>> be issuing

Re: [Qemu-devel] [PATCH 2/5] nbd: Prepare for NBD_CMD_FLAG_FAST_ZERO

2019-08-30 Thread Eric Blake
On 8/30/19 1:07 PM, Vladimir Sementsov-Ogievskiy wrote: > 23.08.2019 17:37, Eric Blake wrote: >> Commit fe0480d6 and friends added BDRV_REQ_NO_FALLBACK as a way to >> avoid wasting time on a preliminary write-zero request that will later >> be rewritten by actual data, if it is known that the write

[Qemu-devel] Discussion: vnc: memory leak in zrle_compress_data

2019-08-30 Thread fangying
Hi Gerd, Memory leak is observed in zrle_compress_data when we are doing some AddressSanitizer tests. The leak stack is as bellow: = ==47887==ERROR: LeakSanitizer: detected memory leaks Direct leak of 29760 byte(s) in 5 object(s)

Re: [Qemu-devel] [PATCH] tests/acceptance: Do not install paramiko module by default

2019-08-30 Thread David Gibson
On Fri, Aug 30, 2019 at 03:51:39PM -0300, Eduardo Habkost wrote: > On Fri, Aug 30, 2019 at 08:40:33PM +0200, Philippe Mathieu-Daudé wrote: > > The paramiko Python module has many dependencies. Some of them > > are not pure Python, such cryptography module which requires to > > be built and linked w

Re: [Qemu-devel] [EXTERNAL]Re: patch to swap SIGRTMIN + 1 and SIGRTMAX - 1

2019-08-30 Thread Josh Kunz via Qemu-devel
I can take over the series. I'll rebase the patch set, and update it to address the SIGRTMIN - 1 issue. I should have an update sometime next week. On Wed, Aug 28, 2019 at 10:31 AM Aleksandar Markovic wrote: > > From: Laurent Vivier > > Sent: Wednesday, August 28, 2019 10:51 AM > > To: Josh Kun

[Qemu-devel] Questions about 'emulated_config_bits' in vfio pci

2019-08-30 Thread Li Qiang
Hi Alex and all, My understanding for ‘emulated_config_bits’ in ‘VFIOPCIDevice’ is that this is the mask for PCI config space. If the bits is set in ‘ emulated_config_bits’ then we can just use the qemu’s ‘vdev->pdev.config’, it the bits is not set, we need to ask the physical device. But the

[Qemu-devel] [PATCH] block: qcow2: free 'refcount_table' in error path

2019-08-30 Thread Li Qiang
Currently, when doing './check -qcow2 098'. We can get following asan output: qemu-img: Could not empty blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error + += +==60365==ERROR: LeakSanitizer: detected memory leaks

Re: [Qemu-devel] Questions about 'emulated_config_bits' in vfio pci

2019-08-30 Thread Alex Williamson
On Sat, 31 Aug 2019 09:31:59 +0800 Li Qiang wrote: > Hi Alex and all, > > My understanding for ‘emulated_config_bits’ in ‘VFIOPCIDevice’ is > that this is the mask for PCI config space. If the bits is set in ‘ > emulated_config_bits’ then we can just use the qemu’s > ‘vdev->pdev.config’, it the

[Qemu-devel] 答复: Questions about 'emulated_config_bits' in vfio pci

2019-08-30 Thread Li Qiang
So detailed explanation, I got the point. Thank you Alex! Li Qiang 发件人: Alex Williamson 发送时间: 2019年8月31日 10:23 收件人: Li Qiang 抄送: Alex Williamson; qemu-devel@nongnu.org 主题: Re: [Qemu-devel] Questions about 'emulated_config_bits' in vfio pci On Sat, 31 Aug 2019 09:31:59 +0800 Li Qiang wrote: >

Re: [Qemu-devel] Cryptic errors from PIP install if missing openssl-devel

2019-08-30 Thread David Gibson
On Fri, Aug 30, 2019 at 02:56:48PM -0300, Eduardo Habkost wrote: > On Thu, Aug 29, 2019 at 11:31:25AM +1000, David Gibson wrote: > > If I attempt to run "make check-acceptance" on my POWER9, RHEL8.1 > > machine when the openssl-devel package isn't installed, I get the > > following very cryptic err

Re: [Qemu-devel] [PATCH v4 2/6] m68k: Add NeXTcube keyboard device

2019-08-30 Thread Thomas Huth
Am Tue, 13 Aug 2019 11:16:44 +0100 schrieb Peter Maydell : > On Tue, 9 Jul 2019 at 08:35, Thomas Huth wrote: > > > > It is likely still quite incomplete (e.g. mouse and interrupts are > > not implemented yet), but it is good enough for keyboard input at > > the firmware monitor. > > This code has

Re: [Qemu-devel] [PATCH v8 01/13] vfio: KABI for migration interface

2019-08-30 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, August 29, 2019 4:51 AM > > On Tue, 27 Aug 2019 00:25:41 +0530 > Kirti Wankhede wrote: > > > - Defined MIGRATION region type and sub-type. > > - Used 3 bits to define VFIO device states. > > Bit 0 => _RUNNING > >

[Qemu-devel] [Bug 1841990] Re: instruction 'denbcdq' misbehaving

2019-08-30 Thread Philippe Mathieu-Daudé
I tried to compile your test program with 2 different GCC versions but it keeps failing, do you need a special/recent version? Meanwhile can you attach a statically linked binary? $ gcc -v gcc version 6.3.0 20170516 (Debian 6.3.0-18) $ gcc -g -O -mcpu=power9 test-denbcdq.c -o test-denbcdq test-d

Re: [Qemu-devel] [PATCH] qemu-doc: Do not hard-code the name of the QEMU binary

2019-08-30 Thread Miroslav Rezanina
- Original Message - > From: "Thomas Huth" > To: qemu-devel@nongnu.org, "Paolo Bonzini" > Cc: mreza...@redhat.com, qemu-triv...@nongnu.org, "Richard Henderson" > , "Eduardo Habkost" > , qemu-bl...@nongnu.org > Sent: Wednesday, August 28, 2019 11:34:47 AM > Subject: [PATCH] qemu-doc: Do n

Re: [Qemu-devel] [PATCH v8 01/13] vfio: KABI for migration interface

2019-08-30 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Friday, August 30, 2019 3:26 PM > [...] > > How does QEMU handle the fact that IOVAs are potentially dynamic while > > performing the live portion of a migration? For example, each time a > > guest driver calls dma_map_page() or dma_unmap_page(), a > > MemoryRegionSect

Re: [Qemu-devel] [PATCH v5 2/2] hw/vfio/common: Fail on VFIO/HW nested paging detection

2019-08-30 Thread Auger Eric
Hi Alex, On 8/29/19 8:14 PM, Alex Williamson wrote: > On Thu, 29 Aug 2019 11:01:41 +0200 > Eric Auger wrote: > >> As of today, VFIO only works along with vIOMMU supporting >> caching mode. The SMMUv3 does not support this mode and >> requires HW nested paging to work properly with VFIO. >> >> So

Re: [Qemu-devel] [PATCH for-4.2 v10 03/15] virtio-iommu: Add skeleton

2019-08-30 Thread Auger Eric
Hi Peter, On 8/30/19 3:26 AM, Peter Xu wrote: > On Thu, Aug 29, 2019 at 02:18:42PM +0200, Auger Eric wrote: >> Hi Peter, >> >> First of all, please forgive me for the delay. >> On 8/15/19 3:54 PM, Peter Xu wrote: >>> On Tue, Jul 30, 2019 at 07:21:25PM +0200, Eric Auger wrote: +static void virt

[Qemu-devel] [Bug 1841990] Re: instruction 'denbcdq' misbehaving

2019-08-30 Thread Philippe Mathieu-Daudé
FWIW I could compile the attached test with: $ gcc -v gcc version 8.3.1 20190507 (Red Hat 8.3.1-4) (GCC) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1841990 Title: instruction 'denbcdq' misbehav

Re: [Qemu-devel] [PATCH] qga: add command guest-get-devices for reporting VirtIO devices

2019-08-30 Thread Tomáš Golembiovský
On Thu, 29 Aug 2019 11:13:53 -0500 Eric Blake wrote: > On 8/29/19 11:03 AM, Tomáš Golembiovský wrote: > > Add command for reporting devices on Windows guest. The intent is not so > > much to report the devices but more importantly the driver (and its > > version) that is assigned to the device. >

[Qemu-devel] [Bug 1842038] [NEW] qemu 4.0/4.1 segfault on live migrate with virtio-scsi iothread

2019-08-30 Thread Dmitriy
Public bug reported: [root@kvm-nvme5 qemu]# uname -a Linux kvm-nvme5 4.14.35-1902.4.8.el7uek.x86_64 #2 SMP Sun Aug 4 22:25:18 GMT 2019 x86_64 x86_64 x86_64 GNU/Linux [root@kvm-nvme5 qemu]# qemu-system-x86_64 --version QEMU emulator version 4.1.0 (qemu-4.1.0-1.el7) Copyright (c) 2003-2019 Fabrice

Re: [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1

2019-08-30 Thread Alex Bennée
Alistair Francis writes: > On Thu, Aug 29, 2019 at 5:05 AM liuzhiwei wrote: >> >> On 2019/8/29 上午5:34, Alistair Francis wrote: >> > On Wed, Aug 28, 2019 at 12:04 AM liuzhiwei wrote: >> >> Change-Id: I3cf891bc400713b95f47ecca82b1bf773f3dcb25 >> >> Signed-off-by: liuzhiwei >> >> --- >> >> fp

Re: [Qemu-devel] QEMU as ISS (Instruction Set Simulator)

2019-08-30 Thread Libo Zhou
Hi Aleksandar, Thanks for explaining helper functions for me. Before getting my hands dirty, I have some more questions. After figuring them out, I can get started. I need to add some new registers to the CPU. In "translate.c", I found that the registers are declared as static TCGv array

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

2019-08-30 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 Reviewe

[Qemu-devel] [PATCH v12 2/6] ppc: spapr: Introduce FWNMI capability

2019-08-30 Thread Aravinda Prasad
Introduce 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 als

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

2019-08-30 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 v12 3/6] target/ppc: Handle NMI guest exit

2019-08-30 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 v12 4/6] target/ppc: Build rtas error log upon an MCE

2019-08-30 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 v12 6/6] migration: Include migration support for machine check handling

2019-08-30 Thread Aravinda Prasad
This patch includes migration support for machine check handling. Especially this patch blocks 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 corr

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

2019-08-30 Thread Aravinda Prasad
This patch adds support in QEMU to handle "ibm,nmi-register" and "ibm,nmi-interlock" RTAS calls and sets the default value of SPAPR_CAP_FWNMI_MCE to SPAPR_CAP_ON for machine type 4.2. The machine check notification address is saved when the OS issues "ibm,nmi-register" RTAS call. This patch also

[Qemu-devel] [PATCH] memory: fetch pmem size in get_file_size()

2019-08-30 Thread Stefan Hajnoczi
Neither stat(2) nor lseek(2) report the size of Linux devdax pmem character device nodes. Commit 314aec4a6e06844937f1677f6cba21981005f389 ("hostmem-file: reject invalid pmem file sizes") added code to hostmem-file.c to fetch the size from sysfs and compare against the user-provided size=NUM parame

Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.2 v5 1/2] kvm: s390: split too big memory section on several memslots

2019-08-30 Thread Igor Mammedov
On Thu, 29 Aug 2019 14:41:13 +0200 Christian Borntraeger wrote: > On 29.08.19 14:31, Igor Mammedov wrote: > > On Thu, 29 Aug 2019 14:07:44 +0200 > > Christian Borntraeger wrote: > > > >> On 29.08.19 14:04, Igor Mammedov wrote: > >>> On Thu, 29 Aug 2019 08:47:49 +0200 > >>> Christian Borntra

Re: [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-30 Thread Christophe de Dinechin
John Snow writes: > On 8/29/19 12:45 PM, Christophe de Dinechin wrote: >> [...] >> Sorry for catching up late, this mail thread happened during my PTO. >> >> I remember bringing up at the time [1] that the correct solution needs >> to take into account usage models that vary from >> >> - a work

[Qemu-devel] [PATCH v2 2/2] tcg: Factor out probe_write() logic into probe_access()

2019-08-30 Thread David Hildenbrand
Let's also allow to probe other access types. Signed-off-by: David Hildenbrand --- accel/tcg/cputlb.c | 43 ++--- accel/tcg/user-exec.c | 26 +++-- include/exec/exec-all.h | 9 +++-- 3 files changed, 59 insertions(+), 19 deletio

[Qemu-devel] [PATCH v2 1/2] tcg: Make probe_write() return a pointer to the host page

2019-08-30 Thread David Hildenbrand
... similar to tlb_vaddr_to_host(); however, allow access to the host page except when TLB_NOTDIRTY or TLB_MMIO is set. Signed-off-by: David Hildenbrand --- accel/tcg/cputlb.c | 21 - accel/tcg/user-exec.c | 6 -- include/exec/exec-all.h | 4 ++-- 3 files changed

[Qemu-devel] [PATCH v2 0/2] tcg: Introduce probe_access() and return a host pointer

2019-08-30 Thread David Hildenbrand
Let's return a host pointer from probe_access() if possible and provide probe_access(). s390x will soon make use of probe_access() and use the provided host pointer. v1 -> v2: - Rebased to tcg-next - "tcg: Make probe_write() return a pointer to the host page" -- Rephrase documentation - "tcg: Fact

Re: [Qemu-devel] [PATCH v8 02/11] accel: collecting TB execution count

2019-08-30 Thread Alex Bennée
vandersonmr writes: > If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS > enabled, then we instrument the start code of this TB > to atomically count the number of times it is executed. > We count both the number of "normal" executions and atomic > executions of a TB. > > The execution co

[Qemu-devel] [PATCH 2/2] tests: cpu-plug-test: fix device_add for pc/q35 machines

2019-08-30 Thread Igor Mammedov
Commit bc1fb850a3 silently broke device_add test for CPU hotplug which resulted in test successfully passing though it wasn't actually run. Fix it by making sure that all non present CPUs reported by "query-hotpluggable-cpus" are hotplugged instead of making up and hardcoding values. Use of query-

[Qemu-devel] [PATCH 0/2] tests: cpu-plug-test: fix x86 device_add cpu-foo test cases

2019-08-30 Thread Igor Mammedov
Fixes bc1fb850a3 (vl.c deprecate incorrect CPUs topology) that introduced regression. Igor Mammedov (2): tests: add qtest_qmp_device_add_qdict() helper tests: cpu-plug-test: fix device_add for pc/q35 machines tests/libqtest.h | 12 + tests/cpu-plug-test.c | 62 ++

[Qemu-devel] [PATCH 1/2] tests: add qtest_qmp_device_add_qdict() helper

2019-08-30 Thread Igor Mammedov
Add an API that takes QDict directly, so users could skip steps of first building json dictionary and converting it back to QDict in existing qtest_qmp_device_add() and instead use QDict directly without intermediate conversion. Signed-off-by: Igor Mammedov --- tests/libqtest.h | 12

Re: [Qemu-devel] [PATCH v8 01/11] accel: introducing TBStatistics structure

2019-08-30 Thread Alex Bennée
vandersonmr writes: > To store statistics for each TB, we created a TBStatistics structure > which is linked with the TBs. TBStatistics can stay alive after > tb_flush and be relinked to a regenerated TB. So the statistics can > be accumulated even through flushes. > > The goal is to have all p

[Qemu-devel] [PATCH v2] qapi/qmp-dispatch: Fix error class for reporting disabled commands

2019-08-30 Thread Michal Privoznik
If a command is disabled an error is reported. But due to usage of error_setg() the class of the error is GenericError which does not help callers in distinguishing this case from a case where a qmp command fails regularly due to other reasons. Use CommandNotFound error class which is much closer t

[Qemu-devel] [PATCH v2 1/2] accel/tcg: adding integration with linux perf

2019-08-30 Thread vandersonmr
This commit adds support to Linux Perf in order to be able to analyze qemu jitted code and also to able to see the TBs PC in it. When using "-perf" qemu creates a jitdump file in the current working directory. The file format specification can be found in: https://github.com/torvalds/linux/blob/ma

Re: [Qemu-devel] [PATCH v8 03/11] accel: collecting JIT statistics

2019-08-30 Thread Alex Bennée
vandersonmr writes: > If a TB has a TBS (TBStatistics) with the TB_JIT_STATS > enabled then we collect statistics of its translation > processes and code translation. > > Collecting the number of host instructions seems to be > not simple as it would imply in having to modify several > target s

Re: [Qemu-devel] [PATCH] qapi: Reintroduce CommandDisabled error class

2019-08-30 Thread Michal Privoznik
On 8/30/19 1:52 PM, Markus Armbruster wrote: Michal Privoznik writes: On 8/29/19 3:12 PM, Eric Blake wrote: On 8/29/19 8:04 AM, Michal Privoznik wrote: A bit of background: up until very recently libvirt used qemu-ga in all or nothing way. It didn't care why a qemu-ga command failed. But ve

Re: [Qemu-devel] [PATCH v8 02/11] accel: collecting TB execution count

2019-08-30 Thread Alex Bennée
Vanderson Martins do Rosario writes: > Ok. I haven't change it before because I would like to be able to collect > information for already translated TBs when I, for instance, remove the > filter during execution. Having the TBStats already created guarantee this. > To guarantee this in your ap

Re: [Qemu-devel] [PATCH v8 02/11] accel: collecting TB execution count

2019-08-30 Thread Vanderson Martins do Rosario
Ok. I haven't change it before because I would like to be able to collect information for already translated TBs when I, for instance, remove the filter during execution. Having the TBStats already created guarantee this. To guarantee this in your approach, we would need to tb_flush when changing t

Re: [Qemu-devel] [PATCH v8 05/11] accel: adding TB_JIT_TIME and full replacing CONFIG_PROFILER

2019-08-30 Thread Alex Bennée
vandersonmr writes: > Replace all others CONFIG_PROFILER statistics and migrate it to > TBStatistics system. However, TCGProfiler still exists and can > be use to store global statistics and times. All TB related > statistics goes to TBStatistics. > > Signed-off-by: Vanderson M. do Rosario > -

Re: [Qemu-devel] [PATCH v6 2/4] 9p: Added virtfs option 'multidevs=remap|forbid|warn'

2019-08-30 Thread Greg Kurz
On Thu, 22 Aug 2019 21:33:37 +0200 Christian Schoenebeck wrote: > 'warn' (default): Only log an error message (once) on host if more than one > device is shared by same export, except of that just ignore this config > error though. This is the default behaviour for not breaking existing > install

Re: [Qemu-devel] [PATCH V12 0/5] add pvpanic mmio support

2019-08-30 Thread Auger Eric
Hi Peng, On 12/12/18 2:54 AM, peng.h...@zte.com.cn wrote: >>> v11 --> v12 >>> realize pvpanic as a pci device and use the mmio of pci device. >> >> Do you have a pointer to the kernel patches? >> >> Thanks, >>> drew >> > I'm still sorting out the code for the kernel part, and I haven't submit

Re: [Qemu-devel] [PATCH v2] qapi/qmp-dispatch: Fix error class for reporting disabled commands

2019-08-30 Thread Eric Blake
On 8/30/19 8:29 AM, Michal Privoznik wrote: > If a command is disabled an error is reported. But due to usage > of error_setg() the class of the error is GenericError which does > not help callers in distinguishing this case from a case where a > qmp command fails regularly due to other reasons. Us

[Qemu-devel] [PATCH v2 2/2] tb-stats: adding TBStatistics info into perf dump

2019-08-30 Thread vandersonmr
Adding TBStatistics information to linux perf TB's symbol names. This commit depends on the following PATCH: [PATCH v5 00/10] Measure Tiny Code Generation Quality Signed-off-by: Vanderson M. do Rosario --- accel/tcg/perf/jitdump.c | 16 +++- 1 file changed, 15 insertions(+), 1 delet

  1   2   >