Re: [Qemu-devel] [RFC v4 09/16] virtio-iommu: Implement translate

2017-09-21 Thread Bharat Bhushan
> -Original Message- > From: Eric Auger [mailto:eric.au...@redhat.com] > Sent: Tuesday, September 19, 2017 1:17 PM > To: eric.auger@gmail.com; eric.au...@redhat.com; > peter.mayd...@linaro.org; alex.william...@redhat.com; m...@redhat.com; > qemu-...@nongnu.org; qemu-devel@nongnu.org;

Re: [Qemu-devel] [PATCH 1/1] s390x/ais: for 2.10 stable: disable ais facility

2017-09-21 Thread Christian Borntraeger
On 09/21/2017 10:26 PM, Michael Roth wrote: > Quoting Michael Roth (2017-09-21 11:50:28) >> Quoting Cornelia Huck (2017-09-21 10:21:42) >>> On Thu, 21 Sep 2017 17:14:46 +0200 >>> Christian Borntraeger wrote: >>> The migration interface for ais was introduced with kernel 4.13 but the cap

Re: [Qemu-devel] [PATCH v11 07/13] tests: Add FreeBSD image

2017-09-21 Thread Fam Zheng
On Fri, 09/22 03:09, Philippe Mathieu-Daudé wrote: > On 09/21/2017 12:07 PM, Fam Zheng wrote: > > The image is prepared following instructions as in: > > > > https://wiki.qemu.org/Hosts/BSD > > > > Signed-off-by: Fam Zheng > > $ QEMU=`pwd`/x86_64-softmmu/qemu-system-x86_64 make vm-build-freebsd

Re: [Qemu-devel] [PATCH] hw/pci-bridge/pcie_pci_bridge: properly handle MSI unavailability case

2017-09-21 Thread Marcel Apfelbaum
On 21/09/2017 21:12, Aleksandr Bezzubikov wrote: 2017-09-21 13:16 GMT+03:00 Marcel Apfelbaum : Hi Aleksandr, On 21/09/2017 0:21, Aleksandr Bezzubikov wrote: Signed-off-by: Aleksandr Bezzubikov --- hw/pci-bridge/pcie_pci_bridge.c | 24 ++-- 1 file changed, 18 insertio

[Qemu-devel] [Bug 1718719] Re: qemu can't capture keys properly under wayland

2017-09-21 Thread ChristianEhrhardt
Hi Mathieu, thanks for the report but since we are up-to-date with qemu and I can't find an obvious breakage we might have introduced for this, this should go to qmeu-upstream in this case. Furthermore are these actually two issues?: #1 - wayland crashes under spice more of a wayland bug th

Re: [Qemu-devel] [PATCH] tests/boot-sector: Increase timeout to 600 seconds

2017-09-21 Thread Philippe Mathieu-Daudé
Hi Thomas, On 09/22/2017 12:06 AM, Thomas Huth wrote: If QEMU has been compiled with the flags --enable-tcg-interpreter and --enable-debug, the guest is running incredibly slow. The pxe boot test There already is a qtest_get_arch(), it might be convenient to have a qtest_get_accel() at some p

Re: [Qemu-devel] [PATCH v11 07/13] tests: Add FreeBSD image

2017-09-21 Thread Philippe Mathieu-Daudé
On 09/21/2017 12:07 PM, Fam Zheng wrote: The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng $ QEMU=`pwd`/x86_64-softmmu/qemu-system-x86_64 make vm-build-freebsd V=1 [...] CC tests/test-io-channel-socket.o CC tests/io-cha

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

2017-09-21 Thread Cédric Le Goater
On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote: > David Gibson writes: > > > As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the > default value of 1 in vl.c. In powernv, we were setting nr-cores like > this: > > object_property_set_int(chip, smp

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

2017-09-21 Thread Nikunj A Dadhania
David Gibson writes: >> >> >> >> As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the >> >> default value of 1 in vl.c. In powernv, we were setting nr-cores like >> >> this: >> >> >> >> object_property_set_int(chip, smp_cores, "nr-cores", >> >> &error_fatal); >> >> >>

Re: [Qemu-devel] [PATCH v3 03/20] file-posix: Switch to .bdrv_co_block_status()

2017-09-21 Thread Fam Zheng
On Wed, 09/20 08:47, Eric Blake wrote: > On 09/20/2017 04:57 AM, Fam Zheng wrote: > > On Thu, 09/14 09:40, Eric Blake wrote: > >> We are gradually moving away from sector-based interfaces, towards > >> byte-based. Update the file protocol driver accordingly. In mapping > >> mode, note that the en

Re: [Qemu-devel] [PULL 00/18] Migration PULL request

2017-09-21 Thread Peter Xu
On Thu, Sep 21, 2017 at 04:29:04PM -0700, no-re...@patchew.org wrote: [...] > /var/tmp/patchew-tester-tmp-b0y2ycie/src/util/bitmap.c: In function > ‘bitmap_to_from_le’: > /var/tmp/patchew-tester-tmp-b0y2ycie/src/util/bitmap.c:383:6: error: > "__WORD_SIZE" is not defined [-Werror=undef] > # if

Re: [Qemu-devel] [PATCH v11 07/13] tests: Add FreeBSD image

2017-09-21 Thread Fam Zheng
On Fri, 09/22 00:17, Philippe Mathieu-Daudé wrote: > Hi Fam, > > On 09/21/2017 12:07 PM, Fam Zheng wrote: > > The image is prepared following instructions as in: > > > > https://wiki.qemu.org/Hosts/BSD > > > > Signed-off-by: Fam Zheng > > --- > > tests/vm/freebsd | 42

Re: [Qemu-devel] [PATCH] tests/boot-sector: Increase timeout to 600 seconds

2017-09-21 Thread Stefan Weil
Am 22.09.2017 um 05:06 schrieb Thomas Huth: > If QEMU has been compiled with the flags --enable-tcg-interpreter and > --enable-debug, the guest is running incredibly slow. The pxe boot test > can take up to 400 seconds when testing the pseries ppc64 machine. While > we should still look for ways to

Re: [Qemu-devel] [PATCH 2/3] memory: seek FlatView sharing candidates among children subregions

2017-09-21 Thread Alexey Kardashevskiy
On 21/09/17 23:57, Paolo Bonzini wrote: > On 21/09/2017 15:39, Alexey Kardashevskiy wrote: >> On 21/09/17 22:07, Paolo Bonzini wrote: >>> A container can be used instead of an alias to allow switching between >>> multiple subregions. In this case we cannot directly share the >>> subregions (since

Re: [Qemu-devel] [PATCH] MAINTAINERS: Fix subsystem name for "Build and test automation"

2017-09-21 Thread Fam Zheng
On Fri, 09/22 05:14, Thomas Huth wrote: > On 21.09.2017 19:02, Eduardo Habkost wrote: > > The subsystem name for the "Build test automation" section is > > "-", because an actual subsystem name > > line is missing: > > > > $ ./scripts/get_maintainer.pl -f tests/docker/doc

Re: [Qemu-devel] [PATCH v11 07/13] tests: Add FreeBSD image

2017-09-21 Thread Philippe Mathieu-Daudé
Hi Fam, On 09/21/2017 12:07 PM, Fam Zheng wrote: The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng --- tests/vm/freebsd | 42 ++ 1 file changed, 42 insertions(+) create mode 100755 tests/vm

Re: [Qemu-devel] [PATCH] MAINTAINERS: Fix subsystem name for "Build and test automation"

2017-09-21 Thread Thomas Huth
On 21.09.2017 19:02, Eduardo Habkost wrote: > The subsystem name for the "Build test automation" section is > "-", because an actual subsystem name > line is missing: > > $ ./scripts/get_maintainer.pl -f tests/docker/docker.py > "Alex Bennée" (maintainer:--

[Qemu-devel] [PATCH] tests/boot-sector: Increase timeout to 600 seconds

2017-09-21 Thread Thomas Huth
If QEMU has been compiled with the flags --enable-tcg-interpreter and --enable-debug, the guest is running incredibly slow. The pxe boot test can take up to 400 seconds when testing the pseries ppc64 machine. While we should still look for ways to speed up the test on the pseries machine, it's bett

[Qemu-devel] [PATCH] qga-win: don't hang if vss hold writes timeout

2017-09-21 Thread Chen Hanxiao
From: Chen Hanxiao When VM is in a heavy IO, if the command "guest-fsfreeze-freeze" is executed, VSS may timeout when trying to hold writes. Inside guest, Event ID 12298(VSS_ERROR_HOLD_WRITES_TIMEOUT) is logged in the Event Viewer. At that time, if we call AbortBackup, qga may hang forever. Th

Re: [Qemu-devel] [PATCH v11 01/13] gitignore: Ignore vm test images

2017-09-21 Thread Fam Zheng
On Thu, 09/21 10:23, Eric Blake wrote: > On 09/21/2017 10:07 AM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > .gitignore | 1 + > > tests/.gitignore | 1 + > > 2 files changed, 2 insertions(+) > > Missing my R-b from v10. My bad, will add it back. Fam

Re: [Qemu-devel] [PATCH v11 03/13] scripts: Add archive-source.sh

2017-09-21 Thread Fam Zheng
On Thu, 09/21 10:22, Eric Blake wrote: > On 09/21/2017 10:07 AM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > scripts/archive-source.sh | 51 > > +++ > > 1 file changed, 51 insertions(+) > > create mode 100755 scripts/archive-source.sh >

Re: [Qemu-devel] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-21 Thread Fam Zheng
On Thu, 09/21 18:39, Manos Pitsidianakis wrote: > On Thu, Sep 21, 2017 at 09:29:43PM +0800, Fam Zheng wrote: > > On Thu, 09/21 16:17, Manos Pitsidianakis wrote: > > > BlockDriverState has a bdrv_do_drain() callback but no equivalent for the > > > end > > > > s/bdrv_do_drain/bdrv_co_drain/ > > >

Re: [Qemu-devel] [PATCH] MAINTAINERS: Fix subsystem name for "Build and test automation"

2017-09-21 Thread Fam Zheng
On Thu, 09/21 14:02, Eduardo Habkost wrote: > The subsystem name for the "Build test automation" section is > "-", because an actual subsystem name > line is missing: > > $ ./scripts/get_maintainer.pl -f tests/docker/docker.py > "Alex Bennée" (maintainer:--

Re: [Qemu-devel] [PULL 00/18] Migration PULL request

2017-09-21 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Subject: [Qemu-devel] [PULL 00/18] Migration PULL request Type: series Message-id: 20170921230812.7095-1-quint...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checko

[Qemu-devel] [RFC v2 1/2] machine: Add a valid_cpu_types property

2017-09-21 Thread Alistair Francis
Signed-off-by: Alistair Francis --- RFC v2: - Rebase on Igor's cpu_type work - Use object_class_dynamic_cast() - Use a NULL terminated cahr** list - Do the check before the machine_class init() is called hw/core/machine.c | 35 +++ include/hw/boards.h | 1

[Qemu-devel] [PULL 32/32] chardev: remove context in chr_update_read_handler

2017-09-21 Thread Paolo Bonzini
From: Peter Xu We had a per-chardev cache for context, then we don't need this parameter to be passed in every time when chr_update_read_handler() called. As long as we are calling chr_update_read_handler() using qemu_chr_be_update_read_handlers() we'll be fine. Signed-off-by: Peter Xu Message

Re: [Qemu-devel] [PATCH] xen: use vMSI related #define-s from public interface

2017-09-21 Thread Stefano Stabellini
On Thu, 21 Sep 2017, Jan Beulich wrote: > >>> On 21.09.17 at 03:12, wrote: > > On Fri, 1 Sep 2017, Jan Beulich wrote: > >> --- a/hw/xen/xen_pt_msi.c > >> +++ b/hw/xen/xen_pt_msi.c > >> @@ -18,6 +18,11 @@ > >> > >> #define XEN_PT_AUTO_ASSIGN -1 > >> > >> +#ifndef XEN_DOMCTL_VMSI_X86_DEST_ID_MA

[Qemu-devel] [PULL 26/32] scsi: build qemu-pr-helper

2017-09-21 Thread Paolo Bonzini
Introduce a privileged helper to run persistent reservation commands. This lets virtual machines send persistent reservations without using CAP_SYS_RAWIO or out-of-tree patches. The helper uses Unix permissions and SCM_RIGHTS to restrict access to processes that can access its socket and prove tha

[Qemu-devel] [PULL 22/32] memory: trace FlatView creation and destruction

2017-09-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 1 - include/qemu/typedefs.h | 1 + memory.c| 3 +++ trace-events| 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 402824c..5ed4042 10064

[Qemu-devel] [PULL 19/32] memory: Rework "info mtree" to print flat views and dispatch trees

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This adds a new "-d" switch to "info mtree" to print dispatch tree internals. This changes the way "-f" is handled - it prints now flat views and associated address spaces. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-15-...@ozlabs.ru> Signed

[Qemu-devel] [RFC v2 2/2] netduino2: Specify the valid CPUs

2017-09-21 Thread Alistair Francis
Signed-off-by: Alistair Francis --- RFC v2: - Use a NULL terminated list - Add the Cortex-M4 for testing hw/arm/netduino2.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c index f936017d4a..391742ea11 100644 --- a/hw/arm/n

[Qemu-devel] [RFC v2 0/2] Add a valid_cpu_types property

2017-09-21 Thread Alistair Francis
There are numorous QEMU machines that only have a single or a handful of valid CPU options. To simplyfy the management of specificying which CPU is/isn't valid let's create a property that can be set in the machine init. We can then check to see if the user supplied CPU is in that list or not. Her

[Qemu-devel] [PULL 16/32] memory: Move address_space_update_ioeventfds

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy So it is called (twice) from the same function. This is to make the next patches a bit simpler. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-12-...@ozlabs.ru> Signed-off-by: Paolo Bonzini --- memory.c | 3 +-- 1 file changed, 1 insertion(+),

[Qemu-devel] [PULL 31/32] chardev: use per-dev context for io_add_watch_poll

2017-09-21 Thread Paolo Bonzini
From: Peter Xu It was only passed in by chr_update_read_handlers(). However when reconnect, we'll lose that context information. So if a chardev was running on another context (rather than the default context, the NULL pointer), it'll switch back to the default context if reconnection happens.

[Qemu-devel] [PULL 15/32] memory: Alloc dispatch tree where topology is generared

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This is to make next patches simpler. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-11-...@ozlabs.ru> Signed-off-by: Paolo Bonzini --- memory.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/memory.c b/

[Qemu-devel] [PULL 28/32] scsi: add persistent reservation manager using qemu-pr-helper

2017-09-21 Thread Paolo Bonzini
This adds a concrete subclass of pr-manager that talks to qemu-pr-helper. Signed-off-by: Paolo Bonzini --- scsi/Makefile.objs | 2 +- scsi/pr-manager-helper.c | 302 +++ 2 files changed, 303 insertions(+), 1 deletion(-) create mode 100644 scsi

[Qemu-devel] [PULL 13/32] memory: Rename mem_begin/mem_commit/mem_add helpers

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This renames some helpers to reflect better what they do. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-9-...@ozlabs.ru> Signed-off-by: Paolo Bonzini --- exec.c | 12 +++---

[Qemu-devel] [PULL 25/32] scsi, file-posix: add support for persistent reservation management

2017-09-21 Thread Paolo Bonzini
It is a common requirement for virtual machine to send persistent reservations, but this currently requires either running QEMU with CAP_SYS_RAWIO, or using out-of-tree patches that let an unprivileged QEMU bypass Linux's filter on SG_IO commands. As an alternative mechanism, the next patches will

[Qemu-devel] [PULL 29/32] chardev: new qemu_chr_be_update_read_handlers()

2017-09-21 Thread Paolo Bonzini
From: Peter Xu Add a wrapper for the chr_update_read_handler(). Signed-off-by: Peter Xu Message-Id: <1505975754-21555-2-git-send-email-pet...@redhat.com> Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- chardev/char-fe.c | 7 ++- chardev/char.c | 10 +

[Qemu-devel] [PULL 24/32] memory: Share special empty FlatView

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This shares an cached empty FlatView among address spaces. The empty FV is used every time when a root MR renders into a FV without memory sections which happens when MR or its children are not enabled or zero-sized. The empty_view is not NULL to keep the rest of memory

[Qemu-devel] [PULL 27/32] scsi: add multipath support to qemu-pr-helper

2017-09-21 Thread Paolo Bonzini
Proper support of persistent reservation for multipath devices requires communication with the multipath daemon, so that the reservation is registered and applied when a path comes up. The device mapper utilities provide a library to do so; this patch makes qemu-pr-helper.c detect multipath device

[Qemu-devel] [PULL 09/32] memory: Move AddressSpaceDispatch from AddressSpace to FlatView

2017-09-21 Thread Paolo Bonzini
From: 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 point

[Qemu-devel] [PULL 23/32] memory: seek FlatView sharing candidates among children subregions

2017-09-21 Thread Paolo Bonzini
A container can be used instead of an alias to allow switching between multiple subregions. In this case we cannot directly share the subregions (since they only belong to a single parent), but if the subregions are aliases we can in turn walk those. This is not enough to remove all source of qua

[Qemu-devel] [PULL 20/32] memory: Get rid of address_space_init_shareable

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy Since FlatViews are shared now and ASes not, this gets rid of address_space_init_shareable(). This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-17-...@ozlabs.ru> Signed-off-by: Paolo Bonzini --- cpus.c

[Qemu-devel] [PULL 08/32] memory: Move FlatView allocation to a helper

2017-09-21 Thread Paolo Bonzini
From: 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. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110

[Qemu-devel] [PULL 30/32] chardev: add Chardev.gcontext field

2017-09-21 Thread Paolo Bonzini
From: Peter Xu It caches the gcontext that is used to poll the chardev IO. Before this patch, we only passed it in via chr_update_read_handlers(). However that may not be enough if the char backend is disconnected and reconnected afterward. There are chardev codes that still assumed the contex

[Qemu-devel] [PULL 21/32] memory: Create FlatView directly

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This avoids usual memory_region_transaction_commit() which rebuilds all FVs. On POWER8 with 255 CPUs, 255 virtio-net, 40 PCI bridges guest this brings down the boot time from 25s to 20s and reduces the amount of temporary FVs allocated during machine constructon (~8000

[Qemu-devel] [PULL 18/32] memory: Do not allocate FlatView in address_space_init

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This creates a new AS object without any FlatView as memory_region_transaction_commit() may want to reuse the empty FV. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-14-...@ozlabs.ru> Signed-off-by: Paolo Bonzini --- memory.c | 29 +++

[Qemu-devel] [PULL 17/32] memory: Share FlatView's and dispatch trees between address spaces

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This allows sharing flat views between address spaces (AS) when the same root memory region is used when creating a new address space. This is done by walking through all ASes and caching one FlatView per a physical root MR (i.e. not aliased). This removes search for d

[Qemu-devel] [PULL 03/32] memory: avoid a name clash with access macro

2017-09-21 Thread Paolo Bonzini
From: KONRAD Frederic This avoids a name clash with the access macro on windows 64: make CHK version_gen.h CC aarch64-softmmu/memory.o /home/konrad/qemu/memory.c: In function 'access_with_adjusted_size': /home/konrad/qemu/memory.c:591:73: error: macro "access" passed 7 arguments,

[Qemu-devel] [PULL 14/32] memory: Store physical root MR in FlatView

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy Address spaces get to keep a root MR (alias or not) but FlatView stores the actual MR as this is going to be used later on to decide whether to share a particular FlatView or not. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-10-...@ozlabs.ru>

[Qemu-devel] [PULL 07/32] memory: Open code FlatView rendering

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy We are going to share FlatView's between AddressSpace's and per-AS memory listeners won't suit the purpose anymore so open code the dispatch tree rendering. Since there is a good chance that dispatch_listener was the only listener, this avoids address_space_update_topo

[Qemu-devel] [PULL 11/32] memory: Switch memory from using AddressSpace to FlatView

2017-09-21 Thread Paolo Bonzini
From: 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;

[Qemu-devel] [PULL 02/32] kvm: drop wrong assertion creating problems with pflash

2017-09-21 Thread Paolo Bonzini
From: David Hildenbrand pflash toggles mr->romd_mode. So this assert does not always hold. 1) a device was added with !mr->romd_mode, therefore effectively not creating a kvm slot as we want to trap every access (add = false). 2) mr->romd_mode was toggled on before remove it. There is now

[Qemu-devel] [PULL 12/32] memory: Cleanup after switching to FlatView

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy We store AddressSpaceDispatch* in FlatView anyway so there is no need to carry it from mem_add() to register_subpage/register_multipage. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-8-...@ozlabs.ru> Si

[Qemu-devel] [PULL 04/32] atomic: update documentation

2017-09-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- docs/devel/atomics.txt | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/devel/atomics.txt b/docs/devel/atomics.txt index 3ef5d85..048e5f2 100644 --- a/docs/devel/atomics.txt +++ b/docs/devel/atomics.txt @@ -63,11 +63,22 @@ ope

[Qemu-devel] [PULL 05/32] memory: avoid "resurrection" of dead FlatViews

2017-09-21 Thread Paolo Bonzini
It's possible for address_space_get_flatview() as it currently stands to cause a use-after-free for the returned FlatView, if the reference count is incremented after the FlatView has been replaced by a writer: thread 1 thread 2 RCU thread -

[Qemu-devel] [PULL 10/32] memory: Remove AddressSpace pointer from AddressSpaceDispatch

2017-09-21 Thread Paolo Bonzini
From: 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. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-6-...@ozlabs.ru> S

[Qemu-devel] [PULL 12/18] bitmap: provide to_le/from_le helpers

2017-09-21 Thread Juan Quintela
From: Peter Xu Provide helpers to convert bitmaps to little endian format. It can be used when we want to send one bitmap via network to some other hosts. One thing to mention is that, these helpers only solve the problem of endianess, but it does not solve the problem of different word size on

[Qemu-devel] [PULL 11/18] bitmap: introduce bitmap_count_one()

2017-09-21 Thread Juan Quintela
From: Peter Xu Count how many bits set in the bitmap. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- include/qemu/bitmap.h | 10 ++ util/bitmap.c | 15 +++ 2 files changed, 25 insertions(+)

[Qemu-devel] [PULL 06/32] exec: Explicitly export target AS from address_space_translate_internal

2017-09-21 Thread Paolo Bonzini
From: Alexey Kardashevskiy This adds an AS** parameter to address_space_do_translate() to make it easier for the next patch to share FlatViews. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy Message-Id: <20170921085110.25598-2-...@ozlabs.ru> Signed-off-by: Paolo B

[Qemu-devel] [PULL 16/18] migration: pass MigrationIncomingState* into migration check functions

2017-09-21 Thread Juan Quintela
From: Alexey Perevalov That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it. Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migra

[Qemu-devel] [PULL 01/32] virtio-serial: add enable_backend callback

2017-09-21 Thread Paolo Bonzini
From: Pavel Butsykin 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 RAM on source side will not be modified as this could lead to non-co

[Qemu-devel] [PULL 00/32] Misc changes for 2017-09-22

2017-09-21 Thread Paolo Bonzini
The following changes since commit b62b7ed0fc9c58e373b8946c9bd2e193be98dae6: Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2017-09-20 20:33:48 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

[Qemu-devel] [PULL 09/18] migration: Split migration_fd_process_incoming

2017-09-21 Thread Juan Quintela
We need that on later patches. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Daniel P. Berrange --- migration/migration.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration

[Qemu-devel] [PULL 15/18] migration: split common postcopy out of ram postcopy

2017-09-21 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Split common postcopy staff from ram postcopy staff. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.c | 39 ++--

[Qemu-devel] [PULL 13/18] migration: add has_postcopy savevm handler

2017-09-21 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Now postcopy-able states are recognized by not NULL save_live_complete_postcopy handler. But when we have several different postcopy-able states, it is not convenient. Ram postcopy may be disabled, while some other postcopy enabled, in this case Ram state should

[Qemu-devel] [PULL 14/18] migration: fix ram_save_pending

2017-09-21 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Fill postcopy-able pending only if ram postcopy is enabled. It is necessary because of there will be other postcopy-able states and when ram postcopy is disabled, it should not spoil common postcopy related pending. Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-devel] [PULL 18/18] migration: split ufd_version_check onto receive/request features part

2017-09-21 Thread Juan Quintela
From: Alexey Perevalov This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch. QEMU have to use separate userfault file descriptor, due to

[Qemu-devel] [PULL 07/18] migration: Create x-multifd-page-count parameter

2017-09-21 Thread Juan Quintela
Indicates how many pages we are going to send in each batch to a multifd thread. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu -- Be consistent with defaults and documentation Use new DEFINE_PROP_* Rename x-multifd-group to x-multifd-page-count --- hm

[Qemu-devel] [PULL 10/18] bitmap: remove BITOP_WORD()

2017-09-21 Thread Juan Quintela
From: Peter Xu We have BIT_WORD(). It's the same. Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- util/bitops.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/bitops.c b/util/bitops.c index b0c35dd5f1..f2364015c4 100644 ---

[Qemu-devel] [PULL 17/18] migration: fix hardcoded function name in error report

2017-09-21 Thread Juan Quintela
From: Alexey Perevalov Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Signed-off-by: Juan Quintela --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ra

[Qemu-devel] [PULL 06/18] migration: Create x-multifd-channels parameter

2017-09-21 Thread Juan Quintela
Indicates the number of channels that we will create. By default we create 2 channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu -- Catch inconsistent defaults (eric). Improve comment stating that number of threads is the same than number of socke

[Qemu-devel] [PULL 02/18] migration: Teach it about G_SOURCE_REMOVE

2017-09-21 Thread Juan Quintela
As this is defined on glib 2.32, add compatibility macros for older glibs. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrange Reviewed-by: Peter Xu --- include/glib-compat.h | 2 ++ migration/exec.c | 2 +- migration/fd.c| 2 +- migration/socket.c| 2 +- 4 files chan

[Qemu-devel] [PULL 05/18] migration: Add multifd capability

2017-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Daniel P. Berrange -- Use new DEFINE_PROP --- migration/migration.c | 10 ++ migration/migration.h | 1 + qapi/migration.json | 4 +++- 3 files changed, 14 insertions(+), 1 deletio

[Qemu-devel] [PULL 03/18] migration: Add comments to channel functions

2017-09-21 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrange --- migration/channel.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/migration/channel.c b/migration/channel.c index edceebdb7b..70ec7ea3b7 100644 --- a/migration/channel.c +++ b/migration/channel.c @@ -19,6 +19

[Qemu-devel] [PULL 08/18] migration: Create multifd migration threads

2017-09-21 Thread Juan Quintela
Creation of the threads, nothing inside yet. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert -- Use pointers instead of long array names Move to use semaphores instead of conditions as paolo suggestion Put all the state inside one struct. Use a counter for the number of threa

[Qemu-devel] [PULL 01/18] migration: Create migration_ioc_process_incoming()

2017-09-21 Thread Juan Quintela
We pass the ioc instead of the fd. This will allow us to have more than one channel open. We also make sure that we set the from_src_file sooner, so we don't need to pass it as a parameter. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrange -- Do not assing mis->from_src_file (pete

[Qemu-devel] [PULL 04/18] migration: Create migration_has_all_channels

2017-09-21 Thread Juan Quintela
This function allows us to decide when to close the listener socket. For now, we only need one connection. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrange --- migration/migration.c | 11 +++ migration/migration.h | 2 ++ migration/socket.c| 10 +++--- 3 files chang

Re: [Qemu-devel] [RFC v1 1/2] machine: Add a valid_cpu_types property

2017-09-21 Thread Alistair Francis
On Sat, Sep 9, 2017 at 1:16 PM, Eduardo Habkost wrote: > On Tue, Sep 05, 2017 at 05:12:01PM -0700, Alistair Francis wrote: >> Signed-off-by: Alistair Francis >> --- >> >> hw/core/machine.c | 27 +++ >> include/hw/boards.h | 1 + >> 2 files changed, 28 insertions(+) >>

[Qemu-devel] [PULL 00/18] Migration PULL request

2017-09-21 Thread Juan Quintela
ff5667ed53c544c4dc88dcd7cb23cc509c9a55e0: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2017-09-21 10:56:09 +0100) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20170921 for you to fetch cha

Re: [Qemu-devel] [RFC v1 2/2] netduino2: Specify the valid CPUs

2017-09-21 Thread Alistair Francis
On Mon, Sep 11, 2017 at 4:56 AM, KONRAD Frederic wrote: > > > On 09/06/2017 02:12 AM, Alistair Francis wrote: >> >> Signed-off-by: Alistair Francis >> --- >> >> hw/arm/netduino2.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c >> index

Re: [Qemu-devel] [PATCH qemu v5 16/18] memory: Get rid of address_space_init_shareable

2017-09-21 Thread Paolo Bonzini
On 21/09/2017 10:51, Alexey Kardashevskiy wrote: > Since FlatViews are shared now and ASes not, this gets rid of > address_space_init_shareable(). > > This should cause no behavioural change. > > Signed-off-by: Alexey Kardashevskiy > --- > Changes: > v3: > * now removes @malloced and @ref_count,

[Qemu-devel] [PATCH v1] s390x/kvm: fix and cleanup storing CPU status

2017-09-21 Thread David Hildenbrand
env->psa is a 64bit value, while we copy 4 bytes into the save area, resulting always in 0 getting stored. Let's try to reduce such errors by using a proper structure. While at it, use correct cpu->be conversion (and get_psw_mask()), as we will be reusing this code for TCG soon. Signed-off-by: Da

Re: [Qemu-devel] [PATCH v2] docs/devel/loads-stores.rst: Document our various load and store APIs

2017-09-21 Thread Peter Maydell
On 21 September 2017 at 20:17, Eric Blake wrote: > On 09/21/2017 12:29 PM, Peter Maydell wrote: >> QEMU has a wide selection of different functions for doing >> loads and stores; provide some overview documentation of >> what they do and how to pick which one to use. >> >> Signed-off-by: Peter May

Re: [Qemu-devel] [PATCH 1/1] s390x/ais: for 2.10 stable: disable ais facility

2017-09-21 Thread Michael Roth
Quoting Michael Roth (2017-09-21 11:50:28) > Quoting Cornelia Huck (2017-09-21 10:21:42) > > On Thu, 21 Sep 2017 17:14:46 +0200 > > Christian Borntraeger wrote: > > > > > The migration interface for ais was introduced with kernel 4.13 > > > but the capability itself had been active since 4.12. As

Re: [Qemu-devel] [RFC v2 10/33] migration: allow dst vm pause on postcopy

2017-09-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > When there is IO error on the incoming channel (e.g., network down), > instead of bailing out immediately, we allow the dst vm to switch to the > new POSTCOPY_PAUSE state. Currently it is still simple - it waits the > new semaphore, until someone poke it for

Re: [Qemu-devel] [RFC v2 09/33] migration: implement "postcopy-pause" src logic

2017-09-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Now when network down for postcopy, the source side will not fail the > migration. Instead we convert the status into this new paused state, and > we will try to wait for a rescue in the future. > > If a recovery is detected, migration_thread() will reset it

Re: [Qemu-devel] [PATCH v2] docs/devel/loads-stores.rst: Document our various load and store APIs

2017-09-21 Thread Eric Blake
On 09/21/2017 12:29 PM, Peter Maydell wrote: > QEMU has a wide selection of different functions for doing > loads and stores; provide some overview documentation of > what they do and how to pick which one to use. > > Signed-off-by: Peter Maydell > --- > Changes v1->v2: filled in most of the gaps

Re: [Qemu-devel] [RFC PATCH] qdev: Mark devices as non-hotpluggable by default

2017-09-21 Thread Eduardo Habkost
On Tue, Sep 19, 2017 at 10:55:53AM +0200, Thomas Huth wrote: > Historically we've marked all devices as hotpluggable by default. However, > most devices are not hotpluggable, and you also need a HotplugHandler to > support these devices. So if the user tries to "device_add" or "device_del" > such a

Re: [Qemu-devel] [PATCH] hw/core/qdev: Do not allow hot-plugging without hotplug controller

2017-09-21 Thread Thomas Huth
On 21.09.2017 19:56, Eduardo Habkost wrote: > On Thu, Sep 07, 2017 at 11:22:42AM +0200, Thomas Huth wrote: >> qdev_unplug() bails out with an assertion if the user tries to device_del >> a hot-plugged device that does not have a hotplug controller. Unfortunately, >> our devices are all marked with

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] qcow2: truncate the tail of the image file after shrinking the image

2017-09-21 Thread Eric Blake
On 09/21/2017 11:48 AM, John Snow wrote: >>> Looks sane to me, but under which circumstances might we grow such a >>> tail? I assume the actual truncate call aligns to cluster boundaries as >>> appropriate, so is this a bit of a "quick fix" to cull unused clusters >>> that happened to be near the t

[Qemu-devel] [PATCH v4 2/5] s390x/css: use ccw data stream

2017-09-21 Thread Halil Pasic
Replace direct access which implicitly assumes no IDA or MIDA with the new ccw data stream interface which should cope with these transparently in the future. Signed-off-by: Halil Pasic Reviewed-by: Dong Jia Shi Reviewed-by: Pierre Morel --- hw/s390x/css.c | 9 + 1 file changed, 5 inser

[Qemu-devel] [PATCH v4 1/5] s390x/css: introduce css data stream

2017-09-21 Thread Halil Pasic
This is a preparation for introducing handling for indirect data addressing and modified indirect data addressing (CCW). Here we introduce an interface which should make the addressing scheme transparent for the client code. Here we implement only the basic scheme (no IDA or MIDA). Signed-off-by:

Re: [Qemu-devel] [PATCH] hw/pci-bridge/pcie_pci_bridge: properly handle MSI unavailability case

2017-09-21 Thread Aleksandr Bezzubikov
2017-09-21 13:16 GMT+03:00 Marcel Apfelbaum : > Hi Aleksandr, > > On 21/09/2017 0:21, Aleksandr Bezzubikov wrote: >> >> Signed-off-by: Aleksandr Bezzubikov >> --- >> hw/pci-bridge/pcie_pci_bridge.c | 24 ++-- >> 1 file changed, 18 insertions(+), 6 deletions(-) >> > > Please

[Qemu-devel] [PATCH v4 5/5] s390x/css: support ccw IDA

2017-09-21 Thread Halil Pasic
Let's add indirect data addressing support for our virtual channel subsystem. This implementation does not bother with any kind of prefetching. We simply step through the IDAL on demand. Signed-off-by: Halil Pasic --- hw/s390x/css.c | 114 -

[Qemu-devel] [PATCH v4 4/5] 390x/css: introduce maximum data address checking

2017-09-21 Thread Halil Pasic
The architecture mandates the addresses to be accessed on the first indirection level (that is, the data addresses without IDA, and the (M)IDAW addresses with (M)IDA) to be checked against an CCW format dependent limit maximum address. If a violation is detected, the storage access is not to be pe

[Qemu-devel] [PATCH v4 0/5] add CCW indirect data access support

2017-09-21 Thread Halil Pasic
Abstract The objective of this series is introducing CCW IDA (indirect data access) support to our virtual channel subsystem implementation. Briefly CCW IDA can be thought of as a kind of a scatter gather support for a single CCW. If certain flags are set, the cda is to be interpreted as

[Qemu-devel] [PATCH v4 3/5] virtio-ccw: use ccw data stream

2017-09-21 Thread Halil Pasic
Replace direct access which implicitly assumes no IDA or MIDA with the new ccw data stream interface which should cope with these transparently in the future. Signed-off-by: Halil Pasic Reviewed-by: Pierre Morel Reviewed-by: Dong Jia Shi --- hw/s390x/virtio-ccw.c | 155 +++--

Re: [Qemu-devel] [RFC v2 08/33] migration: new postcopy-pause state

2017-09-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Introducing a new state "postcopy-paused", which can be used when the > postcopy migration is paused. It is targeted for postcopy network > failure recovery. > > Signed-off-by: Peter Xu > --- > migration/migration.c | 2 ++ > qapi-schema.json | 5

  1   2   3   4   >