Re: [Qemu-devel] [RFC 01/10] target-arm: protect cpu_exclusive_*.

2015-02-26 Thread Mark Burton
> On 26 Feb 2015, at 23:56, Peter Maydell wrote: > > On 27 February 2015 at 03:09, Frederic Konrad > wrote: >> On 29/01/2015 16:17, Peter Maydell wrote: >>> >>> On 16 January 2015 at 17:19, wrote: From: KONRAD Frederic This adds a lock to avoid multiple exclusive acce

[Qemu-devel] [PATCH 9/9] microblaze: fix memory leak

2015-02-26 Thread arei.gonglei
From: Gonglei When not assign a -dtb argument, the variable dtb_filename storage returned from qemu_find_file(), which should be freed after using. Signed-off-by: Gonglei --- hw/microblaze/boot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/microblaze/boot.c b/hw/m

[Qemu-devel] [PATCH 4/9] macio: fix possible memory leak

2015-02-26 Thread arei.gonglei
From: Gonglei If ret = macio_initfn_ide() is less than 0, the timer_memory will leak the memory it points to. Signed-off-by: Gonglei --- hw/misc/macio/macio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index e0f1e88..bf96

[Qemu-devel] [PATCH 1/9] nbd: fix resource leak

2015-02-26 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nbd.c b/block/nbd.c index 2f3b9ad..b9955cb 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -273,6 +273,7 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags, */

[Qemu-devel] [PATCH 8/9] sysbus: fix memory leak

2015-02-26 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/core/sysbus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 84af593..b53c351 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -91,6 +91,8 @@ bool sysbus_has_irq(SysBusDevice *dev, int n) Ob

[Qemu-devel] [PATCH 0/9] Coverity defects fixes

2015-02-26 Thread arei.gonglei
From: Gonglei All those defects are spotted by Coverity, which classed in high impact outstanding defects. Reports come from scan.coverity.com for Qemu. Cc: Paolo Bonzini Cc: Markus Armbruster Cc: qemu-triv...@nongnu.org Gonglei (9): nbd: fix resource leak arm: fix memory leak sparc/leo

Re: [Qemu-devel] [PATCH] hmp: info spice: Show string channel name

2015-02-26 Thread Gerd Hoffmann
On Do, 2015-02-26 at 13:48 -0700, Eric Blake wrote: > On 02/26/2015 12:02 PM, Cole Robinson wrote: > > Useful for debugging. > > > > https://bugzilla.redhat.com/show_bug.cgi?id=822418 > > Signed-off-by: Cole Robinson > > --- > > hmp.c | 13 + > > 1 file changed, 13 insertions(+) > >

Re: [Qemu-devel] [BUG] Balloon malfunctions with memory hotplug

2015-02-26 Thread Markus Armbruster
Luiz Capitulino writes: > Hello, > > Reproducer: > > 1. Start QEMU with balloon and memory hotplug support: > > # qemu [...] -m 1G,slots=2,maxmem=2G -balloon virtio > > 2. Check balloon size: > > (qemu) info balloon > balloon: actual=1024 > (qemu) > > 3. Hotplug some memory: > > (qemu) object_ad

[Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2015-02-26 Thread Denis V. Lunev
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast c

[Qemu-devel] [PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2015-02-26 Thread Denis V. Lunev
The idea is that all other virtio devices are calling this helper to merge properties of the proxy device. This is the only difference in between this helper and code in inside virtio_instance_init_common. The patch should not cause any harm as property list in generic balloon code is empty. This

[Qemu-devel] [PATCH v2] migration: Convert 'status' of MigrationInfo to use an enum type

2015-02-26 Thread zhanghailiang
The original 'status' is an open-coded 'str' type, convert it to use an enum type. This conversion is backwards compatible, better documented and more convenient for future extensibility. In addition, Fix a typo for qapi-schema.json: comppleted -> completed Signed-off-by: zhanghailiang --- v2: -

[Qemu-devel] [PATCHv2 1/3] Add specific config options for PCI-E bridges

2015-02-26 Thread David Gibson
The i82801b11, ioh3420 and xio3130 PCI Express devices are currently included in the build unconditionally. While they could theoretically appear on any target platform with PCI-E, they're pretty unlikely to appear on platforms that aren't Intel derived. Therefore, to avoid presenting unlikely-to

[Qemu-devel] [PATCHv2 2/3] Create specific config option for "platform-bus"

2015-02-26 Thread David Gibson
Currently the "platform-bus" device is included for all softmmu builds. This bridge is intended for use on any platforms that require dynamic creation of sysbus devices. However, at present it is used only for the PPC E500 target, with plans for the ARM "virt" target in the immediate future. To a

Re: [Qemu-devel] [PATCH v9] Support vhd type VHD_DIFFERENCING

2015-02-26 Thread Xiaodong Gong
2015年2月25日 22:58于 "Stefan Hajnoczi" 写道: > > On Sun, Feb 15, 2015 at 09:35:49PM +0800, Xiaodong Gong wrote: > > Now qemu only supports vhd type VHD_FIXED and VHD_DYNAMIC, so qemu > > can't read snapshot volume of vhd, and can't support other storage > > features of vhd file. > > > > This patch add r

Re: [Qemu-devel] [BUG] Balloon malfunctions with memory hotplug

2015-02-26 Thread zhanghailiang
On 2015/2/27 3:26, Luiz Capitulino wrote: Hello, Reproducer: 1. Start QEMU with balloon and memory hotplug support: # qemu [...] -m 1G,slots=2,maxmem=2G -balloon virtio 2. Check balloon size: (qemu) info balloon balloon: actual=1024 (qemu) 3. Hotplug some memory: (qemu) object_add memory-b

Re: [Qemu-devel] [PATCH target-arm v1 11/15] arm: xilinx-zynq-mp: Add UART support

2015-02-26 Thread Alistair Francis
On Tue, Feb 24, 2015 at 9:04 AM, Peter Crosthwaite wrote: > There are 2x Cadence UARTSs in Zynq MP. Add them. > > Signed-off-by: Peter Crosthwaite Reviewed-by: Alistair Francis Thanks, Alistair > --- > hw/arm/xlnx-zynq-mp.c | 21 + > include/hw/arm/xlnx-zynq-mp.h

Re: [Qemu-devel] [PATCH target-arm v1 00/15] Next Generation Xilinx Zynq SoC

2015-02-26 Thread Alistair Francis
On Tue, Feb 24, 2015 at 9:04 AM, Peter Crosthwaite wrote: > Hi Peter and all, > > Xilinx's next gen SoC has been announced. This series adds a SoC and > machine model. > > Series start with addition of ARM cortex A53 support (P1 and P2). The > Soc skeleton is then added with GIC, EMACs and UARTs a

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-26 Thread Chen Gang S
On 2/27/15 11:01, Chris Metcalf wrote: > On 2/25/2015 8:44 PM, Chen Gang S wrote: >> On 02/26/2015 01:19 AM, Richard Henderson wrote: >>> On 02/24/2015 05:40 PM, Chen Gang S wrote: >> +static int gen_shl16insli(struct DisasContext *dc, >> + unsigned char rdst, unsig

Re: [Qemu-devel] [PATCH target-arm v1 10/15] char: cadence_uart: Split state struct and type into header

2015-02-26 Thread Alistair Francis
On Tue, Feb 24, 2015 at 9:04 AM, Peter Crosthwaite wrote: > To allow using the device with modern SoC programming conventions. The > state struct needs to be visible to embed the device in SoC containers. > > Signed-off-by: Peter Crosthwaite > --- > hw/char/cadence_uart.c | 29 +-

[Qemu-devel] [PATCH v6 15/15] spapr_pci: emit hotplug add/remove events during hotplug

2015-02-26 Thread Michael Roth
From: Tyrel Datwyler This uses extension of existing EPOW interrupt/event mechanism to notify userspace tools like librtas/drmgr to handle in-guest configuration/cleanup operations in response to device_add/device_del. Userspace tools that don't implement this extension will need to be run manua

Re: [Qemu-devel] [PATCH V2 08/11] virtio-pci: switch to use bus specific queue limit

2015-02-26 Thread Jason Wang
On Thu, Feb 26, 2015 at 6:20 PM, Michael S. Tsirkin wrote: On Thu, Feb 26, 2015 at 03:04:43PM +0800, Jason Wang wrote: Instead of depending on a macro, switch to use a bus specific queue limit. Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/v

[Qemu-devel] [PATCH v6 03/15] spapr_rtas: add get/set-power-level RTAS interfaces

2015-02-26 Thread Michael Roth
From: Nathan Fontenot These interfaces manage the power domains that guest devices are assigned to and are used to power on/off devices. Currently we only utilize 1 power domain, the 'live-insertion' domain, which automates power management of plugged/unplugged devices, essentially making these c

[Qemu-devel] [PATCH v6 04/15] spapr_rtas: add set-indicator RTAS interface

2015-02-26 Thread Michael Roth
From: Mike Day This interface allows a guest to control various platform/device sensors. Initially, we only implement support necessary to control sensors that are required for hotplug: DR connector indicators/LEDs, resource allocation state, and resource isolation state. See docs/specs/ppc-spap

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-26 Thread Chris Metcalf
On 2/25/2015 8:44 PM, Chen Gang S wrote: On 02/26/2015 01:19 AM, Richard Henderson wrote: On 02/24/2015 05:40 PM, Chen Gang S wrote: +static int gen_shl16insli(struct DisasContext *dc, + unsigned char rdst, unsigned char rsrc, short im16) Use uint16_t, as the field is

[Qemu-devel] [PATCH v6 14/15] spapr_pci: enable basic hotplug operations

2015-02-26 Thread Michael Roth
This enables hotplug of PCI devices to a PHB. Upon hotplug we generate the OF-nodes required by PAPR specification and IEEE 1275-1994 "PCI Bus Binding to Open Firmware" for the device. We associate the corresponding FDT for these nodes with the DRC corresponding to the slot, which will be fetched

[Qemu-devel] [PATCH v6 02/15] spapr_drc: initial implementation of sPAPRDRConnector device

2015-02-26 Thread Michael Roth
This device emulates a firmware abstraction used by pSeries guests to manage hotplug/dynamic-reconfiguration of host-bridges, PCI devices, memory, and CPUs. It is conceptually similar to an SHPC device, complete with LED indicators to identify individual slots to physical physical users and indicat

[Qemu-devel] [PATCH v6 08/15] spapr_events: re-use EPOW event infrastructure for hotplug events

2015-02-26 Thread Michael Roth
From: Nathan Fontenot This extends the data structures currently used to report EPOW events to guests via the check-exception RTAS interfaces to also include event types for hotplug/unplug events. This is currently undocumented and being finalized for inclusion in PAPR specification, but we impl

[Qemu-devel] [PATCH v6 00/15] spapr: add support for pci hotplug

2015-02-26 Thread Michael Roth
These patches are based on ppc-next, and can also be obtained from: https://github.com/mdroth/qemu/commits/spapr-hotplug-pci-v6 Please note there's a potential start-up segfault in this branch due to a recent regression in ppc-next. A fix has been posted here: http://permalink.gmane.org/gmane.

[Qemu-devel] [PATCH v6 01/15] docs: add sPAPR hotplug/dynamic-reconfiguration documentation

2015-02-26 Thread Michael Roth
This adds a general overview of hotplug/dynamic-reconfiguration for sPAPR/pSeries guest. As specified in PAPR+ v2.7. Signed-off-by: Michael Roth Reviewed-by: David Gibson --- docs/specs/ppc-spapr-hotplug.txt | 287 +++ 1 file changed, 287 insertions(+) crea

[Qemu-devel] [PATCH v6 05/15] spapr_rtas: add get-sensor-state RTAS interface

2015-02-26 Thread Michael Roth
From: Mike Day This interface allows a guest to read various platform/device sensors. initially, we only implement support necessary to support hotplug: reading of the dr-entity-sense sensor, which communicates the state of a hotplugged resource/device to the guest (EMPTY/PRESENT/UNUSABLE). See

[Qemu-devel] [PATCH v6 13/15] pci: make pci_bar useable outside pci.c

2015-02-26 Thread Michael Roth
We need to work with PCI BARs to generate OF properties during PCI hotplug for sPAPR guests. Signed-off-by: Michael Roth Reviewed-by: David Gibson Cc: m...@redhat.com --- hw/pci/pci.c | 2 +- include/hw/pci/pci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pc

Re: [Qemu-devel] [PATCH target-arm v1 07/15] net: cadence_gem: Split state struct and type into header

2015-02-26 Thread Alistair Francis
On Tue, Feb 24, 2015 at 9:04 AM, Peter Crosthwaite wrote: > To allow using the device with modern SoC programming conventions. The > state struct needs to be visible to embed the device in SoC containers. > > Signed-off-by: Peter Crosthwaite > --- > hw/net/cadence_gem.c | 43 +---

[Qemu-devel] [PATCH v6 11/15] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge

2015-02-26 Thread Michael Roth
This option enables/disables PCI hotplug for a particular PHB. Also add machine compatibility code to disable it by default for machine types prior to pseries-2.3. Signed-off-by: Michael Roth Reviewed-by: David Gibson --- hw/ppc/spapr.c | 5 + hw/ppc/spapr_pci.c | 2 +

[Qemu-devel] [PATCH v6 10/15] spapr_drc: add spapr_drc_populate_dt()

2015-02-26 Thread Michael Roth
This function handles generation of ibm,drc-* array device tree properties to describe DRC topology to guests. This will by used by the guest to direct RTAS calls to manage any dynamic resources we associate with a particular DR Connector as part of hotplug/unplug. Since general management of boot

[Qemu-devel] [PATCH v6 09/15] spapr_events: event-scan RTAS interface

2015-02-26 Thread Michael Roth
From: Tyrel Datwyler We don't actually rely on this interface to surface hotplug events, and instead rely on the similar-but-interrupt-driven check-exception RTAS interface used for EPOW events. However, the existence of this interface is needed to ensure guest kernels initialize the event-report

Re: [Qemu-devel] [PATCH V2 03/11] virito: introduce bus specific queue limit

2015-02-26 Thread Jason Wang
On Thu, Feb 26, 2015 at 6:19 PM, Michael S. Tsirkin wrote: On Thu, Feb 26, 2015 at 03:04:38PM +0800, Jason Wang wrote: This patch introduces a bus specific queue limitation. It will be useful for increasing the limit for one of the bus without disturbing other buses. Is this about s39

Re: [Qemu-devel] [RFC PATCH 01/14] docs: block replication's description

2015-02-26 Thread Fam Zheng
On Fri, 02/27 10:27, Wen Congyang wrote: > > 1. nbd-target0 is writable here, without the drive-backup, hidden0 could be > > corrupted by writings to it. So there need to be a new convention and > > invariance to follow. > > Hmm, I understand while the hidden-disk should be opened automatically no

Re: [Qemu-devel] [PATCH v2] sheepdog: fix confused return values

2015-02-26 Thread Liu Yuan
On Wed, Feb 18, 2015 at 11:57:55AM +0800, Liu Yuan wrote: > From: Liu Yuan > > These functions mix up -1 and -errno in return values and would might cause > trouble error handling in the call chain. > > This patch let them return -errno and add some comments. > > Cc: qemu-devel@nongnu.org > Cc:

Re: [Qemu-devel] [PATCH target-arm v1 04/15] arm: xlnx-zynq-mp: Add GIC

2015-02-26 Thread Alistair Francis
On Tue, Feb 24, 2015 at 9:04 AM, Peter Crosthwaite wrote: > And connect IRQ outputs to the CPUs. > > Signed-off-by: Peter Crosthwaite Reviewed-by: Alistair Francis Thanks, Alistair > --- > hw/arm/xlnx-zynq-mp.c | 19 +++ > include/hw/arm/xlnx-zynq-mp.h | 2 ++ > 2 fi

[Qemu-devel] [PATCH] bootdevice: fix segment fault when booting guest with '-kernel' and '-initrd'

2015-02-26 Thread arei.gonglei
From: Gonglei Reproducer: $./qemu-system-x86_64 --enable-kvm -kernel /home/vmlinuz-2.6.32.12-0.7-default \ -initrd /home/initrd-2.6.32.12-0.7-default -append \ "root=/dev/ram rw console=ttyS0,115200" -dtb guest.dtb -vnc :10 --monitor stdio -smp 2 QEMU 2.2.50 monitor - type 'help' for more

[Qemu-devel] [PATCH v2 1/9] libqos/ahci: Add halted command helpers

2015-02-26 Thread John Snow
Sometimes we want a command to halt the VM instead of complete successfully, so it'd be nice to let the libqos/ahci functions cope with such scenarios. Signed-off-by: John Snow --- tests/libqos/ahci.c | 27 +++ tests/libqos/ahci.h | 3 +++ 2 files changed, 30 insertions(

[Qemu-devel] [PATCH v2 8/9] qtest/ahci: add halted dma test

2015-02-26 Thread John Snow
If we're going to test the migration of halted DMA jobs, we should probably check to make sure we can resume them locally as a first step. Signed-off-by: John Snow --- tests/ahci-test.c | 60 +++ 1 file changed, 60 insertions(+) diff --git a/t

[Qemu-devel] [PATCH v2 7/9] qtest/ahci: add flush migrate test

2015-02-26 Thread John Snow
Use blkdebug to inject an error on first flush, then attempt to flush on the first guest. When the error halts the VM, migrate to the second VM, and attempt to resume the command. Signed-off-by: John Snow --- tests/ahci-test.c | 52 +++- 1 file cha

[Qemu-devel] [PATCH v2 5/9] qtest/ahci: Add migration test

2015-02-26 Thread John Snow
Notes: * The migration is performed on QOSState objects. * The migration is performed in such a way that it does not assume consistency between the allocators attached to each. That is to say, you can use each QOSState object completely independently and then at an arbitrary point deci

[Qemu-devel] [PATCH v2 2/9] libqos/ahci: Fix sector set method

2015-02-26 Thread John Snow
|| probably does not mean the same thing as |. Additionally, allow users to submit a prd_size of 0 to indicate that they'd like to continue using the default. Signed-off-by: John Snow --- tests/libqos/ahci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/libqos/

Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors

2015-02-26 Thread Eduardo Habkost
On Fri, Feb 27, 2015 at 08:00:25AM +0900, Peter Maydell wrote: > On 27 February 2015 at 07:51, Eduardo Habkost wrote: > > On Fri, Feb 27, 2015 at 07:44:29AM +0900, Peter Maydell wrote: > >> When can it actually fail? Have you seen it do this in practice? > >> (Note that this is only called from fo

Re: [Qemu-devel] [RFC 01/10] target-arm: protect cpu_exclusive_*.

2015-02-26 Thread Peter Maydell
On 27 February 2015 at 03:09, Frederic Konrad wrote: > On 29/01/2015 16:17, Peter Maydell wrote: >> >> On 16 January 2015 at 17:19, wrote: >>> >>> From: KONRAD Frederic >>> >>> This adds a lock to avoid multiple exclusive access at the same time in >>> case of >>> TCG multithread. >> All the s

Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors

2015-02-26 Thread Eduardo Habkost
On Fri, Feb 27, 2015 at 07:44:29AM +0900, Peter Maydell wrote: > On 27 February 2015 at 01:06, Eduardo Habkost wrote: > > On Thu, Feb 26, 2015 at 08:27:12AM +0900, Peter Maydell wrote: > >> Rather than bailing out here, it would be better to > >> propagate the failure out to the caller, which can

Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors

2015-02-26 Thread Peter Maydell
On 27 February 2015 at 01:06, Eduardo Habkost wrote: > On Thu, Feb 26, 2015 at 08:27:12AM +0900, Peter Maydell wrote: >> Rather than bailing out here, it would be better to >> propagate the failure out to the caller, which can >> then fail the fork syscall it's trying to emulate >> by returning a

Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory

2015-02-26 Thread John Snow
(Please don't top-post on qemu-devel: gmail is kind of awful about this, but if you expand the conversation while in-reply, you can edit beneath the quote instead of above.) On 02/26/2015 04:31 PM, Jordan Hargrave wrote: The problem is the FIS registers have stale data. SeaBIOS initialization

Re: [Qemu-devel] [RFC v3 04/10] vfio: add pcie extanded capability support

2015-02-26 Thread Alex Williamson
On Thu, 2015-02-26 at 17:37 +0800, Chen Fan wrote: > On 02/11/2015 12:39 AM, Alex Williamson wrote: > > On Tue, 2015-02-10 at 15:03 +0800, Chen Fan wrote: > >> when we detect extanded capability in vfio device, then > >> we should initialize the vfio device corresponding feature > >> register bits.

[Qemu-devel] [PATCH v3 5/5] target-i386: Move APIC ID compatibility code to pc.c

2015-02-26 Thread Eduardo Habkost
The APIC ID compatibility code is required only for PC, and now that x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that code can be moved to pc.c. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 35 +++ targe

[Qemu-devel] [PATCH v3 3/5] target-i386: Set APIC ID using cpu_index on legacy cpu_x86_init()

2015-02-26 Thread Eduardo Habkost
The PC CPU initialization code already sets apic-id based on the CPU topology, and CONFIG_USER doesn't need the topology-based APIC ID calculation code. Make cpu_x86_init() (used only by CONFIG_USER) set apic-id before realizing the CPU (just like PC already does), so we can simplify x86_cpu_initf

[Qemu-devel] [PATCH v3 0/5] target-i386: Simplify APIC ID initialization, move compat code to pc.c

2015-02-26 Thread Eduardo Habkost
This series removes the APIC ID initialization code from x86_cpu_initfn() (getting us one step closer to making object_new() of X86CPU have no dependency on cpu_exec_init() and other global QEMU state), and moves the APIC ID compatibility logic from target-i386/cpu.c to hw/i386/pc.c. Changes v1 ->

[Qemu-devel] [PATCH 4/4] cpu: Make cpu_init() return QOM object

2015-02-26 Thread Eduardo Habkost
Instead of making cpu_init() return CPUArchState, return a CPU object. Changes were made using the Coccinelle semantic patch below. @@ typedef CPUState; identifier e; expression args; type CPUArchState; @@ - e = + cpu = cpu_init(args); - if (!e) { + if (!cpu)

[Qemu-devel] [PATCH 3/4] unicore32: Use uc32_cpu_init()

2015-02-26 Thread Eduardo Habkost
Instead of using the legacy cpu_init() function, use uc32_cpu_init() to create a UniCore32CPU object. Signed-off-by: Eduardo Habkost Cc: Guan Xuetao --- hw/unicore32/puv3.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c index

[Qemu-devel] [PATCH 2/4] m68k: Use cpu_m68k_init()

2015-02-26 Thread Eduardo Habkost
Instead of using the legacy cpu_init() function, use cpu_m68k_init() directly to create a M68kCPU object. Signed-off-by: Eduardo Habkost --- hw/m68k/dummy_m68k.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/m68k/dummy_m68k.c b/hw/m68k/dummy_m68k.c index facd561..2

Re: [Qemu-devel] [RFC 01/10] target-arm: protect cpu_exclusive_*.

2015-02-26 Thread Alexander Graf
> Am 26.02.2015 um 19:09 schrieb Frederic Konrad : > >> On 29/01/2015 16:17, Peter Maydell wrote: >>> On 16 January 2015 at 17:19, wrote: >>> From: KONRAD Frederic >>> >>> This adds a lock to avoid multiple exclusive access at the same time in >>> case of >>> TCG multithread. >>> >>> Sign

Re: [Qemu-devel] [PATCH v5 15/16] spapr_pci: enable basic hotplug operations

2015-02-26 Thread Michael Roth
Quoting Michael Roth (2015-02-25 00:40:26) > Quoting Michael Roth (2015-02-24 23:17:24) > > Quoting David Gibson (2015-02-24 21:11:29) > > > On Mon, Feb 16, 2015 at 08:27:51AM -0600, Michael Roth wrote: > > > > This enables hotplug for PHB bridges. Upon hotplug we generate the > > > > > > "PCI Hos

[Qemu-devel] [PATCH 2/2] docs: add memory-hotplug.txt

2015-02-26 Thread Luiz Capitulino
This document describes how to use memory hotplug in QEMU. Signed-off-by: Luiz Capitulino --- docs/memory-hotplug.txt | 77 + 1 file changed, 77 insertions(+) create mode 100644 docs/memory-hotplug.txt diff --git a/docs/memory-hotplug.txt b/docs/

[Qemu-devel] [PATCH 0/2] improve memory hotplug documentation

2015-02-26 Thread Luiz Capitulino
Hi, I started playing with memory hotplug the other day and missed some good documentation explaining how to use the feature. I figured I could contribute some documentation myself, although I'm new to the feature so the chances of making mistakes is high. Review is very much appreciated. Luiz C

[Qemu-devel] [BUG] Balloon malfunctions with memory hotplug

2015-02-26 Thread Luiz Capitulino
Hello, Reproducer: 1. Start QEMU with balloon and memory hotplug support: # qemu [...] -m 1G,slots=2,maxmem=2G -balloon virtio 2. Check balloon size: (qemu) info balloon balloon: actual=1024 (qemu) 3. Hotplug some memory: (qemu) object_add memory-backend-ram,id=mem1,size=1G (qemu) device_ad

[Qemu-devel] [PATCH v2 1/2] pci-hotplug-old: Has been dead for five major releases, bury

2015-02-26 Thread Markus Armbruster
Commit 79ca616 (v1.6.0) accidentally disabled legacy x86-only HMP commands pci_add, pci_del: it defined CONFIG_PCI_HOTPLUG only as make variable, not as preprocessor macro, killing the code conditional on defined(CONFIG_PCI_HOTPLUG_OLD). In all this time, nobody reported the loss. I only noticed

Re: [Qemu-devel] [RfC PATCH 06/15] virtio-gpu/2d: add virtio gpu core code

2015-02-26 Thread Max Reitz
On 2015-02-23 at 05:23, Gerd Hoffmann wrote: This patch adds the core code for virtio gpu emulation, covering 2d support. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- hw/display/Makefile.objs | 2 + hw/display/virtio-gpu.c

Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors

2015-02-26 Thread Eduardo Habkost
On Thu, Feb 26, 2015 at 08:27:12AM +0900, Peter Maydell wrote: > On 26 February 2015 at 04:58, Eduardo Habkost wrote: > > This was the only caller of cpu_init() that was not checking for NULL > > yet. > > > > Reviewed-by: Paolo Bonzini > > Signed-off-by: Eduardo Habkost > > --- > > linux-user/m

Re: [Qemu-devel] [PATCH RFC] migration: Convert 'status' of MigrationInfo to use an enum type

2015-02-26 Thread Eric Blake
On 02/26/2015 12:58 AM, zhanghailiang wrote: > The original 'status' is an open-coded 'str' type, convert it to use an > enum type. > This conversion is backwards compatible, better documented and > more convenient for future extensibility. > > In addition, Fix a typo for qapi-schema.json: compple

Re: [Qemu-devel] [PATCH v2 1/1] qmp-commands.hx: Fix several typos

2015-02-26 Thread Eric Blake
On 02/26/2015 07:35 AM, Alberto Garcia wrote: > Signed-off-by: Alberto Garcia > --- > qmp-commands.hx | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

Re: [Qemu-devel] [PATCH RFC 1/1] s390x/pci: Extend pci representation by new zpci device

2015-02-26 Thread Alexander Graf
On 26.02.15 12:59, Frank Blaschka wrote: > This patch extends the current s390 pci implementation to > provide more flexibility in configuration of s390 specific > device handling. For this we had to introduce a new facility > (and bus) to hold devices representing information actually > provided

Re: [Qemu-devel] [RFC PATCH 06/14] NBD client: connect to nbd server later

2015-02-26 Thread Paolo Bonzini
On 25/02/2015 15:22, Max Reitz wrote: > 3. nbd_co_discard() > quorum doens't call bdrv_co_discard(), so it is OK to return -EIO here. That can change, so I think you should return -EIO either everywhere or nowhere. Which probably means nowhere. > Hm, okay. How about adding an option to qu

Re: [Qemu-devel] [RFC PATCH 11/14] allow writing to the backing file

2015-02-26 Thread Paolo Bonzini
On 23/02/2015 23:03, Max Reitz wrote: > On 2015-02-11 at 22:07, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >> block.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > I don't think this is a good idea.

[Qemu-devel] [PULL 13/13] qtest: Use qemu_opt_set() instead of qemu_opts_parse()

2015-02-26 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qtest.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/qtest.c b/qtest.c index 2bca04e..8d1e66c 100644 --- a/qtest.c +++ b/qtest.c @@ -520,16 +520,13 @@ static void qtest_event(void *opaque, int event)

[Qemu-devel] [PULL 05/13] block: Suppress unhelpful extra errors in bdrv_img_create()

2015-02-26 Thread Markus Armbruster
bdrv_img_create() uses qemu_opt_set(), which reports errors with qerror_report_err(). Its error messages aren't helpful here, the caller reports one that actually makes sense. I don't know how to trigger the error conditions, though. Switch to qemu_opt_set_err() to get rid of the unwanted messag

[Qemu-devel] [PULL 11/13] qemu-sockets: Simplify setting numeric and boolean options

2015-02-26 Thread Markus Armbruster
Don't convert numbers or bools to strings for use with qemu_opt_set(), simply use qemu_opt_set_number() or qemu_opt_set_bool() instead. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- util/qemu-sockets.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff -

[Qemu-devel] [PULL 06/13] QemuOpts: Drop qemu_opt_set(), rename qemu_opt_set_err(), fix use

2015-02-26 Thread Markus Armbruster
qemu_opt_set() is a wrapper around qemu_opt_set() that reports the error with qerror_report_err(). Most of its users assume the function can't fail. Make them use qemu_opt_set_err() with &error_abort, so that should the assumption ever break, it'll break noisily. Just two users remain, in util/q

[Qemu-devel] [PULL 04/13] qemu-img: Suppress unhelpful extra errors in convert, resize

2015-02-26 Thread Markus Armbruster
add_old_style_options() for img_convert() and img_resize() use qemu_opt_set(), which reports errors with qerror_report_err(). Its error messages aren't helpful here, the caller reports one that actually makes sense. Reproducer: $ qemu-img convert -B raw in.img out.img qemu-img: Invalid p

[Qemu-devel] [PULL 07/13] QemuOpts: Propagate errors through opts_do_parse()

2015-02-26 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- util/qemu-option.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index 928b86f..8a0f69e 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @

[Qemu-devel] [PULL 01/13] QemuOpts: Convert qemu_opt_set_bool() to Error, fix its use

2015-02-26 Thread Markus Armbruster
Return the Error object instead of reporting it with qerror_report_err(). Change callers that assume the function can't fail to pass &error_abort, so that should the assumption ever break, it'll break noisily. Turns out all callers outside its unit test assume that. We could drop the Error ** ar

[Qemu-devel] [PULL 02/13] QemuOpts: Convert qemu_opt_set_number() to Error, fix its use

2015-02-26 Thread Markus Armbruster
Return the Error object instead of reporting it with qerror_report_err(). Change callers that assume the function can't fail to pass &error_abort, so that should the assumption ever break, it'll break noisily. Turns out all callers outside its unit test assume that. We could drop the Error ** ar

Re: [Qemu-devel] [PATCH V13 3/4] pc: add a Virtual Machine Generation ID device

2015-02-26 Thread Igor Mammedov
On Wed, 25 Feb 2015 20:59:41 +0100 "Michael S. Tsirkin" wrote: > > diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl > > index a611e07..884038b 100644 > > --- a/hw/i386/acpi-dsdt.dsl > > +++ b/hw/i386/acpi-dsdt.dsl > > @@ -306,8 +306,6 @@ DefinitionBlock ( > > Scope(\_GPE) { > >

Re: [Qemu-devel] [PATCH v3 05/11] block: Move BDS close notifiers into BB

2015-02-26 Thread Max Reitz
On 2015-02-25 at 21:19, Fam Zheng wrote: On Wed, 02/25 09:12, Max Reitz wrote: Because I need a Notifier pointer to give to blk_add_{insert,remove}_bs_notifier(), and most importantly because the only "opaque" object the callbacks will receive is that Notifier pointer (which in this case is actu

Re: [Qemu-devel] [PATCH 9/9] throttle: add name of ThrottleGroup to BlockDeviceInfo

2015-02-26 Thread Alberto Garcia
On Wed, Feb 25, 2015 at 08:23:10AM -0700, Eric Blake wrote: > How about query-block-throttle, returning an array of dicts. > > => { "execute":"query-block-throttle" } > <= { "return": [ > { "name": "throttle1", "bps_max": 10, >"nodes": [ "block0", "block1" ] }, > { "name": "

Re: [Qemu-devel] [PULL 08/21] rcu: run RCU callbacks under the BQL

2015-02-26 Thread Leon Alrae
On 26/02/2015 11:35, Paolo Bonzini wrote: > > > On 25/02/2015 18:16, Leon Alrae wrote: >> Hi, >> >> On 16/02/2015 18:17, Paolo Bonzini wrote: >>> This needs to go away sooner or later, but one complication is the >>> complex VFIO data structures that are modified in instance_finalize. >>> Take a

[Qemu-devel] [PATCH 3/3] xen: Remove xen_cmos_set_s3_resume()

2015-02-26 Thread Thomas Huth
The function is not used anymore, and thus can be deleted. Signed-off-by: Thomas Huth Acked-by: Stefano Stabellini --- include/hw/xen/xen.h |1 - xen-hvm-stub.c |4 2 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h inde

[Qemu-devel] [PATCH 1/3] ui: Removed unused functions

2015-02-26 Thread Thomas Huth
Remove qemu_console_displaystate(), qemu_remove_kbd_event_handler(), qemu_different_endianness_pixelformat() and cpkey(), since they are completely unused. Signed-off-by: Thomas Huth Reviewed-by: Gerd Hoffmann --- include/ui/console.h |3 --- ui/console.c | 12 ui/d3d

[Qemu-devel] [PATCH v3 0/3] Remove unused functions

2015-02-26 Thread Thomas Huth
There are quite a lot of completely unused functions scattered around in the QEMU sources - here are some patches to remove at least some of them. I've limited the patches now to the ones which have been ack'ed by the corresponding subsystem maintainers, so it should be really save now to apply th

Re: [Qemu-devel] [PATCH 2/3] AioContext: acquire/release AioContext during aio_poll

2015-02-26 Thread Paolo Bonzini
On 25/02/2015 06:45, Fam Zheng wrote: > On Fri, 02/20 17:26, Paolo Bonzini wrote: >> This is the first step in pushing down acquire/release, and will let >> rfifolock drop the contention callback feature. >> >> Signed-off-by: Paolo Bonzini >> --- >> aio-posix.c | 9 + >> aio-wi

Re: [Qemu-devel] [PATCH V2 04/11] virtio-ccw: introduce ccw specific queue limit

2015-02-26 Thread Cornelia Huck
On Thu, 26 Feb 2015 15:04:39 +0800 Jason Wang wrote: > Instead of depending on marco, using a bus specific limit. > > Cc: Alexander Graf > Cc: Cornelia Huck > Cc: Christian Borntraeger > Cc: Richard Henderson > Signed-off-by: Jason Wang > --- > hw/s390x/s390-virtio-ccw.c | 7 +-- > hw

Re: [Qemu-devel] [PATCH 1/6] target-arm: kvm: save/restore mp state

2015-02-26 Thread Paolo Bonzini
On 25/02/2015 17:02, Alex Bennée wrote: > +#if defined CONFIG_KVM > +{ > +.name = "mp_state", > +.version_id = 0, > +.size = sizeof(uint32_t), > +.info = &vmstate_mpstate, > +.flags = VMS_SINGLE, > +.offset = 0, > +

Re: [Qemu-devel] [PATCH] [POWERPC] display cpu id dump state

2015-02-26 Thread Alexander Graf
On 25.02.15 10:39, Fabien Chouteau wrote: > From: Tristan Gingold > > > Signed-off-by: Fabien Chouteau Same nit here - please always provide a commit message stating your rationale. I can guess (debugging SMP guests), but it's nicer when you can look through the logs and there's no need to g

Re: [Qemu-devel] [PATCH] Openpic: check that cpu id is within the number of cpus

2015-02-26 Thread Alexander Graf
On 25.02.15 10:50, Fabien Chouteau wrote: > Signed-off-by: Fabien Chouteau Thanks, applied to ppc-next. Next time please include a commit message though ;). Alex

Re: [Qemu-devel] [PULL 00/11] Net patches

2015-02-26 Thread Peter Maydell
On 23 February 2015 at 23:40, Stefan Hajnoczi wrote: > The following changes since commit cd2d5541271f1934345d8ca42f5fafff1744eee7: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150212' into > staging (2015-02-13 11:44:50 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [Question] about vhost user Interface

2015-02-26 Thread Michael S. Tsirkin
On Thu, Feb 26, 2015 at 01:55:54PM +0200, Nikolay Nikolaev wrote: > On Thu, Feb 26, 2015 at 11:36 AM, Michael S. Tsirkin wrote: > > > > On Thu, Feb 26, 2015 at 09:30:40AM +, Gaohaifeng (A) wrote: > > > Hi > > > > > > I want to use pxe to install a guest os whose nic type is vhost user. > >

Re: [Qemu-devel] [PULL 00/96] pci, pc, virtio fixes and cleanups

2015-02-26 Thread Peter Maydell
On 26 February 2015 at 20:41, Michael S. Tsirkin wrote: > On Thu, Feb 26, 2015 at 08:17:43PM +0900, Peter Maydell wrote: >> Hi. I'm afraid this fails to build: >> >> CP i386-softmmu/hw/i386/acpi-dsdt.hex >> CP i386-softmmu/hw/i386/q35-acpi-dsdt.hex >> make[1]: *** No rule to make target >> `/h

[Qemu-devel] [PATCH RFC 0/1] Extend s390 pci representation in qemu

2015-02-26 Thread Frank Blaschka
For a better understanding of the following patch here is some general information about how PCI is implemented on the s390 platform. The physical structure of the pci system (bridge, bus, slot) is not shown to the OS. Instead a firmware and I/O configuration layer abstracts each PCI card to a bare

Re: [Qemu-devel] [Question] about vhost user Interface

2015-02-26 Thread Nikolay Nikolaev
On Thu, Feb 26, 2015 at 11:36 AM, Michael S. Tsirkin wrote: > > On Thu, Feb 26, 2015 at 09:30:40AM +, Gaohaifeng (A) wrote: > > Hi > > > > I want to use pxe to install a guest os whose nic type is vhost user. > > However > > pxe rom doesn’t support msi-x interrupt, so qemu won’t start vhost

Re: [Qemu-devel] [PATCH 7/8] qtest/ahci: add qcow2 support to ahci-test

2015-02-26 Thread Stefan Hajnoczi
On Wed, Feb 25, 2015 at 05:40:00PM -0500, John Snow wrote: > > > On 02/25/2015 10:27 AM, Stefan Hajnoczi wrote: > >On Thu, Feb 19, 2015 at 05:30:02PM -0500, John Snow wrote: > >>diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c > >>index bc8beb2..3577401 100644 > >>--- a/tests/libqos/lib

Re: [Qemu-devel] [RFC PATCH 0/2] host->guest environment variables via fw_cfg

2015-02-26 Thread Matt Fleming
On Thu, 2015-02-26 at 10:45 +0100, Laszlo Ersek wrote: > On 02/26/15 02:13, Gabriel L. Somlo wrote: > > For myself, I'm tempted to write a kernel driver to allow me to simply > > "cat /sys/firmware/fw_cfg/etc/guestinfo | grep '^key_name='" when I > > need to retrieve a guest environment variable. >

Re: [Qemu-devel] [PATCH V2 08/11] virtio-pci: switch to use bus specific queue limit

2015-02-26 Thread Michael S. Tsirkin
On Thu, Feb 26, 2015 at 03:04:43PM +0800, Jason Wang wrote: > Instead of depending on a macro, switch to use a bus specific queue > limit. > > Cc: Anthony Liguori > Cc: Michael S. Tsirkin > Signed-off-by: Jason Wang > --- > hw/virtio/virtio-pci.c | 10 +- > 1 file changed, 5 insertions

Re: [Qemu-devel] [PATCH v4 00/10] cpu: add device_add foo-x86_64-cpu support

2015-02-26 Thread Chen Fan
On 02/26/2015 05:35 PM, Andreas Färber wrote: Hi, Am 25.02.2015 um 10:58 schrieb Chen Fan: On 02/25/2015 12:56 AM, Andreas Färber wrote: Am 24.02.2015 um 02:25 schrieb Gu Zheng: The issues you commented in the previous version have been fixed in this one. What I have repeatedly rejected is

Re: [Qemu-devel] [RFC PATCH 0/2] host->guest environment variables via fw_cfg

2015-02-26 Thread Laszlo Ersek
On 02/26/15 02:13, Gabriel L. Somlo wrote: > On Wed, Feb 25, 2015 at 10:40:34PM +, Matt Fleming wrote: >> >> Right, I was thinking about this in the context of configuring the BIOS >> (OVMF in my case) with runtime tunable knobs instead of having to >> recompile the BIOS image from scratch. >>

  1   2   >