Re: [Qemu-devel] [RFC 00/15] QMP: out-of-band (OOB) execution support

2017-09-15 Thread Stefan Hajnoczi
On Fri, Sep 15, 2017 at 11:50:57AM +0800, Peter Xu wrote: > On Thu, Sep 14, 2017 at 04:19:11PM +0100, Stefan Hajnoczi wrote: > > On Thu, Sep 14, 2017 at 01:15:09PM +0200, Marc-André Lureau wrote: > > > There should be a limit in the number of requests the thread can > > > queue. Before the patch, t

Re: [Qemu-devel] [PATCH v2 12/16] tcg: Remove tcg_regset_set

2017-09-15 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson This breaks the mips cross build: In file included from /tmp/qemu-test/src/tcg/tcg.c:254:0: /tmp/qemu-test/src/tcg/mips/tcg-target.inc.c: In function 'target_parse_constraint': /tmp/qemu-test/src/tcg/mips/tcg-target.inc.c:198:9: er

Re: [Qemu-devel] [PATCH] dma/i82374: avoid double creation of i82374 device

2017-09-15 Thread Paolo Bonzini
On 15/09/2017 11:06, Eduardo Otubo wrote: > QEMU fails when used with the following command line: > > ./ppc64-softmmu/qemu-system-ppc64 -S -machine 40p,accel=tcg -device i82374 > qemu-system-ppc64: hw/isa/isa-bus.c:110: isa_bus_dma: Assertion > `!bus->dma[0] && !bus->dma[1]' failed. > Abort

[Qemu-devel] [PATCH RFC 1/1] s390x/ccw: create s390 phb for compat reasons as well

2017-09-15 Thread Cornelia Huck
d32bd032d8 ("s390x/ccw: create s390 phb conditionally") made registering the s390 pci host bridge conditional on presense of the zpci facility bit. Sadly, that breaks migration from some old machines. Create the s390 phb if we need it for compat reasons, even if we don't provide the zpci facility.

[Qemu-devel] [PATCH RFC 0/1] s390x: pci compat handling

2017-09-15 Thread Cornelia Huck
While playing around with compat machines a bit, I noticed that my zpci detanglement patches broke migration from 2.7 to current master (2.8 or newer are fine, which is why I did not notice that before.) qemu 2.7 seems to create a savevm that a s390-next (or master) build without the s390 phb chok

[Qemu-devel] [PATCH 6/6] block: Fix permissions after bdrv_reopen()

2017-09-15 Thread Kevin Wolf
If we switch between read-only and read-write, the permissions that image format drivers need on bs->file change, too. Make sure to update the permissions during bdrv_reopen(). Signed-off-by: Kevin Wolf --- include/block/block.h | 1 + block.c | 64

[Qemu-devel] [PATCH 5/6] block: reopen: Queue children after their parents

2017-09-15 Thread Kevin Wolf
We will calculate the required new permissions in the prepare stage of a reopen. Required permissions of children can be influenced by the changes made to their parents, but parents are independent from their children. This means that permissions need to be calculated top-down. In order to achieve

[Qemu-devel] [PATCH 2/6] block: Add reopen_queue to bdrv_child_perm()

2017-09-15 Thread Kevin Wolf
In the context of bdrv_reopen(), we'll have to look at the state of the graph as it will be after the reopen. This interface addition is in preparation for the change. Signed-off-by: Kevin Wolf --- include/block/block_int.h | 7 +++ block.c | 19 --- block/

[Qemu-devel] [PATCH 4/6] block: Base permissions on rw state after reopen

2017-09-15 Thread Kevin Wolf
When new permissions are calculated during bdrv_reopen(), they need to be based on the state of the graph as it will be after the reopen has completed, not on the current state of the involved nodes. This patch makes bdrv_is_writable() optionally accept a BlockReopenQueue from which the new flags

[Qemu-devel] [PATCH 3/6] block: Add reopen queue to bdrv_check_perm()

2017-09-15 Thread Kevin Wolf
In the context of bdrv_reopen(), we'll have to look at the state of the graph as it will be after the reopen. This interface addition is in preparation for the change. Signed-off-by: Kevin Wolf --- block.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-)

[Qemu-devel] [PATCH 1/6] qemu-io: Reset qemuio_blk permissions before each command

2017-09-15 Thread Kevin Wolf
qemu-io provides a 'reopen' command that allows switching from writable to read-only access. We need to make sure that we don't try to keep write permissions to a BlockBackend that becomes read-only, otherwise things are going to fail. command() already makes sure to request any additional permiss

[Qemu-devel] [PATCH 0/6] block: Fix permissions after ro/rw reopen

2017-09-15 Thread Kevin Wolf
bdrv_reopen() can switch nodes between read-only and read-write modes. This has implications for the required permissions on their child nodes. For example, a qcow2 node requests write permissions on bs->file only if it is writable itself. This means that during bdrv_reopen(), the permissions need

Re: [Qemu-devel] [RFC PATCH] NUMA: Enable adding NUMA node implicitly

2017-09-15 Thread Dou Liyang
Hi Daniel, At 09/15/2017 04:40 PM, Daniel P. Berrange wrote: On Fri, Sep 15, 2017 at 04:33:18PM +0800, Dou Liyang wrote: In QEMU, if we enable NUMA and have nodes, QEMU will build ACPI SRAT table for transfering NUMA configuration to the guest. So, the maximum memory in SRAT can be used to dete

Re: [Qemu-devel] [PATCH] amd_iommu: Return error on machines with no PCI

2017-09-15 Thread Mohammed Gamal
On Fri, 2017-09-15 at 10:07 +0800, Peter Xu wrote: > On Thu, Sep 14, 2017 at 05:31:38PM -0300, Eduardo Habkost wrote: > > On Thu, Sep 14, 2017 at 10:24:23PM +0200, Thomas Huth wrote: > > > On 14.09.2017 22:18, Mohammed Gamal wrote: > > > > Starting the following command line causes a segfault > > >

Re: [Qemu-devel] [PATCH qemu v2 00/13] memory: Reduce memory use

2017-09-15 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH qemu v2 00/13] memory: Reduce memory use Message-id: 20170915084030.40988-1-...@ozlabs.ru Type: s

Re: [Qemu-devel] [PATCH qemu v2 11/13] memory: Share FlatView's and dispatch trees between address spaces

2017-09-15 Thread Paolo Bonzini
On 15/09/2017 10:40, Alexey Kardashevskiy wrote: > + > +static bool flatview_can_share(FlatView *old_view, FlatView *new_view) > +{ > +MemoryRegion *old_root = memory_region_unalias_entire(old_view->root); > +MemoryRegion *new_root = memory_region_unalias_entire(new_view->root); > + > +

Re: [Qemu-devel] [Qemu-trivial] [PATCH] dma/i82374: avoid double creation of i82374 device

2017-09-15 Thread Eduardo Otubo
(oups, forgot the v2 on Subject) On Fri, Sep 15, 2017 at 11:06:43AM +0200, Eduardo Otubo wrote: > QEMU fails when used with the following command line: > > ./ppc64-softmmu/qemu-system-ppc64 -S -machine 40p,accel=tcg -device i82374 > qemu-system-ppc64: hw/isa/isa-bus.c:110: isa_bus_dma: Assert

Re: [Qemu-devel] [PATCH] virtio-serial: add enable_backend callback

2017-09-15 Thread Pavel Butsykin
On 17.07.2017 16:56, Pavel Butsykin wrote: On 07.07.2017 17:21, Pavel Butsykin wrote: We should guarantee that RAM will not be modified while VM has a stopped state, otherwise it can lead to negative consequences during post-copy migration. In RUN_STATE_FINISH_MIGRATE step, it's expected that RA

Re: [Qemu-devel] [PATCH v7 0/4] Add shrink image for qcow2

2017-09-15 Thread Pavel Butsykin
On 17.08.2017 12:15, Pavel Butsykin wrote: This patch add shrinking of the image file for qcow2. As a result, this allows us to reduce the virtual image size and free up space on the disk without copying the image. Image can be fragmented and shrink is done by punching holes in the image file. #

Re: [Qemu-devel] [PATCH 2/3] migration: Cancel migration at exit

2017-09-15 Thread Dr. David Alan Gilbert
* Fam Zheng (f...@redhat.com) wrote: > On Fri, 09/15 09:42, Dr. David Alan Gilbert wrote: > > * Fam Zheng (f...@redhat.com) wrote: > > > On Fri, 09/15 16:03, Peter Xu wrote: > > > > On Fri, Sep 15, 2017 at 01:44:03PM +0800, Fam Zheng wrote: > > > > > bdrv_close_all() would abort() due to op blocker

[Qemu-devel] [Bug 1679126] Re: null pointer access on migration resume of systemrescuecd boot menu with qxl-vga

2017-09-15 Thread Thomas Huth
The fix has apparently been included here: https://git.qemu.org/?p=qemu.git;a=commitdiff;h=a703d3aef5991b72a5a45880e7491232b8032f09 ... and has been released with QEMU v2.9 already. ** Changed in: qemu Status: Confirmed => Fix Released -- You received this bug notification because you are

[Qemu-devel] [PULL v4 19/38] tests: Add README for vm tests

2017-09-15 Thread Fam Zheng
Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-13-f...@redhat.com> --- tests/vm/README | 63 + 1 file changed, 63 insertions(+) create mode 100644 tests/vm/README diff --git a/tests/vm/README b/tests/vm/README new file mode 1006

[Qemu-devel] [PULL v4 20/38] docker: Use archive-source.py

2017-09-15 Thread Fam Zheng
Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-14-f...@redhat.com> --- tests/docker/Makefile.include | 15 ++- tests/docker/run | 8 +--- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.

[Qemu-devel] [PULL v4 15/38] tests: Add NetBSD image

2017-09-15 Thread Fam Zheng
The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng Reviewed-by: Kamil Rytarowski Message-Id: <20170913030119.3957-9-f...@redhat.com> --- tests/vm/netbsd | 42 ++ 1 file changed, 42 insertions(+)

[Qemu-devel] [PULL v4 17/38] Makefile: Add rules to run vm tests

2017-09-15 Thread Fam Zheng
Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-11-f...@redhat.com> --- Makefile | 2 ++ configure | 2 +- tests/vm/Makefile.include | 42 ++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 t

Re: [Qemu-devel] [PATCH qemu v2 09/13] memory: Rename mem_begin/mem_commit/mem_add helpers

2017-09-15 Thread Paolo Bonzini
On 15/09/2017 10:40, Alexey Kardashevskiy wrote: > This renames some helper to reflect better what they do. > > This drops AS in address_space_update_flatview() as it is not used anymore > and renames to flatview_render_new(). > > Signed-off-by: Alexey Kardashevskiy > --- > include/exec/memory-

[Qemu-devel] [PULL v4 12/38] tests: Add vm test lib

2017-09-15 Thread Fam Zheng
This is the common code to implement a "VM test" to 1) Download and initialize a pre-defined VM that has necessary dependencies to build QEMU and SSH access. 2) Archive $SRC_PATH to a .tar file. 3) Boot the VM, and pass the source tar file to the guest. 4) SSH into the VM, untar the s

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-15 Thread Nikunj A Dadhania
David Gibson writes: > On Fri, Sep 15, 2017 at 01:53:15PM +0530, Nikunj A Dadhania wrote: >> David Gibson writes: >> >> >> >> >> I thought, I am doing the same here for PowerNV, number of online cores >> >> is equal to initial online vcpus / threads per core >> >> >> >>int boot_cores_nr =

[Qemu-devel] [PULL v4 16/38] tests: Add OpenBSD image

2017-09-15 Thread Fam Zheng
The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-10-f...@redhat.com> --- tests/vm/openbsd | 43 +++ 1 file changed, 43 insertions(+) create mode 100755 tests/vm/

[Qemu-devel] [PULL v4 00/38] Test and build patches

2017-09-15 Thread Fam Zheng
The following changes since commit 04ef33052c205170c92df21ca0b4be4f3b102188: tcg/tci: do not use ldst label (never implemented) (2017-09-11 19:24:05 +0100) are available in the git repository at: git://github.com/famz/qemu.git tags/test-and-build-pull-request for you to fetch changes up to

[Qemu-devel] [PULL v4 13/38] tests: Add ubuntu.i386 image

2017-09-15 Thread Fam Zheng
This adds a 32bit guest. The official LTS cloud image is downloaded and initialized with cloud-init. Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-7-f...@redhat.com> --- tests/vm/ubuntu.i386 | 88 1 file changed, 88 insertions(+)

Re: [Qemu-devel] [PATCH qemu v2 04/13] memory: Move FlatView allocation to a helper

2017-09-15 Thread Paolo Bonzini
On 15/09/2017 10:40, Alexey Kardashevskiy wrote: > -static void flatview_init(FlatView *view) > +static FlatView *flatview_alloc(void) > { > +FlatView *view; > + > +view = g_new0(FlatView, 1); > view->ref = 1; > -view->ranges = NULL; > -view->nr = 0; > -view->nr_allocated

[Qemu-devel] [PATCH] dma/i82374: avoid double creation of i82374 device

2017-09-15 Thread Eduardo Otubo
QEMU fails when used with the following command line: ./ppc64-softmmu/qemu-system-ppc64 -S -machine 40p,accel=tcg -device i82374 qemu-system-ppc64: hw/isa/isa-bus.c:110: isa_bus_dma: Assertion `!bus->dma[0] && !bus->dma[1]' failed. Aborted (core dumped) The 40p machine type already creates

[Qemu-devel] [PULL v4 18/38] MAINTAINERS: Add tests/vm entry

2017-09-15 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Message-Id: <20170913030119.3957-12-f...@redhat.com> --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 36eeb42d19..42f5454311 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1891,6 +1891,7 @@ S

[Qemu-devel] [PULL v4 10/38] scripts: Add archive-source.sh

2017-09-15 Thread Fam Zheng
Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-4-f...@redhat.com> --- scripts/archive-source.sh | 33 + 1 file changed, 33 insertions(+) create mode 100755 scripts/archive-source.sh diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh new

[Qemu-devel] [PULL v4 11/38] tests: Add a test key pair

2017-09-15 Thread Fam Zheng
This will be used by setup test user ssh. Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-5-f...@redhat.com> --- tests/keys/id_rsa | 27 +++ tests/keys/id_rsa.pub | 1 + 2 files changed, 28 insertions(+) create mode 100644 tests/keys/id_rsa create mode 10

[Qemu-devel] [PULL 03/06] seccomp: add elevateprivileges argument to command line

2017-09-15 Thread Eduardo Otubo
This patch introduces the new argument [,elevateprivileges=allow|deny|children] to the `-sandbox on'. It allows or denies Qemu process to elevate its privileges by blacklisting all set*uid|gid system calls. The 'children' option will let forks and execves run unprivileged. Signed-off-by: Eduardo O

Re: [Qemu-devel] [PATCH qemu v2 03/13] memory: Open code FlatView rendering

2017-09-15 Thread Paolo Bonzini
On 15/09/2017 10:40, Alexey Kardashevskiy wrote: > +/* > + * FIXME: this is cut-n-paste from address_space_update_topology_pass, > + * simplify it > + */ > +iold = inew = 0; > +while (iold < old_view->nr || inew < new_view->nr) { > +if (iold < old_view->nr) { > +

[Qemu-devel] [PULL v4 14/38] tests: Add FreeBSD image

2017-09-15 Thread Fam Zheng
The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng Message-Id: <20170913030119.3957-8-f...@redhat.com> --- tests/vm/freebsd | 42 ++ 1 file changed, 42 insertions(+) create mode 100755 tests/vm/fr

[Qemu-devel] [PULL 02/06] seccomp: add obsolete argument to command line

2017-09-15 Thread Eduardo Otubo
This patch introduces the argument [,obsolete=allow] to the `-sandbox on' option. It allows Qemu to run safely on old system that still relies on old system calls. Signed-off-by: Eduardo Otubo Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrange --- include/sysemu/seccomp.h | 3 ++- qemu-

Re: [Qemu-devel] [RFC v2 16/32] vhost+postcopy: Send address back to qemu

2017-09-15 Thread Peter Xu
On Wed, Sep 13, 2017 at 01:15:32PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Sep 12, 2017 at 06:15:13PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > On Thu, Aug 24, 2017 at 08:27:14PM +0100, Dr. David Alan Gi

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-15 Thread David Gibson
On Fri, Sep 15, 2017 at 01:53:15PM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > >> > >> I thought, I am doing the same here for PowerNV, number of online cores > >> is equal to initial online vcpus / threads per core > >> > >>int boot_cores_nr = smp_cpus / smp_threads; > >> >

[Qemu-devel] [PULL 01/06] seccomp: changing from whitelist to blacklist

2017-09-15 Thread Eduardo Otubo
This patch changes the default behavior of the seccomp filter from whitelist to blacklist. By default now all system calls are allowed and a small black list of definitely forbidden ones was created. Signed-off-by: Eduardo Otubo Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrange --- incl

Re: [Qemu-devel] [PATCH 2/3] migration: Cancel migration at exit

2017-09-15 Thread Dr. David Alan Gilbert
* Fam Zheng (f...@redhat.com) wrote: > On Fri, 09/15 16:03, Peter Xu wrote: > > On Fri, Sep 15, 2017 at 01:44:03PM +0800, Fam Zheng wrote: > > > bdrv_close_all() would abort() due to op blockers added by BMDS, clean > > > up migration states when main loop quits to avoid that. > > > > > > Signed-o

[Qemu-devel] [PATCH] hw/display/virtio-gpu: Put the virtio-gpu-device into the display category

2017-09-15 Thread Thomas Huth
The virtio-gpu-pci device is already in the display category, so the virtio-gpu-device should be there, too. Signed-off-by: Thomas Huth --- hw/display/virtio-gpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index f0761cf..cc9385d 100644

[Qemu-devel] [PATCH qemu v2 01/13] memory: Postpone flatview and dispatch tree building till all devices are added

2017-09-15 Thread Alexey Kardashevskiy
Most devices use at least one address space and every time a new address space is added, flat views and dispatch trees are rebuild for all address spaces. This is not a problem for a relatively small amount of devices but even 50 virtio-pci devices use more than 8GB of RAM. What happens that on ev

Re: [Qemu-devel] [PATCH 2/3] migration: Cancel migration at exit

2017-09-15 Thread Fam Zheng
On Fri, 09/15 09:42, Dr. David Alan Gilbert wrote: > * Fam Zheng (f...@redhat.com) wrote: > > On Fri, 09/15 16:03, Peter Xu wrote: > > > On Fri, Sep 15, 2017 at 01:44:03PM +0800, Fam Zheng wrote: > > > > bdrv_close_all() would abort() due to op blockers added by BMDS, clean > > > > up migration sta

[Qemu-devel] [PULL 05/06] seccomp: add resourcecontrol argument to command line

2017-09-15 Thread Eduardo Otubo
This patch adds [,resourcecontrol=deny] to `-sandbox on' option. It blacklists all process affinity and scheduler priority system calls to avoid any bigger of the process. Signed-off-by: Eduardo Otubo Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrange --- include/sysemu/seccomp.h | 1 +

Re: [Qemu-devel] [RFC PATCH] NUMA: Enable adding NUMA node implicitly

2017-09-15 Thread Daniel P. Berrange
On Fri, Sep 15, 2017 at 04:33:18PM +0800, Dou Liyang wrote: > In QEMU, if we enable NUMA and have nodes, QEMU will build ACPI SRAT table > for transfering NUMA configuration to the guest. So, the maximum memory in > SRAT can be used to determine whether to use the swiotlb for IOMMU or not. > > How

Re: [Qemu-devel] [PATCH 3/3] ppc/kvm: check some capabilities with kvm_vm_check_extension()

2017-09-15 Thread Greg Kurz
On Fri, 15 Sep 2017 07:15:41 +0200 Thomas Huth wrote: > On 14.09.2017 21:25, Greg Kurz wrote: > > The following capabilities are VM specific: > > - KVM_CAP_PPC_SMT_POSSIBLE > > - KVM_CAP_PPC_HTAB_FD > > BTW, looks like kvmppc_has_cap_htab_fd() is dead code ... should we > either remove it or c

Re: [Qemu-devel] [PATCH 3/3] ppc/kvm: check some capabilities with kvm_vm_check_extension()

2017-09-15 Thread Thomas Huth
On 15.09.2017 10:43, Greg Kurz wrote: > On Fri, 15 Sep 2017 07:15:41 +0200 > Thomas Huth wrote: > >> On 14.09.2017 21:25, Greg Kurz wrote: >>> The following capabilities are VM specific: >>> - KVM_CAP_PPC_SMT_POSSIBLE >>> - KVM_CAP_PPC_HTAB_FD >> >> BTW, looks like kvmppc_has_cap_htab_fd() is d

[Qemu-devel] [PATCH qemu v2 05/13] memory: Move AddressSpaceDispatch from AddressSpace to FlatView

2017-09-15 Thread Alexey Kardashevskiy
As we are going to share FlatView's between AddressSpace's, and AddressSpaceDispatch is a structure to perform quick lookup in FlatView, this moves ASD to FlatView. After previosly open coded ASD rendering, we can also remove as->next_dispatch as the new FlatView pointer is stored on a stack and s

[Qemu-devel] [PULL 04/06] seccomp: add spawn argument to command line

2017-09-15 Thread Eduardo Otubo
This patch adds [,spawn=deny] argument to `-sandbox on' option. It blacklists fork and execve system calls, avoiding Qemu to spawn new threads or processes. Signed-off-by: Eduardo Otubo Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrange --- include/sysemu/seccomp.h | 1 + qemu-options.h

[Qemu-devel] [PATCH qemu v2 07/13] memory: Switch memory from using AddressSpace to FlatView

2017-09-15 Thread Alexey Kardashevskiy
FlatView's will be shared between AddressSpace's and subpage_t and MemoryRegionSection cannot store AS anymore, hence this change. In particular, for: typedef struct subpage_t { MemoryRegion iomem; -AddressSpace *as; +FlatView *fv; hwaddr base; uint16_t sub_section[]; } s

[Qemu-devel] [PATCH qemu v2 00/13] memory: Reduce memory use

2017-09-15 Thread Alexey Kardashevskiy
This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593 Previous spin: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg01559.html This patchset tries to reduce amount of memory used by FlatViews and tries share as many FVs between address spaces as possible. Changelog:

[Qemu-devel] [PATCH qemu v2 11/13] memory: Share FlatView's and dispatch trees between address spaces

2017-09-15 Thread Alexey Kardashevskiy
This allows sharing flat views between address spaces when the same root memory region is used when creating a new address space. This adds a global list of flat views and a list of attached address spaces per a flat view. Each address space references a flat view. Signed-off-by: Alexey Kardashev

[Qemu-devel] [PATCH qemu v2 02/13] exec: Explicitely export target AS from address_space_translate_internal

2017-09-15 Thread Alexey Kardashevskiy
This is not so mechanical change in order to move to shared FlatViews so make it a separate patch. The first argument of address_space_do_translate() will become a FlatView, however since address_space_get_iotlb_entry() still wants AS, hence this change. Signed-off-by: Alexey Kardashevskiy --- e

[Qemu-devel] [PATCH qemu v2 12/13] memory: Get rid of address_space_init_shareable

2017-09-15 Thread Alexey Kardashevskiy
Since FlatViews are shared now and ASes not, this gets rid of address_space_init_shareable(). Signed-off-by: Alexey Kardashevskiy --- Squash to the previous one? It is a separate patch to make review easier, mostly. --- include/exec/memory.h | 17 - include/hw/arm/armv7m.h |

[Qemu-devel] [PULL 06/06] buildsys: Move seccomp cflags/libs to per object

2017-09-15 Thread Eduardo Otubo
From: Fam Zheng Like many other libraries, libseccomp cflags and libs should only apply to the building of necessary objects. Do so in the usual way with the help of per object variables. Signed-off-by: Fam Zheng Acked-by: Eduardo Otubo --- Makefile.objs | 2 ++ configure | 6 -- 2 fi

[Qemu-devel] [PATCH qemu v2 10/13] memory: Move root MR from AddressSpace to FlatView

2017-09-15 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- include/exec/memory.h | 2 +- hw/pci/pci.c | 3 ++- memory.c | 30 -- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 7816e5d655..be8cc1

[Qemu-devel] [PATCH qemu v2 13/13] memory: Add flat views to HMP "info mtree"

2017-09-15 Thread Alexey Kardashevskiy
This adds a new switch to "info mtree" to print dispatch tree internals. Signed-off-by: Alexey Kardashevskiy --- Example: aik@fstn1-p1:~$ echo "info mtree -f -d" | nc localhost 3 QEMU 2.9.94 monitor - type 'help' for more information (qemu) info mtree -f -d FlatView #0 AS "memory" AS "cpu

[Qemu-devel] [PULL 00/06] seccomp branch queue

2017-09-15 Thread Eduardo Otubo
The following changes since commit 3dabde1128b671f36ac6cb36b97b273139964420: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170914' into staging (2017-09-14 16:33:02 +0100) are available in the git repository at: https://github.com/otubo/qemu.git tags/pull-seccom

[Qemu-devel] [PATCH qemu v2 09/13] memory: Rename mem_begin/mem_commit/mem_add helpers

2017-09-15 Thread Alexey Kardashevskiy
This renames some helper to reflect better what they do. This drops AS in address_space_update_flatview() as it is not used anymore and renames to flatview_render_new(). Signed-off-by: Alexey Kardashevskiy --- include/exec/memory-internal.h | 6 +++--- exec.c | 7 +++--

[Qemu-devel] [PATCH qemu v2 06/13] memory: Remove AddressSpace pointer from AddressSpaceDispatch

2017-09-15 Thread Alexey Kardashevskiy
AS in ASD is only used to pass AS from mem_begin() to register_subpage() to store it in MemoryRegionSection, we can do this directly now. Signed-off-by: Alexey Kardashevskiy --- exec.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/exec.c b/exec.c index 6b021

[Qemu-devel] [PATCH qemu v2 03/13] memory: Open code FlatView rendering

2017-09-15 Thread Alexey Kardashevskiy
We are going to share FlatView's between AddressSpace's and per-AS memory listeners won't suite the purpose anymore so open code the dispatch tree rendering. Signed-off-by: Alexey Kardashevskiy --- include/exec/memory-internal.h | 6 +++-- include/exec/memory.h | 1 - exec.c

[Qemu-devel] [PATCH qemu v2 08/13] memory: Cleanup after switching to FlatView

2017-09-15 Thread Alexey Kardashevskiy
We store AddressSpaceDispatch* in FlatView anyway so there is no need to carry it from mem_add() to register_subpage/register_multipage. Signed-off-by: Alexey Kardashevskiy --- exec.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/exec.c b/exec.c index b5610

[Qemu-devel] [PATCH qemu v2 04/13] memory: Move FlatView allocation to a helper

2017-09-15 Thread Alexey Kardashevskiy
This moves a FlatView allocation and initialization to a helper. While we are nere, replace g_new with g_new0 to not to bother if we add new fields in the future. Signed-off-by: Alexey Kardashevskiy --- memory.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH 3/3] ppc/kvm: check some capabilities with kvm_vm_check_extension()

2017-09-15 Thread David Gibson
On Fri, Sep 15, 2017 at 10:18:49AM +0200, Thomas Huth wrote: > On 15.09.2017 08:35, David Gibson wrote: > > On Fri, Sep 15, 2017 at 07:15:41AM +0200, Thomas Huth wrote: > >> On 14.09.2017 21:25, Greg Kurz wrote: > >>> The following capabilities are VM specific: > >>> - KVM_CAP_PPC_SMT_POSSIBLE > >>

Re: [Qemu-devel] [PATCH 2/3] migration: Cancel migration at exit

2017-09-15 Thread Peter Xu
On Fri, Sep 15, 2017 at 04:20:26PM +0800, Fam Zheng wrote: [...] > > > void qmp_migrate_set_cache_size(int64_t value, Error **errp) > > > { > > > MigrationState *s = migrate_get_current(); > > > diff --git a/vl.c b/vl.c > > > index fb1f05b937..abbe61f40b 100644 > > > --- a/vl.c > > > +++ b

[Qemu-devel] [RFC PATCH] NUMA: Enable adding NUMA node implicitly

2017-09-15 Thread Dou Liyang
In QEMU, if we enable NUMA and have nodes, QEMU will build ACPI SRAT table for transfering NUMA configuration to the guest. So, the maximum memory in SRAT can be used to determine whether to use the swiotlb for IOMMU or not. However, if QEmu doesn't enable NUMA explicitly on CLI, The SRAT will nev

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-15 Thread Nikunj A Dadhania
David Gibson writes: >> >> I thought, I am doing the same here for PowerNV, number of online cores >> is equal to initial online vcpus / threads per core >> >>int boot_cores_nr = smp_cpus / smp_threads; >> >> Only difference that I see in PowerNV is that we have multiple chips >> (max 2, a

Re: [Qemu-devel] [PATCH 2/3] migration: Cancel migration at exit

2017-09-15 Thread Fam Zheng
On Fri, 09/15 16:03, Peter Xu wrote: > On Fri, Sep 15, 2017 at 01:44:03PM +0800, Fam Zheng wrote: > > bdrv_close_all() would abort() due to op blockers added by BMDS, clean > > up migration states when main loop quits to avoid that. > > > > Signed-off-by: Fam Zheng > > --- > > include/migration/

Re: [Qemu-devel] [PATCH 3/3] ppc/kvm: check some capabilities with kvm_vm_check_extension()

2017-09-15 Thread Thomas Huth
On 15.09.2017 08:35, David Gibson wrote: > On Fri, Sep 15, 2017 at 07:15:41AM +0200, Thomas Huth wrote: >> On 14.09.2017 21:25, Greg Kurz wrote: >>> The following capabilities are VM specific: >>> - KVM_CAP_PPC_SMT_POSSIBLE >>> - KVM_CAP_PPC_HTAB_FD >> >> BTW, looks like kvmppc_has_cap_htab_fd() is

Re: [Qemu-devel] [PATCH v2 1/2] checkpatch: add hwaddr to @typeList

2017-09-15 Thread David Gibson
On Thu, Sep 14, 2017 at 04:14:33PM +0200, Greg Kurz wrote: > The script doesn't know about all possible types and learn them as > it parses the code. If it reaches a line with a type cast but the > type isn't known yet, it is misinterpreted as an identifier. > > For example the following line: >

Re: [Qemu-devel] [PATCH 3/3] ppc/kvm: check some capabilities with kvm_vm_check_extension()

2017-09-15 Thread David Gibson
On Thu, Sep 14, 2017 at 09:25:43PM +0200, Greg Kurz wrote: > The following capabilities are VM specific: > - KVM_CAP_PPC_SMT_POSSIBLE > - KVM_CAP_PPC_HTAB_FD > - KVM_CAP_PPC_ALLOC_HTAB > > If both KVM HV and KVM PR are present, checking them always return > the HV value, even if we explicitely req

Re: [Qemu-devel] [PATCH 3/3] ppc/kvm: check some capabilities with kvm_vm_check_extension()

2017-09-15 Thread David Gibson
On Fri, Sep 15, 2017 at 07:15:41AM +0200, Thomas Huth wrote: > On 14.09.2017 21:25, Greg Kurz wrote: > > The following capabilities are VM specific: > > - KVM_CAP_PPC_SMT_POSSIBLE > > - KVM_CAP_PPC_HTAB_FD > > BTW, looks like kvmppc_has_cap_htab_fd() is dead code ... should we > either remove it o

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-15 Thread David Gibson
On Thu, Sep 14, 2017 at 10:42:52AM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > > On Mon, Sep 11, 2017 at 10:40:10AM +0530, Nikunj A Dadhania wrote: > >> David Gibson writes: > >> > >> > On Wed, Sep 06, 2017 at 01:57:48PM +0530, Nikunj A Dadhania wrote: > >> >> When the user does

Re: [Qemu-devel] [PATCH 2/3] migration: Cancel migration at exit

2017-09-15 Thread Peter Xu
On Fri, Sep 15, 2017 at 01:44:03PM +0800, Fam Zheng wrote: > bdrv_close_all() would abort() due to op blockers added by BMDS, clean > up migration states when main loop quits to avoid that. > > Signed-off-by: Fam Zheng > --- > include/migration/misc.h | 1 + > migration/migration.c| 7 ++

[Qemu-devel] [PULL 8/9] libqtest: Remove dead qtest_instances variable

2017-09-15 Thread Thomas Huth
From: Eric Blake Prior to commit 063c23d9, we were tracking a list of parallel qtest objects, in order to safely clean up a SIGABRT handler only after the last connection quits. But when we switched to more of glib's infrastructure, the list became dead code that is never assigned to. Signed-of

[Qemu-devel] [PULL 9/9] qtest: Avoid passing raw strings through hmp()

2017-09-15 Thread Thomas Huth
From: Eric Blake hmp() passes its string argument through the sprintf() family; with a proper attribute, gcc -Wformat warns us when we do something dangerous like passing a non-constant format string. Fortunately, all our strings were safe, but checking whether the string can contain an unintend

Re: [Qemu-devel] [PATCH] checkpatch: add hwaddr to @typeList

2017-09-15 Thread Paolo Bonzini
On 14/09/2017 11:12, Greg Kurz wrote: > The script doesn't know about all possible types and learn them as > it parses the code. If it reaches a line with a type cast but the > type isn't known yet, it is misinterpreted as an identifier. > > For example the following line: > > foo = (hwaddr)

[Qemu-devel] [PULL 7/9] numa-test: Use hmp()

2017-09-15 Thread Thomas Huth
From: Eric Blake Don't open-code something that has a convenient helper available. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/numa-test.c | 21 +++-- 1 file chang

[Qemu-devel] [PULL 5/9] test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code

2017-09-15 Thread Thomas Huth
From: Eric Blake Back when the test was introduced, in commit 62c39b307, the test was set up to run qemu-ga directly on the host performing the test, and defaults to limiting itself to safe commands. At the time, it was envisioned that setting QGA_TEST_SIDE_EFFECTING in the environment could cov

[Qemu-devel] [PULL 3/9] tests/libqtest: Use a proper error message if QTEST_QEMU_BINARY is missing

2017-09-15 Thread Thomas Huth
The user can currently still cause an abort() if running certain tests (like the prom-env-test) without setting the QTEST_QEMU_BINARY first. A similar problem has been fixed with commit 7c933ad61b8f3f51337 already, but forgot to also take care of the qtest_get_arch() function, so let's introduce a

[Qemu-devel] [PULL 6/9] qtest: Don't perform side effects inside assertion

2017-09-15 Thread Thomas Huth
From: Eric Blake Assertions should be separate from the side effects, since in theory, g_assert() can be disabled (in practice, we can't really ever do that). Signed-off-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- qtest.c | 82 ++

[Qemu-devel] [PULL 4/9] tests: Fix broken ivshmem-server-msi/-irq tests

2017-09-15 Thread Thomas Huth
Broken with commit b4ba67d9a7025 ("libqos: Change PCI accessors to take opaque BAR handle") a while ago, but nobody noticed since the tests are not run by default: The msix_pba_bar is not correctly initialized anymore if bir_pba has the same value as bir_table. With this fix, "make check SPEED=slow

[Qemu-devel] [PULL 2/9] tests/test-hmp: Remove puv3 and tricore_testboard from the blacklist

2017-09-15 Thread Thomas Huth
The problem with puv3 has been fixed with 0ac241bcf9f9d99a252a352a162f ('unicore32: abort when entering "x 0" on the monitor') and the problem with tricore_testboard has been fixed with b190f477e29c7cd03a8fee49c96d ('qemu-system-tricore: segfault when entering "x 0" on the monitor'). Reviewed-by:

[Qemu-devel] [PULL 0/9] Fixes and improvements for various qtests

2017-09-15 Thread Thomas Huth
The following changes since commit 3dabde1128b671f36ac6cb36b97b273139964420: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170914' into staging (2017-09-14 16:33:02 +0100) are available in the git repository at: git://github.com/huth/qemu.git tags/check-2017091

[Qemu-devel] [PULL 1/9] tests: Introduce generic device hot-plug/hot-unplug functions

2017-09-15 Thread Thomas Huth
A lot of tests provide code for adding and removing a device via the device_add and device_del QMP commands. Maintaining this code in so many places is cumbersome and error-prone (some of the code parts check the responses for device deletion in an incorrect way, for example, we've got to deal with

Re: [Qemu-devel] [PATCH 1/3] migration: Allow ram_save_cleanup to be called with empty state

2017-09-15 Thread Peter Xu
On Fri, Sep 15, 2017 at 03:02:32PM +0800, Fam Zheng wrote: > On Fri, 09/15 14:56, Peter Xu wrote: > > On Fri, Sep 15, 2017 at 02:49:07PM +0800, Fam Zheng wrote: > > > On Fri, 09/15 14:41, Peter Xu wrote: > > > > On Fri, Sep 15, 2017 at 01:44:02PM +0800, Fam Zheng wrote: > > > > > So that we can do

Re: [Qemu-devel] host doesn't support requested feature: CPUID.01H:EDX.ds [bit 21] Does this warn affect virtual machine performance or use?

2017-09-15 Thread Jiri Denemark
On Thu, Sep 14, 2017 at 20:48:49 +0800, Paul Schlacter wrote: > this is my stackoverflow question: > https://stackoverflow.com/questions/46219552/host-doesnt-support-requested-feature-cpuid-01hedx-ds-bit-21-does-this-warn > > > I found a lot of warning from the VM qemu log, Does this warn affect

Re: [Qemu-devel] [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback

2017-09-15 Thread Auger Eric
On 15/09/2017 09:30, Auger Eric wrote: > Hi Tomasz, > > On 14/09/2017 16:43, Tomasz Nowicki wrote: >> On 14.09.2017 16:31, Tomasz Nowicki wrote: >>> Hi Eric, >>> >>> On 14.09.2017 11:27, Linu Cherian wrote: Hi Eric, On Fri Sep 01, 2017 at 07:21:16PM +0200, Eric Auger wrote: >

Re: [Qemu-devel] [PATCH v2 2/2] virtio-gpu-ccw: Create a virtio gpu device for the ccw bus

2017-09-15 Thread Thomas Huth
On 14.09.2017 17:55, Farhan Ali wrote: > Wire up the virtio-gpu device for the CCW bus. The virtio-gpu > is a virtio-1 device, so disable revision 0. > > Signed-off-by: Farhan Ali > Acked-by: Christian Borntraeger > Reviewed-by: Halil Pasic > --- > hw/s390x/virtio-ccw.c | 49 ++

Re: [Qemu-devel] [PATCH v2 11/19] s390x: allow only 1 CPU with TCG

2017-09-15 Thread Cornelia Huck
On Thu, 14 Sep 2017 20:13:49 +0200 David Hildenbrand wrote: > FWIW, I started factoring out today KVM SIGP code to make it usable by TCG. > > I also started adding the missing SIGP instructions the kernel handles > for KVM. I dropped the old TCG SIGP handling code and completely reuse > the new

Re: [Qemu-devel] [PATCH v2 1/2] virtio-gpu: Handle endian conversion

2017-09-15 Thread Gerd Hoffmann
Hi, > +static void > +virtio_gpu_ctrl_hdr_bswap_cpu(struct virtio_gpu_ctrl_hdr *hdr) > +{ > +hdr->type =  le32_to_cpu(hdr->type); > +hdr->flags = le32_to_cpu(hdr->flags); > +hdr->fence_id = le64_to_cpu(hdr->fence_id); > +hdr->ctx_id = le32_to_cpu(hdr->ctx_id); > +hdr->padding

Re: [Qemu-devel] [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback

2017-09-15 Thread Auger Eric
Hi Tomasz, On 14/09/2017 16:43, Tomasz Nowicki wrote: > On 14.09.2017 16:31, Tomasz Nowicki wrote: >> Hi Eric, >> >> On 14.09.2017 11:27, Linu Cherian wrote: >>> Hi Eric, >>> >>> On Fri Sep 01, 2017 at 07:21:16PM +0200, Eric Auger wrote: memory_region_iommu_replay() is used for VFIO integrati

Re: [Qemu-devel] [PATCH 1/2] s390x/ccs: add ccw-tester emulated device

2017-09-15 Thread Cornelia Huck
On Thu, 14 Sep 2017 18:50:29 +0200 Halil Pasic wrote: > On 09/14/2017 04:26 PM, Cornelia Huck wrote: > > On Wed, 13 Sep 2017 15:27:51 +0200 > > Halil Pasic wrote: > >> +static Property ccw_tester_properties[] = { > >> +DEFINE_PROP_UINT16("cu_type", CcwTesterDevice, cu_type, > >> +

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64

2017-09-15 Thread Laurent Vivier
Le 15/09/2017 à 08:58, James Clarke a écrit : > Fixes: https://bugs.launchpad.net/qemu/+bug/1716767 > Signed-off-by: James Clarke > --- > linux-user/syscall.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 9b6364a266..24

Re: [Qemu-devel] [Qemu-arm] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback

2017-09-15 Thread Auger Eric
Hi Linu, On 14/09/2017 11:27, Linu Cherian wrote: > Hi Eric, > > On Fri Sep 01, 2017 at 07:21:16PM +0200, Eric Auger wrote: >> memory_region_iommu_replay() is used for VFIO integration. >> >> However its default implementation is not adapted to SMMUv3 >> IOMMU memory region. Indeed the input addr

Re: [Qemu-devel] [PATCH] scsi-bus: correct responses for INQUIRY and REQUEST SENSE

2017-09-15 Thread Paolo Bonzini
On 15/09/2017 02:21, Michael Roth wrote: > Quoting Paolo Bonzini (2017-08-22 08:20:23) >> On 19/08/2017 00:55, Laszlo Ersek wrote: >>> Reported-by: Laszlo Ersek >>> Fixes: ded6ddc5a7b95217557fa360913d1213e12d4a6d >> >> And also: >> >> Cc: qemu-sta...@nongnu.org > > FYI patch freeze for v2.10.1 is

<    1   2   3   4   >