Re: [Qemu-devel] [PATCH v2 05/10] exec: [ŧcg] Use multiple physical TB caches

2016-01-06 Thread Stefan Hajnoczi
On Tue, Nov 24, 2015 at 06:09:14PM +0100, Lluís Vilanova wrote: Commit message uses 'LATIN SMALL LETTER T WITH STROKE' (U+0167) instead of regular 't' character :). signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH] hw/arm/virt: Initialize NICs configured in PCI bus

2016-01-06 Thread Ashok Kumar
On Wed, Jan 06, 2016 at 06:10:15PM +, Peter Maydell wrote: Hi, > On 6 January 2016 at 14:47, Ashok Kumar wrote: > > virtio model is used for default case. > > > > Signed-off-by: Ashok Kumar > > Could you explain why you think this needs to be done? Yes, for -net. Honestly, I didn't know thi

Re: [Qemu-devel] [Qemu-block] Minutes from the "Stuttgart block Gipfele"

2016-01-06 Thread Stefan Hajnoczi
On Mon, Jan 04, 2016 at 03:28:36PM +0800, Fam Zheng wrote: > On Mon, 01/04 13:16, Stefan Hajnoczi wrote: > > On Wed, Dec 23, 2015 at 06:15:20PM +0800, Fam Zheng wrote: > > > On Fri, 12/18 14:15, Markus Armbruster wrote: > > > In that theory, all other block job types, mirror/stream/commit, fit into

Re: [Qemu-devel] about I/O

2016-01-06 Thread Stefan Hajnoczi
On Tue, Dec 29, 2015 at 03:36:07PM +0800, 浩樊啊 wrote: > qemu use paio or libaio finish I/O reqeusts,does that mean that when a sync > request comes from a vm becomes async request in the host? Yes, although storage controllers (virtio-blk, SCSI, SATA, and even IDE in DMA mode) are asynchronous at

[Qemu-devel] Fwd: [vfio-users] [PATCH v2 1/3] input: add qemu_input_qcode_to_linux + qemu_input_linux_to_qcode

2016-01-06 Thread sL1pKn07 SpinFlo
On Mi, 2016-01-06 at 13:42 +0100, sL1pKn07 SpinFlo wrote: > Yes, is like disconect the cable of USB. Ok. That is not so easy. Well, the first part (switch away) is easy, it is just a matter of catching read errors, so the device going away (unplug) doesn't screw up things. But when it comes to

Re: [Qemu-devel] [PATCH] Fix wrong format specifiers in trace events

2016-01-06 Thread Stefan Hajnoczi
On Tue, Dec 29, 2015 at 02:53:34PM +0100, Stefan Weil wrote: > * Add missing % before PRIx64 > * Remove unneeded "" at end of format string in modified lines > > This fixes a regression introduced in commit > c8ee0a445a6a85635e962c0346bc7b1259c1a3f5. > > Signed-off-by: Stefan Weil > --- > > The

[Qemu-devel] Fwd: [vfio-users] [PATCH v2 1/3] input: add qemu_input_qcode_to_linux + qemu_input_linux_to_qcode

2016-01-06 Thread sL1pKn07 SpinFlo
Yes, is like disconect the cable of USB. http://sl1pkn07.wtf/imagenes/kvm01.jpg http://sl1pkn07.wtf/imagenes/kvm04.jpg Greetings. El 06/01/2016 08:53, "Gerd Hoffmann" escribió: > > On Di, 2016-01-05 at 15:44 +0100, sL1pKn07 SpinFlo wrote: > > 2016-01-05 9:06 GMT+01:00 Jonathan Scruggs : > > > I

Re: [Qemu-devel] [PATCH] virtio-blk: Allow startup of empty cdroms

2016-01-06 Thread Stefan Hajnoczi
On Wed, Jan 06, 2016 at 11:35:43AM +0100, Michal Privoznik wrote: > If you have an empty IDE cdrom we will start just fine: > > -drive if=none,id=drive-ide0-0-0,readonly=on > -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 > > However, that's not the case with virtio disk: > > -

Re: [Qemu-devel] [PATCH v2 0/7] Raspberry Pi 2 support

2016-01-06 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Wednesday, 6 January 2016 18:47 > On Wed, Jan 6, 2016 at 4:09 PM, Piotr Król wrote: > > On Wed, Jan 06, 2016 at 06:27:54PM +, Andrew Baumann wrote: > >> This is most likely an unimplemented setend instruction in the > >> use

Re: [Qemu-devel] [PATCH v2] trace-events: fix broken format strings

2016-01-06 Thread Stefan Hajnoczi
On Tue, Jan 05, 2016 at 08:50:45AM -0700, Eric Blake wrote: > On 01/05/2016 08:37 AM, Andrew Jones wrote: > > Fixes compiling with --enable-trace-backends > > > > Signed-off-by: Andrew Jones > > --- > > v2: also remove trailing null strings [Laurent] > > > > > > trace-events | 10 +- >

[Qemu-devel] 答复: What's the advantages of POSTCOPY over CPU-THROTTLE?

2016-01-06 Thread Zhangbo (Oscar)
Thank you David and Jason! BTW, I noticed that Vmware did the same work alike us, but the situation is a little different: they proposed postcopy(in the name of QuickResume) in vSphere4.1, but they substituted it with SDPS(similar to CPU-THROTTLE) from vSphere5, do you know the reason behin

Re: [Qemu-devel] [PATCH v3 2/4] Add Error **errp for xen_pt_setup_vga()

2016-01-06 Thread Cao jin
On 01/06/2016 11:53 PM, Eric Blake wrote: On 01/05/2016 07:39 PM, Cao jin wrote: [...] Please no '!' in error messages. We aren't shouting at the user. Interesting, I didn`t think of this kind of questions before. will fix XEN_PT_ERR(d, "Setup VGA BIOS of passthrough GFX

Re: [Qemu-devel] [PATCH v3 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-06 Thread Cao jin
On 01/06/2016 11:51 PM, Eric Blake wrote: On 01/05/2016 07:39 PM, Cao jin wrote: To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen-host-pci-device.c | 106 +-- hw/xen/xen-host-pci-device.h | 5 +- hw/xen/xen_pt.

Re: [Qemu-devel] [PATCH v2 0/7] Raspberry Pi 2 support

2016-01-06 Thread Peter Crosthwaite
On Wed, Jan 6, 2016 at 4:09 PM, Piotr Król wrote: > On Wed, Jan 06, 2016 at 06:27:54PM +, Andrew Baumann wrote: >> Hi Piotr, >> >> Sorry, I just noticed this email. Please keep me in the To or CC, as I am >> not good at keeping up with all the traffic on qemu-devel. > > Hi Andrew, > this was

Re: [Qemu-devel] [PATCH v6 1/6] qdev: get_child_bus(): Use QOM lookup if available

2016-01-06 Thread Peter Crosthwaite
On Wed, Jan 6, 2016 at 4:18 PM, Alistair Francis wrote: > On Sat, Dec 19, 2015 at 9:43 PM, Peter Crosthwaite > wrote: >> qbus_realize() adds busses as a QOM child of the device in addition to >> adding it to the qdev bus list. Change get_child_bus() to use the QOM >> child if it is available. Thi

Re: [Qemu-devel] [PATCH v2 4/7] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-06 Thread Peter Crosthwaite
On Wed, Jan 6, 2016 at 7:13 AM, Eric Auger wrote: > Current qemu_fdt_getprop exits if the property is not found. It is > sometimes needed to read an optional property, in which case we do > not wish to exit but simply returns a null value. > > This patch converts qemu_fdt_getprop to accept an Erro

Re: [Qemu-devel] [PATCH v6 1/6] qdev: get_child_bus(): Use QOM lookup if available

2016-01-06 Thread Alistair Francis
On Sat, Dec 19, 2015 at 9:43 PM, Peter Crosthwaite wrote: > qbus_realize() adds busses as a QOM child of the device in addition to > adding it to the qdev bus list. Change get_child_bus() to use the QOM > child if it is available. This takes priority over the bus-list, but > the child object is ch

Re: [Qemu-devel] [PATCH v2 0/7] Raspberry Pi 2 support

2016-01-06 Thread Andrew Baumann
> From: Piotr Król [mailto:piotr.k...@3mdeb.com] > Sent: Wednesday, 6 January 2016 16:10 [...] > I tried v2 with qemu 38a762fec63f using: > > $ qemu-system-arm -M raspi2 -kernel raspbian-boot/kernel7.img -sd 2015- > 11-21-raspbian-jessie.img -append "rw earlyprintk loglevel=8 > console=ttyAMA0,115

Re: [Qemu-devel] [PATCH v2 0/7] Raspberry Pi 2 support

2016-01-06 Thread Piotr Król
On Wed, Jan 06, 2016 at 06:27:54PM +, Andrew Baumann wrote: > Hi Piotr, > > Sorry, I just noticed this email. Please keep me in the To or CC, as I am not > good at keeping up with all the traffic on qemu-devel. Hi Andrew, this was my fault instead reply-to-all I send reply to mailing list. I

[Qemu-devel] [PATCH v8 23.5/35] qmp: Tighten output visitor rules, part 2

2016-01-06 Thread Eric Blake
Nothing was using the return value of qmp_output_pop(). Also, adding a parameter will let us diagnose any programming bugs due to mismatched push(struct)/pop(list) or push(list)/pop(struct). Signed-off-by: Eric Blake --- v9: new patch; probably worth squashing into 23/35 --- qapi/qmp-output-vi

Re: [Qemu-devel] [PATCH v8 23/35] qmp: Tighten output visitor rules

2016-01-06 Thread Eric Blake
On 01/05/2016 07:05 AM, Marc-André Lureau wrote: > Hi > > On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: >> Add a new qmp_output_visitor_reset(), which must be called before >> reusing an exising QmpOutputVisitor on a new root object. Tighten >> assertions to require that qmp_output_get_qobj

[Qemu-devel] [PATCH v8 22.5/35] qmp: Support explicit null on input visit

2016-01-06 Thread Eric Blake
Implement the new type_null() callback for the qmp input visitor. While we don't yet have a use for this in qapi (the generator will need some tweaks first), one usage is already envisioned: when changing blockdev parameters, it would be nice to have a difference between leaving a tuning parameter

Re: [Qemu-devel] [PULL 49/57] Round up RAMBlock sizes to host page sizes

2016-01-06 Thread Paolo Bonzini
On 30/12/2015 01:26, Peter Crosthwaite wrote: > On Tue, Nov 10, 2015 at 6:25 AM, Juan Quintela wrote: >> From: "Dr. David Alan Gilbert" >> >> RAMBlocks that are not a multiple of host pages in length >> cause problems for postcopy (I've seen an ACPI table on aarch64 >> be 5k in length - i.e. 5x

Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription

2016-01-06 Thread Mark Cave-Ayland
On 06/01/16 20:57, John Snow wrote: > On 01/06/2016 03:37 PM, Mark Cave-Ayland wrote: >> Make sure that we include the value of dma_active in the migration stream. >> >> Signed-off-by: Mark Cave-Ayland >> --- >> hw/ide/macio.c |3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> d

Re: [Qemu-devel] [PATCH 1/4] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb

2016-01-06 Thread John Snow
On 01/06/2016 03:37 PM, Mark Cave-Ayland wrote: > Currently the aiocb is held within MACIOIDEState, however the IDE core code > assumes that the current actvie DMA aiocb is held in aiocb in a few places, > e.g. ide_bus_reset() and ide_reset(). > > Switch over to using IDEDMA aiocb to store the a

Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription

2016-01-06 Thread John Snow
On 01/06/2016 03:37 PM, Mark Cave-Ayland wrote: > Make sure that we include the value of dma_active in the migration stream. > > Signed-off-by: Mark Cave-Ayland > --- > hw/ide/macio.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/ide/macio.c b/hw/ide/macio.c

Re: [Qemu-devel] [PATCH v8 2/4] hw/ptimer: Perform tick and counter wrap around if timer already expired

2016-01-06 Thread Dmitry Osipenko
06.01.2016 16:59, Peter Crosthwaite пишет: + +if (expired) { +/* Wrap around periodic counter. */ +counter = s->delta = s->limit - counter % s->limit; Why do you update the delta here? Because we would want to schedule next tick based on current

Re: [Qemu-devel] [PATCH 07/13] tests: Add test code for meta bitmap

2016-01-06 Thread John Snow
On 01/04/2016 05:27 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/test-hbitmap.c | 113 > +++ > 1 file changed, 113 insertions(+) > > diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c > index abcea0c..19136e7 100644 > ---

[Qemu-devel] [PATCH 4/4] cuda: add missing fields to VMStateDescription

2016-01-06 Thread Mark Cave-Ayland
Include some fields missed from the previous VMState conversion to the migration stream, as well as the new SR_INT delay timer. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/ma

[Qemu-devel] [PATCH 1/4] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb

2016-01-06 Thread Mark Cave-Ayland
Currently the aiocb is held within MACIOIDEState, however the IDE core code assumes that the current actvie DMA aiocb is held in aiocb in a few places, e.g. ide_bus_reset() and ide_reset(). Switch over to using IDEDMA aiocb to store the aiocb for the current active DMA request so that bus resets a

[Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription

2016-01-06 Thread Mark Cave-Ayland
Make sure that we include the value of dma_active in the migration stream. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 560c071..695d4d2 100644 --- a/hw/ide/macio.c +++ b/hw/ide/m

[Qemu-devel] [PATCH 3/4] mac_dbdma: add DBDMA controller state to VMStateDescription

2016-01-06 Thread Mark Cave-Ayland
Make sure that we include the DBDMA controller state in the migration stream. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/mac_dbdma.c | 40 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/ma

[Qemu-devel] [PATCH 0/4] ppc: loadvm/savevm fixups for macio/DBDMA

2016-01-06 Thread Mark Cave-Ayland
This patchset fixes up macio/DBDMA to allow migration to succeed for Mac machines while IDE/DMA requests are in-flight, and in conjunction with the migration fixup patchset, enables me to successfully migrate live VMs under TCG. Migration was tested by running through a complete Darwin install whi

Re: [Qemu-devel] [PATCH v3 4/7] bcm2835_peripherals: add rollup device for bcm2835 peripherals

2016-01-06 Thread Alistair Francis
On Wed, Jan 6, 2016 at 5:32 AM, Peter Crosthwaite wrote: > On Tue, Jan 5, 2016 at 10:07 PM, Andrew Baumann > wrote: >>> From: Alistair Francis [mailto:alistai...@gmail.com] >>> Sent: Tuesday, 5 January 2016 18:14 >>> On Thu, Dec 31, 2015 at 4:31 PM, Andrew Baumann >>> wrote: >>> > This device ma

[Qemu-devel] [PATCH v2 1/2] ohci: delay first SOF interrupt

2016-01-06 Thread Laurent Vivier
On overcommitted CPU, kernel can be so slow that an interrupt can be triggered by the device whereas the driver is not ready to receive it. This drives us into an infinite loop. This does not happen on real hardware because real hardware never send interrupt immediately after the controller has be

[Qemu-devel] [PATCH v2 2/2] ohci: clear pending SOF on suspend

2016-01-06 Thread Laurent Vivier
On overcommitted CPU, kernel can be so slow that an interrupt can be triggered by the device whereas the driver is not ready to receive it. This drives us into an infinite loop. On suspend, if a SOF interrupt is raised between the stop of the device processing and the change of the device internal

[Qemu-devel] [PATCH v2 0/2] ohci: try to mimic real hardware command latency

2016-01-06 Thread Laurent Vivier
OHCI linux driver has some critical sections not protected against device interrupts. Because of real hardware latency, it is generally not a problem as interrupts cannot be triggered fast enough to happen during these critical sections. But theoretically, it can happen. And with QEMU used on an o

Re: [Qemu-devel] What's the advantages of POSTCOPY over CPU-THROTTLE?

2016-01-06 Thread Jason J. Herne
On 01/06/2016 04:57 AM, Dr. David Alan Gilbert wrote: * Zhangbo (Oscar) (oscar.zhan...@huawei.com) wrote: Hi all:   Postcopy is suitable for migrating guests which have large page change rates. It 1 makes the guest run at the destination ASAP. 2 makes the downtime of the guest small e

Re: [Qemu-devel] [PATCH v2] vfio/common: Check iova with limit not with size

2016-01-06 Thread Alex Williamson
On Tue, 2016-01-05 at 17:03 +0100, Pierre Morel wrote: > In vfio_listener_region_add(), the code makes sure > that the offset in the section is lower than the size > of the section. > But the calculation uses size of the region instead of > the region's limit (size - 1). We're really just trying t

Re: [Qemu-devel] [PATCH] virtio-blk: Allow startup of empty cdroms

2016-01-06 Thread P J P
+-- On Wed, 6 Jan 2016, Michal Privoznik wrote --+ | } | -if (!blk_is_inserted(conf->conf.blk)) { | + | +dinfo = blk_legacy_dinfo(conf->conf.blk); | +if (!((dinfo && dinfo->media_cd) || | + blk_is_inserted(conf->conf.blk))) { | error_setg(errp, "Device needs media

Re: [Qemu-devel] [PATCH v2 0/7] Raspberry Pi 2 support

2016-01-06 Thread Andrew Baumann
Hi Piotr, Sorry, I just noticed this email. Please keep me in the To or CC, as I am not good at keeping up with all the traffic on qemu-devel. > From: qemu-devel-bounces+andrew.baumann=microsoft@nongnu.org > [mailto:qemu-devel- > bounces+andrew.baumann=microsoft@nongnu.org] On Behalf Of

Re: [Qemu-devel] [PATCH] hw/dma/xilinx_axidma: remove dead code

2016-01-06 Thread Alistair Francis
On Wed, Jan 6, 2016 at 7:54 AM, Eric Blake wrote: > On 01/06/2016 05:53 AM, Andrew Jones wrote: >> stream_desc_show() (and DEBUG_ENET) appear to be unused, as the >> function isn't compilable (there are broken PRI format strings). >> >> Signed-off-by: Andrew Jones >> --- >> hw/dma/xilinx_axidma.

[Qemu-devel] [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration

2016-01-06 Thread Mark Cave-Ayland
During local testing with TCG, intermittent errors were found when trying to migrate Darwin OS images. The underlying cause was that Darwin resets the decrementer value to fairly small values on each interrupt. cpu_ppc_set_tb_clk() sets the default value of the decrementer to 0x during ini

[Qemu-devel] [PATCH 3/4] target-ppc: add CPU access_type into the migration stream

2016-01-06 Thread Mark Cave-Ayland
This is referenced in cpu_ppc_handle_mmu_fault() and so should be included in the migration stream. Signed-off-by: Mark Cave-Ayland --- target-ppc/machine.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/machine.c b/target-ppc/machine.c index 322ce84..cb56423 1

[Qemu-devel] [PATCH 0/4] target-ppc: migration fixups (TCG related)

2016-01-06 Thread Mark Cave-Ayland
This patchset came out of my work to fix migration for Mac machines under QEMU running TCG. Patch 1 was posted to the list a few months ago, but is now part this larger patchset instead. Patches 2 and 3 were discovered through a combination of dumping out CPU structures pre- and post- migration a

[Qemu-devel] [PATCH 1/4] target-ppc: add CPU IRQ state to PPC VMStateDescription

2016-01-06 Thread Mark Cave-Ayland
Commit a90db15 "target-ppc: Convert ppc cpu savevm to VMStateDescription" appears to drop the internal CPU IRQ state from the migration stream. Whilst testing migration on g3beige/mac99 machines, test images would randomly fail to resume unless a key was pressed on the VGA console. Further investi

[Qemu-devel] [PATCH 2/4] target-ppc: use cpu_write_xer() helper in cpu_post_load

2016-01-06 Thread Mark Cave-Ayland
Otherwise some internal xer variables fail to get set post-migration. Signed-off-by: Mark Cave-Ayland --- target-ppc/machine.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/machine.c b/target-ppc/machine.c index 98fc63a..322ce84 100644 --- a/target-ppc/machine

Re: [Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-06 Thread Cédric Le Goater
On 01/06/2016 10:55 AM, Greg Kurz wrote: > On Tue, 5 Jan 2016 18:29:56 +0100 > Cédric Le Goater wrote: > >> Signed-off-by: Cédric Le Goater >> --- > > Acked-by: Greg Kurz > > Just some minor comments on the form below. > > >> hw/ipmi/ipmi_bmc_sim.c | 51 >> +++

Re: [Qemu-devel] [PATCH] hw/arm/virt: Initialize NICs configured in PCI bus

2016-01-06 Thread Peter Maydell
On 6 January 2016 at 14:47, Ashok Kumar wrote: > virtio model is used for default case. > > Signed-off-by: Ashok Kumar Could you explain why you think this needs to be done? Virtio networking works OK for me... I guess from the patch that this is adding support for the legacy '-net' way of conf

Re: [Qemu-devel] [PATCH v4 0/5] qmp: Add blockdev-mirror

2016-01-06 Thread Max Reitz
On 24.12.2015 05:45, Fam Zheng wrote: > v4: 02: Add Max's rev-by. > 04: buf_size -> buf-size. > Add Markus' Ack-by. > 05: 'node1' -> qmp_target. > Fix double quotes. > Add Max's Rev-by. > > v3: Rebase to master. > > v2: 01: Move bdrv_op_block_all down. [Max] >

Re: [Qemu-devel] [RFC v6 00/14] Slow-path for atomic instruction translation

2016-01-06 Thread Andrew Baumann
Hi, > From: qemu-devel-bounces+andrew.baumann=microsoft@nongnu.org > [mailto:qemu-devel- > bounces+andrew.baumann=microsoft@nongnu.org] On Behalf Of > Alvise Rigo > Sent: Monday, 14 December 2015 00:41 > > This is the sixth iteration of the patch series which applies to the > upstream bra

Re: [Qemu-devel] [PATCH v9 1/2] mirror: Rewrite mirror_iteration

2016-01-06 Thread Max Reitz
On 05.01.2016 09:46, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > Rewrite mirror_iteration to fix both flaws. > > Signed-

Re: [Qemu-devel] [Qemu-block] [PATCH] send readcapacity10 when readcapacity16 failed

2016-01-06 Thread John Snow
On 01/05/2016 02:57 PM, ronnie sahlberg wrote: > MMC devices: > READ CAPACITY 10 support is mandatory. > No support for READ CAPACITY 16 > > SBC devices: > READ CAPACITY 10 is mandatory > READ CAPACITY 16 support is only required when you have thin > provisioning or protection information (or if

Re: [Qemu-devel] [PATCH v9 1/2] mirror: Rewrite mirror_iteration

2016-01-06 Thread Max Reitz
On 05.01.2016 09:46, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > Rewrite mirror_iteration to fix both flaws. > > Signed-

Re: [Qemu-devel] [PATCH v8 19/35] qmp: Fix reference-counting of qnull on empty output visit

2016-01-06 Thread Eric Blake
On 01/05/2016 07:05 AM, Marc-André Lureau wrote: > Hi > > On Mon, Dec 21, 2015 at 6:08 PM, Eric Blake wrote: >> Commit 6c2f9a15 ensured that we would not return NULL when the >> caller used an output visitor but had nothing to visit. But >> in doing so, it added a FIXME about a reference count le

Re: [Qemu-devel] [RFC v6 08/14] target-arm: Add atomic_clear helper for CLREX insn

2016-01-06 Thread alvise rigo
On Wed, Jan 6, 2016 at 6:13 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> Add a simple helper function to emulate the CLREX instruction. > > And now I see ;-) > > I suspect this should be merged with the other helpers as a generic helper. Agreed. > >> >> Suggested-by: Jani Kokkonen >> Su

[Qemu-devel] ANNOUNCE: libguestfs 1.32 released

2016-01-06 Thread Richard W.M. Jones
I'm pleased to announce libguestfs 1.32, a library and set of tools for accessing and modifying virtual machine disk images. This release took 6 months of work by many people - see release notes below. You can get libguestfs 1.32 here: Main website: http://libguestfs.org/ Source: http://li

Re: [Qemu-devel] [RFC v6 08/14] target-arm: Add atomic_clear helper for CLREX insn

2016-01-06 Thread Alex Bennée
Alvise Rigo writes: > Add a simple helper function to emulate the CLREX instruction. And now I see ;-) I suspect this should be merged with the other helpers as a generic helper. > > Suggested-by: Jani Kokkonen > Suggested-by: Claudio Fontana > Signed-off-by: Alvise Rigo > --- > target-ar

Re: [Qemu-devel] [RFC v6 07/14] target-arm: translate: Use ld/st excl for atomic insns

2016-01-06 Thread Alex Bennée
Alvise Rigo writes: > Use the new LL/SC runtime helpers to handle the ARM atomic > instructions in softmmu_llsc_template.h. > > In general, the helper generator > gen_helper_{ldlink,stcond}_aa32_i{8,16,32,64}() calls the function > helper_{le,be}_{ldlink,stcond}{ub,uw,ulq}_mmu() implemented in >

Re: [Qemu-devel] [PATCH v5 12/15] block: Remove the "bs->file" test in bdrv_co_get_block_status

2016-01-06 Thread Max Reitz
On 05.01.2016 09:11, Fam Zheng wrote: > Now that all drivers return the right "file" pointer, we can remove this > check. > > Signed-off-by: Fam Zheng > --- > block/io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/io.c b/block/io.c > index 492c291..1ca4e61 100

Re: [Qemu-devel] [PATCH v5 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-06 Thread Max Reitz
On 05.01.2016 09:11, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [v15 12/15] vfio: add bus in reset flag

2016-01-06 Thread Alex Williamson
On Wed, 2016-01-06 at 10:13 +0800, Chen Fan wrote: > On 01/06/2016 03:58 AM, Alex Williamson wrote: > > On Tue, 2016-01-05 at 09:20 +0800, Cao jin wrote: > > > From: Chen Fan > > > > > > mark the host bus be in reset. avoid multiple devices trigger the > > > host bus reset many times. > > > > >

Re: [Qemu-devel] [PATCH v5 01/15] block: Add "file" output parameter to block status query functions

2016-01-06 Thread Max Reitz
On 05.01.2016 09:11, Fam Zheng wrote: > The added parameter can be used to return the BDS pointer which the > valid offset is referring to. Its value should be ignored unless > BDRV_BLOCK_OFFSET_VALID in ret is set. > > Until block drivers fill in the right value, let's clear it explicitly > right

[Qemu-devel] [PATCH v2] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-06 Thread Stefano Stabellini
If the frontend sets out_cons to a value higher than out_prod, it will cause xenfb_handle_events to loop about 2^32 times. Avoid that by using better checks at the beginning of the function. Signed-off-by: Stefano Stabellini Reported-by: Ling Liu --- diff --git a/hw/display/xenfb.c b/hw/displa

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Max Reitz
On 06.01.2016 17:28, Eric Blake wrote: > On 01/06/2016 09:20 AM, Max Reitz wrote: > >>> If I take a snapshot while the guest sees a 1G disk, then resize the >>> disk to 2G, then roll back to the point in time of the snapshot, I'd >>> expect the disk to roll back to 1G in size. Anything else is li

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Eric Blake
On 01/06/2016 09:20 AM, Max Reitz wrote: >> If I take a snapshot while the guest sees a 1G disk, then resize the >> disk to 2G, then roll back to the point in time of the snapshot, I'd >> expect the disk to roll back to 1G in size. Anything else is likely to >> confuse the guest. And that's what

Re: [Qemu-devel] [RFC] util: Fix QEMU_LD_PREFIX endless loop

2016-01-06 Thread 陳威伯
For further explaination of endless loop happen in util/path.c For example, set the QEMU_LD_PREFIX="/home/apple/i386" sudo debootstrap --arch=i386 trusty /home/apple/i386 http://archive.ubuntu.com/ubuntu/ magic is a normal dynamic-linkd 32-bit elf. qemu-i386 -L /home/apple/i386 /home/apple/magic Th

Re: [Qemu-devel] [Xen-devel] [PATCH v3 07/11] igd: revamp host config read

2016-01-06 Thread Stefano Stabellini
On Wed, 6 Jan 2016, Gerd Hoffmann wrote: > > > +for (i = 0; i < len; i++) { > > > +rc = pread(config_fd, guest->config + list[i].offset, > > > + list[i].len, list[i].offset); > > > +if (rc != list[i].len) { > > > > pread is allowed to return early, returning t

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Max Reitz
On 06.01.2016 16:04, Eric Blake wrote: > On 01/05/2016 07:50 PM, lihuiba wrote: >> At 2016-01-05 21:55:56, "Eric Blake" wrote: >>> On 01/05/2016 05:10 AM, lihuiba wrote: >>> >> In our production environment, we need to extend a qcow2 image with >> snapshots in it. >>> > The thing is th

[Qemu-devel] [Bug 1357226] Re: qemu: uncaught target signal 11 (Segmentation fault) - core dumped

2016-01-06 Thread Scott Moser
This may or may not be relevant here, but the mysterious "uncaught target signal 11" error was fixed for maas images (lp:maas-images) build process by increasing the memory to the VMs that were doing the build. We had been doing the cross/qemu-static building in ~512M vms and that was resulting in

Re: [Qemu-devel] [PATCH v3 4/4] Xen PCI passthru: convert to realize()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > Signed-off-by: Cao jin > Reviewed-by: Stefano Stabellini > --- > hw/xen/xen_pt.c | 53 - > 1 file changed, 28 insertions(+), 25 deletions(-) > > @@ -801,19 +801,19 @@ static int xen_pt_initfn(PCIDevice

Re: [Qemu-devel] [PATCH v3 0/4] Convert to realize()

2016-01-06 Thread Stefano Stabellini
On Wed, 6 Jan 2016, Eric Blake wrote: > On 01/06/2016 04:08 AM, Stefano Stabellini wrote: > > On Wed, 6 Jan 2016, Cao jin wrote: > >> v3 changelog: > >> 1. use following style when we want to check the returned error > >> > >> Error *err = NULL; > >> foo(arg, &err); > >> if (err) { >

Re: [Qemu-devel] [PATCH v3 3/4] Add Error **errp for xen_pt_config_init()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > --- > hw/xen/xen_pt.c | 7 --- > hw/xen/xen_pt.h | 2 +- > hw/xen/xen_pt_config_init.c | 51 > - > 3 fil

Re: [Qemu-devel] [PATCH] hw/dma/xilinx_axidma: remove dead code

2016-01-06 Thread Eric Blake
On 01/06/2016 05:53 AM, Andrew Jones wrote: > stream_desc_show() (and DEBUG_ENET) appear to be unused, as the > function isn't compilable (there are broken PRI format strings). > > Signed-off-by: Andrew Jones > --- > hw/dma/xilinx_axidma.c | 10 -- > 1 file changed, 10 deletions(-) Revi

Re: [Qemu-devel] [PATCH v3 2/4] Add Error **errp for xen_pt_setup_vga()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > Reviewed-by: Stefano Stabellini > --- > hw/xen/xen_pt.c | 5 - > hw/xen/xen_pt.h | 3 ++- > hw/xen/xen_pt_graphics.c | 11 ++- > 3 files changed,

Re: [Qemu-devel] [PATCH v3 10/11] igd: handle igd-passthrough-isa-bridge setup in realize()

2016-01-06 Thread Gerd Hoffmann
On Mi, 2016-01-06 at 15:29 +, Stefano Stabellini wrote: > On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > > That way a simple '-device igd-passthrough-isa-bridge,addr=1f' will > > do the setup. > > Is this going to change the QEMU command line arguments to use it? See patch 11 ;) cheers, Gerd

Re: [Qemu-devel] [PATCH v3 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > --- > hw/xen/xen-host-pci-device.c | 106 > +-- > hw/xen/xen-host-pci-device.h | 5 +- > hw/xen/xen_pt.c | 12 +++-- > 3 f

Re: [Qemu-devel] [PATCH v3 07/11] igd: revamp host config read

2016-01-06 Thread Gerd Hoffmann
> > +for (i = 0; i < len; i++) { > > +rc = pread(config_fd, guest->config + list[i].offset, > > + list[i].len, list[i].offset); > > +if (rc != list[i].len) { > > pread is allowed to return early, returning the number of bytes read. > This is a sysfs file tho

Re: [Qemu-devel] [PATCH v3 0/4] Convert to realize()

2016-01-06 Thread Eric Blake
On 01/06/2016 04:08 AM, Stefano Stabellini wrote: > On Wed, 6 Jan 2016, Cao jin wrote: >> v3 changelog: >> 1. use following style when we want to check the returned error >> >> Error *err = NULL; >> foo(arg, &err); >> if (err) { >> handle the error... >> error_propa

Re: [Qemu-devel] [PATCH 3/6] nvdimm acpi: introduce patched dsm memory

2016-01-06 Thread Xiao Guangrong
On 01/06/2016 11:23 PM, Igor Mammedov wrote: On Tue, 5 Jan 2016 02:52:05 +0800 Xiao Guangrong wrote: The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int64 object returned by

Re: [Qemu-devel] [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize

2016-01-06 Thread Gerd Hoffmann
> > > > +static void (*i440fx_realize)(PCIDevice *pci_dev, Error **errp); > > static void igd_pt_i440fx_realize(PCIDevice *pci_dev, Error **errp) > > { > > +Error *err = NULL; > > uint32_t val = 0; > > int rc, i, num; > > int pos, len; > > Can't we get the parent PCIDeviceCl

Re: [Qemu-devel] could i using qemu-img covert && rebase -u to do qcow2 rollback?

2016-01-06 Thread Max Reitz
On 05.01.2016 04:52, Huan Zhang wrote: > Hi Max, > "rollback" means revert user data to snap1 state, and for some reason, > we want to > keep snap2 and 'rollbacked' qocw2 file in a single backing file chain. > After rollback, looks like: > snap0.qcow2 -> snap1.qcow2 ->snap2.qcow2 -> rollbacked-sna

Re: [Qemu-devel] [PATCH v3 11/11] igd: move igd-passthrough-isa-bridge creation to machine init

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > This patch moves igd-passthrough-isa-bridge creation out of the xen > passthrough code into machine init. It is triggered by the > igd-passthru=on machine option. Advantages: > > * This works for on both xen and kvm. > * It is activated for the pc mac

Re: [Qemu-devel] [PATCH v3 10/11] igd: handle igd-passthrough-isa-bridge setup in realize()

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > That way a simple '-device igd-passthrough-isa-bridge,addr=1f' will > do the setup. Is this going to change the QEMU command line arguments to use it? > Also instead of looking up reasonable PCI IDs based on the graphic > device id simply copy over the

Re: [Qemu-devel] [PATCH 3/6] nvdimm acpi: introduce patched dsm memory

2016-01-06 Thread Igor Mammedov
On Tue, 5 Jan 2016 02:52:05 +0800 Xiao Guangrong wrote: > The dsm memory is used to save the input parameters and store > the dsm result which is filled by QEMU. > > The address of dsm memory is decided by bios and patched into > int64 object returned by "MEMA" method > > Signed-off-by: Xiao G

[Qemu-devel] [RFC] util: Fix QEMU_LD_PREFIX endless loop

2016-01-06 Thread Wei-Bo, Chen
Detail bug report in the following url: https://bugs.launchpad.net/qemu/+bug/1245703 Remove is_dir_maybe macro condition DT_LNK in util/path.c Signed-off-by: Wei-Bo, Chen --- util/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/path.c b/util/path.c index 4e4877e.

[Qemu-devel] [PATCH v2 5/7] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-06 Thread Eric Auger
Some passthrough'ed devices depend on clock nodes. Those need to be generated in the guest device tree. This patch introduces some helpers to build a clock node from information retrieved in the host device tree. - inherit_properties copies properties from a host device tree node to a guest devi

Re: [Qemu-devel] [RFC v6 04/14] softmmu: Add helpers for a new slowpath

2016-01-06 Thread Alex Bennée
Alvise Rigo writes: > The new helpers rely on the legacy ones to perform the actual read/write. > > The LoadLink helper (helper_ldlink_name) prepares the way for the > following SC operation. It sets the linked address and the size of the > access. nit: extra line or continue paragraph > These

[Qemu-devel] [PATCH v2 7/7] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-01-06 Thread Eric Auger
qemu_fdt_setprop self-exists in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 66fa766..68d7e53 100644

[Qemu-devel] [PATCH v2 6/7] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-01-06 Thread Eric Auger
This patch allows the instantiation of the vfio-amd-xgbe device from the QEMU command line (-device vfio-amd-xgbe,host=""). The guest is exposed with a device tree node that combines the description of both XGBE and PHY (representation supported from 4.2 onwards kernel): Documentation/devicetree/b

[Qemu-devel] [PATCH v2 4/7] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-06 Thread Eric Auger
Current qemu_fdt_getprop exits if the property is not found. It is sometimes needed to read an optional property, in which case we do not wish to exit but simply returns a null value. This patch converts qemu_fdt_getprop to accept an Error **, and existing users are converted to pass &error_fatal.

[Qemu-devel] [PATCH v2 2/7] device_tree: introduce load_device_tree_from_sysfs

2016-01-06 Thread Eric Auger
This function returns the host device tree blob from sysfs (/proc/device-tree). It uses a recursive function inspired from dtc read_fstree. Signed-off-by: Eric Auger --- v1 -> v2: - do not implement/expose read_fstree and load_device_tree_from_sysfs if CONFIG_LINUX is not defined (lstat is not

[Qemu-devel] [PATCH v2 3/7] device_tree: introduce qemu_fdt_node_path

2016-01-06 Thread Eric Auger
This new helper routine returns the node path of a device referred to by its node name and compat string. Signed-off-by: Eric Auger --- v1 -> v2: - move doc comment in header file - do not use a fixed size buffer - break on errors in while loop - use strcmp instead of strncmp RFC -> v1: - impr

[Qemu-devel] [PATCH v2 0/7] AMD XGBE KVM platform passthrough

2016-01-06 Thread Eric Auger
This series allows to set up AMD XGBE passthrough. This was tested on AMD Seattle. The first upstreamed device supporting KVM platform passthrough was the Calxeda Midway XGMAC. Compared to this latter, the XGBE XGMAC exposes a much more complex device tree node. - First There are 2 device tree no

[Qemu-devel] [PATCH v2 1/7] hw/vfio/platform: amd-xgbe device

2016-01-06 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger Reviewed-by: Alex Benné --- RFC -> v1: - add Alex' R-b --- hw/vfio/Makefile.objs | 1 + hw/vfio/amd-x

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Eric Blake
On 01/05/2016 07:50 PM, lihuiba wrote: > At 2016-01-05 21:55:56, "Eric Blake" wrote: >> On 01/05/2016 05:10 AM, lihuiba wrote: >> > In our production environment, we need to extend a qcow2 image with > snapshots in it. >> The thing is that one would need to update all the inactive L1

Re: [Qemu-devel] [PATCH v3 07/11] igd: revamp host config read

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > Move all work to the host_pci_config_copy helper function, > which we can easily reuse when adding q35 support. > Open sysfs file only once for all values. Use pread. > Proper error handling. Fix bugs: > > * Don't throw away results (like old host_pci_

[Qemu-devel] [PATCH] i2c-tiny-usb: add new usb to i2c bridge

2016-01-06 Thread Tim Sander
Version 4 with improvements suggested by Gerd Hoffmann: Signed-off-by: Tim Sander i2c-tiny-usb is a small usb to i2c bridge: http://www.harbaum.org/till/i2c_tiny_usb/index.shtml It is pretty simple and has no usb endpoints just a control. Reasons for adding this device: * Linux device driver a

Re: [Qemu-devel] [PATCH 3/8] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-06 Thread Greg Kurz
On Tue, 5 Jan 2016 18:29:57 +0100 Cédric Le Goater wrote: > This is a simulator. Just return an unknown cause (0). > > Signed-off-by: Cédric Le Goater > --- Acked-by: Greg Kurz > hw/ipmi/ipmi_bmc_sim.c | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff

[Qemu-devel] [PATCH] hw/arm/virt: Initialize NICs configured in PCI bus

2016-01-06 Thread Ashok Kumar
virtio model is used for default case. Signed-off-by: Ashok Kumar --- hw/arm/virt.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index acc1fcb..fd52b76 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -808,6 +808,7 @@ static void create_pcie(

  1   2   >