Re: [Qemu-devel] [PATCH 0/7] Provide support for the software TPM emulator

2017-04-05 Thread Amarnath Valluri
On 03.04.2017 20:07, Daniel P. Berrange wrote: On Fri, Mar 31, 2017 at 04:10:09PM +0300, Amarnath Valluri wrote: Briefly, Theses set of patches introduces: - new TPM backend driver to support software TPM emulators(swtpm(1)). - and few supported fixes/enhancements/cleanup to existing tpm b

Re: [Qemu-devel] [RFC] migration/block:limit the time used for block migration

2017-04-05 Thread 858585 jemmy
On Wed, Mar 29, 2017 at 9:21 PM, 858585 jemmy wrote: > On Tue, Mar 28, 2017 at 5:47 PM, Juan Quintela wrote: >> Lidong Chen wrote: >>> when migration with quick speed, mig_save_device_bulk invoke >>> bdrv_is_allocated too frequently, and cause vnc reponse slowly. >>> this patch limit the time us

Re: [Qemu-devel] [PATCH kernel v8 2/4] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER

2017-04-05 Thread Wang, Wei W
On Wednesday, April 5, 2017 12:31 PM, Wei Wang wrote: > On Wednesday, April 5, 2017 11:54 AM, Michael S. Tsirkin wrote: > > On Wed, Apr 05, 2017 at 03:31:36AM +, Wang, Wei W wrote: > > > On Thursday, March 16, 2017 3:09 PM Wei Wang wrote: > > > > The implementation of the current virtio-balloon

[Qemu-devel] [PATCH for-2.9] tco: do not generate an NMI

2017-04-05 Thread Paolo Bonzini
This behavior is not indicated in the datasheet and can confuse the OS. Signed-off-by: Paolo Bonzini --- hw/acpi/tco.c | 2 -- hw/isa/lpc_ich9.c | 5 - include/hw/i386/ich9.h | 1 - 3 files changed, 8 deletions(-) diff --git a/hw/acpi/tco.c b/hw/acpi/tco.c index b4adac8..05b9d

Re: [Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-04-05 Thread Richard W.M. Jones
On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote: > On 01/19/2017 08:38 AM, Eric Blake wrote: > > On 01/19/2017 03:25 AM, Markus Armbruster wrote: > >> Eric Blake writes: > >> > >>> Quite a few users of qdict_put() were manually wrapping a > >>> non-QObject. We can make such call-sites s

Re: [Qemu-devel] [PATCH] Put all trace.o into libqemuutil.a

2017-04-05 Thread Lluís Vilanova
Xu, Anthony writes: > Put all trace.o into libqemuutil.a > Currently all trace.o are linked into qemu-system, qemu-img, > qemu-nbd, qemu-io etc., even the corresponding components > are not included. > Put all trace.o into libqemuutil.a that the linker would only pull in .o > files containing s

Re: [Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-04-05 Thread Richard W.M. Jones
On Wed, Apr 05, 2017 at 10:21:13AM +0200, Julia Lawall wrote: > > > On Wed, 5 Apr 2017, Richard W.M. Jones wrote: > > > On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote: > > > On 01/19/2017 08:38 AM, Eric Blake wrote: > > > > On 01/19/2017 03:25 AM, Markus Armbruster wrote: > > > >> Er

Re: [Qemu-devel] [RFC 19/19] virtio-mmio: Remove user_creatable flag

2017-04-05 Thread Laszlo Ersek
On 04/04/17 21:35, Eduardo Habkost wrote: > On Mon, Apr 03, 2017 at 05:50:13PM +0200, Laszlo Ersek wrote: >> On 04/01/17 02:46, Eduardo Habkost wrote: >>> virtio-mmio needs to be wired and mapped by other device or board >>> code, and won't work with -device. Remove the user_creatable flag >>> from

Re: [Qemu-devel] [PATCH 00/10] make display updates thread safe.

2017-04-05 Thread Mark Cave-Ayland
On 04/04/17 13:54, Mark Cave-Ayland wrote: > I've just noticed that TCX 24-bit is still leaving some artifacts, but > from looking at the code I'm fairly confident that it's bugs in the > existing TCX code where some of the accelerated features aren't > correctly invalidating the external color pl

[Qemu-devel] [PATCH 03/14] cg3: remove unused width and height variables

2017-04-05 Thread Mark Cave-Ayland
These aren't required since we can use the display width and height directly. Signed-off-by: Mark Cave-Ayland --- hw/display/cg3.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index b42f60e..178a6dd 100644 --- a/hw/disp

[Qemu-devel] [PATCH 01/14] cg3: remove TARGET_PAGE_SIZE rounding on dirty page detection

2017-04-05 Thread Mark Cave-Ayland
This was an artifact from very early versions of the code from before the memory API and is no longer needed. Signed-off-by: Mark Cave-Ayland --- hw/display/cg3.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 1174220..7d436

[Qemu-devel] [PATCH 02/14] cg3: fix up size parameter for memory_region_get_dirty()

2017-04-05 Thread Mark Cave-Ayland
The code was incorrectly calculating the end address rather than the size of the required region. Signed-off-by: Mark Cave-Ayland --- hw/display/cg3.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 7d43694..b42f60e 100644 --- a/hw

[Qemu-devel] [PATCH 04/14] cg3: switch to load_image_mr() and remove prom-addr hack

2017-04-05 Thread Mark Cave-Ayland
Previous to the existence of load_image_mr(), the only way to load in the FCode ROM image was to pass in its physical address via qdev properties and use load_image_targphys(). Signed-off-by: Mark Cave-Ayland --- hw/display/cg3.c |4 +--- hw/sparc/sun4m.c |1 - 2 files changed, 1 inserti

[Qemu-devel] [PATCH 00/14] TCX/CG3 adapter cleanups

2017-04-05 Thread Mark Cave-Ayland
This started as part of the work on Gerd's thread-safe display patches but ended up turning into something a lot more comprehensive. It contains lots of cleanupm and fixes for display invalidation (particularly on 24-bit TCX) exposed by testing the thread-safe patchset. Signed-off-by: Mark Cave-Ay

[Qemu-devel] [PATCH 08/14] tcx: alter tcx24_reset_dirty() to accept address and length parameters

2017-04-05 Thread Mark Cave-Ayland
This can now be used by both the 8-bit and 24-bit display code, so rename to tcx_check_dirty(). Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index 1

[Qemu-devel] [PATCH 05/14] tcx: alter tcx_set_dirty() to accept address and length parameters

2017-04-05 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index 8e26aae..d24466f 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -93,9 +93,9 @@ typedef struct TCXState {

[Qemu-devel] [PATCH 09/14] tcx: remove page24 and cpage from tcx24_update_display()

2017-04-05 Thread Mark Cave-Ayland
Since all of the tcx_*_dirty() functions now calculate the 24-bit and cplane offsets themselves from the base address, these variables are no longer needed. Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/displ

[Qemu-devel] [PATCH 07/14] tcx: alter tcx24_check_dirty() to accept address and length parameters

2017-04-05 Thread Mark Cave-Ayland
This can now be used by both the 8-bit and 24-bit display code, so rename to tcx_check_dirty(). Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index 6817bd2

[Qemu-devel] [PATCH 06/14] tcx: ensure tcx_set_dirty() also invalidates the 24-bit plane and cplane

2017-04-05 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index d24466f..6817bd2 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -96,6 +96,13 @@ typedef struct TCXState { static void tcx_set_dirt

[Qemu-devel] [PATCH 14/14] tcx: switch to load_image_mr() and remove prom_addr hack

2017-04-05 Thread Mark Cave-Ayland
Previous to the existence of load_image_mr(), the only way to load in the FCode ROM image was to pass in its physical address via qdev properties and use load_image_targphys(). Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c |4 +--- hw/sparc/sun4m.c |1 - 2 files changed, 1 inserti

[Qemu-devel] [PATCH 13/14] tcx: use tcx_set_dirty() for accelerated ops

2017-04-05 Thread Mark Cave-Ayland
Rather than calling memory_region_set_dirty() directly, make sure that we call tcx_set_dirty() instead. This ensures that the 24-bit plane and cplane are also invalidated correctly. Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 10 +- 1 file changed, 5 insertions(+), 5 deletio

[Qemu-devel] [PATCH 10/14] tcx: remove TARGET_PAGE_SIZE from tcx_update_display()

2017-04-05 Thread Mark Cave-Ayland
Now that page alignment is handled by the memory API, there is no need to duplicate the code 4 times (4 * 1024 == 4096 == TARGET_PAGE_SIZE). Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 36 1 file changed, 4 insertions(+), 32 deletions(-) diff --

[Qemu-devel] [PATCH 11/14] tcx: remove TARGET_PAGE_SIZE from tcx24_update_display()

2017-04-05 Thread Mark Cave-Ayland
Now that page alignment is handled by the memory API, there is no need to duplicate the code 4 times (4 * 1024 == 4096 == TARGET_PAGE_SIZE). Finally we have now removed all traces of TARGET_PAGE_SIZE. Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 46 ++

[Qemu-devel] [PATCH 12/14] tcx: remove primitives for non-32-bit surfaces

2017-04-05 Thread Mark Cave-Ayland
As all surfaces in QEMU are now either shared or 32-bit ARGB regardless of the guest depth, remove all non-32-bit primitives from tcx_update_display() and consequence their implementation which are no longer required. Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 126 --

Re: [Qemu-devel] [PATCH v6] vfio error recovery: kernel support

2017-04-05 Thread Cao jin
Sorry for late. Distracted by other problem for a while. On 03/31/2017 02:16 AM, Alex Williamson wrote: > On Thu, 30 Mar 2017 21:00:35 +0300 >> >>> >>> I also asked in my previous comments to provide examples of errors that >>> might trigger correctable errors to the user, th

Re: [Qemu-devel] [PATCH v2 21/21] s390-pcibus: No need to set user_creatable=false explicitly

2017-04-05 Thread Cornelia Huck
On Tue, 4 Apr 2017 17:24:29 -0300 Eduardo Habkost wrote: > TYPE_S390_PCI_HOST_BRIDGE is a subclass of TYPE_PCI_HOST_BRIDGE, > which is a subclass of TYPE_SYS_BUS_DEVICE. TYPE_SYS_BUS_DEVICE > already sets user_creatable=false, so we don't require an > explicit user_creatable=false assignment in

[Qemu-devel] [PATCH v2] migration/block:limit the time used for block migration

2017-04-05 Thread jemmy858585
From: Lidong Chen when migration with quick speed, mig_save_device_bulk invoke bdrv_is_allocated too frequently, and cause vnc reponse slowly. this patch limit the time used for bdrv_is_allocated. Signed-off-by: Lidong Chen --- migration/block.c | 38 ++ 1 f

Re: [Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-04-05 Thread Richard W.M. Jones
On Wed, Apr 05, 2017 at 10:38:37AM +0200, Julia Lawall wrote: > OK, there is nothing special about g_assert_cmpint, but Coccinelle expects > expressions or types in function argument lists, so it gives a parse error > on finding an ==. I should have checked the coccinelle mailing list before askin

Re: [Qemu-devel] [PATCH v2] migration/block:limit the time used for block migration

2017-04-05 Thread 858585 jemmy
sorry, i make a mistake, ignore this patch. On Wed, Apr 5, 2017 at 4:58 PM, wrote: > From: Lidong Chen > > when migration with quick speed, mig_save_device_bulk invoke > bdrv_is_allocated too frequently, and cause vnc reponse slowly. > this patch limit the time used for bdrv_is_allocated. > > S

Re: [Qemu-devel] [PATCH] Put all trace.o into libqemuutil.a

2017-04-05 Thread Daniel P. Berrange
On Tue, Apr 04, 2017 at 09:39:39PM +, Xu, Anthony wrote: > Put all trace.o into libqemuutil.a > > Currently all trace.o are linked into qemu-system, qemu-img, > qemu-nbd, qemu-io etc., even the corresponding components > are not included. > Put all trace.o into libqemuutil.a that the linker

[Qemu-devel] [PATCH v4 1/1] block: pass the right options for BlockDriver.bdrv_open()

2017-04-05 Thread Dong Jia Shi
raw_open() expects the caller always passing in the right actual @options parameter. But when trying to applying snapshot on a RBD image, bdrv_snapshot_goto() calls raw_open() (by calling the bdrv_open callback on the BlockDriver) with a NULL @options, and that will result in a Segmentation fault.

[Qemu-devel] [PATCH v4 0/1] block: pass the right options for BlockDriver.bdrv_open()

2017-04-05 Thread Dong Jia Shi
Changelog = v3 -> v4: 1. Unconditionally invoke bdrv_unref_child() before calling drv->bdrv_open(). 2. To prevent the child BDS from getting deleted when detached from bs, wrap everything in bdrv_ref(0/bdrv_unref(). v2 -> v3: 1. Remove every option in "options" that has a "file." pr

[Qemu-devel] [PATCH v3] migration/block:limit the time used for block migration

2017-04-05 Thread jemmy858585
From: Lidong Chen when migration with high speed, mig_save_device_bulk invoke bdrv_is_allocated too frequently, and cause vnc reponse slowly. this patch limit the time used for bdrv_is_allocated. Signed-off-by: Lidong Chen --- migration/block.c | 35 ++- 1 file

Re: [Qemu-devel] [PATCH for-2.9] tco: do not generate an NMI

2017-04-05 Thread Laszlo Ersek
CC Paulo On 04/05/17 10:12, Paolo Bonzini wrote: > This behavior is not indicated in the datasheet and can confuse the OS. * The message of commit 920557971b60 ("ich9: add TCO interface emulation", 2015-06-28) says > ... This patch adds support to TCO watchdog logic and few other > features like

Re: [Qemu-devel] [PATCH v3] migration/block:limit the time used for block migration

2017-04-05 Thread Daniel P. Berrange
On Wed, Apr 05, 2017 at 05:27:58PM +0800, jemmy858...@gmail.com wrote: > From: Lidong Chen > > when migration with high speed, mig_save_device_bulk invoke > bdrv_is_allocated too frequently, and cause vnc reponse slowly. > this patch limit the time used for bdrv_is_allocated. Can you explain why

Re: [Qemu-devel] [PATCH v4] Allow setting NUMA distance for different NUMA nodes

2017-04-05 Thread He Chen
On Mon, Apr 03, 2017 at 10:38:51AM +0200, Andrew Jones wrote: > On Sat, Apr 01, 2017 at 06:25:26PM +0800, He Chen wrote: > > Current, QEMU does not provide a clear command to set vNUMA distance for > > guest although we already have `-numa` command to set vNUMA nodes. > > > > vNUMA distance makes

Re: [Qemu-devel] [PATCH v4] Allow setting NUMA distance for different NUMA nodes

2017-04-05 Thread He Chen
On Mon, Apr 03, 2017 at 01:58:34PM -0500, Eric Blake wrote: > On 04/03/2017 03:38 AM, Andrew Jones wrote: > > On Sat, Apr 01, 2017 at 06:25:26PM +0800, He Chen wrote: > >> Current, QEMU does not provide a clear command to set vNUMA distance for > >> guest although we already have `-numa` command to

Re: [Qemu-devel] [PATCH 30/51] ram: Move src_page_req* to RAMState

2017-04-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Fri, Mar 31, 2017 at 04:25:56PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Thu, Mar 23, 2017 at 09:45:23PM +0100, Juan Quintela wrote: > > > > This are the last postcopy fields still at MigrationState. Once the

Re: [Qemu-devel] [PATCH 30/51] ram: Move src_page_req* to RAMState

2017-04-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > > Hi > > >> @@ -1191,19 +1204,18 @@ static bool get_queued_page(RAMState *rs, > >> MigrationState *ms, > >> * > >> * It should be empty at the end anyway, but in

Re: [Qemu-devel] [RFC PATCH v1 7/9] cpus: move icount preparation out of tcg_exec_cpu

2017-04-05 Thread Pavel Dovgalyuk
> From: Alex Bennée [mailto:alex.ben...@linaro.org] > Paolo Bonzini writes: > > > On 04/04/2017 14:31, Alex Bennée wrote: > >> > >> Paolo Bonzini writes: > >> > >>> On 04/04/2017 12:46, Alex Bennée wrote: > > In theory the main-loop should be sequenced before or after vCPU events > > bec

Re: [Qemu-devel] [PATCH v3] migration/block:limit the time used for block migration

2017-04-05 Thread 858585 jemmy
On Wed, Apr 5, 2017 at 5:34 PM, Daniel P. Berrange wrote: > On Wed, Apr 05, 2017 at 05:27:58PM +0800, jemmy858...@gmail.com wrote: >> From: Lidong Chen >> >> when migration with high speed, mig_save_device_bulk invoke >> bdrv_is_allocated too frequently, and cause vnc reponse slowly. >> this patc

[Qemu-devel] [PATCH v2] qga-win: Fix a bug where qemu-ga service is stuck during stop operation

2017-04-05 Thread Sameeh Jubran
After triggering a freeze command without any following thaw command, qemu-ga will not respond to stop operation. This behaviour is wanted on Linux as there is no time limit for a freeze command and we want to prevent quitting in the middle of freeze, on the other hand on Windows the time limit for

Re: [Qemu-devel] [PATCH v1 1/5] cadence_gem: Read the correct queue descriptor

2017-04-05 Thread Philippe Mathieu-Daudé
On 04/04/2017 08:40 PM, Alistair Francis wrote: Read the correct descriptor instead of hardcoding the first (q=0). Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- hw/net/cadence_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/c

Re: [Qemu-devel] [PATCH v1 4/5] cadence_gem: Make the revision a property

2017-04-05 Thread Philippe Mathieu-Daudé
On 04/04/2017 08:40 PM, Alistair Francis wrote: Expose the Cadence GEM revision as a property. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- hw/net/cadence_gem.c | 6 +- include/hw/net/cadence_gem.h | 1 + 2 files changed, 6 insertions(+), 1 deletion

Re: [Qemu-devel] [PATCH v1 3/5] cadence_gem: Only trigger interrupts if the status register is set

2017-04-05 Thread Philippe Mathieu-Daudé
On 04/04/2017 08:40 PM, Alistair Francis wrote: Only trigger multi-queue GEM interrupts if the interrupt status register is set. This logic was already used for non multi-queue interrupts but it also applies to multi-queue interrupts. Signed-off-by: Alistair Francis Reviewed-by: Philippe Math

Re: [Qemu-devel] nbd: Possible regression in 2.9 RCs

2017-04-05 Thread Kevin Wolf
Am 04.04.2017 um 17:09 hat Paolo Bonzini geschrieben: > On 04/04/2017 16:53, Kevin Wolf wrote: > >> The big question is how this fits into release management. We have > >> another important regression from the op blocker work and only a week > >> to go before the last rc. Are we going to delay 2.

Re: [Qemu-devel] [RFC PATCH v1 7/9] cpus: move icount preparation out of tcg_exec_cpu

2017-04-05 Thread Alex Bennée
Pavel Dovgalyuk writes: >> From: Alex Bennée [mailto:alex.ben...@linaro.org] >> Paolo Bonzini writes: >> >> > On 04/04/2017 14:31, Alex Bennée wrote: >> >> >> >> Paolo Bonzini writes: >> >> >> >>> On 04/04/2017 12:46, Alex Bennée wrote: >> > In theory the main-loop should be sequenced befo

Re: [Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-04-05 Thread Paolo Bonzini
On 05/04/2017 11:01, Richard W.M. Jones wrote: > On Wed, Apr 05, 2017 at 10:38:37AM +0200, Julia Lawall wrote: >> OK, there is nothing special about g_assert_cmpint, but Coccinelle expects >> expressions or types in function argument lists, so it gives a parse error >> on finding an ==. > > I sh

[Qemu-devel] [PATCH v2] qga-win: Fix Event Viewer errors caused by qemu-ga

2017-04-05 Thread Sameeh Jubran
When the command "guest-fsfreeze-freeze" is executed it causes the VSS service to log the error below in the Event Viewer. This error is caused by an issue in the function "CommitSnapshots" in provider.cpp: * When VSS_TIMEOUT_MSEC expires the funtion returns E_ABORT. This causes the error #12293.

Re: [Qemu-devel] [PATCH v2 for-2.10 09/16] block/qcow2: Generalize preallocate()

2017-04-05 Thread Max Reitz
On 03.04.2017 21:19, Philippe Mathieu-Daudé wrote: > Hi Max, > > On 04/03/2017 01:09 PM, Max Reitz wrote: >> This patch adds two new parameters to the preallocate() function so we >> will be able to use it not just for preallocating a new image but also >> for preallocated image growth. >> >> The

Re: [Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-04-05 Thread Julia Lawall
On Wed, 5 Apr 2017, Richard W.M. Jones wrote: > On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote: > > On 01/19/2017 08:38 AM, Eric Blake wrote: > > > On 01/19/2017 03:25 AM, Markus Armbruster wrote: > > >> Eric Blake writes: > > >> > > >>> Quite a few users of qdict_put() were manuall

Re: [Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-04-05 Thread Julia Lawall
On Wed, 5 Apr 2017, Richard W.M. Jones wrote: > On Wed, Apr 05, 2017 at 10:21:13AM +0200, Julia Lawall wrote: > > > > > > On Wed, 5 Apr 2017, Richard W.M. Jones wrote: > > > > > On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote: > > > > On 01/19/2017 08:38 AM, Eric Blake wrote: > > > >

[Qemu-devel] [PATCH 04/21] ppc/pnv: enable only one LPC bus

2017-04-05 Thread Cédric Le Goater
Multi chip systems only have one LPC bus, on chip 0. The PnvLPC object will still be created under the PnvChip objects but only the one under chip 0 will be advertise in the device tree. Also remove the comment which is slightly wrong. Only chip 0 has a LPC device node : xscom@3fc00/isa@b0

[Qemu-devel] [PATCH 02/21] ppc/pnv: Add OCC model stub with interrupt support

2017-04-05 Thread Cédric Le Goater
From: Benjamin Herrenschmidt The OCC is an on-chip microcontroller based on a ppc405 core used for various power management tasks. It comes with a pile of additional hardware sitting on the PIB (aka XSCOM bus). At this point we don't emulate it (nor plan to do so). However there is one facility w

[Qemu-devel] [PATCH 00/21] pnv: PSI, OCC, IPMI and PCI models

2017-04-05 Thread Cédric Le Goater
Hello, Now that we have support for the interrupt controller in the PowerNV machine, we can start adding controllers depending on it. First of these, is the Processor Service Interface (PSI), which handles the external interrupt, and then a minimal model for the OCC. They have been reviewed a coup

[Qemu-devel] [PATCH 07/21] ipmi: provide support for FRUs

2017-04-05 Thread Cédric Le Goater
This patch provides a simple FRU support for the BMC simulator. FRUs are loaded from a file which name is specified in the object properties, each entry having a fixed size, also specified in the properties. If the file is unknown or not accessible for some reason, a unique entry of 1024 bytes is c

[Qemu-devel] [PATCH 05/21] ppc: add IPMI support

2017-04-05 Thread Cédric Le Goater
OpenPOWER systems use a BT device to communicate with the BMC. Provide support for it. Signed-off-by: Cédric Le Goater --- default-configs/ppc64-softmmu.mak | 4 1 file changed, 4 insertions(+) diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak index 05c833

[Qemu-devel] [PATCH 01/21] ppc/pnv: Add cut down PSI bridge model and hookup external interrupt

2017-04-05 Thread Cédric Le Goater
The Processor Service Interface (PSI) Controller is one of the engines of the "Bridge" unit which connects the different interfaces to the Power Processor. This adds just enough of the PSI bridge to handle various on-chip and the one external interrupt. The rest of PSI has to do with the link to t

[Qemu-devel] [PATCH 10/21] ipmi: add SET_SENSOR_READING command

2017-04-05 Thread Cédric Le Goater
SET_SENSOR_READING is a complex IPMI command (IPMI spec : "35.17 Set Sensor Reading And Event Status Command"). Here is a very minimum framework fitting the Open PowerNV platform needs. This command is used on this platform to set the "System Firmware Progress" sensor and the "Boot Count" sensor.

[Qemu-devel] [PATCH 16/21] ppc/pnv: generate an OEM SEL event on shutdown

2017-04-05 Thread Cédric Le Goater
OpenPOWER systems expect to be notified with such an event before a shutdown or a reboot. An OEM SEL message is sent with specific identifiers and a user data containing the request : OFF or REBOOT. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 14 ++ hw/ppc/pnv_bmc.c

[Qemu-devel] [PATCH 06/21] ipmi: use a file to load SDRs

2017-04-05 Thread Cédric Le Goater
The IPMI BMC simulator populates the sdr/sensor tables with a minimal set of entries (Watchdog). But some qemu platforms might want to use extra entries for their custom needs. This patch modifies slighty the initializing routine to take into account a larger set read from a file. The name of the

[Qemu-devel] [PATCH 03/21] ppc/pnv: Add support for POWER8+ LPC Controller

2017-04-05 Thread Cédric Le Goater
From: Benjamin Herrenschmidt It adds the Naples chip which supports proper LPC interrupts via the LPC controller rather than via an external CPLD. Signed-off-by: Benjamin Herrenschmidt [clg: - updated for qemu-2.9 - ported on latest PowerNV patchset ] Signed-off-by: Cédric Le Goater Revi

[Qemu-devel] [PATCH 13/21] ppc/pnv: populate device tree for serial devices

2017-04-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 33 + 1 file changed, 33 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 2f9c41e350d4..00e594a0cbe3 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -301,6 +301,37 @@ static void powernv_populate_rtc(I

[Qemu-devel] [PATCH 08/21] ipmi: introduce an ipmi_bmc_sdr_find() API

2017-04-05 Thread Cédric Le Goater
This patch exposes a new IPMI routine to query a sdr entry from the sdr table maintained by the IPMI BMC simulator. The API is very similar to the internal sdr_find_entry() routine and should be used the same way to query one or all sdrs. A typical use would be to loop on the sdrs to build nodes o

Re: [Qemu-devel] [PATCH for-2.9] tco: do not generate an NMI

2017-04-05 Thread Paolo Bonzini
On 05/04/2017 11:30, Laszlo Ersek wrote: > CC Paulo > > On 04/05/17 10:12, Paolo Bonzini wrote: >> This behavior is not indicated in the datasheet and can confuse the OS. > > * The message of commit 920557971b60 ("ich9: add TCO interface > emulation", 2015-06-28) says > >> ... This patch adds

[Qemu-devel] [PATCH 14/21] ppc/pnv: populate device tree for IPMI BT devices

2017-04-05 Thread Cédric Le Goater
When an ipmi-bt device [1] is defined on the ISA bus, we need to populate the device tree with the object properties. Such devices are created with the command line options : -device ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10 [1] https://lists.gnu.org/archive/html/qemu-devel/2015

[Qemu-devel] [PATCH 11/21] ppc/pnv: scan ISA bus to populate device tree

2017-04-05 Thread Cédric Le Goater
This is an empty shell that we will use to include nodes in the device tree for ISA devices. We expect RTC, UART and IPMI BT devices. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c

[Qemu-devel] [PATCH 09/21] ipmi: introduce an ipmi_bmc_gen_event() API

2017-04-05 Thread Cédric Le Goater
It will be used to fill the message buffer with custom events expected by some systems. Typically, an Open PowerNV platform guest is notified with an OEM SEL message before a shutdown or a reboot. Signed-off-by: Cédric Le Goater Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_sim.c | 24 ++

[Qemu-devel] [PATCH 12/21] ppc/pnv: populate device tree for RTC devices

2017-04-05 Thread Cédric Le Goater
The code could be common to any ISA device but we are missing the IO length. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index a3c8f6594d10..2f9c41e350d4 100644 --- a/hw/ppc/pnv.c

[Qemu-devel] [PATCH 20/21] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2017-04-05 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This is a model of the PCIe host bridge found on Power8 chips, including IOMMU support, PCIe root complex etc... This implementation doesn't emulate the EEH error handling (and may never do). Signed-off-by: Benjamin Herrenschmidt [clg: updated for qemu-2.9 QO

[Qemu-devel] [PATCH 15/21] ppc/pnv: add initial IPMI sensors for the BMC simulator

2017-04-05 Thread Cédric Le Goater
Skiboot, the firmware for the PowerNV platform, expects the BMC to provide some specific IPMI sensors. These sensors are exposed in the device tree and their values are updated by the firmware at boot time. Sensors of interest are : "FW Boot Progress" "Boot Count" As such a devic

[Qemu-devel] [PATCH 18/21] pci: Use the new pci_can_add_device() to enforce devfn_min/max

2017-04-05 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This adds a devfn_max field to PCIBus and adds a pci_can_add_device() function which, if no "addr" (aka devfn) is specified, will tell whether there is any slot free between devfn_min and devfn_max. When devfn_max is 0 (default), it will be ignored (no constraints).

[Qemu-devel] [PATCH 17/21] qdev: Add a hook for a bus to device if it can add devices

2017-04-05 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This allows a bus class to tell whether a given bus has room for any new device. max_dev isn't sufficient as the rules can depend on some arguments or can differ between instances of a bus. This will be used by PCI in subsequent patches Signed-off-by: Benjamin Herren

[Qemu-devel] [PATCH 19/21] pci: Don't call pci_irq_handler() for a negative intx

2017-04-05 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Under some circumstances, pci_intx() can return -1 (when the interrupt pin in the config space is 0 which normally means no interrupt). I have seen cases of pci_set_irq() being called on such devices, in turn causing pci_irq_handler() to be called with "-1" as an arg

[Qemu-devel] [PATCH 21/21] ppc/pnv: Create a default PCI layout

2017-04-05 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This creates a legacy PCIe->PCI bridge under the PHB by default to which a bunch of standard devices are attached. Currently: - VGA (as specified by -vga) - USB (with keyboard and mouse if graphcis is enabled) - AHCI - e1000 This gives us something close to

Re: [Qemu-devel] qemu-2.9 crashes in tcg_handle_interrupt() during winx64 boot

2017-04-05 Thread Igor Mammedov
On Fri, 31 Mar 2017 09:58:49 +0100 Alex Bennée wrote: > Igor Mammedov writes: > > > On Thu, 30 Mar 2017 16:05:58 +0100 > > Alex Bennée wrote: > > > >> Igor Mammedov writes: > >> > >> > (PS: resend due to wrong qemu-devel mail list address in original > >> > email) > >> > >> Le *sigh* an

Re: [Qemu-devel] [PATCH v2 4/6] fdc-test: Avoid deprecated 'change' command

2017-04-05 Thread Eric Blake
On 01/19/2017 08:39 AM, Eric Blake wrote: > On 01/19/2017 03:30 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Use the preferred blockdev-change-medium command instead. >>> >>> Signed-off-by: Eric Blake >>> Reviewed-by: John Snow >>> --- >>> tests/fdc-test.c | 5 +++-- >>> 1 file cha

Re: [Qemu-devel] [RFC PATCH for-2.9] block: Ignore guest dev permissions during incoming migration

2017-04-05 Thread Max Reitz
On 04.04.2017 17:35, Kevin Wolf wrote: > Usually guest devices don't like other writers to the same image, so > they use blk_set_perm() to prevent this from happening. In the migration > phase before the VM is actually running, though, they don't have a > problem with writes to the image. On the ot

[Qemu-devel] [PATCH v2 02/12] scripts/qemu-gdb/timers.py: new helper to dump timer state

2017-04-05 Thread Alex Bennée
This introduces the qemu-gdb command "qemu timers" which will dump the state of the main timers in the system. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- scripts/qemu-gdb.py | 3 ++- scripts/qemugdb/timers.py | 54 +++ 2

[Qemu-devel] [PATCH v2 01/12] scripts/qemugdb/mtree.py: fix up mtree dump

2017-04-05 Thread Alex Bennée
Since QEMU has been able to build with native Int128 support this was broken as it attempts to fish values out of the non-existent structure. Also the alias print was trying to make a %x out of gdb.ValueType directly which didn't seem to work. Signed-off-by: Alex Bennée --- scripts/qemugdb/mtree

[Qemu-devel] [PATCH v2 00/12] icount and misc MTTCG fixes for 2.9-rc4

2017-04-05 Thread Alex Bennée
Hi, Here is my current queue for icount and miscellaneous MTTCG related fixes. The main difference from the RFC series is I have dropped the graceful handling of backward time events in the replay log in favour of updating the global qemu_icount more frequently. The graceful handling is now replac

Re: [Qemu-devel] qemu-2.9 crashes in tcg_handle_interrupt() during winx64 boot

2017-04-05 Thread Alex Bennée
Igor Mammedov writes: > On Fri, 31 Mar 2017 09:58:49 +0100 > Alex Bennée wrote: > >> Igor Mammedov writes: >> >> > On Thu, 30 Mar 2017 16:05:58 +0100 >> > Alex Bennée wrote: >> > >> >> Igor Mammedov writes: >> >> >> >> > (PS: resend due to wrong qemu-devel mail list address in original >> >>

[Qemu-devel] [PATCH v2 03/12] scripts/replay-dump.py: replay log dumper

2017-04-05 Thread Alex Bennée
This script is a debugging tool for looking through the contents of a replay log file. It is incomplete but should fail gracefully at events it doesn't understand. It currently understands two different log formats as the audio record/replay support was merged during since MTTCG. It was written to

[Qemu-devel] [PATCH v2 06/12] cpus: check cpu->running in cpu_get_icount_raw()

2017-04-05 Thread Alex Bennée
The lifetime of current_cpu is now the lifetime of the vCPU thread. However get_icount_raw() can apply a fudge factor if called while code is running to take into account the current executed instruction count. To ensure this is always the case we also check cpu->running. Signed-off-by: Alex Benn

[Qemu-devel] [PATCH v2 05/12] cpus: remove icount handling from qemu_tcg_cpu_thread_fn

2017-04-05 Thread Alex Bennée
We should never be running in multi-threaded mode with icount enabled. There is no point calling handle_icount_deadline here so remove it and assert !use_icount. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH v2 04/12] target/i386/misc_helper: wrap BQL around another IRQ generator

2017-04-05 Thread Alex Bennée
Anything that calls into HW emulation must be protected by the BQL. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Acked-by: Eduardo Habkost --- target/i386/misc_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/misc_helper.c b/target/i386/misc_helper.c ind

[Qemu-devel] [PATCH v2 08/12] cpus: don't credit executed instructions before they have run

2017-04-05 Thread Alex Bennée
Outside of the vCPU thread icount time will only be tracked against timers_state.qemu_icount. We no longer credit cycles until they have completed the run. Inside the vCPU thread we adjust for passage of time by looking at how many have run so far. This is only valid inside the vCPU thread while it

[Qemu-devel] [PATCH v2 07/12] cpus: move icount preparation out of tcg_exec_cpu

2017-04-05 Thread Alex Bennée
As icount is only supported for single-threaded execution due to the requirement for determinism let's remove it from the common tcg_exec_cpu path. Also remove the additional fiddling which shouldn't be required as the icount counters should all be rectified as you enter the loop. Signed-off-by:

[Qemu-devel] [PATCH v2 10/12] cpu-exec: update icount after each TB_EXIT

2017-04-05 Thread Alex Bennée
There is no particular reason we shouldn't update the global system icount time as we exit each TranslationBlock run. This ensures the main-loop doesn't have to wait until we exit to the outer loop for executed instructions to be credited to timer_state. The prepare_icount_for_run function is slig

[Qemu-devel] [PATCH v2 11/12] cpus: call cpu_update_icount on read

2017-04-05 Thread Alex Bennée
This ensures each time the vCPU thread reads the icount we update the master timer_state.qemu_icount field. This way as long as updates are in BQL protected sections (which they should be) the main-loop can never come to update the log and find time has gone backwards. Signed-off-by: Alex Bennée

[Qemu-devel] [PATCH v2 09/12] cpus: introduce cpu_update_icount helper

2017-04-05 Thread Alex Bennée
By holding off updates to timer_state.qemu_icount we can run into trouble when the non-vCPU thread needs to know the time. This helper ensures we atomically update timers_state.qemu_icount based on what has been currently executed. Signed-off-by: Alex Bennée --- cpus.c | 16 +++

Re: [Qemu-devel] [PATCH v2 12/12] replay: assert time only goes forward

2017-04-05 Thread Pavel Dovgalyuk
> From: Alex Bennée [mailto:alex.ben...@linaro.org] > > If we find ourselves trying to add an event to the log where time has > gone backwards it is because a vCPU event has occurred and the > main-loop is not yet aware of time moving forward. This should not > happen and if it does its better to

[Qemu-devel] [PATCH v2 12/12] replay: assert time only goes forward

2017-04-05 Thread Alex Bennée
If we find ourselves trying to add an event to the log where time has gone backwards it is because a vCPU event has occurred and the main-loop is not yet aware of time moving forward. This should not happen and if it does its better to fail early than generate a log that will have weird behaviour.

Re: [Qemu-devel] [PATCH for-2.9] tco: do not generate an NMI

2017-04-05 Thread Laszlo Ersek
On 04/05/17 14:44, Paolo Bonzini wrote: > > > On 05/04/2017 11:30, Laszlo Ersek wrote: >> CC Paulo >> >> On 04/05/17 10:12, Paolo Bonzini wrote: >>> This behavior is not indicated in the datasheet and can confuse the OS. >> >> * The message of commit 920557971b60 ("ich9: add TCO interface >> emul

Re: [Qemu-devel] [PATCH for-2.9] tco: do not generate an NMI

2017-04-05 Thread Paolo Bonzini
On 05/04/2017 15:35, Laszlo Ersek wrote: > Yes, I did track it back to SERR#/IOCHK#. > > What wasn't obvious to me why the TCO watchdog couldn't activate SERR#. > > I guess I missed the "SERR#" explanation in Table-2.6 "PCI Interface > Signals", where it is described as > > System Error: SER

Re: [Qemu-devel] [PATCH v2 12/12] replay: assert time only goes forward

2017-04-05 Thread Paolo Bonzini
On 05/04/2017 15:33, Pavel Dovgalyuk wrote: >> + >> +/* Time can only go forward */ >> +assert(diff >= 0); >> + >> if (diff > 0) { > This "if" is useless then. > It isn't, "diff == 0" can happen. Paolo

Re: [Qemu-devel] [PATCH v4 1/1] block: pass the right options for BlockDriver.bdrv_open()

2017-04-05 Thread Max Reitz
On 05.04.2017 11:19, Dong Jia Shi wrote: > raw_open() expects the caller always passing in the right actual > @options parameter. But when trying to applying snapshot on a RBD > image, bdrv_snapshot_goto() calls raw_open() (by calling the > bdrv_open callback on the BlockDriver) with a NULL @option

Re: [Qemu-devel] [PATCH for-2.9] tco: do not generate an NMI

2017-04-05 Thread Laszlo Ersek
On 04/05/17 15:49, Paolo Bonzini wrote: > > > On 05/04/2017 15:35, Laszlo Ersek wrote: >> Yes, I did track it back to SERR#/IOCHK#. >> >> What wasn't obvious to me why the TCO watchdog couldn't activate SERR#. >> >> I guess I missed the "SERR#" explanation in Table-2.6 "PCI Interface >> Signals",

Re: [Qemu-devel] [PATCH v2 11/12] cpus: call cpu_update_icount on read

2017-04-05 Thread Paolo Bonzini
On 05/04/2017 15:25, Alex Bennée wrote: > This ensures each time the vCPU thread reads the icount we update the > master timer_state.qemu_icount field. This way as long as updates are > in BQL protected sections (which they should be) the main-loop can > never come to update the log and find time

Re: [Qemu-devel] [PATCH v2 09/12] cpus: introduce cpu_update_icount helper

2017-04-05 Thread Paolo Bonzini
On 05/04/2017 15:25, Alex Bennée wrote: > +{ > +int64_t executed = cpu_get_icount_executed(cpu); > +cpu->icount_budget -= executed; > +atomic_add(&timers_state.qemu_icount, executed); > +} Since there's only one writer, it's also okay to do atomic_set(&timers_state.qemu_icou

  1   2   3   >