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

2017-09-21 Thread Cornelia Huck
On Thu, 21 Sep 2017 08:50:36 +0800 Dong Jia Shi wrote: > * Halil Pasic [2017-09-20 18:46:57 +0200]: > > Thinking about this some more. Since in case of IDA we are guaranteed > > to never cross a block boundary with a single IDAW we won't ever cross > > block boundary. So we can do the check in

Re: [Qemu-devel] [PATCH v10 01/10] userfault: update kernel header for UFFD_FEATURE_*

2017-09-21 Thread Alexey Perevalov
On 09/20/2017 09:43 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This commit adds modification for UFFD_FEATURE_SIGBUS and UFFD_FEATURE_THREAD_ID. Signed-off-by: Alexey Perevalov This should be replaced with just running the scripts/update-linux-he

Re: [Qemu-devel] [PATCH qemu v4 18/18] memory: Give memory_region_transaction_commit a hint

2017-09-21 Thread Paolo Bonzini
- Original Message - > From: "Alexey Kardashevskiy" > To: "Paolo Bonzini" , qemu-devel@nongnu.org > Sent: Thursday, September 21, 2017 2:02:02 AM > Subject: Re: [PATCH qemu v4 18/18] memory: Give > memory_region_transaction_commit a hint > > On 21/09/17 03:14, Paolo Bonzini wrote: > >

Re: [Qemu-devel] block ais migration for machines <= 2.9

2017-09-21 Thread Christian Borntraeger
On 09/20/2017 06:04 PM, Dr. David Alan Gilbert wrote: > * Christian Borntraeger (borntrae...@de.ibm.com) wrote: >> Something like the following seems to do the tricks. >> Needs proper patch description, review, full test with different kernel >> versions. > > Without knowing anything about 'a

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

2017-09-21 Thread Igor Mammedov
On Thu, 21 Sep 2017 08:04:55 +0200 Cédric Le Goater wrote: > On 09/21/2017 05:54 AM, Nikunj A Dadhania wrote: > > David Gibson writes: > > > >> On Wed, Sep 20, 2017 at 12:48:55PM +0530, Nikunj A Dadhania wrote: > >>> David Gibson writes: > >>> > On Wed, Sep 20, 2017 at 12:10:48PM +0

Re: [Qemu-devel] [PATCH v3 0/3] nbd client refactoring and fixing

2017-09-21 Thread Vladimir Sementsov-Ogievskiy
20.09.2017 20:22, Eric Blake wrote: On 09/20/2017 07:45 AM, Vladimir Sementsov-Ogievskiy wrote: v3: dropped all controversial things. I'll try to implement minimal structured reply and block status over this small residue. Vladimir Sementsov-Ogievskiy (3): block/nbd-client: refactor nbd_co_r

[Qemu-devel] [PULL] qemu-sparc updates

2017-09-21 Thread Mark Cave-Ayland
Hi Peter, This contains the code for the new Sun HME (Happy Meal Ethernet) card and switches the sun4u machine over to use it as the default. Please pull. ATB, Mark. The following changes since commit b62b7ed0fc9c58e373b8946c9bd2e193be98dae6: Merge remote-tracking branch 'remotes/gkurz/ta

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

2017-09-21 Thread Igor Mammedov
On Thu, 21 Sep 2017 12:19:17 +0800 Dou Liyang wrote: > Hi Igor, > > I am sorry I missed some comments you gave to me. > > my reply is below. > At 09/18/2017 05:24 PM, Dou Liyang wrote: > [...] > >>> ranges where > >>> *the guest will attempt to probe for a device that QEMU doesn't > >>>

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

2017-09-21 Thread Igor Mammedov
On Wed, 20 Sep 2017 18:10:48 +0200 Thomas Huth wrote: > On 20.09.2017 13:17, Thomas Huth wrote: > > On 20.09.2017 12:57, Marcel Apfelbaum wrote: > >> On 20/09/2017 13:07, Peter Maydell wrote: > [...] > >>> Is it possible to hack together some kind of test code that > >>> can give us a list of

Re: [Qemu-devel] [PATCH] trivial: Add missing "-m" parameter in docs/memory-hotplug.txt

2017-09-21 Thread Igor Mammedov
On Tue, 19 Sep 2017 11:02:26 +0200 Thomas Huth wrote: > The example obviously lacks the "-m" parameter. > > Signed-off-by: Thomas Huth Reviewed-by: Igor Mammedov > --- > docs/memory-hotplug.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/docs/memory-hotplug.txt

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

2017-09-21 Thread Dou Liyang
Hi Igor, At 09/21/2017 03:54 PM, Igor Mammedov wrote: On Thu, 21 Sep 2017 12:19:17 +0800 [...] I've meant something like that: parse_numa_opts() { if (mc->auto_enable_numa_with_memhp == true) { qemu_opts_parse_noisily(qemu_find_opts("numa"), "node", true); } } Oops, Unde

Re: [Qemu-devel] [PATCH v3 0/3] Implement basic MSA functions

2017-09-21 Thread Cornelia Huck
On Wed, 20 Sep 2017 17:30:13 +0200 David Hildenbrand wrote: > Some leftover from "target/s390x: tcg improvments + MSA functions". > > Implement all basic MSA (cpacf/crypto) instructions <= z13. Only provide > the query subfunction (to query available subfunctions), no actual > de/encryption yet.

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

2017-09-21 Thread Dong Jia Shi
* Cornelia Huck [2017-09-07 10:08:17 +0200]: [...] > > I'm thinking of a method these days: > > Could passing through an fully emulated ccw device (e.g. 3270), or a > > virtio ccw device, in the level 1 kvm guest to a level 2 guest be a test > > method for this? > > > > All of the CCWs will be

[Qemu-devel] [PATCH qemu v5 03/18] memory: Move FlatView allocation to a helper

2017-09-21 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. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * s/flatview_alloc/flatview_new/ --- m

[Qemu-devel] [PATCH qemu v5 05/18] memory: Remove AddressSpace pointer from AddressSpaceDispatch

2017-09-21 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. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy --- exec.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-)

[Qemu-devel] [PATCH qemu v5 11/18] memory: Move address_space_update_ioeventfds

2017-09-21 Thread 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 --- memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/memory.c b/memory.c index eb730cd619..9868d0f57c 100644 --- a/memory.c +++ b/memo

[Qemu-devel] [PATCH qemu v5 06/18] memory: Switch memory from using AddressSpace to FlatView

2017-09-21 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 v5 08/18] memory: Rename mem_begin/mem_commit/mem_add helpers

2017-09-21 Thread Alexey Kardashevskiy
This renames some helpers to reflect better what they do. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy --- Changes: v3: * s/flatview_mem_add/flatview_add_to_dispatch/ * s/phys_page_compact_all/address_space_dispatch_compact/ * s/address_space_dispatch_alloc/addres

[Qemu-devel] [PATCH qemu v5 02/18] memory: Open code FlatView rendering

2017-09-21 Thread 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_topology_pass() if there is no re

[Qemu-devel] [PATCH qemu v5 13/18] memory: Do not allocate FlatView in address_space_init

2017-09-21 Thread 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 --- I do not really want to add view!=NULL into flatview_ref()/flatview_unref() as this is quite special case when view==NULL. --- memory.c

[Qemu-devel] [PATCH qemu v5 04/18] memory: Move AddressSpaceDispatch from AddressSpace to FlatView

2017-09-21 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] [PATCH qemu v5 07/18] memory: Cleanup after switching to FlatView

2017-09-21 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. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy --- exec.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[Qemu-devel] [PATCH qemu v5 00/18] memory: Store physical root MR in FlatView

2017-09-21 Thread Alexey Kardashevskiy
This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593 Previous versions: v1: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg01559.html v2: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04069.html v3: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg0

[Qemu-devel] [PATCH qemu v5 10/18] memory: Alloc dispatch tree where topology is generared

2017-09-21 Thread Alexey Kardashevskiy
This is to make next patches simpler. Signed-off-by: Alexey Kardashevskiy --- memory.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/memory.c b/memory.c index 98b0b95e6e..eb730cd619 100644 --- a/memory.c +++ b/memory.c @@ -742,6 +742,7 @@ static MemoryReg

[Qemu-devel] [PATCH qemu v5 09/18] memory: Store physical root MR in FlatView

2017-09-21 Thread 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 --- Changes: v4: * s/memory_region_unalias_entire/memory_region_get_flatview_root

[Qemu-devel] [PATCH qemu v5 12/18] memory: Share FlatView's and dispatch trees between address spaces

2017-09-21 Thread 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 duplicates from address_space_

[Qemu-devel] [PATCH qemu v5 18/18] memory: Avoid temporary FlatView allocation in a single child case

2017-09-21 Thread Alexey Kardashevskiy
The root MR may be enabled but the only child may be not (this is the case for the PCI bus master address space) so check this and avoid allocating temporary FV if that nested MR is not enabled. This does not make any difference though. Signed-off-by: Alexey Kardashevskiy --- memory.c | 5 +

[Qemu-devel] [PATCH qemu v5 14/18] memory: Rework "info mtree" to print flat views and dispatch trees

2017-09-21 Thread 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 --- Changes: v3: * reimplemented as there is no more global FlatView list --- Example

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

2017-09-21 Thread 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 --- Changes: v3: * now removes @malloced and @ref_count, used to be in the previos patch --- include/exec/memory.h | 19 --

[Qemu-devel] [PATCH qemu v5 01/18] exec: Explicitly export target AS from address_space_translate_internal

2017-09-21 Thread 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 --- exec.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/exec.c b/e

[Qemu-devel] [PATCH qemu v5 17/18] memory: Create FlatView directly

2017-09-21 Thread 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 (~80 -> ~64) and amount of

[Qemu-devel] [PATCH qemu v5 15/18] memory: Share special empty FlatView

2017-09-21 Thread 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 API intact; it also has a di

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

2017-09-21 Thread Cornelia Huck
On Thu, 21 Sep 2017 16:45:47 +0800 Dong Jia Shi wrote: > * Cornelia Huck [2017-09-07 10:08:17 +0200]: > > [...] > > > > I'm thinking of a method these days: > > > Could passing through an fully emulated ccw device (e.g. 3270), or a > > > virtio ccw device, in the level 1 kvm guest to a level 2

Re: [Qemu-devel] [PATCH 1/2] s390x/3270: IDA support for 3270 via CcwDataStream

2017-09-21 Thread Cornelia Huck
On Wed, 20 Sep 2017 19:23:13 +0200 Halil Pasic wrote: > Let us convert the 3270 code so it uses the recently introduced > CcwDataStream abstraction instead of blindly assuming direct data access. > > This patch does not change behavior beyond introducing IDA support: for > direct data access CCW

Re: [Qemu-devel] [PATCH qemu v4 2/3] vfio/spapr: Add a notifier for PPC64 HV/PR KVM about new group attached to LIOBN

2017-09-21 Thread Alexey Kardashevskiy
On 28/08/17 14:20, Alexey Kardashevskiy wrote: > On 25/08/17 16:21, David Gibson wrote: >> On Thu, Jul 20, 2017 at 05:22:30PM +1000, Alexey Kardashevskiy wrote: >>> This implements a notification for a new IOMMU group attached to >>> sPAPR's logical IO bus (LIOBN) to enable in-kernel TCE accelerati

Re: [Qemu-devel] [Bug 1706296] Re: Booting NT 4 disk causes /home/rjones/d/qemu/cpus.c:1580:qemu_mutex_lock_iothread: assertion failed: (!qemu_mutex_iothread_locked())

2017-09-21 Thread Peter Maydell
On 18 August 2017 at 11:33, Peter Maydell wrote: > On 18 August 2017 at 11:23, Alex Bennée wrote: >> Peter Maydell writes: >>> On 18 August 2017 at 09:40, Alex Bennée wrote: It might be related. The assertion error is caused by the fact an exception has occurred and processor is tryin

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

2017-09-21 Thread Dou Liyang
Linux and Windows need ACPI SRAT table to make memory hotplug work properly, however currently QEMU doesn't create SRAT table if numa options aren't present on CLI. Which breaks both linux and windows guests in certain conditions: * Windows: won't enable memory hotplug without SRAT table at all

Re: [Qemu-devel] [PATCH 2/2] s390x/3270: handle writes of arbitrary length

2017-09-21 Thread Cornelia Huck
On Wed, 20 Sep 2017 19:23:14 +0200 Halil Pasic wrote: > The problem is, that the current implementation places unrealistic and > arbitrary constraints on the length of writes to the device (that is the > outbound requests), by asserting ccw.count being such that that even the > worst case escaped

Re: [Qemu-devel] [PATCH 0/2] 3270 improvements

2017-09-21 Thread Cornelia Huck
On Wed, 20 Sep 2017 19:23:12 +0200 Halil Pasic wrote: > Jason found some problems with 3270 which he traced down to insufficient > output buffer size. I've looked into the underlying issue (and the > relevant code) and I saw strange things. Among others an unreasonable > assert requiring the payl

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

2017-09-21 Thread Pierre Morel
On 05/09/2017 13:16, Halil Pasic wrote: 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 --- hw/s390x/css.c | 5 +++-- 1 file changed, 3 insertions(+), 2 d

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

2017-09-21 Thread Pierre Morel
On 21/09/2017 11:33, Pierre Morel wrote: On 05/09/2017 13:16, Halil Pasic wrote: 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 ---   hw/s390x/css.c | 5 ++

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

2017-09-21 Thread Pierre Morel
On 19/09/2017 20:27, Halil Pasic wrote: 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/c

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

2017-09-21 Thread Pierre Morel
On 19/09/2017 20:27, Halil Pasic wrote: 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 --- hw/s390x/virtio-ccw.c | 157 +

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

2017-09-21 Thread Cornelia Huck
On Thu, 21 Sep 2017 11:33:03 +0200 Pierre Morel wrote: > On 05/09/2017 13:16, Halil Pasic wrote: > > 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

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

2017-09-21 Thread Pavel Butsykin
On 21.09.2017 00:38, John Snow wrote: On 09/20/2017 09:58 AM, Pavel Butsykin wrote: Now after shrinking the image, at the end of the image file, there might be a tail that probably will never be used. So we can find the last used cluster and cut the tail. Signed-off-by: Pavel Butsykin ---

Re: [Qemu-devel] [PATCH v3 0/7] Update websocket code to more fully support the RFC

2017-09-21 Thread Daniel P. Berrange
On Wed, Sep 20, 2017 at 09:56:07AM -0700, Brandon Carpenter wrote: > How are things looking, Daniel. I believe every comment from the previous > version of the series was addressed. > > I also wanted to mention that I put together a Python script, which acts as > a proxy between noVNC and qemu, an

Re: [Qemu-devel] [PULL 0/2] xen-20170920-tag

2017-09-21 Thread Peter Maydell
On 21 September 2017 at 03:21, Stefano Stabellini wrote: > 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: > > >

Re: [Qemu-devel] [PATCH] tcg/tci: do not use ldst label (never implemented)

2017-09-21 Thread Thomas Huth
On 12.09.2017 17:13, Paolo Bonzini wrote: > On 12/09/2017 16:56, Thomas Huth wrote: >> The problem is that the SLOF firmware just performs very badly with TCG >> (it's fine on real hardware). It executes a lot of Forth code, and the >> Forth interpreter uses things like computed gotos or other tric

Re: [Qemu-devel] [PATCH qemu v5 00/18] memory: Store physical root MR in FlatView

2017-09-21 Thread Paolo Bonzini
On 21/09/2017 10:50, Alexey Kardashevskiy wrote: > This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593 > Previous versions: > v1: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg01559.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04069.html > v3:

Re: [Qemu-devel] [PATCH] virtio/vhost: reset dev->log after syncing

2017-09-21 Thread Marc-André Lureau
- Original Message - > vhost_log_put() is called to decomission the dirty log between qemu and > a vhost device when stopping the device. Such a call can happen from > migration_completion(). > > Present code sets dev->log_size to zero too early in vhost_log_put(), > causing the sync che

[Qemu-devel] [PATCH] memory: avoid a name clash with access macro

2017-09-21 Thread 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] [PATCH] io: add trace events for websockets frame handling

2017-09-21 Thread Daniel P. Berrange
It is useful to trace websockets frame encoding/decoding when debugging problems. Signed-off-by: Daniel P. Berrange --- io/channel-websock.c | 23 ++- io/trace-events | 5 + 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/io/channel-websock.c b/io/ch

Re: [Qemu-devel] [PATCH qemu v5 00/18] memory: Store physical root MR in FlatView

2017-09-21 Thread Alexey Kardashevskiy
On 21/09/17 20:03, Paolo Bonzini wrote: > On 21/09/2017 10:50, Alexey Kardashevskiy wrote: >> This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593 >> Previous versions: >> v1: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg01559.html >> v2: https://lists.gnu.org/archiv

Re: [Qemu-devel] [PATCH v10 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-09-21 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, > in case when this feature is provided by kernel. > > PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, > due to it's postcopy only feature. > Also it defines Po

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

2017-09-21 Thread 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 add Eduardo's Reported-by tag and the actual failure in the commit m

Re: [Qemu-devel] [PATCH 0/2] 3270 improvements

2017-09-21 Thread Halil Pasic
On 09/21/2017 11:24 AM, Cornelia Huck wrote: > On Wed, 20 Sep 2017 19:23:12 +0200 > Halil Pasic wrote: > >> Jason found some problems with 3270 which he traced down to insufficient >> output buffer size. I've looked into the underlying issue (and the >> relevant code) and I saw strange things.

Re: [Qemu-devel] [PATCH 2/2] s390x/3270: handle writes of arbitrary length

2017-09-21 Thread Halil Pasic
On 09/21/2017 11:23 AM, Cornelia Huck wrote: > On Wed, 20 Sep 2017 19:23:14 +0200 > Halil Pasic wrote: > >> The problem is, that the current implementation places unrealistic and >> arbitrary constraints on the length of writes to the device (that is the >> outbound requests), by asserting ccw.

Re: [Qemu-devel] [PATCH v1] kvm: drop wrong assertion creating problems with pflash

2017-09-21 Thread Paolo Bonzini
On 21/09/2017 08:49, Gerd Hoffmann wrote: > On Wed, 2017-09-20 at 16:50 +0200, David Hildenbrand wrote: >> 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

Re: [Qemu-devel] [PATCH v8 02/13] qemu.py: avoid writing to stdout/stderr

2017-09-21 Thread Kevin Wolf
Am 01.09.2017 um 13:28 hat Amador Pahim geschrieben: > This module should not write directly to stdout/stderr. Instead, it > should either raise exceptions or just log the messages and let the > callers handle them and decide what to do. For example, scripts could > choose to send the log messages

Re: [Qemu-devel] [PATCH 0/2] 3270 improvements

2017-09-21 Thread Cornelia Huck
On Thu, 21 Sep 2017 12:22:30 +0200 Halil Pasic wrote: > On 09/21/2017 11:24 AM, Cornelia Huck wrote: > > On Wed, 20 Sep 2017 19:23:12 +0200 > > Halil Pasic wrote: > > > >> Jason found some problems with 3270 which he traced down to insufficient > >> output buffer size. I've looked into the un

[Qemu-devel] [PATCH] s390x: use generic cpu_model parsing

2017-09-21 Thread Igor Mammedov
define default CPU type in generic way in machine class_init and let common machine code to handle cpu_model parsing. Signed-off-by: Igor Mammedov --- tested under TCG booting debian kernel, and compile tested on s390 host CC: Cornelia Huck CC: Christian Borntraeger CC: Alexander Graf CC: Ric

Re: [Qemu-devel] [PATCH 0/2] 3270 improvements

2017-09-21 Thread Halil Pasic
On 09/21/2017 12:48 PM, Cornelia Huck wrote: > On Thu, 21 Sep 2017 12:22:30 +0200 > Halil Pasic wrote: > >> On 09/21/2017 11:24 AM, Cornelia Huck wrote: >>> On Wed, 20 Sep 2017 19:23:12 +0200 >>> Halil Pasic wrote: >>> Jason found some problems with 3270 which he traced down to insuffi

[Qemu-devel] [PATCH] accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)

2017-09-21 Thread Alex Bennée
The mmio path (see exec.c:prepare_mmio_access) already protects itself against recursive locking and it makes sense to do the same for io_readx/writex. Otherwise any helper running in the BQL context will assert when it attempts to write to device memory as in the case of the bug report. Signed-of

Re: [Qemu-devel] [PATCH] accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)

2017-09-21 Thread Peter Maydell
On 21 September 2017 at 12:06, Alex Bennée wrote: > The mmio path (see exec.c:prepare_mmio_access) already protects itself > against recursive locking and it makes sense to do the same for > io_readx/writex. Otherwise any helper running in the BQL context will > assert when it attempts to write to

Re: [Qemu-devel] [PATCH] s390x: use generic cpu_model parsing

2017-09-21 Thread Cornelia Huck
On Thu, 21 Sep 2017 12:53:54 +0200 Igor Mammedov wrote: cc: David > define default CPU type in generic way in machine class_init > and let common machine code to handle cpu_model parsing. > > Signed-off-by: Igor Mammedov > --- > tested under TCG booting debian kernel, > and compile tested on s

Re: [Qemu-devel] [RFC PATCH v2 18/21] ppc/xive: add device tree support

2017-09-21 Thread Cédric Le Goater
On 09/21/2017 03:35 AM, David Gibson wrote: > On Wed, Sep 20, 2017 at 02:26:32PM +0200, Cédric Le Goater wrote: >> On 09/19/2017 10:44 AM, David Gibson wrote: >>> On Mon, Sep 11, 2017 at 07:12:32PM +0200, Cédric Le Goater wrote: Like for XICS, the XIVE interface for the guest is described in t

Re: [Qemu-devel] [PATCH 1/2] s390x/3270: IDA support for 3270 via CcwDataStream

2017-09-21 Thread Halil Pasic
On 09/21/2017 11:15 AM, Cornelia Huck wrote: >> +static inline CcwDataStream *get_cds(Terminal3270 *t) >> +{ >> +return &(CCW_DEVICE(&t->cdev)->sch->cds); >> +} >> + >> +static int read_payload_3270(EmulatedCcw3270Device *dev) >> { >> Terminal3270 *t = TERMINAL_3270(dev); >> int le

Re: [Qemu-devel] [PATCH v10 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-09-21 Thread Alexey Perevalov
On 09/21/2017 01:16 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due to i

Re: [Qemu-devel] [PATCH qemu v5 00/18] memory: Store physical root MR in FlatView

2017-09-21 Thread Paolo Bonzini
On 21/09/2017 12:11, Alexey Kardashevskiy wrote: > On 21/09/17 20:03, Paolo Bonzini wrote: >> On 21/09/2017 10:50, Alexey Kardashevskiy wrote: >>> This was inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1481593 >>> Previous versions: >>> v1: https://lists.gnu.org/archive/html/qemu-devel/20

Re: [Qemu-devel] [Qemu-block] [PATCH v5 1/6] qapi/qnull: Add own header

2017-09-21 Thread Alberto Garcia
On Sat 16 Sep 2017 08:51:18 PM CEST, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > include/qapi/qmp/qdict.h| 1 + > include/qapi/qmp/qnull.h| 30 ++ > include/qapi/qmp/qobject.h | 12 > include/qapi/qmp/types.h| 1 + > qapi/qapi-clone-

Re: [Qemu-devel] [Qemu-block] [PATCH v5 2/6] qapi/qlist: Add qlist_append_null() macro

2017-09-21 Thread Alberto Garcia
On Sat 16 Sep 2017 08:51:19 PM CEST, Max Reitz wrote: > Signed-off-by: Max Reitz > @@ -37,6 +38,8 @@ typedef struct QList { > qlist_append(qlist, qbool_from_bool(value)) > #define qlist_append_str(qlist, value) \ > qlist_append(qlist, qstring_from_str(value)) > +#define qlist_a

Re: [Qemu-devel] [PATCH qemu v5 04/18] memory: Move AddressSpaceDispatch from AddressSpace to FlatView

2017-09-21 Thread Paolo Bonzini
On 21/09/2017 10:50, Alexey Kardashevskiy wrote: > * since FlatView::rcu is used now to dispose FV, call_rcu() in > address_space_update_topology() is replaced with direct call to > flatview_unref() Hmm, this is not correct, as you could have thread 1 thread 2 RCU thre

Re: [Qemu-devel] [PATCH v10 07/10] migration: calculate vCPU blocktime on dst side

2017-09-21 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > This patch provides blocktime calculation per vCPU, > as a summary and as a overlapped value for all vCPUs. > > This approach was suggested by Peter Xu, as an improvements of > previous approch where QEMU kept tree with faulted page address and

Re: [Qemu-devel] [Qemu-block] [PATCH v5 3/6] qapi: Add qobject_is_equal()

2017-09-21 Thread Alberto Garcia
On Sat 16 Sep 2017 08:51:20 PM CEST, Max Reitz wrote: > This generic function (along with its implementations for different > types) determines whether two QObjects are equal. > +bool qnull_is_equal(const QObject *x, const QObject *y); > + You could almost make this one inline, but it doesn't rea

Re: [Qemu-devel] [PATCH v2 0/4] chardev: support non-default gcontext

2017-09-21 Thread Marc-André Lureau
On Thu, Sep 21, 2017 at 8:35 AM, Peter Xu wrote: > The old chardev may not fully support non-default GMainContext. One > direct clue is that when we call io_add_watch_poll() sometimes we are > still passing in the NULL context pointer. > > IIUC we are fine during setup since the context will be p

Re: [Qemu-devel] [PATCH 1/2] s390x/3270: IDA support for 3270 via CcwDataStream

2017-09-21 Thread Cornelia Huck
On Thu, 21 Sep 2017 13:22:44 +0200 Halil Pasic wrote: > On 09/21/2017 11:15 AM, Cornelia Huck wrote: > >> +static inline CcwDataStream *get_cds(Terminal3270 *t) > >> +{ > >> +return &(CCW_DEVICE(&t->cdev)->sch->cds); > >> +} > >> + > >> +static int read_payload_3270(EmulatedCcw3270Device *dev

[Qemu-devel] [patch 1/2] qemu: sync linux-headers with KVM

2017-09-21 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-fifoprio/linux-headers/linux/kvm.h === --- qemu-fifoprio.orig/linux-headers/linux/kvm.h +++ qemu-fifoprio/linux-headers/linux/kvm.h @@ -929,6 +929,7 @@ struct kvm_ppc_resize_hpt { #define K

[Qemu-devel] [PATCH 1/3] 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 402824c6f2..5ed4042f87

[Qemu-devel] [PATCH 3/3] 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 would render into a FV without memory sections, which happens when MR or its children are not enabled (or zero-sized, which isn't caught yet). The empty_view is not

[Qemu-devel] [PATCH 0/3] FlatView memory savings

2017-09-21 Thread Paolo Bonzini
This gets memory API consumption down to 4 FlatViews when non-virtio devices are in use. virtio still wastes memory due to the "modern_as". Alexey Kardashevskiy (1): memory: Share special empty FlatView Paolo Bonzini (2): memory: trace FlatView creation and destruction memory: seek FlatVie

[Qemu-devel] [patch 2/2] qemu: kvm: support RT_PRIO_HC hypercall

2017-09-21 Thread Marcelo Tosatti
Add the following CPU options: allow-rt-prio-hc: allow guest to execute hypercall to change vcpu thread priority. rt-prio: SCHED_FIFO priority to be used when that hypercall is invoked. See kernel patchset for details about this hypercall. Signed-off-by: Marcelo Tosatti --- target/i386/cpu.

Re: [Qemu-devel] [PATCH] memory: avoid a name clash with access macro

2017-09-21 Thread Paolo Bonzini
On 21/09/2017 12:04, KONRAD Frederic wrote: > 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: mac

[Qemu-devel] [PATCH 2/3] 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. While this does not reduce much the number of

[Qemu-devel] [PATCH 0/2] Add more trace points to VNC code

2017-09-21 Thread Daniel P. Berrange
Add many more trace points to the VNC server, removing a bunch of VNC_DEBUG lines where appropriate Daniel P. Berrange (2): ui: add tracing of VNC operations related to QIOChannel ui: add tracing of VNC authentication process ui/trace-events| 21 + ui/vnc-auth-sasl.c | 1

[Qemu-devel] [PATCH 1/2] ui: add tracing of VNC operations related to QIOChannel

2017-09-21 Thread Daniel P. Berrange
Trace anything which opens/closes/wraps a QIOChannel in the VNC server. Signed-off-by: Daniel P. Berrange --- ui/trace-events| 6 ++ ui/vnc-auth-vencrypt.c | 2 ++ ui/vnc-ws.c| 6 +++--- ui/vnc.c | 11 --- 4 files changed, 19 insertions(+), 6 dele

[Qemu-devel] [PATCH 2/2] ui: add tracing of VNC authentication process

2017-09-21 Thread Daniel P. Berrange
Trace anything related to authentication in the VNC protocol handshake Signed-off-by: Daniel P. Berrange --- ui/trace-events| 15 +++ ui/vnc-auth-sasl.c | 113 ++--- ui/vnc-auth-vencrypt.c | 21 - ui/vnc.c | 36

[Qemu-devel] [patch 0/2] support RT_PRIO_HC hypercall

2017-09-21 Thread Marcelo Tosatti
Add the following CPU options: allow-rt-prio-hc: allow guest to execute hypercall to change vcpu thread priority. rt-prio: SCHED_FIFO priority to be used when that hypercall is invoked. Signed-off-by: Marcelo Tosatti

[Qemu-devel] nbd structured reply

2017-09-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! I'm about this: "A server SHOULD try to minimize the number of chunks sent in a reply, but MUST NOT mark a chunk as final if there is still a possibility of detecting an error before transmission of that chunk completes" What do we mean by "possibility"? Formally, such possibility ex

Re: [Qemu-devel] [PATCH] io: add trace events for websockets frame handling

2017-09-21 Thread Stefan Hajnoczi
On Thu, Sep 21, 2017 at 11:05:29AM +0100, Daniel P. Berrange wrote: > It is useful to trace websockets frame encoding/decoding when debugging > problems. > > Signed-off-by: Daniel P. Berrange > --- > io/channel-websock.c | 23 ++- > io/trace-events | 5 + > 2 files

Re: [Qemu-devel] [PATCH v2] ide: fix enum comparison for gcc 4.7

2017-09-21 Thread Stefan Hajnoczi
On Wed, Sep 20, 2017 at 09:38:21PM -0400, John Snow wrote: > Apparently GCC gets bent over comparing enum values against zero. > Replace the conditional with something less readable. > > Tested-by: Mark Cave-Ayland > Signed-off-by: John Snow > > --- > > v2: Second verse, same as the first. > S

[Qemu-devel] [PATCH] migration: disable auto-converge during bulk block migration

2017-09-21 Thread Peter Lieven
auto-converge and block migration currently do not play well together. During block migration the auto-converge logic detects that ram migration makes no progress and thus throttles down the vm until it nearly stalls completely. Avoid this by disabling the throttling logic during the bulk phase of

Re: [Qemu-devel] need to resurrect no-lock option?

2017-09-21 Thread Stefan Hajnoczi
On Wed, Sep 20, 2017 at 11:26:11AM +0200, Christian Ehrhardt wrote: > Hi, > this might have been discussed in the wake of the lock changes that took > place in 2.10 but I can't find anything clear enough to follow in the > current case. > There was an old submission [1] by Fam to make it possible t

Re: [Qemu-devel] [PATCH v10 08/10] migration: postcopy_blocktime documentation

2017-09-21 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Alexey Perevalov Although it does have my R-b it might be worth adding some clarification that it's a measure of when *all* cpus are blocked and so isn't a total measure of impact of postc

Re: [Qemu-devel] [PATCH] s390x: use generic cpu_model parsing

2017-09-21 Thread David Hildenbrand
On 21.09.2017 12:53, Igor Mammedov wrote: > define default CPU type in generic way in machine class_init > and let common machine code to handle cpu_model parsing. > > Signed-off-by: Igor Mammedov > --- > tested under TCG booting debian kernel, > and compile tested on s390 host Hotplugging check

Re: [Qemu-devel] Block Migration and CPU throttling

2017-09-21 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > Am 19.09.2017 um 16:41 schrieb Dr. David Alan Gilbert: > > * Peter Lieven (p...@kamp.de) wrote: > >> Am 19.09.2017 um 16:38 schrieb Dr. David Alan Gilbert: > >>> * Peter Lieven (p...@kamp.de) wrote: > Hi, > > I just noticed that CPU throttling a

Re: [Qemu-devel] [PATCH v3 0/3] Implement basic MSA functions

2017-09-21 Thread David Hildenbrand
On 21.09.2017 10:23, Cornelia Huck wrote: > On Wed, 20 Sep 2017 17:30:13 +0200 > David Hildenbrand wrote: > >> Some leftover from "target/s390x: tcg improvments + MSA functions". >> >> Implement all basic MSA (cpacf/crypto) instructions <= z13. Only provide >> the query subfunction (to query avai

Re: [Qemu-devel] [PATCH v10 09/10] migration: add blocktime calculation into postcopy-test

2017-09-21 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > This patch just requests blocktime calculation, but doesn't > add any facility to check or show it. > > Signed-off-by: Alexey Perevalov > --- > tests/postcopy-test.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > di

Re: [Qemu-devel] [PATCH v10 10/10] migration: add postcopy total blocktime into query-migrate

2017-09-21 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > Postcopy total blocktime is available on destination side only. > But query-migrate was possible only for source. This patch > adds ability to call query-migrate on destination. > To be able to see postcopy blocktime, need to request postcopy-bl

Re: [Qemu-devel] Block Migration and CPU throttling

2017-09-21 Thread Peter Lieven
Am 21.09.2017 um 14:36 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Am 19.09.2017 um 16:41 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Am 19.09.2017 um 16:38 schrieb Dr. David Alan Gilbert: * Peter Lieven (p...@kamp.de) wrote: Hi, I just noti

Re: [Qemu-devel] need to resurrect no-lock option?

2017-09-21 Thread Daniel P. Berrange
On Thu, Sep 21, 2017 at 01:33:20PM +0100, Stefan Hajnoczi wrote: > On Wed, Sep 20, 2017 at 11:26:11AM +0200, Christian Ehrhardt wrote: > > Hi, > > this might have been discussed in the wake of the lock changes that took > > place in 2.10 but I can't find anything clear enough to follow in the > > c

  1   2   3   4   >