Re: [Qemu-devel] [PATCH 05/10] snapshot: create bdrv_all_find_snapshot helper

2015-11-17 Thread Denis V. Lunev
On 11/17/2015 10:22 AM, Stefan Hajnoczi wrote: On Mon, Nov 16, 2015 at 06:24:36PM +0300, Denis V. Lunev wrote: +int bdrv_all_find_snapshot(const char *name, bool skip_read_only, + BlockDriverState **first_bad_bs) +{ +QEMUSnapshotInfo sn; +int err = 0; +Block

Re: [Qemu-devel] [PATCH COLO-Frame v10 18/38] COLO failover: Introduce a new command to trigger a failover

2015-11-17 Thread zhanghailiang
On 2015/11/14 0:59, Eric Blake wrote: On 11/03/2015 04:56 AM, zhanghailiang wrote: We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover, COLO wi

Re: [Qemu-devel] [PATCH V2 0/4] hw/pcie: Multi-root support for Q35

2015-11-17 Thread Markus Armbruster
Marcel Apfelbaum writes: > On 11/16/2015 12:11 PM, Paolo Bonzini wrote: >> >> >> On 16/11/2015 11:10, Marcel Apfelbaum wrote: What would you lose? Hotplug? >>> >>> Without the bridge? Yes. However the user can add it manually the >>> pci-bridge and have it anyway. >> >> Ok, I guess that's m

Re: [Qemu-devel] virtio-input questions

2015-11-17 Thread Jiri 'Ghormoon' Novak
Hi, resending this, seems you did a typo when CCing qemu-devel and I've just blindly replied-all and got a bounce, sorry for doubled mail, I keep you both in recipients so we don't have multiple threads later. Gh. Jiri 'Ghormoon' Novak wrote: Hi Gerd Hoffmann wrote: Hi, [ Cc'ing qemu-

Re: [Qemu-devel] virtio-input questions

2015-11-17 Thread Jiri 'Ghormoon' Novak
Hi, Gerd Hoffmann wrote: Hi, Seems I'll try to start from the curses.c then, if that's better way (my knowledge of qemu codebase is zero and I'm not a good developer either, but I may try in my free time since I need this and I'd like I wouldn't bother with curses. Better grab input event

[Qemu-devel] [Bug 1516203] Re: qemu-system-x86_64 crashed with SIGSEGV in SDL_BlitCopy()

2015-11-17 Thread Kai Kasurinen
ProcCmdline: qemu-system-x86_64 -machine ubuntu,accel=kvm -m 1024 -device virtio-vga -cdrom ubuntu-15.10-desktop-amd64.iso -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1516203 Title: qemu-system-x

[Qemu-devel] RFC: raspberry pi / pi2 / Windows-on-ARM support

2015-11-17 Thread Andrew Baumann
Hi all, I have been working on Raspberry Pi 2 emulation, building on the previous work of Gregory Estrade, Stefan Weil and others on the original Raspberry Pi target. My current working tree (based off a recent master) is here: https://github.com/0xabu/qemu/tree/raspi The present status is:

Re: [Qemu-devel] [PATCH v2] vhost-user: print original request on error

2015-11-17 Thread Michael S. Tsirkin
On Tue, Nov 17, 2015 at 08:52:24AM +0100, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > When we get an unexpected response, print out > > the original request. > > Helps debug protocol errors tremendously. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > > > Changes from v1:

[Qemu-devel] [PATCH v14 01/13] vfio: extract vfio_get_hot_reset_info as a single function

2015-11-17 Thread Cao jin
From: Chen Fan the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 66 +++ 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/h

[Qemu-devel] [PATCH v14 00/13] vfio-pci: pass the aer error to guest

2015-11-17 Thread Cao jin
From: Chen Fan For now, for vfio pci passthough devices when qemu receives an error from host aer report, currentlly just terminate the guest, but usually user want to know what error occurred but stopping the guest, so this patches add aer capability support for vfio device, and pass the error t

[Qemu-devel] [PATCH v14 09/13] add check reset mechanism when hotplug vfio device

2015-11-17 Thread Cao jin
From: Chen Fan Since we support multi-function hotplug. the function 0 indicate the closure of the slot, so we have the chance to do the check. Signed-off-by: Chen Fan --- hw/pci/pci.c | 29 + hw/vfio/pci.c| 19 +++ hw/vfio/pc

[Qemu-devel] [PATCH v14 10/13] pci: add pci device pre-post reset callbacks for host bus reset

2015-11-17 Thread Cao jin
From: Chen Fan Particularly, For vfio devices, Once need to recovery devices by bus reset such as AER, we always need to reset the host bus to recovery the devices under the bus, so we need to add pci device callbacks to specify to do host bus reset. Signed-off-by: Chen Fan Reviewed-by: Michael

[Qemu-devel] [PATCH v14 04/13] vfio: make the 4 bytes aligned for capability size

2015-11-17 Thread Cao jin
From: Chen Fan this function search the capability from the end, the last size should 0x100 - pos, not 0xff - pos. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index f333dfc..e305cda 100644 --- a/h

[Qemu-devel] [PATCH v14 02/13] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-11-17 Thread Cao jin
From: Chen Fan squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c ind

[Qemu-devel] [PATCH v14 08/13] vfio: add check host bus reset is support or not

2015-11-17 Thread Cao jin
From: Chen Fan when init vfio devices done, we should test all the devices supported aer whether conflict with others. For each one, get the hot reset info for the affected device list. For each affected device, all should attach to the VM and on/below the same bus. also, we should test all of t

[Qemu-devel] [PATCH v14 06/13] aer: impove pcie_aer_init to support vfio device

2015-11-17 Thread Cao jin
From: Chen Fan pcie_aer_init was used to emulate an aer capability for pcie device, but for vfio device, the aer config space size is mutable and is not always equal to PCI_ERR_SIZEOF(0x48). it depends on where the TLP Prefix register required, so here we add a size argument. Signed-off-by: Chen

[Qemu-devel] [PATCH v14 03/13] pcie: modify the capability size assert

2015-11-17 Thread Cao jin
From: Chen Fan Device's Offset and size can reach PCIE_CONFIG_SPACE_SIZE, fix the corresponding assert. Signed-off-by: Chen Fan Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin --- hw/pci/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pcie.c

[Qemu-devel] [PATCH v14 05/13] vfio: add pcie extanded capability support

2015-11-17 Thread Cao jin
From: Chen Fan For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 70

[Qemu-devel] [PATCH v14 07/13] vfio: add aer support for vfio device

2015-11-17 Thread Cao jin
From: Chen Fan Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 81 --- hw/vfio/pci.h | 3 +++ 2 fil

[Qemu-devel] [PULL for-2.5 2/2] input: Document why x-input-send-event is still experimental

2015-11-17 Thread Markus Armbruster
From: Eric Blake The x-input-send-event command was introduced in 2.2 with mention that it is experimental, but now that several releases have elapsed without any changes, it would be nice to document why that was done and should still remain experimental in 2.5. Meanwhile, our documentation sta

[Qemu-devel] [PATCH v14 11/13] pcie_aer: expose pcie_aer_msg() interface

2015-11-17 Thread Cao jin
From: Chen Fan For vfio device, we need to propagate the aer error to Guest OS. we use the pcie_aer_msg() to send aer error to guest. Signed-off-by: Chen Fan Reviewed-by: Michael S. Tsirkin --- hw/pci/pcie_aer.c | 2 +- include/hw/pci/pcie_aer.h | 1 + 2 files changed, 2 insertions(+)

[Qemu-devel] [PATCH v14 13/13] vfio: add 'aer' property to expose aercap

2015-11-17 Thread Cao jin
From: Chen Fan add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio/pci.c b

[Qemu-devel] [PULL for-2.5 1/2] qapi: Document introspection stability considerations

2015-11-17 Thread Markus Armbruster
From: Eric Blake We are not ready (and might never be ready) to declare introspection stable between releases. Clients written to control multiple versions of qemu, and desiring to know whether a particular member is supported for a given command, must be prepared to locate that member in spite o

[Qemu-devel] [PULL for-2.5 0/2] QAPI patches

2015-11-17 Thread Markus Armbruster
The following changes since commit c257779e2a586043a1480bb7e96fb6bcd0129634: Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20151116' into staging (2015-11-16 12:09:47 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2015-11-17 f

[Qemu-devel] [PATCH v14 12/13] vfio-pci: pass the aer error to guest

2015-11-17 Thread Cao jin
From: Chen Fan when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and have the guest driver recover from the

Re: [Qemu-devel] [PATCH 05/10] snapshot: create bdrv_all_find_snapshot helper

2015-11-17 Thread Stefan Hajnoczi
On Tue, Nov 17, 2015 at 11:10:26AM +0300, Denis V. Lunev wrote: > On 11/17/2015 10:22 AM, Stefan Hajnoczi wrote: > >On Mon, Nov 16, 2015 at 06:24:36PM +0300, Denis V. Lunev wrote: > >>@@ -2168,21 +2157,7 @@ void hmp_info_snapshots(Monitor *mon, const QDict > >>*qdict) > >> available_snapshots

Re: [Qemu-devel] [PATCH 1/5] migration: split hmp_savevm to do_savevm and hmp_savevm wrapper

2015-11-17 Thread Markus Armbruster
"Denis V. Lunev" writes: > This would be useful in the next step when QMP version of this call will > be introduced. > > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Amit Shah > CC: Markus Armbruster > CC: Eric Blake > --- > migration/savevm.c | 38 +++

[Qemu-devel] [PATCH 05/11] migration: factor our snapshottability check in load_vmstate

2015-11-17 Thread Denis V. Lunev
We should check that all inserted and not read-only images support snapshotting. This could be made using already invented helper bdrv_all_can_snapshot(). Signed-off-by: Denis V. Lunev CC: Juan Quintela CC: Stefan Hajnoczi CC: Kevin Wolf --- migration/savevm.c | 15 +++ 1 file cha

[Qemu-devel] [PATCH 04/11] snapshot: create bdrv_all_goto_snapshot helper

2015-11-17 Thread Denis V. Lunev
to switch to snapshot on all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev Reviewed-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela CC: Kevin Wolf --- block/snapshot.c | 20 includ

[Qemu-devel] [PATCH for 2.9 v8 0/10] dataplane snapshot fixes

2015-11-17 Thread Denis V. Lunev
with test while /bin/true ; do virsh snapshot-create rhel7 sleep 10 virsh snapshot-delete rhel7 --current done with enabled iothreads on a running VM leads to a lot of troubles: hangs, asserts, errors. Anyway, I think that the construction like assert(aio_contex

[Qemu-devel] [PATCH 01/11] snapshot: create helper to test that block drivers supports snapshots

2015-11-17 Thread Denis V. Lunev
The patch enforces proper locking for this operation. Signed-off-by: Denis V. Lunev Reviewed-by: Greg Kurz Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela CC: Kevin Wolf --- block/snapshot.c | 24 include/block/snapshot.h | 8

[Qemu-devel] [PATCH 07/11] migration: drop find_vmstate_bs check in hmp_delvm

2015-11-17 Thread Denis V. Lunev
There is no much sense to do the check and write warning. Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela --- migration/savevm.c | 5 - 1 file changed, 5 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 4e6d578..6

[Qemu-devel] [PATCH 11/11] migration: normalize locking in migration/savevm.c

2015-11-17 Thread Denis V. Lunev
basically all bdrv_* operations must be called under aio_context_acquire except ones with bdrv_all prefix. Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela CC: Kevin Wolf --- migration/savevm.c | 19 ++- 1 file changed, 18 in

[Qemu-devel] [PATCH 02/11] snapshot: return error code from bdrv_snapshot_delete_by_id_or_name

2015-11-17 Thread Denis V. Lunev
this will make code better in the next patch Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela CC: Kevin Wolf --- block/snapshot.c | 7 --- include/block/snapshot.h | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) dif

[Qemu-devel] [PATCH 03/11] snapshot: create bdrv_all_delete_snapshot helper

2015-11-17 Thread Denis V. Lunev
to delete snapshots from all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela CC: Kevin Wolf --- block/snapshot.c | 22 include/block/snapshot.h | 2

[Qemu-devel] [PATCH 06/11] snapshot: create bdrv_all_find_snapshot helper

2015-11-17 Thread Denis V. Lunev
to check that snapshot is available for all loaded block drivers. The check bs != bs1 in hmp_info_snapshots is an optimization. The check for availability of this snapshot will return always true as the list of snapshots was collected from that image. The patch also ensures proper locking. Signed

[Qemu-devel] [PATCH 09/11] migration: reorder processing in hmp_savevm

2015-11-17 Thread Denis V. Lunev
State deletion can be performed on running VM which reduces VM downtime This approach looks a bit more natural. Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela --- migration/savevm.c | 18 +- 1 file changed, 9 insertions(+),

[Qemu-devel] [PATCH 08/11] snapshot: create bdrv_all_create_snapshot helper

2015-11-17 Thread Denis V. Lunev
to create snapshot for all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela CC: Kevin Wolf --- block/snapshot.c | 26 ++ include/block/snapshot.h |

[Qemu-devel] [PATCH 10/11] migration: implement bdrv_all_find_vmstate_bs helper

2015-11-17 Thread Denis V. Lunev
The patch also ensures proper locking for the operation. Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng CC: Juan Quintela CC: Kevin Wolf --- block/snapshot.c | 15 +++ include/block/snapshot.h | 2 ++ migration/savevm.c | 19 -

Re: [Qemu-devel] [PATCH v2] virtio-blk: Fix double completion for werror=stop

2015-11-17 Thread Stefan Hajnoczi
On Tue, Nov 17, 2015 at 03:28:29PM +0800, Fam Zheng wrote: > On Tue, 11/17 14:58, Stefan Hajnoczi wrote: > > On Mon, Nov 16, 2015 at 02:10:36PM +0800, Fam Zheng wrote: > > > When a request R is absorbed by request M, it is appended to the > > > "mr_next" queue led by M, and is completed together wi

Re: [Qemu-devel] [PATCH for-2.5?] hw/ppc/ppc405_boards: Fix infinite recursion by converting taihu_cpld from old_mmio

2015-11-17 Thread Paolo Bonzini
On 16/11/2015 15:57, Peter Maydell wrote: > The taihu_cpld_writel() function had an obvious typo that meant that > if it was ever called it would go into an infinite recursion. Newer > versions of clang will detect and warn about this: > hw/ppc/ppc405_boards.c:481:1: warning: all paths through

Re: [Qemu-devel] [PATCH] hw/audio/fmopl.c: Avoid clang warning about shifting negative number

2015-11-17 Thread Paolo Bonzini
On 16/11/2015 16:16, Peter Maydell wrote: > Newer versions of clang warn: > > hw/audio/fmopl.c:1085:39: warning: shifting a negative signed value is > undefined [-Wshift-negative-value] > data = Limit( outd[0] , OPL_MAXOUT, OPL_MINOUT ); >

Re: [Qemu-devel] WG: [ovirt-users] Segmentation fault in libtcmalloc

2015-11-17 Thread Dr. David Alan Gilbert
* Grundmann, Christian (christian.grundm...@fabasoft.com) wrote: > Hi, > Dan sent me over to you, > please let me know if i can provide additional informations Hi Christian, Thanks for reporting this, > Softwareversions: > ovirt-node-iso-3.6-0.999.201510221942.el7.centos.iso > > qemu-img-ev-2.

[Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Paolo Bonzini
There's no reason for the compiler to exploit the undefinedness of left shifts, In fact GCC explicitly documents that they do not use at all all this possibility. They also say this is subject to change, but they have been saying this for 10 years (since the wording appeared in the GCC 4.0 manual)

[Qemu-devel] [PATCH v4] tests/vhost-user-bridge: implement logging of dirty pages

2015-11-17 Thread Victor Kaplansky
During migration devices continue writing to the guest's memory. The writes has to be reported to QEMU. This change implements minimal support in vhost-user-bridge required for successful migration of a guest with virtio-net device. Signed-off-by: Victor Kaplansky --- v4: - implement set_vrin

Re: [Qemu-devel] [PATCH COLO-Frame v10 17/38] COLO: synchronize PVM's state to SVM periodically

2015-11-17 Thread zhanghailiang
On 2015/11/14 2:34, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Do checkpoint periodically, the default interval is 200ms. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian --- migration/colo.c | 14 ++ 1 file changed, 14 insertion

Re: [Qemu-devel] [PATCH COLO-Frame v10 17/38] COLO: synchronize PVM's state to SVM periodically

2015-11-17 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > On 2015/11/14 2:34, Dr. David Alan Gilbert wrote: > >* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > >>Do checkpoint periodically, the default interval is 200ms. > >> > >>Signed-off-by: zhanghailiang > >>Signed-off-by: Li Zhijian

Re: [Qemu-devel] [PATCH 2/5] qmp: create qmp_savevm command

2015-11-17 Thread Markus Armbruster
"Denis V. Lunev" writes: > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Amit Shah > CC: Markus Armbruster > CC: Eric Blake > --- > migration/savevm.c | 5 + > qapi-schema.json | 13 + > qmp-commands.hx| 25 + > 3 files changed, 43 in

Re: [Qemu-devel] [PATCH 3/5] qmp: create qmp_delvm command

2015-11-17 Thread Markus Armbruster
"Denis V. Lunev" writes: > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Amit Shah > CC: Markus Armbruster > CC: Eric Blake > --- > migration/savevm.c | 27 ++- > qapi-schema.json | 13 + > qmp-commands.hx| 23 +++ > 3

Re: [Qemu-devel] [PATCH] hw/audio/fmopl.c: Avoid clang warning about shifting negative number

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 09:45, Paolo Bonzini wrote: > Again: let's stop this madness!! > > (Yes, so many exclamation marks). > > This is clearly computing -32768 * 2^N, not -(32768 * 2^N). The latter > is totally, utterly wrong, because 32768 is _not even expressible_ as a > 16

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 09:59, Paolo Bonzini wrote: > There's no reason for the compiler to exploit the undefinedness of left > shifts, In fact GCC explicitly documents that they do not use at all > all this possibility. They also say this is subject to change, but > they have been saying this for

[Qemu-devel] [PATCH v3] virtio-blk: Fix double completion for werror=stop

2015-11-17 Thread Fam Zheng
When a request R is absorbed by request M, it is appended to the "mr_next" queue led by M, and is completed together with the completion of M, in virtio_blk_rw_complete. During DMA restart in virtio_blk_dma_restart_bh, requests in s->rq are parsed and submitted again, possibly with a stale req->mr

Re: [Qemu-devel] [PATCH v2] vhost-user: print original request on error

2015-11-17 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Tue, Nov 17, 2015 at 08:52:24AM +0100, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >> > When we get an unexpected response, print out >> > the original request. >> > Helps debug protocol errors tremendously. >> > >> > Signed-off-by: Michael S. T

Re: [Qemu-devel] [PATCH COLO-Frame v10 12/38] COLO: Save PVM state to secondary side when do checkpoint

2015-11-17 Thread zhanghailiang
On 2015/11/14 2:53, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: On 2015/11/7 2:59, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: The main process of checkpoint is to synchronize SVM with PVM. VM's state includes

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Markus Armbruster
Paolo Bonzini writes: > There's no reason for the compiler to exploit the undefinedness of left > shifts, In fact GCC explicitly documents that they do not use at all > all this possibility. They also say this is subject to change, but Suggest to scratch one of two "all" :) > they have been sa

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Paolo Bonzini
On 17/11/2015 11:19, Peter Maydell wrote: > I think we should only take this patch if you can get a cast-iron > guarantee from both clang and gcc that they will never use this > UB to drive optimizations. As you say gcc already say this more or > less, but clang doesn't, and if they're warning ab

Re: [Qemu-devel] [PATCH V2 3/4] hw/pc: query both q35 and i440fx bus

2015-11-17 Thread Marcel Apfelbaum
On 11/16/2015 08:26 PM, Eduardo Habkost wrote: On Sun, Nov 15, 2015 at 05:39:05PM +0200, Marcel Apfelbaum wrote: Look for pxb devices on both i386 machines. Signed-off-by: Marcel Apfelbaum [...] diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index c81507d..2fbbcd3 100644 --- a/hw/pci-hos

Re: [Qemu-devel] [PATCH COLO-Frame v10 17/38] COLO: synchronize PVM's state to SVM periodically

2015-11-17 Thread zhanghailiang
On 2015/11/17 18:08, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: On 2015/11/14 2:34, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Do checkpoint periodically, the default interval is 200ms. Signed-off-by: zhangh

Re: [Qemu-devel] [PATCH 0/5] QMP wrappers for VM snapshot operations

2015-11-17 Thread Markus Armbruster
"Denis V. Lunev" writes: > EFI based VM with pflash storage for NVRAM could not be snapshoted as > libvirt configures storage as 'raw' and writable. OK, this is a libvirt > problem. > > Another problem is that libvirt can not detect this failure at all > as it uses HMP for this operation. This cr

Re: [Qemu-devel] [PATCH 4/5] migration: improve error reporting for hmp_loadvm

2015-11-17 Thread Markus Armbruster
"Denis V. Lunev" writes: > The patch adds Error ** parameter to load_vmstate call and fills error > inside. The caller after that properly reports error either through > monitor or via local stderr facility during VM start. > > This helper will be usefull too for qmp_load_vmstate implementation.

Re: [Qemu-devel] [PATCH v3] virtio-blk: Fix double completion for werror=stop

2015-11-17 Thread Stefan Hajnoczi
On Tue, Nov 17, 2015 at 06:20:11PM +0800, Fam Zheng wrote: > When a request R is absorbed by request M, it is appended to the > "mr_next" queue led by M, and is completed together with the completion > of M, in virtio_blk_rw_complete. > > During DMA restart in virtio_blk_dma_restart_bh, requests i

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 10:28, Paolo Bonzini wrote: > On 17/11/2015 11:19, Peter Maydell wrote: >> I think we should only take this patch if you can get a cast-iron >> guarantee from both clang and gcc that they will never use this >> UB to drive optimizations. As you say gcc already say this more

Re: [Qemu-devel] WG: [ovirt-users] Segmentation fault in libtcmalloc

2015-11-17 Thread Grundmann, Christian
Hi, @ Can you please use a 'thread apply all bt full' the full gives a little more info. gdb --batch /usr/libexec/qemu-kvm core.52281.1447709011.dump -ex "set pagination off" -ex "thread apply all bt full" [New LWP 52281] [New LWP 52288] [New LWP 52286] [New LWP 52291] [New LWP 52292] [New LW

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Paolo Bonzini
On 17/11/2015 11:36, Peter Maydell wrote: > > If and when this happens we will add "-fno-strict-overflow" for clang, > > just like we are using "-fno-strict-aliasing" already. > > -fno-strict-overflow in clang is AFAICT just an alias for -fwrapv. > These options control handling of signed overflo

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Laszlo Ersek
On 11/17/15 11:26, Markus Armbruster wrote: > Paolo Bonzini writes: > >> There's no reason for the compiler to exploit the undefinedness of left >> shifts, In fact GCC explicitly documents that they do not use at all >> all this possibility. They also say this is subject to change, but > > Sugg

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Laszlo Ersek
On 11/17/15 11:28, Paolo Bonzini wrote: > > > On 17/11/2015 11:19, Peter Maydell wrote: >> I think we should only take this patch if you can get a cast-iron >> guarantee from both clang and gcc that they will never use this >> UB to drive optimizations. As you say gcc already say this more or >>

Re: [Qemu-devel] [PATCH] hw/audio/fmopl.c: Avoid clang warning about shifting negative number

2015-11-17 Thread Paolo Bonzini
On 17/11/2015 11:17, Peter Maydell wrote: > If clang is > warning about it they obviously don't want to guarantee that they > aren't ever going to rely on this UB for optimisation. My interpretation is just that clang's diagnostics are not that much better than GCC anymore, and they feel the nee

Re: [Qemu-devel] [PATCH V2 0/4] hw/pcie: Multi-root support for Q35

2015-11-17 Thread Marcel Apfelbaum
On 11/17/2015 10:15 AM, Markus Armbruster wrote: Marcel Apfelbaum writes: On 11/16/2015 12:11 PM, Paolo Bonzini wrote: On 16/11/2015 11:10, Marcel Apfelbaum wrote: What would you lose? Hotplug? Without the bridge? Yes. However the user can add it manually the pci-bridge and have it anyw

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 10:37, Paolo Bonzini wrote: > > > On 17/11/2015 11:36, Peter Maydell wrote: >> > If and when this happens we will add "-fno-strict-overflow" for clang, >> > just like we are using "-fno-strict-aliasing" already. >> >> -fno-strict-overflow in clang is AFAICT just an alias for

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Paolo Bonzini
On 17/11/2015 11:41, Laszlo Ersek wrote: > > If and when this happens we will add "-fno-strict-overflow" for clang, > > just like we are using "-fno-strict-aliasing" already. > > How about adding "-fwrapv -fno-strict-overflow" right now? (Spelling out > the latter of those explicitly for pointer

Re: [Qemu-devel] [PATCH 0/5] QMP wrappers for VM snapshot operations

2015-11-17 Thread Denis V. Lunev
On 11/17/2015 01:33 PM, Markus Armbruster wrote: "Denis V. Lunev" writes: EFI based VM with pflash storage for NVRAM could not be snapshoted as libvirt configures storage as 'raw' and writable. OK, this is a libvirt problem. Another problem is that libvirt can not detect this failure at all a

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Laszlo Ersek
On 11/17/15 11:43, Paolo Bonzini wrote: > > > On 17/11/2015 11:41, Laszlo Ersek wrote: >>> If and when this happens we will add "-fno-strict-overflow" for clang, >>> just like we are using "-fno-strict-aliasing" already. >> >> How about adding "-fwrapv -fno-strict-overflow" right now? (Spelling o

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 10:37, Paolo Bonzini wrote: > > > On 17/11/2015 11:36, Peter Maydell wrote: >> > If and when this happens we will add "-fno-strict-overflow" for clang, >> > just like we are using "-fno-strict-aliasing" already. >> >> -fno-strict-overflow in clang is AFAICT just an alias for

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Paolo Bonzini
On 17/11/2015 11:55, Peter Maydell wrote: > If you pass clang -fwrapv then this causes -fsanitize=undefined to > no longer complain about signed integer overflows from addition. > However the sanitizer will still complain about left shifts of > negative values. The conclusion I draw is that clang

Re: [Qemu-devel] [PATCH 1/2] target-arm: Update condexec before CP access check in AA32 translation

2015-11-17 Thread Sergey Fedorov
On 16.11.2015 22:34, Sergey Fedorov wrote: > Coprocessor access instructions are allowed inside IT block. > gen_helper_access_check_cp_reg() can raise an exceptions thus condexec > bits should be updated before. > > Signed-off-by: Sergey Fedorov > --- > target-arm/translate.c | 1 + > 1 file chan

Re: [Qemu-devel] [PATCH v4] tests/vhost-user-bridge: implement logging of dirty pages

2015-11-17 Thread Michael S. Tsirkin
On Tue, Nov 17, 2015 at 12:04:06PM +0200, Victor Kaplansky wrote: > During migration devices continue writing to the guest's memory. > The writes has to be reported to QEMU. This change implements > minimal support in vhost-user-bridge required for successful > migration of a guest with virtio-net

[Qemu-devel] [PULL for-2.5 0/7] Block patches

2015-11-17 Thread Stefan Hajnoczi
Bug fixes plus clang warning fixes that have no tree. The following changes since commit c257779e2a586043a1480bb7e96fb6bcd0129634: Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20151116' into staging (2015-11-16 12:09:47 +) are available in the git repository at: git://

[Qemu-devel] [PULL for-2.5 1/7] docs: update bitmaps.md

2015-11-17 Thread Stefan Hajnoczi
From: John Snow Include new error handling scenarios for 2.5. Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 1447196417-26081-1-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- docs/bitmaps.md | 157 1 f

[Qemu-devel] [PULL for-2.5 3/7] tpm: avoid clang shifting negative signed warning

2015-11-17 Thread Stefan Hajnoczi
clang 3.7.0 on x86_64 warns about the following: hw/tpm/tpm_tis.c:1000:36: warning: shifting a negative signed value is undefined [-Wshift-negative-value] tis->loc[c].iface_id = TPM_TIS_IFACE_ID_SUPPORTED_FLAGS1_3; ^

[Qemu-devel] [PULL for-2.5 4/7] disas/arm: avoid clang shifting negative signed warning

2015-11-17 Thread Stefan Hajnoczi
clang 3.7.0 on x86_64 warns about the following: disas/arm.c:1782:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value] imm |= (-1 << 7); ~~ ^ Note that this patch preserves the tab indent in this source file because the surrounding code still uses

[Qemu-devel] [PULL for-2.5 2/7] tests: Ignore recent test binaries

2015-11-17 Thread Stefan Hajnoczi
From: Eric Blake Commits 6c6f312d and bd797fc1 added new tests (test-blockjob-txn and test-timed-average, respectively), but did not mark them for exclusion in .gitignore. Signed-off-by: Eric Blake Reviewed-by: John Snow Message-id: 1447386423-13160-1-git-send-email-ebl...@redhat.com Signed-of

[Qemu-devel] [PULL for-2.5 7/7] virtio-blk: Fix double completion for werror=stop

2015-11-17 Thread Stefan Hajnoczi
From: Fam Zheng When a request R is absorbed by request M, it is appended to the "mr_next" queue led by M, and is completed together with the completion of M, in virtio_blk_rw_complete. During DMA restart in virtio_blk_dma_restart_bh, requests in s->rq are parsed and submitted again, possibly wi

[Qemu-devel] [PULL for-2.5 6/7] block: make 'stats-interval' an array of ints instead of a string

2015-11-17 Thread Stefan Hajnoczi
From: Alberto Garcia This is the natural JSON representation and prevents us from having to decode the list manually. Signed-off-by: Alberto Garcia Message-id: 0e3da8fa206f4ab534ae3ce6086e75fe84f1557e.1447665472.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- blockdev.c |

[Qemu-devel] [PULL for-2.5 5/7] aio-epoll: Fix use-after-free of node

2015-11-17 Thread Stefan Hajnoczi
From: Fam Zheng aio_epoll_update needs the fields in node, so delay the free. Reported-by: Paolo Bonzini Signed-off-by: Fam Zheng Message-id: 1447655534-13974-1-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 6 +- 1 file changed, 5 insertions(+), 1 deleti

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 10:57, Paolo Bonzini wrote: > > > On 17/11/2015 11:55, Peter Maydell wrote: >> If you pass clang -fwrapv then this causes -fsanitize=undefined to >> no longer complain about signed integer overflows from addition. >> However the sanitizer will still complain about left shift

Re: [Qemu-devel] [PULL for-2.5 0/2] QAPI patches

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 08:46, Markus Armbruster wrote: > The following changes since commit c257779e2a586043a1480bb7e96fb6bcd0129634: > > Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20151116' > into staging (2015-11-16 12:09:47 +) > > are available in the git repository at

Re: [Qemu-devel] WG: [ovirt-users] Segmentation fault in libtcmalloc

2015-11-17 Thread Dr. David Alan Gilbert
* Grundmann, Christian (christian.grundm...@fabasoft.com) wrote: > Hi, > > @ Can you please use a 'thread apply all bt full' the full gives a little > more info. > > gdb --batch /usr/libexec/qemu-kvm core.52281.1447709011.dump -ex "set > pagination off" -ex "thread apply all bt full" OK, it

Re: [Qemu-devel] [PATCH v4] tests/vhost-user-bridge: implement logging of dirty pages

2015-11-17 Thread Victor Kaplansky
On Tue, Nov 17, 2015 at 01:04:33PM +0200, Michael S. Tsirkin wrote: > On Tue, Nov 17, 2015 at 12:04:06PM +0200, Victor Kaplansky wrote: > > During migration devices continue writing to the guest's memory. > > The writes has to be reported to QEMU. This change implements > > minimal support in vhost

[Qemu-devel] [PATCH 0/2] mirror: Improve zero write and discard

2015-11-17 Thread Fam Zheng
See patch 1 for the changes since v4. Patch 2 is a small DRY cleaning up. Fam Zheng (2): mirror: Rewrite mirror_iteration mirror: Add mirror_wait_for_io block/mirror.c | 326 ++--- 1 file changed, 197 insertions(+), 129 deletions(-) -- 2

[Qemu-devel] [PATCH 2/2] mirror: Add mirror_wait_for_io

2015-11-17 Thread Fam Zheng
The three lines are duplicated a number of times now, refactor a function. Signed-off-by: Fam Zheng --- block/mirror.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index df1b758..5797ae5 100644 --- a/block/mirror.c

[Qemu-devel] [PATCH] target-i386: Fix mulx for identical target regs

2015-11-17 Thread Richard Henderson
The Intel specification clearly indicates that the low part of the result is written first and the high part of the result is written second; thus if ModRM:reg and VEX. are identical, the final result should be the high part of the result. At present, TCG may either produce incorrect results o

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

2015-11-17 Thread Fam Zheng
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-off-by: Fam Zheng --- v5: Address Max's review com

Re: [Qemu-devel] [PATCH 05/11] migration: factor our snapshottability check in load_vmstate

2015-11-17 Thread Fam Zheng
On Tue, 11/17 12:08, Denis V. Lunev wrote: > We should check that all inserted and not read-only images support > snapshotting. This could be made using already invented helper > bdrv_all_can_snapshot(). > > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Stefan Hajnoczi > CC: Kevin Wol

Re: [Qemu-devel] [PATCH v3 1/4] usb-mtp: use a list for keeping track of children

2015-11-17 Thread Gerd Hoffmann
Hi, > +QLIST_FOREACH(iter, &o->children, list) { > +usb_mtp_object_free(s, iter); You have to use QLIST_FOREACH_SAFE here to avoid use-after-free on iter. Or, as you free the whole list anyway, just grab QLIST_FIRST() while ! QLIST_EMPTY(). cheers, Gerd

Re: [Qemu-devel] [PATCH 06/11] snapshot: create bdrv_all_find_snapshot helper

2015-11-17 Thread Fam Zheng
On Tue, 11/17 12:08, Denis V. Lunev wrote: > to check that snapshot is available for all loaded block drivers. > The check bs != bs1 in hmp_info_snapshots is an optimization. The check > for availability of this snapshot will return always true as the list > of snapshots was collected from that ima

[Qemu-devel] [PATCH] specs/vhost-user: fix spec to match reality

2015-11-17 Thread Michael S. Tsirkin
We wanted to start/stop rings on VRING_ENABLE, but that is not what QEMU does. Rather than tweaking code some more, with risk to stability, let's just document it as it is. We'll be able to fix this in the future with a new protocol feature bit. Reported-by: Victor Kaplansky Signed-off-by: Mich

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Markus Armbruster
Laszlo Ersek writes: > On 11/17/15 11:28, Paolo Bonzini wrote: >> >> >> On 17/11/2015 11:19, Peter Maydell wrote: >>> I think we should only take this patch if you can get a cast-iron >>> guarantee from both clang and gcc that they will never use this >>> UB to drive optimizations. As you say g

Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based file monitoring

2015-11-17 Thread Gerd Hoffmann
Hi, > +#ifndef __linux__ > +return 1; > +#endif Hmm? Shouldn't the stubs avoid these kinds of #ifdefs? > -QLIST_FOREACH(iter, &o->children, list) { > +QLIST_FOREACH_SAFE(iter, &o->children, list, next) { > handles[i++] = iter->handle; > } No need for SAFE here, you

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Peter Maydell
On 17 November 2015 at 11:59, Markus Armbruster wrote: > Laszlo Ersek writes: > >> On 11/17/15 11:28, Paolo Bonzini wrote: >>> >>> >>> On 17/11/2015 11:19, Peter Maydell wrote: I think we should only take this patch if you can get a cast-iron guarantee from both clang and gcc that they

Re: [Qemu-devel] [PATCH for 2.5] QEMU does not care about left shifts of signed negative values

2015-11-17 Thread Paolo Bonzini
On 17/11/2015 12:22, Peter Maydell wrote: > On 17 November 2015 at 10:57, Paolo Bonzini wrote: >> >> >> On 17/11/2015 11:55, Peter Maydell wrote: >>> If you pass clang -fwrapv then this causes -fsanitize=undefined to >>> no longer complain about signed integer overflows from addition. >>> Howeve

  1   2   3   >