[Qemu-devel] [PATCH v2 20/22] blockdev: Keep track of monitor-owned BDS

2015-02-09 Thread Max Reitz
...and release the reference on bdrv_close_all(). Signed-off-by: Max Reitz --- block.c | 2 ++ blockdev.c| 24 include/block/block_int.h | 2 ++ 3 files changed, 28 insertions(+) diff --git a/block.c b/block.c index cbe333d..1ab0e29 1

[Qemu-devel] [PATCH v2 21/22] block: Strip down bdrv_close_all()

2015-02-09 Thread Max Reitz
References to all BlockBackends and BlockDriverStates are now released by their respective holders; force-closing them is no longer necessary. Signed-off-by: Max Reitz --- block.c| 11 +-- block/block-backend.c | 8 include/sysemu/block-backend.

Re: [Qemu-devel] [PATCH v2 08/37] block: Make bdrv_is_inserted() recursive

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > If bdrv_is_inserted() is called on the top level BDS, it should make > sure all nodes in the BDS tree are actually inserted. > > Signed-off-by: Max Reitz > --- > block.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Eric B

Re: [Qemu-devel] [PATCH v2 11/37] block: Remove wr_highest_sector from BlockAcctStats

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > BlockAcctStats contains statistics about the data transferred from and > to the device; wr_highest_sector does not fit in with the rest. > > Furthermore, those statistics are supposed to be specific for a certain > device and not necessarily for a BDS (se

[Qemu-devel] [PATCH v3 02/12] qcow2: Pull up overlap check option evaluation

2015-02-09 Thread Max Reitz
Pull up the absorption of the qcow2-relevant command line options and the evaluation of the overlap check options in qcow2_open(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 96 +-- 1 file changed, 48 insertions(+

[Qemu-devel] [PATCH v3 06/12] qcow2/overlaps: Protect refcount blocks

2015-02-09 Thread Max Reitz
Keep track of the refcount blocks in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/block/q

[Qemu-devel] [PATCH v3 12/12] qcow2: Use new metadata overlap check function

2015-02-09 Thread Max Reitz
Make the static new overlap check function global and drop the old function. Signed-off-by: Max Reitz --- block/qcow2-overlap.c | 8 +--- block/qcow2-refcount.c | 120 - 2 files changed, 2 insertions(+), 126 deletions(-) diff --git a/block/qcow

[Qemu-devel] [PATCH v3 00/12] qcow2: Add new overlap check functions

2015-02-09 Thread Max Reitz
As has been requested, this series adds new overlap check functions to the qcow2 code. My local branch is called "qcow2-improved-overlap-v1", but I am not so sure whether it is actually an improvement; that is left for you to decide, dear reviewers. See patch 1 for an explanation of why this serie

[Qemu-devel] [PATCH v3 07/12] qcow2/overlaps: Protect active L1 table

2015-02-09 Thread Max Reitz
Keep track of the active L1 table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-cluster.c | 11 +++ block/qcow2-snapshot.c | 10 ++ block/qcow2.c | 4 3 files changed, 25 inse

[Qemu-devel] [PATCH v3 01/12] qcow2: Add new overlap check functions

2015-02-09 Thread Max Reitz
The existing qcow2 metadata overlap detection function used existing structures to determine the location of the image metadata, from plain fields such as l1_table_offset and l1_size in the BDRVQcowState, over image structures in memory such as the L1 table for the L2 tables' positions, or it even

[Qemu-devel] [PATCH v3 05/12] qcow2/overlaps: Protect refcount table

2015-02-09 Thread Max Reitz
Keep track of the refcount table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 18 ++ block/qcow2.c | 4 2 files changed, 22 insertions(+) diff --git a/block/qcow

[Qemu-devel] [PATCH v3 10/12] qcow2/overlaps: Protect inactive L1 tables

2015-02-09 Thread Max Reitz
Keep track of the inactive L1 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-snapshot.c | 25 + 1 file changed, 25 insertions(+) diff --git a/block/qcow2-snapshot.c b/block/q

[Qemu-devel] [PATCH v3 03/12] qcow2: Create metadata list

2015-02-09 Thread Max Reitz
Create and destroy the metadata list on creation and destruction of a qcow2 BDS, respectively. Skip creation if no overlap checks should be performed. Signed-off-by: Max Reitz --- block/qcow2.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 4

[Qemu-devel] [PATCH v3 08/12] qcow2/overlaps: Protect active L2 tables

2015-02-09 Thread Max Reitz
Keep track of the active L2 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 2 ++ block/qcow2-refcount.c | 6 ++ block/qcow2-snapshot.c | 21 + block/qcow2.c | 8 +++- 4 fi

[Qemu-devel] [PATCH v3 09/12] qcow2/overlaps: Protect snapshot table

2015-02-09 Thread Max Reitz
Keep track of the snapshot table in the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-snapshot.c | 10 ++ block/qcow2.c | 6 ++ 2 files changed, 16 insertions(+) diff --git a/block/qcow2-snap

[Qemu-devel] [PATCH v3 11/12] qcow2/overlaps: Protect inactive L2 tables

2015-02-09 Thread Max Reitz
Keep track of the inactive L2 tables in the metadata list to protect them against accidental modifications. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 20 block/qcow2-snapshot.c | 43 --- 2 files changed, 60 insertions(+), 3

[Qemu-devel] [PATCH v3 04/12] qcow2/overlaps: Protect image header

2015-02-09 Thread Max Reitz
Enter the image header into the metadata list to protect it against accidental modifications. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 81016d8..b61dab5 100644 --- a/block/qcow2.c

[Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier"

2015-02-09 Thread Christian Borntraeger
From: Andy Whitcroft checkpatch currently loops on fpu/softfloat.c Turns out this is fixed in the Linux version of checkpatch. So this is a port of Andy Whitcrofts fix from Linux, Original commit was commit 89a883530fe7 ("checkpatch: ## is not a valid modifier") Cc: Andy Whitcroft Signed-off-b

Re: [Qemu-devel] [PATCH] win64: perform correct setjmp calls

2015-02-09 Thread Stefan Weil
Am 09.02.2015 um 09:07 schrieb Pavel Dovgaluk: From: Stefan Weil [mailto:s...@weilnetz.de] Am 09.02.2015 um 08:55 schrieb Pavel Dovgalyuk: On w64, setjmp is implemented by _setjmp which needs a second parameter. This parameter should be NULL to allow using longjump from generated code. This patc

[Qemu-devel] [PATCH v2 1/3] numa: Reject CPU indexes > max_cpus

2015-02-09 Thread Eduardo Habkost
The CPU indexes for NUMA nodes make sense only up to max_cpus, and CPU indexes > max_cpus are ignored. Reject configuration which uses invalid CPU indexes. Signed-off-by: Eduardo Habkost --- numa.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/numa.c b/numa.c index 0

[Qemu-devel] [PATCH v2 3/3] numa: Print warning if no node is assigned to a CPU

2015-02-09 Thread Eduardo Habkost
Instead of silently assigning CPU to node 0 when it is omitted from the command-line, check if all CPUs up to max_cpus are present in the NUMA configuration. I am making this a warning and not a fatal error, to allow management software to be updated if necessary. Signed-off-by: Eduardo Habkost

[Qemu-devel] [PATCH v2 2/3] numa: Reject configuration if CPU appears on multiple nodes

2015-02-09 Thread Eduardo Habkost
Each CPU can appear in only one NUMA node on the NUMA config. Reject configuration if a CPU appears in multiple nodes. Signed-off-by: Eduardo Habkost --- numa.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/numa.c b/numa.c index f768434..f004a74 100644 --- a/nu

[Qemu-devel] [PATCH v2 0/3] NUMA: Validate CPU configuration

2015-02-09 Thread Eduardo Habkost
This adds extra checks to the NUMA code to make sure the CPU configuration is consistent. This needs to be applied on top of the following series: Message-Id: <1423421482-11619-1-git-send-email-ehabk...@redhat.com> Subject: [Qemu-devel] [PATCH 0/7] NUMA code cleanup From: Eduardo Habkost

[Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs

2015-02-09 Thread Michael S. Tsirkin
It doesn't make sense to copy values manually: the only issue with getting headers from linux seems to be dealing with linux/types, we can easily fix that automatically while importing. Signed-off-by: Michael S. Tsirkin --- FYI this is what I propose instead of the recently suggested virtio:

Re: [Qemu-devel] [v2][RFC][PATCH] virtio: uniform virtio device IDs

2015-02-09 Thread Michael S. Tsirkin
On Fri, Feb 06, 2015 at 01:41:26PM +0800, Tiejun Chen wrote: > Actually we define these device IDs in virtio standard, so > we'd better put them into one common place to manage conveniently. > Here I also add VIRTIO_ID_RESERVE according to virtio spec. > > Signed-off-by: Tiejun Chen So I just po

[Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2015-02-09 Thread Leen Keus
Hi Serge, Following error message appears after I teared down apparmor and when I tried to start the vm: $sudo virsh start error: Failed to start domain error: error from service: ListActivatableNames: Failed to query AppArmor policy: No such file or directory Can anybody provide me a list of

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] openpic: convert to vmstate

2015-02-09 Thread Mark Cave-Ayland
On 09/02/15 13:50, Juan Quintela wrote: > Mark Cave-Ayland wrote: >> On 09/02/15 12:43, Alexander Graf wrote: > >> Ha! I did actually do this but I accidentally messed up a rebase just >> before sending out the patchset so it got lost. But yes, I agree a >> version bump to 3 should be sufficient

Re: [Qemu-devel] [PATCH v2 17/37] block: Prepare remaining BB functions for NULL BDS

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > There are several BlockBackend functions which, in theory, cannot fail. > This patch makes them cope with the BlockDriverState pointer being NULL > by making them fall back to some default action like ignoring the value > in setters and returning the defau

Re: [Qemu-devel] [PATCH 7/7] target-mips: Add IEEE 754-2008 features support

2015-02-09 Thread Maciej W. Rozycki
On Mon, 9 Feb 2015, Leon Alrae wrote: > > +if (info->elf_flags & EF_MIPS_NAN2008) > > +env->active_fpu.fcr31 |= > > +(1 << FCR31_NAN2008) & env->active_fpu.fcr31_rw_bitmask; > > +else > > +env->active_fpu.fcr31 &= > > +~((1 <<

Re: [Qemu-devel] [PATCH v2 20/37] block: Prepare for NULL BDS

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > blk_bs() will not necessarily return a non-NULL value any more (unless > blk_is_available() is true or it can be assumed to otherwise, e.g. > because it is called immediately after a successful blk_new_with_bs() or > blk_new_open()). > > Signed-off-by: Ma

Re: [Qemu-devel] [PATCH v2 21/37] blockdev: Do not create BDS for empty drive

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Do not use "rudimentary" BDSs for empty drives any longer (for > freshly created drives). > > With this change, bdrv_close_all() has no effect on empty drives (whose > media were not changed) any longer. This breaks some test outputs, fix > them. > > Aft

[Qemu-devel] Revert commit 5af35d7feccaa7d26b72c6c3d14116421d736b36 - "usb-host-libusb: Fix reset handling"

2015-02-09 Thread Dennis Ostermann
Hi there, please revert commit 5af35d7feccaa7d26b72c6c3d14116421d736b36 - "usb-host-libusb: Fix reset handling" This breaks usb pass through of FTDI based usb devices: On the host: lsusb | grep FT2232 Bus 003 Device 008: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual

Re: [Qemu-devel] [Qemu-ppc] [PATCHv3 0/9] pseries: Fix and extend PAPR RTC implementation

2015-02-09 Thread Alexander Graf
On 06.02.15 04:55, David Gibson wrote: > At the moment, the PAPR RTC implementation (actually a paravirt > firmware interface, rather than a normal device) works directly off > host time, and so doesn't respect the options such as clock=vm which > can be specified in the -rtc command line option.

Re: [Qemu-devel] [PATCH v2 25/37] blockdev: Add blockdev-open-tray

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > blockdev.c | 48 > qapi/block-core.json | 23 +++ > qmp-commands.hx | 39 +++ > 3 files changed, 110

Re: [Qemu-devel] [PATCH v2 26/37] blockdev: Add blockdev-close-tray

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > blockdev.c | 22 ++ > qapi/block-core.json | 16 > qmp-commands.hx | 35 +++ > 3 files changed, 73 insertions(+) > Reviewed-by: Eric Bl

Re: [Qemu-devel] [PATCH v2 27/37] blockdev: Add blockdev-remove-medium

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > blockdev.c | 25 + > qapi/block-core.json | 15 +++ > qmp-commands.hx | 45 + > 3 files changed, 85 insertions(+) > Reviewed

Re: [Qemu-devel] [PATCH v2 28/37] blockdev: Add blockdev-insert-medium

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > And a helper function for that which directly takes a pointer to the BDS reads better with s/that/that,/ > to be inserted instead of its node-name (which will be used for > implementing 'change' using blockdev-insert-medium). > > Signed-off-by: Max Reit

Re: [Qemu-devel] [PATCH v2 30/37] blockdev: Implement change with basic operations

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Implement 'change' on block devices by calling blockdev-open-tray, > blockdev-remove-medium, blockdev-insert-medium (a variation of that > which does not need a node-name) and blockdev-close-tray. > > Signed-off-by: Max Reitz > --- > blockdev.c | 185 >

Re: [Qemu-devel] [PULL v2 00/47] Block patches

2015-02-09 Thread Peter Maydell
On 6 February 2015 at 17:35, Kevin Wolf wrote: > [ Posting only the new patches in v2 as replies, see v1 for the rest ] > > The following changes since commit cebbae86b4f7ee3d3dd9df906b97d269e70d9cc7: > > Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into > staging (2015

[Qemu-devel] [PATCHv3 1/9] macio.c: include parent PCIDevice state in VMStateDescription

2015-02-09 Thread Mark Cave-Ayland
This ensures that the macio PCI device is correctly configured when restoring from a VM snapshot. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/macio.c | 24 1 file changed, 24 insertions(+) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index e0f1e88.

[Qemu-devel] [PATCHv3 0/9] ppc: loadvm/savevm fixups for -M g3beige and -M mac99

2015-02-09 Thread Mark Cave-Ayland
This patchset fixes up various bugs in loadvm/savevm for -M g3beige and -M mac99 so that it is becomes possible to save and restore image snapshots. The focus of this patchset is on -M g3beige since this matches the majority of my test images, but there were some easy fixes to be made to -M mac99

[Qemu-devel] [PATCHv3 3/9] cuda.c: include adb_poll_timer in VMStateDescription

2015-02-09 Thread Mark Cave-Ayland
Make sure that we include the adb_poll_timer when saving the VM state for client OSs that use it, e.g. Darwin. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 47

[Qemu-devel] [PATCHv3 7/9] openpic: fix up loadvm under -M mac99

2015-02-09 Thread Mark Cave-Ayland
Issuing loadvm under -M mac99 would fail for two reasons: firstly an incorrect version number for openpic would cause openpic_load() to abort, and secondly a cut/paste error when restoring the IVPR and IDR registers caused subsequent vmstate sections to become misaligned and abort early. Signed-of

[Qemu-devel] [PATCHv3 8/9] openpic: switch IRQQueue queue from inline to bitmap

2015-02-09 Thread Mark Cave-Ayland
This is in preparation for using VMSTATE_BITMAP in a followup vmstate migration patch. Signed-off-by: Mark Cave-Ayland --- hw/intc/openpic.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 4194cef..2a314

[Qemu-devel] [PATCHv3 6/9] openpic: fix segfault on -M mac99 savevm

2015-02-09 Thread Mark Cave-Ayland
A simple copy/paste error causes savevm on -M mac99 to segfault. Signed-off-by: Mark Cave-Ayland --- hw/intc/openpic.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 7d1f3b9..8699a4a 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/

[Qemu-devel] [PATCHv3 4/9] target-ppc: move sdr1 value change detection logic to helper_store_sdr1()

2015-02-09 Thread Mark Cave-Ayland
Otherwise when cpu_post_load calls ppc_store_sdr1() when restoring a VM snapshot the value is deemed unchanged and so the internal env->htab* variables aren't set correctly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Paolo Bonzini --- target-ppc/misc_helper.c |7 ++- target-ppc/mmu_he

[Qemu-devel] [PATCHv3 2/9] adb.c: include ADBDevice parent state in KBDState and MouseState

2015-02-09 Thread Mark Cave-Ayland
The parent ADBDevice contains the device id on the ADB bus. Make sure that this state is included in both its subclasses since some clients (such as OpenBIOS) reprogram each device id after enumeration. Signed-off-by: Mark Cave-Ayland --- hw/input/adb.c | 22 ++ 1 file chan

[Qemu-devel] [PATCHv3 5/9] target-ppc: force update of msr bits in cpu_post_load

2015-02-09 Thread Mark Cave-Ayland
Since env->msr has already been restored by the time cpu_post_load is called, make sure that ppc_store_msr() is explicitly called with all msr bits except MSR_TGPR marked as invalid. This solves the issue where MSR flags aren't set correctly when restoring a VM snapshot, in particular the internal

[Qemu-devel] [PATCHv3 9/9] openpic: convert to vmstate

2015-02-09 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Alexander Graf Reviewed-by: Juan Quintela --- hw/intc/openpic.c | 253 + 1 file changed, 119 insertions(+), 134 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 2a3144f..25ecd

Re: [Qemu-devel] [PATCH] qmp: unbreak build for non-vnc configuration

2015-02-09 Thread Peter Maydell
On 2 February 2015 at 05:08, Leon Yu wrote: > Signed-off-by: Leon Yu > Fixes: df887684603a ("monitor: add query-vnc-servers command") > --- > qmp.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/qmp.c b/qmp.c > index 963305c..ae55f1e 100644 > --- a/qmp.c > +++ b/qmp.c > @@ -134,6

Re: [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier"

2015-02-09 Thread Peter Maydell
On 9 February 2015 at 19:43, Christian Borntraeger wrote: > From: Andy Whitcroft > > checkpatch currently loops on fpu/softfloat.c > Turns out this is fixed in the Linux version of checkpatch. > > So this is a port of Andy Whitcrofts fix from Linux, > Original commit was commit 89a883530fe7 ("che

Re: [Qemu-devel] [PATCH v2 32/37] qmp: Introduce blockdev-change-medium

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Introduce a new QMP command 'blockdev-change-medium' which is intended > to replace the 'change' command for block devices. The existing function > qmp_change_blockdev() is accordingly renamed to > qmp_blockdev_change_medium(). > > Signed-off-by: Max Reit

Re: [Qemu-devel] [PATCH v2 34/37] blockdev: read-only-mode for blockdev-change-medium

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Add an option to qmp_blockdev_change_medium() which allows changing the > read-only status of the block device whose medium is changed. > > Some drives do not have a inherently fixed read-only status; for > instance, floppy disks can be set read-only or w

Re: [Qemu-devel] [PATCH v2 35/37] hmp: Add read-only-mode option to change command

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Expose the new read-only-mode option of 'blockdev-change-medium' for the > 'change' HMP command. > > Signed-off-by: Max Reitz > --- > hmp-commands.hx | 20 +--- > hmp.c | 22 +- > 2 files changed, 38 inserti

Re: [Qemu-devel] [PATCH v2 37/37] iotests: Add test for change-related QMP commands

2015-02-09 Thread Eric Blake
On 02/09/2015 10:11 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/118 | 653 > + > tests/qemu-iotests/118.out | 5 + > tests/qemu-iotests/group | 1 + > 3 files changed, 659 insertions(+) > create mode 100755 tes

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Bin Wu
On 2015/2/9 22:48, Stefan Hajnoczi wrote: > On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote: >> From: Bin Wu >> >> We tested VMs migration with their disk images by drive_mirror. With >> migration, two VMs copyed large files between each other. During the >> test, a segfault occured. The st

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Bin Wu
On 2015/2/9 17:09, Paolo Bonzini wrote: > > > On 09/02/2015 07:50, Bin Wu wrote: >> From: Bin Wu >> >> We tested VMs migration with their disk images by drive_mirror. With >> migration, two VMs copyed large files between each other. During the >> test, a segfault occured. The stack was as follow

Re: [Qemu-devel] [PATCH] qemu-coroutine-lock: fix co_queue multi-adding bug

2015-02-09 Thread Bin Wu
On 2015/2/9 18:12, Kevin Wolf wrote: > Am 09.02.2015 um 10:36 hat Bin Wu geschrieben: >> On 2015/2/9 16:12, Fam Zheng wrote: >>> On Sat, 02/07 17:51, w00214312 wrote: From: Bin Wu When a coroutine holds a lock, other coroutines who want to get the lock must wait on a co_queue b

[Qemu-devel] [PATCH v12 00/17] block: incremental backup series

2015-02-09 Thread John Snow
Welcome to the "incremental backup" newsletter, where we discuss exciting developments in non-redundant backup technology. This patchset enables the in-memory part of the incremental backup feature. There are two series on the mailing list now by Vladimir Sementsov-Ogievskiy that enable the migrat

[Qemu-devel] [PATCH v12 01/17] qapi: Add optional field "name" to block dirty bitmap

2015-02-09 Thread John Snow
From: Fam Zheng This field will be set for user created dirty bitmap. Also pass in an error pointer to bdrv_create_dirty_bitmap, so when a name is already taken on this BDS, it can report an error message. This is not global check, two BDSes can have dirty bitmap with a common name. Implemented

[Qemu-devel] [PATCH v12 06/17] block: Add bitmap successors

2015-02-09 Thread John Snow
A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to be created just prior to a sensitive operation (e.g. Incremental Backup) that can either succeed or fail, but during the course of which we still want a bitmap tracking writes. On creating a successor, we "freeze" the parent bi

[Qemu-devel] [PATCH v12 09/17] qapi: Add transaction support to block-dirty-bitmap operations

2015-02-09 Thread John Snow
This adds four qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any write. For starting a new incremental backup chain, users can also chain together a bi

[Qemu-devel] [PATCH v12 02/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-02-09 Thread John Snow
The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps with the same names. The granularity is an optional field. If it is not specified, we will choose a default granula

[Qemu-devel] [PATCH v12 03/17] block: Introduce bdrv_dirty_bitmap_granularity()

2015-02-09 Thread John Snow
This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Small adjustments are made to ensure that granularity-- in bytes-- is handled consistently as a uint64_t throughout the code. Signed-off-by: John Snow --- block.c

[Qemu-devel] [PATCH v12 07/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-02-09 Thread John Snow
For "dirty-bitmap" sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of "top" sync mode. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c

[Qemu-devel] [PATCH v12 04/17] hbitmap: add hbitmap_merge

2015-02-09 Thread John Snow
We add a bitmap merge operation to assist in error cases where we wish to combine two bitmaps together. This is algorithmically O(bits) provided HBITMAP_LEVELS remains constant. For a full bitmap on a 64bit machine: sum(bits/64^k, k, 0, HBITMAP_LEVELS) ~= 1.01587 * bits We may be able to improve

[Qemu-devel] [PATCH v12 11/17] block: add BdrvDirtyBitmap documentation

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 3c0989c..e065694 100644 --- a/block.c +++ b/block.c @@ -60,11 +60,11 @@ * or enabled. A frozen bitmap can only abdicate() or reclaim(). */ struct Bd

[Qemu-devel] [PATCH v12 10/17] qmp: Add dirty bitmap status fields in query-block

2015-02-09 Thread John Snow
Adds the "disabled" and "frozen" status booleans. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 2 ++ qapi/block-core.json | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index ad33d96..3c0989c 100644 --- a/block.c +++

[Qemu-devel] [PATCH v12 13/17] iotests: add invalid input incremental backup tests

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112 | 89 ++ tests/qemu-iotests/112.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 95 insertions(+) create mode 100644 tests/qemu-iotests/112 create mode 100644 tests/qemu-iotests/

[Qemu-devel] [PATCH v12 05/17] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2015-02-09 Thread John Snow
This allows to put the dirty bitmap into a disabled state where it is read only. A disabled bitmap will ignore any attempts to set or reset any of its bits, but can otherwise be renamed, deleted, or re-enabled. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v12 15/17] iotests: add transactional incremental backup test

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112 | 45 + tests/qemu-iotests/112.out | 4 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112 index 31431ad..7d1a6ec 100644 --- a/tes

[Qemu-devel] [PATCH v12 12/17] block: Ensure consistent bitmap function prototypes

2015-02-09 Thread John Snow
We often don't need the BlockDriverState for functions that operate on bitmaps. Remove it. Signed-off-by: John Snow --- block.c | 13 ++--- block/backup.c| 2 +- block/mirror.c| 23 ++- blockdev.c| 2 +- include/block/block.

[Qemu-devel] [PATCH v12 17/17] iotests: add incremental backup failure recovery test

2015-02-09 Thread John Snow
To test the failure case, we modify iotests.py to allow us to specify that we'd like to allow failures when we wait for block job events. Signed-off-by: John Snow --- tests/qemu-iotests/112| 55 ++- tests/qemu-iotests/112.out| 4 ++-- tests/qe

[Qemu-devel] [PATCH v12 08/17] qmp: add block-dirty-bitmap-clear

2015-02-09 Thread John Snow
Add bdrv_clear_dirty_bitmap and a matching QMP command, qmp_block_dirty_bitmap_clear that enables a user to reset the bitmap attached to a drive. This allows us to reset a bitmap in the event of a full drive backup. Signed-off-by: John Snow --- block.c | 7 +++ blockdev.c

[Qemu-devel] [PATCH v12 14/17] iotests: add simple incremental backup case

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112| 120 +- tests/qemu-iotests/112.out| 4 +- tests/qemu-iotests/iotests.py | 18 --- 3 files changed, 133 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu-io

[Qemu-devel] [PATCH v12 16/17] blkdebug: fix "once" rule

2015-02-09 Thread John Snow
Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an "active list" of rules to be used for the forthcoming action, provided the events and state numbers match. Then

Re: [Qemu-devel] [PATCH v4] sheepdog: selectable object size support

2015-02-09 Thread Liu Yuan
On Tue, Jan 27, 2015 at 05:35:27PM +0900, Teruaki Ishizaki wrote: > Previously, qemu block driver of sheepdog used hard-coded VDI object size. > This patch enables users to handle "block_size_shift" value for > calculating VDI object size. > > When you start qemu, you don't need to specify additio

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Wen Congyang
On 02/09/2015 10:48 PM, Stefan Hajnoczi wrote: > On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote: >> From: Bin Wu >> >> We tested VMs migration with their disk images by drive_mirror. With >> migration, two VMs copyed large files between each other. During the >> test, a segfault occured. T

Re: [Qemu-devel] [PATCH v4] sheepdog: selectable object size support

2015-02-09 Thread Liu Yuan
On Tue, Feb 10, 2015 at 11:10:51AM +0800, Liu Yuan wrote: > On Tue, Jan 27, 2015 at 05:35:27PM +0900, Teruaki Ishizaki wrote: > > Previously, qemu block driver of sheepdog used hard-coded VDI object size. > > This patch enables users to handle "block_size_shift" value for > > calculating VDI object

[Qemu-devel] [PATCH 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread linhaifeng
From: Linhaifeng If u64 is not 0 we should return -1 to tell qemu not going on. Signed-off-by: Linhaifeng --- hw/virtio/vhost-user.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index aefe0bb..a68ce36 100644 -

[Qemu-devel] [PATCH 1/2] vhost-user: support SET_MEM_TABLE waite the result of mmap

2015-02-09 Thread linhaifeng
From: Linhaifeng Slave should reply to master and set u64 to 0 if mmap all regions success otherwise set u64 to 1. Signed-off-by: Linhaifeng --- docs/specs/vhost-user.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 650bb18..c9

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Bin Wu
On 2015/2/10 11:16, Wen Congyang wrote: > On 02/09/2015 10:48 PM, Stefan Hajnoczi wrote: >> On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote: >>> From: Bin Wu >>> >>> We tested VMs migration with their disk images by drive_mirror. With >>> migration, two VMs copyed large files between each o

Re: [Qemu-devel] [PATCH 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread Gonglei
On 2015/2/10 11:24, linhaifeng wrote: > From: Linhaifeng > > If u64 is not 0 we should return -1 to tell qemu not going on. > > Signed-off-by: Linhaifeng > --- > hw/virtio/vhost-user.c | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/hw/virtio/vhost-user.

[Qemu-devel] [PATCH 1/2] vga: Expose framebuffer byteorder as a QOM property

2015-02-09 Thread David Gibson
The VGA device model now supports having the framebuffer in either endian, and can be switched between these by the guest via a register in the qext region. However, in some cases (e.g. LE OS on the pseries machine) we have existing guest that don't know about the endian switch register, but other

[Qemu-devel] [PATCH 2/2] pseries: Switch VGA endian on H_SET_MODE

2015-02-09 Thread David Gibson
When the guest switches the interrupt endian mode, which essentially means a global machine endian switch, we want to change the VGA framebuffer endian mode as well in order to be backward compatible with existing guests who don't know about the new endian control register. Signed-off-by: Benjamin

[Qemu-devel] [PATCH 0/2] ppc: Automatically set vga framebuffer endianness based on guest

2015-02-09 Thread David Gibson
This is a reworked version of BenH's patch to set VGA framebuffer endianess based on the endianness of the guest (as determined by the H_SET_MODE hypercall). I've split the patch into two parts the first adding the object property to the VGA device allowing control of the endianness, and the secon

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Wen Congyang
On 02/10/2015 11:48 AM, Bin Wu wrote: > On 2015/2/10 11:16, Wen Congyang wrote: >> On 02/09/2015 10:48 PM, Stefan Hajnoczi wrote: >>> On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote: From: Bin Wu We tested VMs migration with their disk images by drive_mirror. With migrat

[Qemu-devel] [PATCH v3] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Bin Wu
From: Bin Wu We tested VMs migration with their disk images by drive_mirror. With migration, two VMs copyed large files between each other. During the test, a segfault occured. The stack was as follow: 00) 0x7fa5a0c63fc5 in qemu_co_queue_run_restart (co=0x7fa5a1798648) at qemu-coroutine-loc

Re: [Qemu-devel] [PATCH 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread Linhaifeng
On 2015/2/10 11:57, Gonglei wrote: > On 2015/2/10 11:24, linhaifeng wrote: >> From: Linhaifeng >> >> If u64 is not 0 we should return -1 to tell qemu not going on. >> >> Signed-off-by: Linhaifeng >> --- >> hw/virtio/vhost-user.c | 13 - >> 1 file changed, 12 insertions(+), 1 deleti

[Qemu-devel] [PATCH v1 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread linhaifeng
From: Linhaifeng If u64 is not 0 we should return -1 to tell qemu not going on. Remove some unnecessary '\n' in error_report. Signed-off-by: Linhaifeng --- hw/virtio/vhost-user.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/hw/virtio/

Re: [Qemu-devel] [PATCH v10 2/5] stm32f2xx_USART: Add the stm32f2xx USART Controller

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the stm32f2xx USART controller > (UART also uses the same controller). > > Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite > --- > V8: > - Clear IRQ on reset > - Lower IRQ on data read/status clear > -

Re: [Qemu-devel] [PATCH] win64: perform correct setjmp calls

2015-02-09 Thread Pavel Dovgaluk
> From: Stefan Weil [mailto:s...@weilnetz.de] > Am 09.02.2015 um 09:07 schrieb Pavel Dovgaluk: > >> From: Stefan Weil [mailto:s...@weilnetz.de] > >> Am 09.02.2015 um 08:55 schrieb Pavel Dovgalyuk: > >>> On w64, setjmp is implemented by _setjmp which needs a second parameter. > >>> This parameter sh

[Qemu-devel] [PATCH v1 1/2] vhost-user: support SET_MEM_TABLE waite the result of mmap

2015-02-09 Thread linhaifeng
From: Linhaifeng Slave should reply to master and set u64 to 0 if mmap all regions success otherwise set u64 to 1. Signed-off-by: Linhaifeng --- docs/specs/vhost-user.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 650bb18..c9

Re: [Qemu-devel] [PATCH v10 5/5] netduino2: Add the Netduino 2 Machine

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the Netduino 2 Machine. > > This is a Cortex-M3 based machine. Information can be found at: > http://www.netduino.com/netduino2/specs.htm > > Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite > --- > > hw/

Re: [Qemu-devel] [PATCH v4 0/2] Reworked Zynq GPIO model

2015-02-09 Thread Peter Crosthwaite
On Sun, Jan 25, 2015 at 11:51 AM, Colin Leitner wrote: > Hello everyone, > > this is the fourth version of the Zynq GPIO model patch. It includes > > * removal of unneeded memset in zynq_gpio_realize > * some minor code cleanup > * fixes for all remaining checkpatch warnings (lines too long) >

Re: [Qemu-devel] [PATCH v10 4/5] stm32f205: Add the stm32f205 SoC

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the stm32f205 SoC. This will be used by the > Netduino 2 to create a machine. > > Signed-off-by: Alistair Francis > --- > V6: > - Correct the number of USART/UART devices > - Use macros to define how many devices are ini

[Qemu-devel] [PATCH] vfio: Fix debug message compile error

2015-02-09 Thread Alexey Kardashevskiy
This fixes a compiler error which occurs if DEBUG_VFIO is defined. Signed-off-by: Alexey Kardashevskiy --- hw/vfio/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 29caabc..cfc087a 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -517

Re: [Qemu-devel] [PATCH v10 1/5] stm32f2xx_timer: Add the stm32f2xx Timer

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the stm32f2xx timers: TIM2, TIM3, TIM4 and TIM5 > to QEMU. > > Signed-off-by: Alistair Francis > Signed-off-by: Peter Crosthwaite > --- > V10: > - Correct the units based on a patch by Peter C > V9: > - Convert tick_off

[Qemu-devel] [PULL 08/46] virtfs-proxy-helper: Fix possible socket leak.

2015-02-09 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- fsdev/virtfs-proxy-helper.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index cd291d3..c1da2d7

[Qemu-devel] [PULL 04/46] Add trace to ps2.c.

2015-02-09 Thread Michael Tokarev
From: Don Koch Signed-off-by: Don Koch Signed-off-by: Michael Tokarev --- hw/input/ps2.c | 16 trace-events | 17 + 2 files changed, 33 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index a466e25..4baeea2 100644 --- a/hw/input/ps2.c +++ b/hw/inp

<    1   2   3   4   >