Re: [Qemu-devel] [RFC 2/3] spapr: Start hotplugged PCI devices in ISOLATED state

2017-06-07 Thread Michael Roth
Quoting Michael Roth (2017-06-07 17:49:06) > Quoting David Gibson (2017-06-06 08:05:33) > > PCI DRCs, and only PCI DRCs, are immediately moved to UNISOLATED isolation > > state once the device is attached. This has been there from the initial > > implementation, and it's not clear why. > > > > Th

Re: [Qemu-devel] [PATCH v1 1/1] char-socket: Don't report TCP socket waiting as an error

2017-06-07 Thread Alistair Francis
On Wed, Jun 7, 2017 at 12:19 AM, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 06/06/2017 18:30, Alistair Francis wrote: This is somehow confusing. I don't think it is worth having another qemu_log_stderr() function rather than using error_report() but this very cal

Re: [Qemu-devel] [PATCH v4 0/7] tcg: allocate TB structs preceding translate

2017-06-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20170607155536.1193-1-...@twiddle.net Subject: [Qemu-devel] [PATCH v4 0/7] tcg: allocate TB structs preceding translate === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PULL 18/33] vhost-user-scsi: Introduce vhost-user-scsi host device

2017-06-07 Thread Michael S. Tsirkin
On Wed, Jun 07, 2017 at 02:56:57PM -0400, Paolo Bonzini wrote: > > > > This could be documented, > > > > It is documented AFAIK. Pls take a look at the spec documentation. > > Found it now. It's not under GET_VRING_BASE, it's under "starting > and stopping rings"---fair enough. > > In the case

Re: [Qemu-devel] [PATCH] vhost-user-bridge: fix iov_restore_front() warning

2017-06-07 Thread Michael S. Tsirkin
On Wed, Jun 07, 2017 at 07:00:46PM +, Marc-André Lureau wrote: > Hi, Michael, could you pick this patch? > > thanks OK. Pls cc me on patches you want me to review. > On Fri, Jun 2, 2017 at 12:26 PM Marc-André Lureau < > marcandre.lur...@redhat.com> wrote: > > > CC tests/vhost-user-br

Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 07:10:55PM +0200, Thomas Huth wrote: > On 07.06.2017 16:34, Paolo Bonzini wrote: > > > > > > On 07/06/2017 09:33, Thomas Huth wrote: > >> On 07.06.2017 09:07, David Gibson wrote: > >>> The pseries machine type doesn't usually use the 'pvpanic' device as such, > >>> because

Re: [Qemu-devel] [PATCH v2 2/4] nvdimm: warn if the backend is not a DAX device

2017-06-07 Thread Haozhong Zhang
On 06/06/17 10:59 -0700, Dan Williams wrote: > On Tue, Jun 6, 2017 at 12:22 AM, Haozhong Zhang > wrote: > > Applications in Linux guest that use device-dax never trigger flush > > that can be trapped by KVM/QEMU. Meanwhile, if the host backend is not > > device-dax, QEMU cannot guarantee the persi

Re: [Qemu-devel] [PATCH v2 2/4] nvdimm: warn if the backend is not a DAX device

2017-06-07 Thread Haozhong Zhang
On 06/07/17 16:14 +0100, Stefan Hajnoczi wrote: > On Tue, Jun 06, 2017 at 03:22:27PM +0800, Haozhong Zhang wrote: > > diff --git a/util/osdep.c b/util/osdep.c > > index a2863c8e53..02881f96bc 100644 > > --- a/util/osdep.c > > +++ b/util/osdep.c > > @@ -471,3 +471,64 @@ writev(int fd, const struct i

Re: [Qemu-devel] [PATCHv2 0/7] spapr: DRC cleanups (part III)

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 06:22:16PM -0500, Michael Roth wrote: > Quoting David Gibson (2017-06-06 22:20:11) > > A third batch of cleanups to the DRC code. This continues to clear > > away relatively simple cruft, to get a clearer look at the fundamental > > state handling. > > > > Changes since v1

Re: [Qemu-devel] [PATCH 6/7] spapr: Clean up handling of DR-indicator

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 06:11:03PM -0500, Michael Roth wrote: > Quoting David Gibson (2017-06-06 20:28:51) > > On Tue, Jun 06, 2017 at 04:04:33PM -0500, Michael Roth wrote: > > > Quoting David Gibson (2017-06-06 03:32:20) > > > > There are 3 types of "indicator" associated with hotplug in the PAPR

Re: [Qemu-devel] [RFC 2/3] spapr: Start hotplugged PCI devices in ISOLATED state

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 05:49:06PM -0500, Michael Roth wrote: > Quoting David Gibson (2017-06-06 08:05:33) > > PCI DRCs, and only PCI DRCs, are immediately moved to UNISOLATED isolation > > state once the device is attached. This has been there from the initial > > implementation, and it's not cle

Re: [Qemu-devel] [PATCH v2 3/4] nvdimm: add a boolean option "restrict"

2017-06-07 Thread Haozhong Zhang
On 06/07/17 16:27 +0100, Stefan Hajnoczi wrote: > On Tue, Jun 06, 2017 at 03:22:28PM +0800, Haozhong Zhang wrote: > > If a vNVDIMM device is not backed by a DAX device and its "restrict" > > option is enabled, bit 3 of state flags in its region mapping > > structure will be set, in order to notify

Re: [Qemu-devel] [PATCH v3 00/43] qobject/qapi: add uint type

2017-06-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20170607163635.17635-1-marcandre.lur...@redhat.com Subject: [Qemu-devel] [PATCH v3 00/43] qobject/qapi: add uint type === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 tot

Re: [Qemu-devel] [PATCH v3 2/5] xics: add reset() handler to ICPStateClass

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 07:47:04PM +0200, Cédric Le Goater wrote: 1;4602;0c> On 06/07/2017 07:17 PM, Greg Kurz wrote: > > Taking into account that qemu_set_irq() returns immediatly if its first > > argument is NULL, icp_kvm_reset() largely duplicates icp_reset(). > > > > This patch introduces a re

Re: [Qemu-devel] [PATCH v3 1/5] pnv_core: drop reference on ICPState object during CPU realization

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 07:49:14PM +0200, Cédric Le Goater wrote: > On 06/07/2017 07:16 PM, Greg Kurz wrote: > > Similarly to what was done to spapr with commit 249127d0dfeb, this patch > > ensures that we don't keep an extra reference on the ICPState object. Also > > since the object was just crea

Re: [Qemu-devel] [PATCH v3 3/5] xics: setup cpu at realize time

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 07:17:09PM +0200, Greg Kurz wrote: > Until recently, spapr used to allocate ICPState objects for the lifetime > of the machine. They would only be associated to vCPUs in xics_cpu_setup() > when plugging a CPU core. > > Now that ICPState objects have the same lifecycle as vC

Re: [Qemu-devel] [PATCH v3 3/5] xics: setup cpu at realize time

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 10:55:07PM +0200, Greg Kurz wrote: > On Wed, 7 Jun 2017 20:11:38 +0200 > Cédric Le Goater wrote: > > > On 06/07/2017 07:17 PM, Greg Kurz wrote: > > > Until recently, spapr used to allocate ICPState objects for the lifetime > > > of the machine. They would only be associate

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix region format interface code

2017-06-07 Thread Xiao Guangrong
On 06/07/2017 04:06 PM, Haozhong Zhang wrote: Per ACPI 6.2, section 5.2.25.6 and JEDEC Annex L Release 3, the current region format interface code 0x201 indicates the block addressed function interface 1, rather than a byte addressable interface. Fix it by using 0x301 which indicates the byte a

[Qemu-devel] [PATCH] util/qemu-sockets: Drop unused helper socket_address_to_string()

2017-06-07 Thread Mao Zhongyi
Signed-off-by: Mao Zhongyi --- include/qemu/sockets.h | 15 --- util/qemu-sockets.c| 34 -- 2 files changed, 49 deletions(-) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 7abffc4..8eb0172 100644 --- a/include/qemu/sockets.h +++

[Qemu-devel] [PATCH] net/colo-compare.c: Add no-need-checkpoint period to optimize performance

2017-06-07 Thread Zhang Chen
If colo-compare find out the first different packet that means the following packet almost is different. we needn't do a lot of checkpoint in one second, so we set the no-need-checkpoint period, default just set 3 second. Signed-off-by: Zhang Chen --- net/colo-compare.c | 9 - 1 file cha

Re: [Qemu-devel] [PATCH v3 4/5] xics: directly register ICPState objects to vmstate

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 07:17:17PM +0200, Greg Kurz wrote: > The ICPState objects are currently registered to vmstate as qdev objects. > Their instance ids are hence computed automatically in the migration code, > and thus depends on the order the CPU cores were plugged. > > If the destination had

Re: [Qemu-devel] [PATCH v3 5/5] spapr: fix migration of ICPState objects from/to older QEMU

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 07:17:26PM +0200, Greg Kurz wrote: > Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under > sPAPRCPUCore") moved ICPState objects from the machine to CPU cores. > This is an improvement since we no longer allocate ICPState objects > that will never be used. B

Re: [Qemu-devel] [PATCH v4 1/2] spapr: Add a "no HPT" encoding to HTAB migration stream

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 01:23:32PM +0530, Bharata B Rao wrote: > On Thu, Jun 01, 2017 at 02:54:48PM +1000, David Gibson wrote: > > On Wed, May 31, 2017 at 04:56:44PM +0530, Bharata B Rao wrote: > > > Add a "no HPT" encoding (using value -1) to the HTAB migration > > > stream (in the place of HPT si

Re: [Qemu-devel] [PATCHv5 0/4] Clean up compatibility mode handling

2017-06-07 Thread David Gibson
On Fri, Jun 02, 2017 at 01:15:03PM +1000, David Gibson wrote: > This is a rebased and revised version of my patches revising CPU > compatiblity mode handling on ppc, last posted in November. Since > then, many of the patches have already been merged (some for 2.9, some > since). This is what's le

Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Adjust firmware name for PCI bridges

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 10:20:27AM +0200, Thomas Huth wrote: > SLOF uses "pci" as name for PCI bridges nodes in the device tree instead > of "pci-bridges", so booting via bootindex from a device behind a PCI > bridge currently does not work since QEMU passes the wrong name in the > "qemu,boot-list"

Re: [Qemu-devel] [PATCH v5 1/2] spapr: Add a "no HPT" encoding to HTAB migration stream

2017-06-07 Thread David Gibson
On Wed, Jun 07, 2017 at 01:24:52PM +0530, Bharata B Rao wrote: > Add a "no HPT" encoding (using value -1) to the HTAB migration > stream (in the place of HPT size) when the guest doesn't allocate HPT. > This will help the target side to match target HPT with the source HPT > and thus enable success

Re: [Qemu-devel] [PATCH] Makefile: Do not generate files if "configure" has not been run yet

2017-06-07 Thread Thomas Huth
On 07.06.2017 22:59, Eric Blake wrote: > On 06/07/2017 02:11 PM, Thomas Huth wrote: >> When doing a "make -j10" in the vanilla QEMU source tree (without >> running "configure first), the Makefile currently generates two > > s/"configure/"configure"/ > >> files already, qemu-version.h and qemu-opt

Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread Thomas Huth
On 08.06.2017 02:18, David Gibson wrote: > On Wed, Jun 07, 2017 at 07:10:55PM +0200, Thomas Huth wrote: >> On 07.06.2017 16:34, Paolo Bonzini wrote: >>> >>> >>> On 07/06/2017 09:33, Thomas Huth wrote: On 07.06.2017 09:07, David Gibson wrote: > The pseries machine type doesn't usually use t

Re: [Qemu-devel] [PATCH v2] Fix the -accel parameter and the documentation for 'hax'

2017-06-07 Thread Thomas Huth
On 07.06.2017 22:14, Emilio G. Cota wrote: > On Thu, May 04, 2017 at 09:11:50 +0200, Markus Armbruster wrote: >> Thomas Huth writes: > (snip) >>> STEXI >>> @item -accel @var{name}[,prop=@var{value}[,...]] >>> @findex -accel >>> This is used to enable an accelerator. Depending on the target >>

Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread David Gibson
On Thu, Jun 08, 2017 at 06:33:57AM +0200, Thomas Huth wrote: > On 08.06.2017 02:18, David Gibson wrote: > > On Wed, Jun 07, 2017 at 07:10:55PM +0200, Thomas Huth wrote: > >> On 07.06.2017 16:34, Paolo Bonzini wrote: > >>> > >>> > >>> On 07/06/2017 09:33, Thomas Huth wrote: > On 07.06.2017 09:0

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix region format interface code

2017-06-07 Thread Haozhong Zhang
On 06/08/17 11:07 +0800, Xiao Guangrong wrote: > > > On 06/07/2017 04:06 PM, Haozhong Zhang wrote: > > Per ACPI 6.2, section 5.2.25.6 and JEDEC Annex L Release 3, the > > current region format interface code 0x201 indicates the block > > addressed function interface 1, rather than a byte addressa

[Qemu-devel] [PATCH 2/6] spapr: Eliminate DRC 'signalled' state variable

2017-06-07 Thread David Gibson
The 'signalled' field in the DRC appears to be entirely a torturous workaround for the fact that PCI devices were started in UNISOLATED state for unclear reasons. 1) 'signalled' is already meaningless for logical (so far, all non PCI) DRCs. It's always set to true (at least at any point it might

[Qemu-devel] [PATCH 3/6] spapr: Split DRC release from DRC detach

2017-06-07 Thread David Gibson
spapr_drc_detach() is called when qemu generic code requests a device be unplugged. It makes a number of tests, which could well delay further action until later, before actually detach the device from the DRC. This splits out the part which actually removes the device from the DRC into spapr_drc

[Qemu-devel] [PATCH 4/6] spapr: Make DRC reset force DRC into known state

2017-06-07 Thread David Gibson
The reset handler for DRCs attempts several state transitions which are subject to various checks and restrictions. But at reset time we know there is no guest, so we can ignore most of the usual sequencing rules and just set the DRC back to a known state. In fact, it's safer to do so. The exist

[Qemu-devel] [PATCH 0/6] spapr: DRC cleanups (part IV)

2017-06-07 Thread David Gibson
This fourth isntallment of cleanups to the DRC code introduces the first changes to the fundamental state handling. We change the initial states in the reset code and attach code for PCI devices, and are able to remove the 'signalled' state variable with those fixes. There are also some more mech

[Qemu-devel] [PATCH 5/6] spapr: Clean up DRC set_allocation_state path

2017-06-07 Thread David Gibson
The allocation-state indicator should only actually be implemented for "logical" DRCs, not physical ones. Factor a check for this, and also for valid indicator state values into rtas_set_allocation_state(). Because they don't exist for physical DRCs, there's no reason that we'd ever want more tha

[Qemu-devel] [PATCH 1/6] spapr: Start hotplugged PCI devices in ISOLATED state

2017-06-07 Thread David Gibson
PCI DRCs, and only PCI DRCs, are immediately moved to UNISOLATED isolation state once the device is attached. This has been there from the initial implementation, and it's not clear why. The state diagram in PAPR 13.4 suggests PCI devices should start in ISOLATED state until the guest moves them

[Qemu-devel] [PATCH 6/6] spapr: Clean up DRC set_isolation_state() path

2017-06-07 Thread David Gibson
There are substantial differences in the various paths through set_isolation_state(), both for setting to ISOLATED versus UNISOLATED state and for logical versus physical DRCs. So, split the set_isolation_state() method into isolate() and unisolate() methods, and give it different implementations

[Qemu-devel] [PATCH] vl: Fix broken thread=xxx option of the --accel parameter

2017-06-07 Thread Thomas Huth
Commit bde4d9205 ("Fix the -accel parameter and the documentation for 'hax'") introduced a regression by adding a new local accel_opts variable which shadows the variable with the same name that is declared at the beginning of the main() scope. This causes the qemu_tcg_configure() call later to be

Re: [Qemu-devel] [PATCH v2 1/1] qemu/migration: fix the double free problem on from_src_file

2017-06-07 Thread QingFeng Hao
在 2017/6/7 20:18, Dr. David Alan Gilbert 写道: * QingFeng Hao (ha...@linux.vnet.ibm.com) wrote: 在 2017/6/6 20:49, Kevin Wolf 写道: Am 06.06.2017 um 07:24 hat QingFeng Hao geschrieben: I can't tell for postcopy_ram_listen_thread() - commit 660819b didn't seem to remove a qemu_fclose() call th

Re: [Qemu-devel] [PATCH] monitor: Add -a (all) option to info registers

2017-06-07 Thread Suraj Jitindar Singh
On Wed, 2017-06-07 at 20:16 +0100, Dr. David Alan Gilbert wrote: > * Suraj Jitindar Singh (sjitindarsi...@gmail.com) wrote: > > The info registers command in the qemu monitor is used to dump > > register > > values. > > > > Currently this command uses the monitor cpu (which can be set by > > the >

[Qemu-devel] [PATCH V2] monitor: Add -a (all) option to info registers

2017-06-07 Thread Suraj Jitindar Singh
The info registers command in the qemu monitor is used to dump register values. Currently this command uses the monitor cpu (which can be set by the user) as the cpu for whose registers will be dumped. Sometimes it is useful to see the registers for all cpus and currently this requires setting the

Re: [Qemu-devel] [PATCH v3 3/5] xics: setup cpu at realize time

2017-06-07 Thread Cédric Le Goater
On 06/07/2017 10:55 PM, Greg Kurz wrote: > On Wed, 7 Jun 2017 20:11:38 +0200 > Cédric Le Goater wrote: > >> On 06/07/2017 07:17 PM, Greg Kurz wrote: >>> Until recently, spapr used to allocate ICPState objects for the lifetime >>> of the machine. They would only be associated to vCPUs in xics_cpu_

Re: [Qemu-devel] [Qemu-ppc] [PATCHv5 2/4] pseries: Move CPU compatibility property to machine

2017-06-07 Thread Suraj Jitindar Singh
On Fri, 2017-06-02 at 13:15 +1000, David Gibson wrote: > Server class POWER CPUs have a "compat" property, which is used to > set the > backwards compatibility mode for the processor.  However, this only > makes > sense for machine types which don't give the guest access to > hypervisor > privilege

Re: [Qemu-devel] [PATCH v1 1/1] char-socket: Don't report TCP socket waiting as an error

2017-06-07 Thread Markus Armbruster
Alistair Francis writes: > On Wed, Jun 7, 2017 at 12:19 AM, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> On 06/06/2017 18:30, Alistair Francis wrote: > > This is somehow confusing. I don't think it is worth having another > qemu_log_stderr() function rather than using er

Re: [Qemu-devel] [Qemu-ppc] [PATCHv5 0/4] Clean up compatibility mode handling

2017-06-07 Thread Suraj Jitindar Singh
On Thu, 2017-06-08 at 14:17 +1000, David Gibson wrote: > On Fri, Jun 02, 2017 at 01:15:03PM +1000, David Gibson wrote: > > This is a rebased and revised version of my patches revising CPU > > compatiblity mode handling on ppc, last posted in November.  Since > > then, many of the patches have alrea

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-07 Thread Peter Xu
On Wed, Jun 07, 2017 at 04:07:20PM +0300, Michael S. Tsirkin wrote: > On Wed, Jun 07, 2017 at 11:44:43AM +0800, Peter Xu wrote: > > On Wed, Jun 07, 2017 at 09:47:05AM +1000, David Gibson wrote: > > > On Tue, Jun 06, 2017 at 04:34:30PM +0200, Paolo Bonzini wrote: > > > > > > > > > > > > On 05/06/2

Re: [Qemu-devel] [PATCH] util/qemu-sockets: Drop unused helper socket_address_to_string()

2017-06-07 Thread Markus Armbruster
Mao Zhongyi writes: > Signed-off-by: Mao Zhongyi socket_address_to_string() was added in commit 7e84495 "Change net/socket.c to use socket_*() functions". The commit was reverted (commit 6160183), but the revert left in the helper. It was then redone (commit 883e4f7), and reverted again (comm

Re: [Qemu-devel] [PATCH v5 1/2] spapr: Add a "no HPT" encoding to HTAB migration stream

2017-06-07 Thread David Gibson
On Thu, Jun 08, 2017 at 02:28:48PM +1000, David Gibson wrote: > On Wed, Jun 07, 2017 at 01:24:52PM +0530, Bharata B Rao wrote: > > Add a "no HPT" encoding (using value -1) to the HTAB migration > > stream (in the place of HPT size) when the guest doesn't allocate HPT. > > This will help the target

[Qemu-devel] [PATCH RFC] spapr: ignore interrupts during reset state

2017-06-07 Thread Nikunj A Dadhania
Rebooting a SMP TCG guest is broken for both single/multi threaded TCG. When reset happens, all the CPUs are in halted state. First CPU is brought out of reset and secondary CPUs would be initialized by the guest kernel using a rtas call start-cpu. However, in case of TCG, decrementer interrupts

Re: [Qemu-devel] [PATCH v2 3/4] nvdimm: add a boolean option "restrict"

2017-06-07 Thread Haozhong Zhang
On 06/07/17 16:27 +0100, Stefan Hajnoczi wrote: > On Tue, Jun 06, 2017 at 03:22:28PM +0800, Haozhong Zhang wrote: > > If a vNVDIMM device is not backed by a DAX device and its "restrict" > > option is enabled, bit 3 of state flags in its region mapping > > structure will be set, in order to notify

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix region format interface code

2017-06-07 Thread Xiao Guangrong
On 06/08/2017 01:06 PM, Haozhong Zhang wrote: On 06/08/17 11:07 +0800, Xiao Guangrong wrote: On 06/07/2017 04:06 PM, Haozhong Zhang wrote: Per ACPI 6.2, section 5.2.25.6 and JEDEC Annex L Release 3, the current region format interface code 0x201 indicates the block addressed function interf

Re: [Qemu-devel] [PATCH] nvdimm acpi: fix region format interface code

2017-06-07 Thread Haozhong Zhang
On 06/08/17 14:40 +0800, Xiao Guangrong wrote: > > > On 06/08/2017 01:06 PM, Haozhong Zhang wrote: > > On 06/08/17 11:07 +0800, Xiao Guangrong wrote: > > > > > > > > > On 06/07/2017 04:06 PM, Haozhong Zhang wrote: > > > > Per ACPI 6.2, section 5.2.25.6 and JEDEC Annex L Release 3, the > > > > c

<    1   2   3   4   5