[Qemu-devel] [PATCH] ppc/pnv: add dummy XSCOM registers for PRD initialization

2019-05-27 Thread Cédric Le Goater
PRD (Processor recovery diagnostics) is a service available on OpenPower systems. The opal-prd daemon initializes the PowerPC Processor through the XSCOM bus and then waits for hardware diagnostic events. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_xscom.c | 18 ++ 1 file chan

[Qemu-devel] [PATCH] ppc/pnv: introduce new skiboot platform properties

2019-05-27 Thread Cédric Le Goater
Newer skiboots (after 6.3) support QEMU platforms that have characteristics closer to real OpenPOWER systems. The CPU type is used to define the BMC drivers: Aspeed AST2400 for POWER8 processors and AST2500 for POWER9s. Advertise the new platform property names, "qemu,powernv8" and "qemu,powernv9"

Re: [Qemu-devel] [PATCH] i386: Fix nested SVM on older Opterons

2019-05-27 Thread Bernhard M. Wiedemann
On 23/05/2019 23.27, Eduardo Habkost wrote: > On Thu, May 23, 2019 at 07:57:38PM +0100, Dr. David Alan Gilbert wrote: >> * Bernhard M. Wiedemann (bwiedem...@suse.de) wrote: >>> Without this patch, a VM on a Opteron G3 host will have the svm flag, but >>> the kvm-amd module fails to load in there, c

Re: [Qemu-devel] hw/s390x/ipl: Dubious use of qdev_reset_all_fn

2019-05-27 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 24 May 2019 at 20:47, Christian Borntraeger > wrote: >> While this patch is certainly ok, I find it disturbing that qdev devices are >> being resetted, >> but qom devices not. > > It's not a qdev-vs-QOM thing. Anything which is a DeviceState > has a reset method,

Re: [Qemu-devel] Question about wrong ram-node0 reference

2019-05-27 Thread Igor Mammedov
On Sat, 25 May 2019 03:35:20 + "liujunjie (A)" wrote: > Hi, I have met a problem: > > The QEMU version is 2.8.1, the virtual machine is configured with 1G huge > pages, two NUMA nodes and four pass-through NVME SSDs. > > After we started the VM, in addition to some QMP queries nothing more

Re: [Qemu-devel] qapi/misc.json is too big, let's bite off a few chunks

2019-05-27 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, May 23, 2019 at 06:14:18PM +0200, Markus Armbruster wrote: >> It's nice when QAPI schema modules clearly belong to a single subsystem >> in addition to "QAPI Schema". misc.json doesn't, and it's grown fat: >> 3000+ lines. Let's move out some stuff. Here are a

Re: [Qemu-devel] [PATCH v2 5/6] qapi: Allow documentation for features

2019-05-27 Thread Markus Armbruster
Kevin Wolf writes: > Features will be documented in a new part introduced by a "Features:" > line, after arguments and before named sections. > > Signed-off-by: Kevin Wolf > --- > scripts/qapi/common.py | 43 ++ > scripts/qapi/doc.py| 11 +++ >

[Qemu-devel] [PATCH v3 1/8] configure: permit use of io_uring

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- configure | 27 +++ 1 file changed, 27 insertions(+) diff --git a/configure b/configure index 528b9ff705..acbdf04168 100755 --- a/configure +++ b/configure @@ -365,6 +365,7 @@ xen="" xen_ctrl_version="" xen_

[Qemu-devel] [PATCH v3 0/8] Add support for io_uring

2019-05-27 Thread Aarushi Mehta
This patch series adds support for the newly developed io_uring Linux AIO interface. Linux io_uring is faster than Linux's AIO asynchronous I/O code, offers efficient buffered asynchronous I/O support, the ability to do I/O without performing a system call via polled I/O, and other efficiency e

[Qemu-devel] [PATCH v3 3/8] block/block: add BDRV flag for io_uring

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- include/block/block.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/block.h b/include/block/block.h index 9b083e2bca..60f7c6c01c 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -121,6 +121,7 @@ typedef struct HDGeometry {

[Qemu-devel] [PATCH v3 2/8] qapi/block-core: add option for io_uring

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- qapi/block-core.json | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 7ccbfff9d0..2773803890 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2776,11 +2776,13 @@ # # @thre

[Qemu-devel] [PATCH v3 4/8] block/io_uring: implements interfaces for io_uring

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- We need nested loops in ioq_submit because overflowed requests may be permitted to submit if existing ones are cleared. Hence, failure to fulfill an overflow request must break separately from normal submission. For now, to prevent any infinite loops, if the kern

[Qemu-devel] [PATCH v3 5/8] stubs: add stubs for io_uring interface

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- MAINTAINERS | 1 + stubs/Makefile.objs | 1 + stubs/io_uring.c| 32 3 files changed, 34 insertions(+) create mode 100644 stubs/io_uring.c diff --git a/MAINTAINERS b/MAINTAINERS index 462c00a021..6c6672bda3 100644 --

[Qemu-devel] [PATCH v3 7/8] blockdev: accept io_uring as option

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- blockdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 79fbac8450..b44b9d660d 100644 --- a/blockdev.c +++ b/blockdev.c @@ -386,6 +386,8 @@ static void extract_common_blockdev_op

[Qemu-devel] [PATCH v3 6/8] util/async: add aio interfaces for io_uring

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- util/async.c | 36 1 file changed, 36 insertions(+) diff --git a/util/async.c b/util/async.c index c10642a385..2709f0edc3 100644 --- a/util/async.c +++ b/util/async.c @@ -277,6 +277,14 @@ aio_ctx_

[Qemu-devel] [PATCH v3 8/8] block/fileposix: extend to use io_uring

2019-05-27 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- block/file-posix.c | 65 ++ 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index d018429672..50899064df 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@

Re: [Qemu-devel] [PATCH v3] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-27 Thread Yury Kotov
Ping 23.05.2019, 12:45, "Yury Kotov" : > monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() > return mon_fdset->id which is int64_t. Downcasting from int64_t to int > leads to a bug with removing fd from fdset with id >= 2^32. > So, fix return types for these function. > > Signed-o

Re: [Qemu-devel] Failure to submit patches, two questions - what should I do?

2019-05-27 Thread Thomas Huth
On 26/05/2019 10.09, Lucien Anti-Spam via Qemu-devel wrote: > > >> On Sunday, May 26, 2019, 4:45:26 PM GMT+9, wrote: > > Subject; [Qemu-devel] [PATCH] Incorrect Stack Pointer shadow register > support on some m68k CPUs > .> snip> .> === OUTPUT BEGIN === >>  ERROR: Author email add

Re: [Qemu-devel] [PATCH v4 00/20] monitor: add asynchronous command type

2019-05-27 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, May 23, 2019 at 9:52 AM Markus Armbruster wrote: >> I'm not sure how asynchronous commands could support reconnect and >> resume. > > The same way as current commands, including job commands. Consider the following scenario: a management application su

Re: [Qemu-devel] Failure to submit patches, two questions - what should I do?

2019-05-27 Thread Laurent Vivier
On 27/05/2019 10:13, Thomas Huth wrote: On 26/05/2019 10.09, Lucien Anti-Spam via Qemu-devel wrote: > On Sunday, May 26, 2019, 4:45:26 PM GMT+9, wrote: > Subject;  [Qemu-devel] [PATCH] Incorrect Stack Pointer shadow register support on some m68k CPUs > .> snip> .> === OUTPUT BE

Re: [Qemu-devel] [PATCH 0/2]: vmdk: Add read-only support for the new seSparse format

2019-05-27 Thread Sam Eiderman
Gentle ping > On 12 May 2019, at 11:14, Sam wrote: > > Gentle ping on "[PATCH 2/2] vmdk: Add read-only support for seSparse > snapshots”. > Yuchenlin reviewed "[PATCH 1/2] vmdk: Fix comment regarding max l1_size > coverage”. > > Thanks, Sam > >> On 24 Apr 2019, at 10:48, Sam Eiderman >

Re: [Qemu-devel] [Qemu-block] [PATCH v3 2/8] qapi/block-core: add option for io_uring

2019-05-27 Thread Stefan Hajnoczi
On Mon, May 27, 2019 at 9:04 AM Aarushi Mehta wrote: > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 7ccbfff9d0..2773803890 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -2776,11 +2776,13 @@ > # > # @threads: Use qemu's thread pool > # @native:

Re: [Qemu-devel] [PATCH v3 3/8] block/block: add BDRV flag for io_uring

2019-05-27 Thread Stefan Hajnoczi
Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v3 5/8] stubs: add stubs for io_uring interface

2019-05-27 Thread Stefan Hajnoczi
On Mon, May 27, 2019 at 9:09 AM Aarushi Mehta wrote: > > Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH] Incorrect Stack Pointer shadow register support on some m68k CPUs

2019-05-27 Thread Laurent Vivier
On 27/05/2019 05:43, Lucien Anti-Spam wrote: > On Sunday, May 26, 2019, 10:10:39 PM GMT+9, Laurent Vivier wrote: > On 26/05/2019 09:28, Lucien Murray-Pitts wrote: >> On CPU32 and the early 68000 and 68010 the ISP doesnt exist. >> These CPUs only have SSP/USP. >> [SNIP] >> The movec inst

Re: [Qemu-devel] [PATCH v11 02/20] gdbstub: Implement deatch (D pkt) with new infra

2019-05-27 Thread Alex Bennée
Jon Doron writes: > Signed-off-by: Jon Doron Reviewed-by: Alex Bennée > --- > gdbstub.c | 93 +++ > 1 file changed, 53 insertions(+), 40 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index e6d895177b..307366b250 100644 > --- a/gdb

Re: [Qemu-devel] [PATCH v11 02/20] gdbstub: Implement deatch (D pkt) with new infra

2019-05-27 Thread Alex Bennée
Alex Bennée writes: > Jon Doron writes: > >> Signed-off-by: Jon Doron > > Reviewed-by: Alex Bennée Hmm although I bisected to this patch which fails on: 09:49 alex@zen/x86_64 [linux.git/master@origin] >gdb ./builds/arm64/vmlinux -x ~/lsrc/qemu.git/tests/guest-debug/test-gdbstub.py GNU gd

[Qemu-devel] [Bug 1590322] Re: mouse_button 0 takes back to initial position

2019-05-27 Thread Thomas Huth
Did you mean "mouse_button 0" instead of "mouse_move 0" here? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1590322 Title: mouse_button 0 takes

[Qemu-devel] [Bug 1585533] Re: cache-miss-rate / Invalid JSON

2019-05-27 Thread Thomas Huth
Is there still something to be done for upstream QEMU here? ... otherwise, I assume we can close this bug now? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpa

Re: [Qemu-devel] [PATCH v11 02/20] gdbstub: Implement deatch (D pkt) with new infra

2019-05-27 Thread Alex Bennée
Alex Bennée writes: > Alex Bennée writes: > >> Jon Doron writes: >> >>> Signed-off-by: Jon Doron >> >> Reviewed-by: Alex Bennée > > Hmm although I bisected to this patch which fails on: > > 09:49 alex@zen/x86_64 [linux.git/master@origin] >gdb ./builds/arm64/vmlinux > -x ~/lsrc/qemu.git/te

Re: [Qemu-devel] [PATCH v3 0/8] Add support for io_uring

2019-05-27 Thread Stefan Hajnoczi
On Mon, May 27, 2019 at 01:25:56AM -0700, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20190527080327.10780-1-mehta.aar...@gmail.com/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [Qemu-deve

Re: [Qemu-devel] [PATCH v4 00/20] monitor: add asynchronous command type

2019-05-27 Thread Gerd Hoffmann
On Mon, May 27, 2019 at 10:18:42AM +0200, Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Thu, May 23, 2019 at 9:52 AM Markus Armbruster wrote: > >> I'm not sure how asynchronous commands could support reconnect and > >> resume. > > > > The same way as current commands,

[Qemu-devel] [PATCH] virtio-gpu: add sanity check

2019-05-27 Thread Gerd Hoffmann
Require a minimum 16x16 size for the scanout, to make sure the guest can't set either width or height to zero. This (a) doesn't make sense at all and (b) causes problems in some UI code. When using spice this will triggers an assert(). Reported-by: Tyler Slabinski Signed-off-by: Gerd Hoffmann

Re: [Qemu-devel] [PATCH] tests/docker: Update the Fedora image to Fedora 30

2019-05-27 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190504060336.21060-1-phi...@redhat.com/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that ha

[Qemu-devel] [PATCH] block/linux-aio: explictly clear laiocb->co

2019-05-27 Thread Stefan Hajnoczi
qemu_aio_get() does not zero allocated memory. Explicitly initialize laiocb->co to prevent an uninitialized memory access in qemu_laio_process_completion(). Note that this bug has never manifested itself. I guess we're lucky! Signed-off-by: Stefan Hajnoczi --- I challenge you to find a place w

Re: [Qemu-devel] [PATCH v3 4/8] block/io_uring: implements interfaces for io_uring

2019-05-27 Thread Stefan Hajnoczi
On Mon, May 27, 2019 at 01:33:23PM +0530, Aarushi Mehta wrote: > +static void qemu_luring_process_completions(LuringState *s) > +{ > +struct io_uring_cqe *cqes; > +/* > + * Request completion callbacks can run the nested event loop. > + * Schedule ourselves so the nested event loop

[Qemu-devel] [PATCH 0/2] Deferred incoming migration through fd

2019-05-27 Thread Yury Kotov
Hi, This series is a continuation of the previous two: * migration: Fix handling fd protocol * Add 'inline-fd:' protocol for migration It's about such use case: 1. Target VM: exec ...,-incoming defer 2. Target VM: getfd("fd-mig") 3. Target VM: migrate-incoming("fd:"fd-mig") 4. Source VM: getfd("f

[Qemu-devel] [PATCH 1/2] migration: Fix fd protocol for incoming defer

2019-05-27 Thread Yury Kotov
Currently, incoming migration through fd supports only command-line case: E.g. fork(); fd = open(); exec("qemu ... -incoming fd:%d", fd); It's possible to use add-fd commands to pass fd for migration, but it's invalid case. add-fd works with fdset but not with particular fds. To work

[Qemu-devel] New HAXM maintainer

2019-05-27 Thread Yu Ning
Hello, I am leaving Intel, and will soon lose access to my Intel email accounts. Effective today, I am no longer maintainer of the HAXM open source project (https://github.com/intel/haxm). Colin Xu (colin DOT xu AT intel DOT com) will take my place, and he will be helped by Henry Yuan (hang D

[Qemu-devel] [PATCH 2/2] migration-test: Add a test for fd protocol

2019-05-27 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/libqtest.c | 83 ++-- tests/libqtest.h | 51 +++- tests/migration-test.c | 107 +++-- 3 files changed, 233 insertions(+), 8 deletions(-) diff --git a/tests/libqtest.c

Re: [Qemu-devel] [PATCH 2/2] migration-test: Add a test for fd protocol

2019-05-27 Thread Yury Kotov
27.05.2019, 12:35, "Yury Kotov" : > Signed-off-by: Yury Kotov > --- >  tests/libqtest.c | 83 ++-- >  tests/libqtest.h | 51 +++- >  tests/migration-test.c | 107 +++-- >  3 files changed, 233 insertions(+), 8 deletion

Re: [Qemu-devel] [PATCH v3 8/8] block/fileposix: extend to use io_uring

2019-05-27 Thread Stefan Hajnoczi
On Mon, May 27, 2019 at 01:33:27PM +0530, Aarushi Mehta wrote: > @@ -1920,24 +1947,40 @@ static int coroutine_fn > raw_co_pwritev(BlockDriverState *bs, uint64_t offset, > > static void raw_aio_plug(BlockDriverState *bs) > { > -#ifdef CONFIG_LINUX_AIO > +#if defined CONFIG_LINUX_AIO || defined

Re: [Qemu-devel] [PATCH 2/2] migration-test: Add a test for fd protocol

2019-05-27 Thread Thomas Huth
On 27/05/2019 11.33, Yury Kotov wrote: > Signed-off-by: Yury Kotov > --- > tests/libqtest.c | 83 ++-- > tests/libqtest.h | 51 +++- > tests/migration-test.c | 107 +++-- > 3 files changed, 233 insertion

Re: [Qemu-devel] [PATCH v11 07/20] gdbstub: Implement breakpoint commands (Z/z pkt) with new infra

2019-05-27 Thread Alex Bennée
Jon Doron writes: > Signed-off-by: Jon Doron With the fix to avoid double responses this commit still regresses: 10:46 alex@zen/x86_64 [linux.git/master@origin] >gdb ./builds/arm64/vmlinux -x ~/lsrc/qemu.git/tests/guest-debug/test-gdbstub.py GNU gdb (GDB) 8.3.50.20190424-git Copyright (C)

Re: [Qemu-devel] [RFC v4 5/7] tests: New make target check-source

2019-05-27 Thread Paolo Bonzini
On 27/05/19 07:10, Markus Armbruster wrote: >> Another suggestion: are there headers that cannot even be included once >> (due to dependencies)? Is it worth including a test for those even in >> the first iteration? >> > I'm not sure I get what you mean. > > Most headers failing the test fail it

[Qemu-devel] [PATCH v2] vfio/common: Introduce vfio_set_irq_signaling helper

2019-05-27 Thread Eric Auger
The code used to assign an interrupt index/subindex to an eventfd is duplicated many times. Let's introduce an helper that allows to set/unset the signaling for an ACTION_TRIGGER, ACTION_MASK or ACTION_UNMASK action. Signed-off-by: Eric Auger --- v1 -> v2: - don't call GET_IRQ_INFO in vfio_set_

Re: [Qemu-devel] hw/s390x/ipl: Dubious use of qdev_reset_all_fn

2019-05-27 Thread Philippe Mathieu-Daudé
Cc'ing Damien who is working on "multi-phase reset mechanism". On 5/27/19 9:52 AM, Markus Armbruster wrote: > Peter Maydell writes: > >> On Fri, 24 May 2019 at 20:47, Christian Borntraeger >> wrote: >>> While this patch is certainly ok, I find it disturbing that qdev devices >>> are being rese

Re: [Qemu-devel] qapi/misc.json is too big, let's bite off a few chunks

2019-05-27 Thread Paolo Bonzini
On 27/05/19 10:00, Markus Armbruster wrote: > As long as we don't have an active QOM maintainer[*], the benefit is > low. > > > [*] We need one. I'm not volunteering. I think Daniel, Eduardo and I could count as de facto maintainer. I guess I could maintain it if I get two partners in crime as

Re: [Qemu-devel] [PATCH v3 0/8] Add support for io_uring

2019-05-27 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190527080327.10780-1-mehta.aar...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v3 0/8] Add support for io_uring Type: series Message-id: 20190527080327.10780-1-m

[Qemu-devel] [Bug 1585533] Re: cache-miss-rate / Invalid JSON

2019-05-27 Thread Marc Brothier
I'm not able to test that issue anymore, you can close the ticket. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1585533 Title: cache-miss-rate / Invalid JSON Status in QEMU: Incomplete Bug des

Re: [Qemu-devel] [PULL v2 04/36] virtio: Introduce started flag to VirtioDevice

2019-05-27 Thread Greg Kurz
On Fri, 24 May 2019 19:56:06 +0800 Yongji Xie wrote: > On Fri, 24 May 2019 at 18:20, Greg Kurz wrote: > > > > On Mon, 20 May 2019 19:10:35 -0400 > > "Michael S. Tsirkin" wrote: > > > > > From: Xie Yongji > > > > > > The virtio 1.0 transitional devices support driver uses the device > > > bef

[Qemu-devel] [PATCH] target-i386: adds PV_SCHED_YIELD CPUID feature bit

2019-05-27 Thread Wanpeng Li
From: Wanpeng Li Adds PV_SCHED_YIELD CPUID feature bit. Signed-off-by: Wanpeng Li --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5f07d68..f4c4b6b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -90

Re: [Qemu-devel] [PATCH] virtio-gpu: add sanity check

2019-05-27 Thread Marc-André Lureau
On Mon, May 27, 2019 at 11:13 AM Gerd Hoffmann wrote: > > Require a minimum 16x16 size for the scanout, to make sure the guest > can't set either width or height to zero. This (a) doesn't make sense > at all and (b) causes problems in some UI code. When using spice this > will triggers an assert

Re: [Qemu-devel] [RFC PATCH 0/2] establish nesting rule of BQL vs cpu-exclusive

2019-05-27 Thread Roman Kagan
On Thu, May 23, 2019 at 12:31:16PM +0100, Alex Bennée wrote: > > Roman Kagan writes: > > > I came across the following AB-BA deadlock: > > > > vCPU thread main thread > > --- --- > > async_safe_run_on_cpu(self, > >

[Qemu-devel] [RFC v4 00/27] vSMMUv3/pSMMUv3 2 stage VFIO integration

2019-05-27 Thread Eric Auger
Up to now vSMMUv3 has not been integrated with VFIO. VFIO integration requires to program the physical IOMMU consistently with the guest mappings. However, as opposed to VTD, SMMUv3 has no "Caching Mode" which allows easy trapping of guest mappings. This means the vSMMUV3 cannot use the same VFIO i

[Qemu-devel] [RFC v4 05/27] memory: add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute

2019-05-27 Thread Eric Auger
We introduce a new IOMMU Memory Region attribute, IOMMU_ATTR_VFIO_NESTED which tells whether the virtual IOMMU requires physical nested stages for VFIO integration. Intel virtual IOMMU supports Caching Mode and does not require 2 stages at physical level. However virtual ARM SMMU does not implement

[Qemu-devel] [RFC v4 02/27] update-linux-headers: Import iommu.h

2019-05-27 Thread Eric Auger
Update the script to import the new iommu.h uapi header. Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index f76d77363b..dfdfdfddcf 100755 --- a/s

[Qemu-devel] [RFC v4 07/27] hw/arm/smmuv3: Advertise VFIO_NESTED and MSI_TRANSLATE attributes

2019-05-27 Thread Eric Auger
Virtual SMMUv3 requires physical nested stages for VFIO integration and translates MSIs. So let's advertise those attributes. Signed-off-by: Eric Auger --- v2 -> v3: - also advertise MSI_TRANSLATE --- hw/arm/smmuv3.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/arm/s

[Qemu-devel] [RFC v4 01/27] vfio/common: Introduce vfio_set_irq_signaling helper

2019-05-27 Thread Eric Auger
The code used to assign an interrupt index/subindex to an eventfd is duplicated many times. Let's introduce an helper that allows to set/unset the signaling for an ACTION_TRIGGER, ACTION_MASK or ACTION_UNMASK action. Signed-off-by: Eric Auger --- v1 -> v2: - don't call GET_IRQ_INFO in vfio_set_

[Qemu-devel] [RFC v4 03/27] update-linux-headers: Add sve_context.h to asm-arm64

2019-05-27 Thread Eric Auger
From: Andrew Jones Signed-off-by: Andrew Jones --- scripts/update-linux-headers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index dfdfdfddcf..c97d485b08 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/upd

[Qemu-devel] [RFC v4 08/27] hw/vfio/common: Force nested if iommu requires it

2019-05-27 Thread Eric Auger
In case we detect the address space is translated by a virtual IOMMU which requires nested stages, let's set up the container with the VFIO_TYPE1_NESTING_IOMMU iommu_type. Signed-off-by: Eric Auger --- v2 -> v3: - add "nested only is selected if requested by @force_nested" comment in this pat

[Qemu-devel] [RFC v4 09/27] memory: Prepare for different kinds of IOMMU MR notifiers

2019-05-27 Thread Eric Auger
Current IOMMUNotifiers dedicate to IOTLB related notifications, ie. MAP/UNMAP. We plan to introduce new types of notifiers, for instance to notify vIOMMU configuration changes. Those new notifiers may not be characterized by any associated address space range. So let's create a specialized IOMMUIO

[Qemu-devel] [RFC v4 06/27] memory: add IOMMU_ATTR_MSI_TRANSLATE IOMMU memory region attribute

2019-05-27 Thread Eric Auger
We introduce a new IOMMU Memory Region attribute, IOMMU_ATTR_MSI_TRANSLATE which tells whether the virtual IOMMU translates MSIs. ARM SMMU will expose this attribute since, as opposed to Intel DMAR, MSIs are translated as any other DMA requests. Signed-off-by: Eric Auger --- include/exec/memory.

[Qemu-devel] [RFC v4 04/27] header update against 5.2.0-rc1 and IOMMU/VFIO nested stage APIs

2019-05-27 Thread Eric Auger
This is an update against the following development branch: https://github.com/eauger/linux/tree/v5.2.0-rc1-2stage-v8. Signed-off-by: Eric Auger --- linux-headers/linux/iommu.h | 280 linux-headers/linux/vfio.h | 107 ++ 2 files changed, 387 inse

[Qemu-devel] [RFC v4 12/27] hw/arm/smmuv3: Store the PASID table GPA in the translation config

2019-05-27 Thread Eric Auger
For VFIO integration we will need to pass the Context Descriptor (CD) table GPA to the host. The CD table is also referred to as the PASID table. Its GPA corresponds to the s1ctrptr field of the Stream Table Entry. So let's decode and store it in the configuration structure. Signed-off-by: Eric Au

[Qemu-devel] [RFC v4 13/27] hw/arm/smmuv3: Implement dummy replay

2019-05-27 Thread Eric Auger
The default implementation of memory_region_iommu_replay() shall not be used as it forces the translation of the whole RAM range. The purpose of this function is to update the shadow page tables. However in case of nested stage, there is no shadow page table so we can simply return. Signed-off-by:

[Qemu-devel] [RFC v4 10/27] memory: Add IOMMUConfigNotifier

2019-05-27 Thread Eric Auger
With this patch, an IOMMUNotifier can now be either an IOTLB notifier or a config notifier. A config notifier is supposed to be called on guest translation config change. This gives host a chance to update the physical IOMMU configuration so that is consistent with the guest view. The notifier is

[Qemu-devel] [RFC v4 11/27] memory: Add arch_id and leaf fields in IOTLBEntry

2019-05-27 Thread Eric Auger
TLB entries are usually tagged with some ids such as the asid or pasid. When propagating an invalidation command from the guest to the host, we need to pass this id. Also we add a leaf field which indicates, in case of invalidation notification whether only cache entries for the last level of tran

[Qemu-devel] [RFC v4 14/27] hw/arm/smmuv3: Fill the IOTLBEntry arch_id on NH_VA invalidation

2019-05-27 Thread Eric Auger
When the guest invalidates one S1 entry, it passes the asid. When propagating this invalidation downto the host, the asid information also must be passed. So let's fill the arch_id field introduced for that purpose. Signed-off-by: Eric Auger --- hw/arm/smmuv3.c | 1 + 1 file changed, 1 insertion

[Qemu-devel] [RFC v4 17/27] hw/vfio/common: Introduce vfio_alloc_guest_iommu helper

2019-05-27 Thread Eric Auger
Soon this code will be called several times. So let's introduce an helper. Signed-off-by: Eric Auger --- hw/vfio/common.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 75fb568f95..7df8b92563 100644 --- a/h

[Qemu-devel] [RFC v4 15/27] hw/arm/smmuv3: Fill the IOTLBEntry leaf field on NH_VA invalidation

2019-05-27 Thread Eric Auger
Let's propagate the leaf attribute throughout the invalidation path. This hint is used to reduce the scope of the invalidations to the last level of translation. Not enforcing it induces large performance penalties in nested mode. Signed-off-by: Eric Auger --- hw/arm/smmuv3.c | 16 +-

[Qemu-devel] [RFC v4 16/27] hw/arm/smmuv3: Notify on config changes

2019-05-27 Thread Eric Auger
In case IOMMU config notifiers are attached to the IOMMU memory region, we execute them, passing as argument the iommu_pasid_table_config struct updated with the new viommu translation config. Config notifiers are called on STE changes. At physical level, they translate into CMD_CFGI_STE_* commands

[Qemu-devel] [RFC v4 25/27] vfio-pci: register handler for iommu fault

2019-05-27 Thread Eric Auger
We use the VFIO_PCI_DMA_FAULT_IRQ_INDEX "irq" index to set/unset a notifier for physical DMA faults. The associated eventfd is triggered, in nested mode, whenever a fault is detected at IOMMU physical level. As this is the first use of this new IRQ index, also handle it in irq_to_str() in case the

[Qemu-devel] [RFC v4 22/27] vfio-pci: Expose MSI stage 1 bindings to the host

2019-05-27 Thread Eric Auger
When the guest is exposed with a virtual IOMMU that translates MSIs, the guest allocates an IOVA (gIOVA) that maps the virtual doorbell (gDB). In nested mode, when the MSI is setup, we pass this stage1 mapping to the host so that it can use this stage1 binding to create a nested stage translating i

[Qemu-devel] [RFC v4 20/27] hw/vfio/common: Setup nested stage mappings

2019-05-27 Thread Eric Auger
In nested mode, legacy vfio_iommu_map_notify cannot be used as there is no "caching" mode and we do not trap on map. On Intel, vfio_iommu_map_notify was used to DMA map the RAM through the host single stage. With nested mode, we need to setup the stage 2 and the stage 1 separately. This patch int

[Qemu-devel] [RFC v4 18/27] hw/vfio/common: Introduce hostwin_from_range helper

2019-05-27 Thread Eric Auger
Let's introduce a hostwin_from_range() helper that returns the hostwin encapsulating an IOVA range or NULL if non is found. This improves the readibility of callers and removes the usage of hostwin_found. Signed-off-by: Eric Auger --- hw/vfio/common.c | 37 ++---

[Qemu-devel] [RFC v4 21/27] hw/vfio/common: Register a MAP notifier for MSI binding

2019-05-27 Thread Eric Auger
Instantiate a MAP notifier to register the MSI stage 1 binding (gIOVA -> gDB) to the host. This allows the host to build a nested mapping towards the physical doorbell: guest IOVA -> guest Doorbell -> physical doorbell. Stage1 Stage 2 The unregistration is done on VFIO container

[Qemu-devel] [RFC v4 19/27] hw/vfio/common: Introduce helpers to DMA map/unmap a RAM section

2019-05-27 Thread Eric Auger
Let's introduce two helpers that allow to DMA map/unmap a RAM section. Those helpers will be called for nested stage setup in another call site. Also the vfio_listener_region_add/del() structure may be clearer. Signed-off-by: Eric Auger --- hw/vfio/common.c | 178 ++--

[Qemu-devel] [RFC v4 23/27] memory: Introduce IOMMU Memory Region inject_faults API

2019-05-27 Thread Eric Auger
This new API allows to inject @count iommu_faults into the IOMMU memory region. Signed-off-by: Eric Auger --- include/exec/memory.h | 25 + memory.c | 10 ++ 2 files changed, 35 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h

[Qemu-devel] [Bug 1829682] Re: QEMU PPC SYSTEM regression - 3.1.0 and GIT - Fail to boot AIX

2019-05-27 Thread Ivan Warren via Qemu-devel
According to git bisect : git bisect bad c24ba3d0a34f68ad2c6bf1a15bc43770005f6cc0 is the first bad commit commit c24ba3d0a34f68ad2c6bf1a15bc43770005f6cc0 Author: Laurent Vivier Date: Wed Dec 19 17:35:41 2018 +0100 spapr: Add H-Call H_HOME_NODE_ASSOCIATIVITY H_HOME_NODE_ASSOCIATIVITY

[Qemu-devel] [RFC v4 24/27] hw/arm/smmuv3: Implement fault injection

2019-05-27 Thread Eric Auger
We convert iommu_fault structs received from the kernel into the data struct used by the emulation code and record the evnts into the virtual event queue. Signed-off-by: Eric Auger --- v3 -> v4: - fix compil issue on mingw Exhaustive mapping remains to be done --- hw/arm/smmuv3.c | 71 +++

[Qemu-devel] [RFC v4 26/27] vfio-pci: Set up fault regions

2019-05-27 Thread Eric Auger
We setup two fault regions: the producer fault is read-only from the user space perspective. It is composed of the fault queue (mmappable) and a header written by the kernel, located in a separate page. The consumer fault is write-only from the user-space perspective. Signed-off-by: Eric Auger

[Qemu-devel] [RFC v4 27/27] vfio-pci: Implement the DMA fault handler

2019-05-27 Thread Eric Auger
Whenever the eventfd is triggered, we retrieve the DMA faults from the mmapped fault region and inject them in the iommu memory region. Signed-off-by: Eric Auger --- hw/vfio/pci.c | 53 +++ hw/vfio/pci.h | 1 + 2 files changed, 54 insertions(+) d

Re: [Qemu-devel] [PATCH v14 0/1] qcow2: cluster space preallocation

2019-05-27 Thread Max Reitz
On 26.05.19 17:01, Alberto Garcia wrote: > On Fri 24 May 2019 03:56:21 PM CEST, Max Reitz wrote: >>> +---+---+--+---+--+--+ >>> | file|before| after| gain | >>> +---+---+--+---+--+--+ >>> |ssd|

Re: [Qemu-devel] [RFC 1/3] block: Add ImageRotationalInfo

2019-05-27 Thread Max Reitz
On 26.05.19 17:08, Alberto Garcia wrote: > On Fri 24 May 2019 07:28:10 PM CEST, Max Reitz wrote: >> +## >> +# @ImageRotationalInfo: >> +# >> +# Indicates whether an image is stored on a rotating disk or not. >> +# >> +# @solid-state: Image is stored on a solid-state drive >> +# >> +# @rotating:

Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's

2019-05-27 Thread Igor Mammedov
On Thu, 11 Apr 2019 15:17:39 +0800 Wei Yang wrote: > pc_memory_pre_plug() is called during hotplug for both pc-dimm and > nvdimm. This is more proper to check apci hotplug capability before > check nvdimm specific capability. not sure what this about. Currently we are checking if ACPI is enabled

Re: [Qemu-devel] [PATCH v7 10/10] hw/m68k: define Macintosh Quadra 800

2019-05-27 Thread Mark Cave-Ayland
On 25/05/2019 23:50, Laurent Vivier wrote: > If you want to test the machine, it doesn't yet boot a MacROM, but you can > boot a linux kernel from the command line. > > You can install your own disk using debian-installer with: > > ./qemu-system-m68k \ > -M q800 \ > -serial none -ser

Re: [Qemu-devel] [RFC 1/3] block: Add ImageRotationalInfo

2019-05-27 Thread Alberto Garcia
On Mon 27 May 2019 02:16:53 PM CEST, Max Reitz wrote: > On 26.05.19 17:08, Alberto Garcia wrote: >> On Fri 24 May 2019 07:28:10 PM CEST, Max Reitz wrote: >>> +## >>> +# @ImageRotationalInfo: >>> +# >>> +# Indicates whether an image is stored on a rotating disk or not. >>> +# >>> +# @solid-state: I

Re: [Qemu-devel] Running linux on qemu omap

2019-05-27 Thread Tony Lindgren
Hi, * Philippe Mathieu-Daudé [190523 12:01]: > What I use as reference for testing ARM boards [*] is the work of > Guenter Roeck: > https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/run-qemu-arm.sh I think Guenter also has v2.3.50-local-linaro branch in his github repo that has s

Re: [Qemu-devel] [PATCH v3] numa: improve cpu hotplug error message with a wrong node-id

2019-05-27 Thread Igor Mammedov
On Mon, 27 May 2019 08:55:49 +0200 Laurent Vivier wrote: > On 24/05/2019 22:14, Eduardo Habkost wrote: > > On Fri, May 24, 2019 at 04:39:12PM +0200, Laurent Vivier wrote: > >> On 24/05/2019 16:10, Igor Mammedov wrote: > >>> On Fri, 24 May 2019 12:35:21 +0200 > >>> Laurent Vivier wrote: > >>>

Re: [Qemu-devel] Question about wrong ram-node0 reference

2019-05-27 Thread liujunjie (A)
We find only one VM aborted among at least 20 VMs with the same configuration. And this problem does not reproduce yet... (Be aware of reproduce is importance to figure out the problem, we already tried to add more VMs to reproduce, but no results yet.) The qemu cmdline is as follows: /usr/bin/q

[Qemu-devel] [PATCH] qcow2-bitmap: initialize bitmap directory alignment

2019-05-27 Thread Andrey Shinkevich
Valgrind detects multiple issues in QEMU iotests when the memory is used without being initialized. Valgrind may dump lots of unnecessary reports what makes the memory issue analysis harder. Particularly, that is true for the aligned bitmap directory and can be seen while running the iotest #169. P

Re: [Qemu-devel] [RFC 1/3] block: Add ImageRotationalInfo

2019-05-27 Thread Max Reitz
On 27.05.19 14:37, Alberto Garcia wrote: > On Mon 27 May 2019 02:16:53 PM CEST, Max Reitz wrote: >> On 26.05.19 17:08, Alberto Garcia wrote: >>> On Fri 24 May 2019 07:28:10 PM CEST, Max Reitz wrote: +## +# @ImageRotationalInfo: +# +# Indicates whether an image is stored on a ro

Re: [Qemu-devel] [PULL v2 04/36] virtio: Introduce started flag to VirtioDevice

2019-05-27 Thread Yongji Xie
On Mon, 27 May 2019 at 18:44, Greg Kurz wrote: > > On Fri, 24 May 2019 19:56:06 +0800 > Yongji Xie wrote: > > > On Fri, 24 May 2019 at 18:20, Greg Kurz wrote: > > > > > > On Mon, 20 May 2019 19:10:35 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > > > From: Xie Yongji > > > > > > > > The vir

Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it

2019-05-27 Thread Markus Armbruster
It's been three years, let's examine how things have evolved. I'm using commit db3d11ee3f0, which is a bit behind current master, just so I can apply my "[PATCH 0/4] Cleanups around qemu-common.h" cleanly. Markus Armbruster writes: [...] > = The status quo and why I hate it = > > I've seen seve

Re: [Qemu-devel] [PATCH v3 0/5] blockdev-backup: don't check aio_context too early

2019-05-27 Thread Max Reitz
On 23.05.19 19:06, John Snow wrote: > See patch one's commit message for justification. > Patches 2-5 are for testing, because that's always how these things go. > > 001/5:[] [--] 'blockdev-backup: don't check aio_context too early' > 002/5:[0004] [FC] 'iotests.py: do not use infinite waits' >

Re: [Qemu-devel] [PATCH v4 00/20] monitor: add asynchronous command type

2019-05-27 Thread Markus Armbruster
Gerd Hoffmann writes: > On Mon, May 27, 2019 at 10:18:42AM +0200, Markus Armbruster wrote: >> Marc-André Lureau writes: >> >> > Hi >> > >> > On Thu, May 23, 2019 at 9:52 AM Markus Armbruster >> > wrote: >> >> I'm not sure how asynchronous commands could support reconnect and >> >> resume. >>

Re: [Qemu-devel] [PATCH] event_match: always match on None value

2019-05-27 Thread Max Reitz
On 24.05.19 20:02, John Snow wrote: > Before, event_match didn't always recurse if the event value was not a > dictionary, and would instead check for equality immediately. > > By delaying equality checking to post-recursion, we can allow leaf > values like "5" to match "None" and take advantage o

Re: [Qemu-devel] [PATCH] qcow2-bitmap: initialize bitmap directory alignment

2019-05-27 Thread Max Reitz
On 27.05.19 14:52, Andrey Shinkevich wrote: > Valgrind detects multiple issues in QEMU iotests when the memory is > used without being initialized. Valgrind may dump lots of unnecessary > reports what makes the memory issue analysis harder. Particularly, > that is true for the aligned bitmap direct

Re: [Qemu-devel] [PATCH v7 10/10] hw/m68k: define Macintosh Quadra 800

2019-05-27 Thread Aleksandar Markovic
On May 26, 2019 1:07 AM, "Laurent Vivier" wrote: > > If you want to test the machine, it doesn't yet boot a MacROM, but you can > boot a linux kernel from the command line. > > You can install your own disk using debian-installer with: > > ./qemu-system-m68k \ > -M q800 \ > -serial non

  1   2   >