Re: [Qemu-devel] [PATCH v2] qapi: fix memory leak in QmpOutputVisitor

2016-10-23 Thread Markus Armbruster
Eric Blake writes: > On 10/21/2016 04:32 PM, Eric Blake wrote: >> In fact, applying this patch regresses to the very state that f24582d >> tried to prevent. However, I'm unable to see a difference in valgrind >> on tests/test-qmp-output-visitor either with or without this patch, >> which sadly m

Re: [Qemu-devel] [PATCH v12 0/2] virtio-crypto: virtio crypto device specification

2016-10-23 Thread Gonglei (Arei)
Ping And the corresponding source code v9 on QEMU side had been posted: [PATCH v9 00/12] virtio-crypto: introduce framework and device emulation https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg04755.html Regards, -Gonglei > -Original Message- > From: Gonglei (Arei) > Sen

Re: [Qemu-devel] [PATCH] net: rtl8139: limit processing of ring descriptors

2016-10-23 Thread Jason Wang
On 2016年10月21日 20:09, P J P wrote: From: Prasad J Pandit RTL8139 ethernet controller in C+ mode supports multiple descriptor rings, each with maximum of 64 descriptors. While processing transmit descriptor ring in 'rtl8139_cplus_transmit', it does not limit the descriptor count and runs forev

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-23 Thread Jike Song
On 10/19/2016 09:56 PM, Eric Blake wrote: > 17 levels of quoting is rather over-the-top. It is OKAY (and in fact > DESIRABLE) to trim your emails to relevant portions, when posting to a > high-volume list. Readers shouldn't have to scroll through pages of > deeply-nested quoting... Hi Eric, Sor

Re: [Qemu-devel] [Qemu-block] [PATCH v4 0/3] iotests: Fix test 162

2016-10-23 Thread Hao QingFeng
在 2016-10-16 1:27, Max Reitz 写道: On 13.10.2016 07:20, Hao QingFeng wrote: 在 2016-10-13 3:46, Max Reitz 写道: On 12.10.2016 10:55, Hao QingFeng wrote: Max, Just a common question for this case, if sshx block driver wasn't built into qemu-img, this case would fail as below: Good point, and th

Re: [Qemu-devel] [PATCH v4 RESEND 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-10-23 Thread David Gibson
On Fri, Oct 21, 2016 at 01:17:08PM +0800, Peter Xu wrote: > On Fri, Oct 21, 2016 at 11:50:05AM +1100, David Gibson wrote: > > [...] > > > > > In my setup the VFIO registered two memory areas with one page of > > > > unregistered memory > > > > between them. > > > > > > > > When I'm calling memor

Re: [Qemu-devel] [V6] fsdev: add IO throttle support to fsdev devices

2016-10-23 Thread Pradeep Jagadeesh
On Fri 21 Oct 2016 06:21:59 PM CEST, Pradeep Jagadeesh wrote: +static bool fsdev_throttle_check_for_wait(FsThrottle *fst, bool is_write) +{ + return throttle_schedule_timer(&fst->ts, &fst->tt, is_write); ^ There's an extra whitespace there. Removed +static void fsdev_thr

[Qemu-devel] [PATCH v3 3/3] utils: Add prefetch for Thunderx platform

2016-10-23 Thread vijay . kilari
From: Vijaya Kumar K Thunderx pass2 chip requires explicit prefetch instruction to give prefetch hint. To speed up live migration on Thunderx platform, prefetch instruction is added in zero buffer check function.The below results show live migration time improvement with prefetch instruction. VM

[Qemu-devel] [PATCH v3 2/3] utils: Add helper to read arm MIDR_EL1 register

2016-10-23 Thread vijay . kilari
From: Vijaya Kumar K Add helper API to read MIDR_EL1 registers to fetch cpu identification information. This helps in adding errata's and architecture specific features. This is implemented only for arm architecture. Signed-off-by: Vijaya Kumar K --- include/qemu/aarch64-cpuid.h | 9 + u

[Qemu-devel] [PATCH v3 1/3] cutils: Set __builtin_prefetch optional parameters

2016-10-23 Thread vijay . kilari
From: Vijaya Kumar K Optional parameters of __builtin_prefetch() which specifies rw and locality to 0's. For checking buffer is zero, set rw as read and temporal locality to 0. On arm64, __builtin_prefetch(addr) generates 'prfmpldl1keep' where __builtin_prefetch(addr, 0, 0) generates 'prfm p

[Qemu-devel] [PATCH v3 0/3] Live migration optimization for Thunderx platform

2016-10-23 Thread vijay . kilari
From: Vijaya Kumar K The CPU MIDR_EL1 register is exposed to userspace for arm64 with the below patch. https://lkml.org/lkml/2016/7/8/467 Thunderx platform requires explicit prefetch instruction to provide prefetch hint. Using MIDR_EL1 information, provided by above kernel patch, prefetch is exe

Re: [Qemu-devel] [PATCH v5 00/17] ppc/pnv: booting the kernel and reaching user space

2016-10-23 Thread David Gibson
On Sat, Oct 22, 2016 at 11:46:33AM +0200, Cédric Le Goater wrote: > Hello, > > Here is the latest version of the ppc/pnv platform patchset. PowerNV > (as Non-Virtualized) is the "baremetal" platform using the OPAL > firmware. It runs Linux on IBM and Open Power systems and it can be > used as an h

Re: [Qemu-devel] [PATCH v7] timer: a9gtimer: remove loop to auto-increment comparator

2016-10-23 Thread P J P
+-- On Tue, 18 Oct 2016, P J P wrote --+ | Use QEMU_ALIGN_UP instead of QEMU_ALIGN_DOWN | -> https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg03788.html | | diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c | index 772f85f..ce1dc63 100644 | --- a/hw/timer/a9gtimer.c | +++ b/hw/timer

[Qemu-devel] [PATCHv3 06/12] pseries: Move construction of /interrupt-controller fdt node

2016-10-23 Thread David Gibson
Currently the device tree node for the XICS interrupt controller is in spapr_create_fdt_skel(). As part of consolidating device tree construction to reset time, this moves it to a function called from spapr_build_fdt(). In addition we move the actual code into hw/intc/xics_spapr.c with the rest o

[Qemu-devel] [PATCHv3 11/12] pseries: Consolidate construction of /vdevice device tree node

2016-10-23 Thread David Gibson
Construction of the /vdevice node (and its children) is divided between spapr_create_fdt_skel() (at init time), which creates the base node, and spapr_populate_vdevice() (at reset time) which creates the nodes for each individual virtual device. This consolidates both into a single function called

[Qemu-devel] [PATCHv3 05/12] pseries: Consolidate RTAS loading

2016-10-23 Thread David Gibson
At each system reset, the pseries machine needs to load RTAS (the runtime portion of the guest firmware) into the VM. This means copying the actual RTAS code into guest memory, and also updating the device tree so that the guest OS and boot firmware can locate it. For historical reasons the copy

[Qemu-devel] [PATCHv3 02/12] pseries: Remove rtas_addr and fdt_addr fields from machinestate

2016-10-23 Thread David Gibson
These values are used only within ppc_spapr_reset(), so just change them to local variables. Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 14 +++--- include/hw/ppc/spapr.h | 1 - 2 files changed, 7 insertions(+), 8

Re: [Qemu-devel] [PATCHv2 01/12] pseries: Split device tree construction from device tree load

2016-10-23 Thread Alexey Kardashevskiy
On 21/10/16 13:56, David Gibson wrote: > spapr_finalize_fdt() both finishes building the device tree for the guest > and loads it into guest memory. For future cleanups, it's going to be > more convenient to do these two things separately. The loading portion is > pretty trivial, so we move it in

[Qemu-devel] [PATCHv3 00/12] pseries: Consolidate guest device tree construction

2016-10-23 Thread David Gibson
For historical reasons construction of the guest device tree in spapr is divided between spapr_create_fdt_skel() which is called at init time, and spapr_build_fdt() which runs at reset time. Over time, more and more things have needed to be moved to reset time. This series consolidates all the de

[Qemu-devel] [PATCHv3 10/12] pseries: Move /hypervisor node construction to fdt_build_fdt()

2016-10-23 Thread David Gibson
Currently the /hypervisor device tree node is constructed in spapr_create_fdt_skel(). As part of consolidating device tree construction to reset time, move it to a function called from spapr_build_fdt(). Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Michael Roth --- hw/ppc

[Qemu-devel] [PATCHv3 01/12] pseries: Split device tree construction from device tree load

2016-10-23 Thread David Gibson
spapr_finalize_fdt() both finishes building the device tree for the guest and loads it into guest memory. For future cleanups, it's going to be more convenient to do these two things separately. The loading portion is pretty trivial, so we move it inline into the caller, ppc_spapr_reset(). We al

[Qemu-devel] [PATCHv5 12/12] libqos: Change PCI accessors to take opaque BAR handle

2016-10-23 Thread David Gibson
The usual use model for the libqos PCI functions is to map a specific PCI BAR using qpci_iomap() then pass the returned token into IO accessor functions. This, and the fact that iomap() returns a (void *) which actually contains a PCI space address, kind of suggests that the return value from ioma

[Qemu-devel] [PATCHv3 08/12] pseries: Consolidate construction of /rtas device tree node

2016-10-23 Thread David Gibson
For historical reasons construction of the /rtas node in the device tree (amongst others) is split into several places. In particular it's split between spapr_create_fdt_skel(), spapr_build_fdt() and spapr_rtas_device_tree_setup(). In fact, as well as adding the actual RTAS tokens to the device t

[Qemu-devel] [PATCHv3 09/12] pseries: Move /event-sources construction to spapr_build_fdt()

2016-10-23 Thread David Gibson
The /event-sources device tree node is built from spapr_create_fdt_skel(). As part of consolidating device tree construction to reset time, this moves it to spapr_build_fdt(). Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Michael Roth --- hw/ppc/spapr.c | 6 +++---

[Qemu-devel] [PATCHv5 08/12] tests: Clean up IO handling in ide-test

2016-10-23 Thread David Gibson
ide-test uses many explicit inb() / outb() operations for its IO, which means it's not portable to non-x86 platforms. This cleans it up to use the libqos PCI accessors instead. Signed-off-by: David Gibson --- tests/ide-test.c | 179 --- 1 file

[Qemu-devel] [PATCHv3 12/12] pseries: Remove spapr_create_fdt_skel()

2016-10-23 Thread David Gibson
For historical reasons construction of the guest device tree in spapr is divided between spapr_create_fdt_skel() which is called at init time, and spapr_build_fdt() which runs at reset time. Over time, more and more things have needed to be moved to reset time. Previous cleanups mean the only thi

[Qemu-devel] [PATCHv5 07/12] libqos: Implement mmio accessors in terms of mem{read, write}

2016-10-23 Thread David Gibson
In the libqos PCI code we now have accessors both for registers (byte significance preserving) and for streaming data (byte address order preserving). These exist in both the interface for qtest drivers and in the machine specific backends. However, the register-style accessors aren't actually ne

[Qemu-devel] [PATCHv3 07/12] pseries: Consolidate construction of /chosen device tree node

2016-10-23 Thread David Gibson
For historical reasons, building the /chosen node in the guest device tree is split across several places and includes both parts which write the DT sequentially and others which use random access functions. This patch consolidates construction of the node into one place, using random access funct

[Qemu-devel] [PATCHv5 10/12] tests: Use qpci_mem{read, write} in ivshmem-test

2016-10-23 Thread David Gibson
ivshmem implements a block of shared memory in a PCI BAR. Currently our test case accesses this using qtest_mem{read,write}. However, deducing the correct addresses for these requires making assumptions about the internel format returned by qpci_iomap(), along with some ugly casts. This patch ch

[Qemu-devel] [PATCHv5 06/12] libqos: Add streaming accessors for PCI MMIO

2016-10-23 Thread David Gibson
Currently PCI memory (aka MMIO) space is accessed via a set of readb/writeb style accessors. This is what we want for accessing discrete registers of a certain size. However, there are a few cases where we instead need a "bag of bytes" style streaming interface to PCI MMIO space. This can be eit

[Qemu-devel] [PATCHv3 04/12] pseries: Move adding of fdt reserve map entries

2016-10-23 Thread David Gibson
The flattened device tree passed to pseries guests contains a list of reserved memory areas. Currently we construct this list early in spapr_create_fdt_skel() as we sequentially write the fdt. This will be inconvenient for upcoming cleanups, so this patch moves the reserve map changes to the end

[Qemu-devel] [PATCHv5 11/12] tests: Don't assume structure of PCI IO base in ahci-test

2016-10-23 Thread David Gibson
In a couple of places ahci-test makes assumptions about how the tokens returned from qpci_iomap() are formatted in ways it probably shouldn't. First in verify_state() it uses a non-NULL token to indicate that the AHCI device has been enabled (part of enabling is to iomap()). This changes it to us

[Qemu-devel] [PATCHv5 09/12] libqos: Add 64-bit PCI IO accessors

2016-10-23 Thread David Gibson
Currently the libqos PCI layer includes accessor helpers for 8, 16 and 32 bit reads and writes. It's likely that we'll want 64-bit accesses in the future (plenty of modern peripherals will have 64-bit reigsters). This adds them. For PIO (not MMIO) accesses on the PC backend, this is implemented

[Qemu-devel] [PATCHv5 00/12] Cleanups to qtest PCI handling

2016-10-23 Thread David Gibson
This series contains a number of cleanups to the libqos code for accessing PCI devices, and to tests which use it. The general aim is to improve the consistency of semantics across functions, and reduce the amount of intimate knowledge of the libqos PCI layer needed by tests. This should make it

[Qemu-devel] [PATCHv3 03/12] pseries: Make spapr_create_fdt_skel() get information from machine state

2016-10-23 Thread David Gibson
Currently spapr_create_fdt_skel() takes a bunch of individual parameters for various things it will put in the device tree. Some of these can already be taken directly from sPAPRMachineState. This patch alters it so that all of them can be taken from there, which will allow this code to be moved

[Qemu-devel] [PATCHv5 01/12] libqos: Give qvirtio_config_read*() consistent semantics

2016-10-23 Thread David Gibson
The 'addr' parameter to qvirtio_config_read*() doesn't have a consistent meaning: when using the virtio-pci versions, it's a full PCI space address, but for virtio-mmio, it's an offset from the device's base mmio address. This means that the callers need to do different things to calculate the add

[Qemu-devel] [PATCHv5 03/12] libqos: Move BAR assignment to common code

2016-10-23 Thread David Gibson
The PCI backends in libqos each supply an iomap() and iounmap() function which is used to set up a specified PCI BAR. But PCI BAR allocation takes place entirely within PCI space, so doesn't really need per-backend versions. For example, Linux includes generic BAR allocation code used on platform

[Qemu-devel] [PATCHv5 04/12] libqos: Better handling of PCI legacy IO

2016-10-23 Thread David Gibson
The usual model for PCI IO with libqos is to use qpci_iomap() to map a specific BAR for a PCI device, then perform IOs within that BAR using qpci_io_{read,write}*(). However, certain devices also have legacy PCI IO. In this case, instead of (or as well as) being accessed via PCI BARs, the device

Re: [Qemu-devel] [PATCHv4 11/11] libqos: Change PCI accessors to take opaque BAR handle

2016-10-23 Thread David Gibson
On Mon, Oct 24, 2016 at 02:19:47PM +1100, David Gibson wrote: > On Fri, Oct 21, 2016 at 03:23:51PM +0200, Greg Kurz wrote: > > On Fri, 21 Oct 2016 12:19:52 +1100 > > David Gibson wrote: > > > > > The usual use model for the libqos PCI functions is to map a specific PCI > > > BAR using qpci_iomap(

[Qemu-devel] [PATCHv5 02/12] libqos: Handle PCI IO de-multiplexing in common code

2016-10-23 Thread David Gibson
The PCI IO space (aka PIO, aka legacy IO) and PCI memory space (aka MMIO) are distinct address spaces by the PCI spec (although parts of one might be aliased to parts of the other in some cases). However, qpci_io_read*() and qpci_io_write*() can perform accesses to either space depending on parame

[Qemu-devel] [PATCHv5 05/12] tests: Adjust tco-test to use qpci_legacy_iomap()

2016-10-23 Thread David Gibson
Avoid tco-test making assumptions about the internal format of the address tokens passed to PCI IO accessors, by using the new qpci_legacy_iomap() function. Signed-off-by: David Gibson Reviewed-by: Laurent Vivier --- tests/tco-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [Qemu-devel] [PATCH v2] ppc: allow certain HV interrupts to be delivered to guests

2016-10-23 Thread David Gibson
On Fri, Oct 21, 2016 at 03:35:43PM +1100, Nicholas Piggin wrote: > On Fri, 21 Oct 2016 12:09:54 +1100 > David Gibson wrote: > > > On Fri, Oct 21, 2016 at 12:40:58AM +1100, Nicholas Piggin wrote: > > > On Thu, 20 Oct 2016 15:08:07 +0200 > > > Cédric Le Goater wrote: > > > > > > > On 10/20/2016

Re: [Qemu-devel] [PATCHv4 11/11] libqos: Change PCI accessors to take opaque BAR handle

2016-10-23 Thread David Gibson
On Fri, Oct 21, 2016 at 03:23:51PM +0200, Greg Kurz wrote: > On Fri, 21 Oct 2016 12:19:52 +1100 > David Gibson wrote: > > > The usual use model for the libqos PCI functions is to map a specific PCI > > BAR using qpci_iomap() then pass the returned token into IO accessor > > functions. This, and

Re: [Qemu-devel] [PATCH V4] colo-proxy: fix memory leak

2016-10-23 Thread Hailiang Zhang
On 2016/10/17 17:23, Zhang Chen wrote: Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity and add some comments. Signed-off-by: Zhang Chen --- Reviewed-by: zhanghailiang net/colo-compare.c| 34 +++--- net/filter-rewriter.c | 17 +++

Re: [Qemu-devel] [PATCH RFC 7/7] nbd/replication: implement .bdrv_get_info() for nbd and replication driver

2016-10-23 Thread Hailiang Zhang
Hi, On 2016/10/20 23:34, Eric Blake wrote: On 10/20/2016 08:57 AM, zhanghailiang wrote: Without this callback, there will be an error reports in the primary side: "qemu-system-x86_64: Couldn't determine the cluster size of the target image, which has no backing file: Operation not supported Abo

Re: [Qemu-devel] [PATCH v4 RESEND 1/3] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest

2016-10-23 Thread Jason Wang
On 2016年10月22日 03:47, Michael S. Tsirkin wrote: On Fri, Oct 21, 2016 at 03:14:00PM +0800, Jason Wang wrote: > > >On 2016年10月17日 23:44, Aviv B.D wrote: > >From: "Aviv Ben-David" > > > >This capability asks the guest to invalidate cache before each map operation. > >We can use this invalidation

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-23 Thread Alex Williamson
On Fri, 21 Oct 2016 01:47:25 +0530 Kirti Wankhede wrote: > Alex, > > Addressing your comments other than invalidation part. > > On 10/20/2016 2:32 AM, Alex Williamson wrote: > > On Tue, 18 Oct 2016 02:52:04 +0530 > > Kirti Wankhede wrote: > > > ... > >> Tested by assigning below combination

Re: [Qemu-devel] [PATCH V4] colo-proxy: fix memory leak

2016-10-23 Thread Zhang Chen
Anyone have some comments? this bug report by paolo ping... On 10/17/2016 05:23 PM, Zhang Chen wrote: Fix memory leak in colo-compare.c and filter-rewriter.c Report by Coverity and add some comments. Signed-off-by: Zhang Chen --- net/colo-compare.c| 34 +++-

Re: [Qemu-devel] [PATCH qemu] sysemu: support up to 1024 vCPUs

2016-10-23 Thread Alexey Kardashevskiy
On 19/10/16 23:23, Igor Mammedov wrote: > On Wed, 19 Oct 2016 10:39:12 +1100 > Alexey Kardashevskiy wrote: > >> On 18/10/16 22:00, Igor Mammedov wrote: >>> On Tue, 11 Oct 2016 09:19:10 +1100 >>> Alexey Kardashevskiy wrote: >>> Ping, anyone? >>> I have a similar patch >>> http://patchwo

Re: [Qemu-devel] [GIT PULL] pseries: Update SLOF firmware image to 20161019

2016-10-23 Thread Alexey Kardashevskiy
On 20/10/16 20:41, Peter Maydell wrote: > On 19 October 2016 at 00:15, Alexey Kardashevskiy wrote: >> The following changes since commit bd56ff33ed174cbe825a3b9929399ca804ce0f27: >> >> pseries: Update SLOF firmware image to 20161019 (2016-10-19 10:05:26 +1100) >> >> are available in the git repo

Re: [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-23 Thread Changlong Xie
Ping. Any comments? It's really a problem for NBD. Thanks -Xie On 10/12/2016 06:18 PM, Changlong Xie wrote: NBD is using the CoMutex in a way that wasn't anticipated. For example, if there are N(N=26, MAX_NBD_REQUESTS=16) nbd write requests, so we will invoke nbd_client_co_pwritev N t

Re: [Qemu-devel] [PATCHv2 07/12] pseries: Consolidate construction of /chosen device tree node

2016-10-23 Thread David Gibson
On Sun, Oct 23, 2016 at 07:33:59PM -0500, Michael Roth wrote: > Quoting David Gibson (2016-10-20 21:56:35) > > For historical reasons, building the /chosen node in the guest device tree > > is split across several places and includes both parts which write the DT > > sequentially and others which u

Re: [Qemu-devel] target-ppc: gdbstub breakpoints get stuck in an infinite loop on next/continue

2016-10-23 Thread David Gibson
On Sat, Oct 22, 2016 at 09:22:45AM +0100, Mark Cave-Ayland wrote: > On 21/10/16 23:02, Benjamin Herrenschmidt wrote: > > > On Fri, 2016-10-21 at 15:18 +0100, Mark Cave-Ayland wrote: > >> > >> bd6fefe71cec5a0c7d2be4ac96307f25db56abf9 is the first bad commit > >> commit bd6fefe71cec5a0c7d2be4ac963

Re: [Qemu-devel] [PATCHv2 07/12] pseries: Consolidate construction of /chosen device tree node

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:35) > For historical reasons, building the /chosen node in the guest device tree > is split across several places and includes both parts which write the DT > sequentially and others which use random access functions. > > This patch consolidates construction

Re: [Qemu-devel] [PATCHv2 06/12] pseries: Move construction of /interrupt-controller fdt node

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:34) > Currently the device tree node for the XICS interrupt controller is in > spapr_create_fdt_skel(). As part of consolidating device tree construction > to reset time, this moves it to a function called from spapr_build_fdt(). > > In addition we move the

Re: [Qemu-devel] [PATCHv2 12/12] pseries: Remove spapr_create_fdt_skel()

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:40) > For historical reasons construction of the guest device tree in spapr is > divided between spapr_create_fdt_skel() which is called at init time, and > spapr_build_fdt() which runs at reset time. Over time, more and more > things have needed to be moved

Re: [Qemu-devel] [PATCHv2 09/12] pseries: Move /event-sources construction to spapr_build_fdt()

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:37) > The /event-sources device tree node is built from spapr_create_fdt_skel(). > As part of consolidating device tree construction to reset time, this moves > it to spapr_build_fdt(). > > Signed-off-by: David Gibson > Reviewed-by: Thomas Huth Reviewed-by

Re: [Qemu-devel] [PATCHv2 10/12] pseries: Move /hypervisor node construction to fdt_build_fdt()

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:38) > Currently the /hypervisor device tree node is constructed in > spapr_create_fdt_skel(). As part of consolidating device tree construction > to reset time, move it to a function called from spapr_build_fdt(). > > Signed-off-by: David Gibson > Reviewed-

Re: [Qemu-devel] [PATCHv2 11/12] pseries: Consolidate construction of /vdevice device tree node

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:39) > Construction of the /vdevice node (and its children) is divided between > spapr_create_fdt_skel() (at init time), which creates the base node, and > spapr_populate_vdevice() (at reset time) which creates the nodes for each > individual virtual device. >

Re: [Qemu-devel] [PATCHv2 08/12] pseries: Consolidate construction of /rtas device tree node

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:36) > For historical reasons construction of the /rtas node in the device > tree (amongst others) is split into several places. In particular > it's split between spapr_create_fdt_skel(), spapr_build_fdt() and > spapr_rtas_device_tree_setup(). > > In fact, a

Re: [Qemu-devel] [PATCHv2 05/12] pseries: Consolidate RTAS loading

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:33) > At each system reset, the pseries machine needs to load RTAS (the runtime > portion of the guest firmware) into the VM. This means copying > the actual RTAS code into guest memory, and also updating the device > tree so that the guest OS and boot firmwa

Re: [Qemu-devel] [PATCHv2 04/12] pseries: Move adding of fdt reserve map entries

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:32) > The flattened device tree passed to pseries guests contains a list of > reserved memory areas. Currently we construct this list early in > spapr_create_fdt_skel() as we sequentially write the fdt. > > This will be inconvenient for upcoming cleanups, so

Re: [Qemu-devel] [PATCHv2 03/12] pseries: Make spapr_create_fdt_skel() get information from machine state

2016-10-23 Thread Michael Roth
Quoting David Gibson (2016-10-20 21:56:31) > Currently spapr_create_fdt_skel() takes a bunch of individual parameters > for various things it will put in the device tree. Some of these can > already be taken directly from sPAPRMachineState. This patch alters it so > that all of them can be taken

Re: [Qemu-devel] [PATCH v2] i2c: Fix SMBus read transactions to avoid double events

2016-10-23 Thread Corey Minyard
On 10/22/2016 04:20 AM, Peter Maydell wrote: I got here because Coverity complains that the i2c_start_transfer() calls in smbus.c don't check their return value. That suggests to me that we'd be better off having a different function (i2c_restart_transfer() ??) for the "I know we already did this

[Qemu-devel] [PATCH 2/3] Defer BrlAPI tty acquisition to when guest starts using device

2016-10-23 Thread Samuel Thibault
We do not want to catch the BrlAPI input/ouput immediately, but only when the guest has started discussing withour virtual device. This notably fixes input before the guest driver has started. Signed-off-by: Samuel Thibault --- backends/baum.c | 81 ++

[Qemu-devel] [PATCH 1/3] Add dots keypresses support to the baum braille device

2016-10-23 Thread Samuel Thibault
Signed-off-by: Samuel Thibault --- backends/baum.c | 234 +++- 1 file changed, 130 insertions(+), 104 deletions(-) diff --git a/backends/baum.c b/backends/baum.c index c537141..9f9f7c0 100644 --- a/backends/baum.c +++ b/backends/baum.c @@ -1,7

[Qemu-devel] [PATCH 3/3] Move getting XWindow ID from baum driver to graphical backend

2016-10-23 Thread Samuel Thibault
This adds two console functions, qemu_console_set_window_id and qemu_graphic_console_get_window_id, to let graphical backend record the window id in the QemuConsole structure, and let the baum driver read it. We can then move the SDL code from the baum driver to the sdl ui code, and add SDL2 and G

[Qemu-devel] [PATCHv2 0/3] baum driver update v2

2016-10-23 Thread Samuel Thibault
This is a series of updates for the baum driver, to improve its integration of input/output and fix focus tracking with sdl2 and gtk backends. The difference with the previously-posted series is that it should fix the win32 build. Loads of thanks for having set up the build bot :) Samuel Thibault

Re: [Qemu-devel] [PATCH 0/3] baum driver update

2016-10-23 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/3] baum driver update Type: series Message-id: 20161023184718.5892-1-samuel.thiba...@ens-lyon.org === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log -

Re: [Qemu-devel] [PATCH 0/3] baum driver update

2016-10-23 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20161023184718.5892-1-samuel.thiba...@ens-lyon.org Subject: [Qemu-devel] [PATCH 0/3] baum driver upda

[Qemu-devel] [PATCH 1/3] Add dots keypresses support to the baum braille device

2016-10-23 Thread Samuel Thibault
Signed-off-by: Samuel Thibault --- backends/baum.c | 234 +++- 1 file changed, 130 insertions(+), 104 deletions(-) diff --git a/backends/baum.c b/backends/baum.c index c537141..9f9f7c0 100644 --- a/backends/baum.c +++ b/backends/baum.c @@ -1,7

[Qemu-devel] [PATCH 3/3] Move getting XWindow ID from baum driver to graphical backend

2016-10-23 Thread Samuel Thibault
This adds two console functions, qemu_console_set_window_id and qemu_graphic_console_get_window_id, to let graphical backend record the window id in the QemuConsole structure, and let the baum driver read it. We can then move the SDL code from the baum driver to the sdl ui code, and add SDL2 and G

[Qemu-devel] [PATCH 0/3] baum driver update

2016-10-23 Thread Samuel Thibault
Hello, This is a series of updates for the baum driver, to improve its integration of input/output and fix focus tracking with sdl2 and gtk backends. Note that the second patch will fail style checking (braces {} are necessary for all arms of this statement) but that code is actually dropped by p

[Qemu-devel] [PATCH 2/3] Defer BrlAPI tty acquisition to when guest starts using device

2016-10-23 Thread Samuel Thibault
We do not want to catch the BrlAPI input/ouput immediately, but only when the guest has started discussing withour virtual device. This notably fixes input before the guest driver has started. Signed-off-by: Samuel Thibault --- backends/baum.c | 76 +-

Re: [Qemu-devel] [PATCH 00/38] char: fixes and improvements (was "[PATCH 0/9] Fix mux regression")

2016-10-23 Thread Paolo Bonzini
On 22/10/2016 11:52, Marc-André Lureau wrote: > Hi, > > This is a followup of the series "[PATCH 0/9] Fix mux regression > (commit 949055a2)". Paolo suggested a new API for qemu_chr_fe_* taking > a new CharBackend* structure as argument, and modifying properties to > hold such structure. I follo

Re: [Qemu-devel] [PATCH 0/5] nvram: Refactor OpenBIOS NVRAM code to support -prom-env on pseries, too

2016-10-23 Thread Mark Cave-Ayland
On 18/10/16 21:46, Thomas Huth wrote: > The OpenBIOS NVRAM set-up is based on the layout defined in the CHRP > (Common Hardware Reference Platform) specification. This is the same > layout that is also used by the PAPR specification and thus by the SLOF > firmware of the pseries machine. By refact

Re: [Qemu-devel] [PATCH] vhost: secure vhost shared log files using argv paremeter

2016-10-23 Thread Marc-André Lureau
- Original Message - > Commit 31190ed7 added a migration blocker in vhost_dev_init() to > check if memfd would succeed. It is better if this blocker first > checks if vhost backend requires shared log. This will avoid a > situation where a blocker is added inappropriately (e.g. shared > l

[Qemu-devel] [PATCH v5] raw_bsd: add offset and size options

2016-10-23 Thread Tomáš Golembiovský
Added two new options 'offset' and 'size'. This makes it possible to use only part of the file as a device. This can be used e.g. to limit the access only to single partition in a disk image or use a disk inside a tar archive (like OVA). When 'size' is specified we do our best to honour it. Signe

[Qemu-devel] [PATCH v5] Add 'offset' and 'size' options

2016-10-23 Thread Tomáš Golembiovský
v4 -> v5: - added two missing overflow checks - comments from Eric Blake: - renamed 'fail' label to 'end' - fixed optional fields in JSON scheme - no punctuation at the end of error_setg() message - spaces around PRI* macros - using QEMU_IS_ALIGNED - typos v3 -> v4: - fix stupid compil

Re: [Qemu-devel] [PATCH 37/38] char: allocate CharDriverState as a single object

2016-10-23 Thread Paolo Bonzini
On 22/10/2016 12:16, Marc-André Lureau wrote: > Use a single allocation for CharDriverState, this avoids extra > allocations & pointers, and is a step towards more object-oriented > CharDriver. > > Signed-off-by: Marc-André Lureau > --- > backends/baum.c | 23 ++--- > backends/msmouse.c

Re: [Qemu-devel] [PATCH 31/38] char: use a const CharDriver

2016-10-23 Thread Paolo Bonzini
On 22/10/2016 12:09, Marc-André Lureau wrote: > No need to allocate & copy fileds, let's use static const struct > instead. > > Signed-off-by: Marc-André Lureau > --- > backends/baum.c | 7 ++-- > backends/msmouse.c| 6 ++-- > backends/testdev.c| 6 ++-- > qemu-char.c

Re: [Qemu-devel] [PATCH 32/38] char: use a static array for backends

2016-10-23 Thread Paolo Bonzini
On 22/10/2016 12:09, Marc-André Lureau wrote: > Number and kinds of backends is known at compile-time, use a fixed-sized > static array to simplify iterations & lookups. > > Signed-off-by: Marc-André Lureau > --- > backends/baum.c | 2 +- > backends/msmouse.c| 2 +- > backends/te

Re: [Qemu-devel] [PATCH 09/38] char: introduce CharBackend

2016-10-23 Thread Paolo Bonzini
On 22/10/2016 11:52, Marc-André Lureau wrote: > +assert(be); I feel a GNOME perturbation in the force. :D The assertion (unlike g_return_value_if_fail) is unnecessary, because you'd crash anyway eventually. Paolo > +return be->chr; > +} > + > +bool qemu_chr_fe_init(CharBackend *b, Cha

Re: [Qemu-devel] [PATCH 07/38] xilinx: fix buffer overflow on realize

2016-10-23 Thread Paolo Bonzini
On 22/10/2016 11:52, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > hw/ssi/xilinx_spips.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c > index e2b77dc..ab7fa6f 100644 > --- a/hw/ssi/xilinx_spips.c >

Re: [Qemu-devel] [RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-10-23 Thread Li, Liang Z
> On Fri, Oct 21, 2016 at 10:25:21AM -0700, Dave Hansen wrote: > > On 10/20/2016 11:24 PM, Liang Li wrote: > > > Dave Hansen suggested a new scheme to encode the data structure, > > > because of additional complexity, it's not implemented in v3. > > > > So, what do you want done with this patch set

[Qemu-devel] [PATCH 4/4] hw/display: QOM'ify pl110.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao --- hw/display/pl110.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/display/pl110.c b/hw/display/pl110.c index c069c0b..eae4cde 100644 --- a/hw/display

[Qemu-devel] [PATCH 2/4] hw/arm: QOM'ify pxa2xx_gpio.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao --- hw/arm/pxa2xx_gpio.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c index 576a8eb..521dba

[Qemu-devel] [PATCH 1/4] hw/arm: QOM'ify musicpal.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao --- hw/arm/musicpal.c | 88 --- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c

[Qemu-devel] [PATCH 3/4] hw/arm: QOM'ify strongarm.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao --- hw/arm/strongarm.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 021cbf9..0f3216a 100644 --- a/hw

[Qemu-devel] [PATCH 0/4] QOM'ify work for arm

2016-10-23 Thread xiaoqiang zhao
Here is my QOM'ify work relate with arm. See each commit for details. xiaoqiang zhao (4): hw/arm: QOM'ify musicpal.c hw/arm: QOM'ify pxa2xx_gpio.c hw/arm: QOM'ify strongarm.c hw/display: QOM'ify pl110.c hw/arm/musicpal.c| 88 +++- hw/ar

[Qemu-devel] [PATCH 0/2] QOM'ify work for etraxfs

2016-10-23 Thread xiaoqiang zhao
This is some QOM'ify work relate with etraxfs. See each commit for details. xiaoqiang zhao (2): hw/timer: QOM'ify etraxfs_timer hw/net: QOM'ify etraxfs_eth.c hw/net/etraxfs_eth.c | 34 +++--- hw/timer/etraxfs_timer.c | 18 +- 2 files changed, 2

[Qemu-devel] [PATCH 2/2] hw/net: QOM'ify etraxfs_eth.c

2016-10-23 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/net/etraxfs_eth.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) dif

[Qemu-devel] [PATCH 1/2] hw/timer: QOM'ify etraxfs_timer

2016-10-23 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Edgar E. Iglesias Signed-off-by: xiaoqiang zhao --- hw/timer/etraxfs_timer.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/timer/etraxfs_ti