[Qemu-devel] [PATCH v6 20/21] iotests: add incremental backup failure recovery test

2015-04-17 Thread John Snow
Test the failure case for incremental backups. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/124 | 57 ++ tests/qemu-iotests/124.out | 4 ++-- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iot

Re: [Qemu-devel] [PATCH 1/4] hw/s390x/virtio-ccw: Add virtio_ccw_device_plugged for virtio-ccw

2015-04-17 Thread Shannon Zhao
On Friday, 17 April 2015, Peter Maydell wrote: > On 17 April 2015 at 13:13, Shannon Zhao wrote: >> Add virtio_ccw_device_plugged, it can be used to get backend's features. >> >> Signed-off-by: Shannon Zhao >> Signed-off-by: Shannon Zhao >> --- >> hw/s390x/virtio-ccw.c | 11 +++ >> 1 fi

Re: [Qemu-devel] [PATCH v4] vhost: fix log base address

2015-04-17 Thread 幽灵王子
At 2015/4/17 23:13, Michael S. Tsirkin Wrote: VHOST_SET_LOG_BASE got an incorrect address, causing migration errors and potentially even memory corruption. Reported-by: Wen Congyang Signed-off-by: Michael S. Tsirkin --- changed (uint64_t)(unsigned long) to (uintptr_t). Untested. Wen Congyang

[Qemu-devel] [PATCH v2.5 00/10] block: incremental backup transactions

2015-04-17 Thread John Snow
I am not prepared to send a v3 on this, primarily because I am still waffling on whether or not to do the code motion patch that is present in patch #8 of v2 of this series. However, for the purposes of testing, reviewers may find it convenient to have a new version of this series that applies

[Qemu-devel] [PATCH v6 21/21] iotests: add incremental backup granularity tests

2015-04-17 Thread John Snow
Test what happens if you fiddle with the granularity. Reviewed-by: Max Reitz Signed-off-by: John Snow --- tests/qemu-iotests/124 | 58 +- tests/qemu-iotests/124.out | 4 ++-- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/tests/

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

2015-04-17 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/124 | 104 + tests/qemu-iotests/124.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 110 insertions(+) create mode 100644 tests

[Qemu-devel] [PATCH v6 15/21] block: Resize bitmaps on bdrv_truncate

2015-04-17 Thread John Snow
Signed-off-by: John Snow --- block.c| 18 ++ include/qemu/hbitmap.h | 10 ++ util/hbitmap.c | 48 3 files changed, 76 insertions(+) diff --git a/block.c b/block.c index 735acff..b29aafe 100644 --- a/

[Qemu-devel] [PATCH v6 18/21] iotests: add QMP event waiting queue

2015-04-17 Thread John Snow
A filter is added to allow callers to request very specific events to be pulled from the event queue, while leaving undesired events still in the stream. This allows us to poll for completion data for multiple asynchronous events in any arbitrary order. A new timeout context is added to the qmp p

[Qemu-devel] [PATCH v6 14/21] block: Ensure consistent bitmap function prototypes

2015-04-17 Thread John Snow
We often don't need the BlockDriverState for functions that operate on bitmaps. Remove it. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- block.c | 13 ++--- block/backup.c| 2 +- block/mirror.c| 26 ++

[Qemu-devel] [PATCH v6 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-04-17 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 v6 09/21] block: Add bitmap successors

2015-04-17 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 v6 13/21] block: add BdrvDirtyBitmap documentation

2015-04-17 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index ca73a6a..30c8568 100644 --- a/block.c +++ b/block.c @@ -60,11 +60,11 @@ * or enabled. A frozen bi

[Qemu-devel] [PATCH v6 11/21] qmp: add block-dirty-bitmap-clear

2015-04-17 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 Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi R

[Qemu-devel] [PATCH v6 19/21] iotests: add simple incremental backup case

2015-04-17 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/124 | 174 +++-- tests/qemu-iotests/124.out | 4 +- 2 files changed, 172 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 85675ec.

[Qemu-devel] [PATCH v6 08/21] block: Add bitmap disabled status

2015-04-17 Thread John Snow
Add a status indicating the enabled/disabled state of the bitmap. A bitmap is by default enabled, but you can lock the bitmap into a read-only state by setting disabled = true. A previous version of this patch added a QMP interface for changing the state of the bitmap, but it has since been remove

[Qemu-devel] [PATCH v6 06/21] hbitmap: cache array lengths

2015-04-17 Thread John Snow
As a convenience: between incremental backups, bitmap migrations and bitmap persistence we seem to need to recalculate these a lot. Because the lengths are a little bit-twiddly, let's just solidly cache them and be done with it. Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: John

[Qemu-devel] [PATCH v6 12/21] qmp: Add dirty bitmap status field in query-block

2015-04-17 Thread John Snow
Add the "frozen" status booleans, to inform clients when a bitmap is occupied doing a task. Signed-off-by: Fam Zheng Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block.c | 1 + qapi/block-core.json | 5 - 2 files ch

[Qemu-devel] [PATCH v6 16/21] hbitmap: truncate tests

2015-04-17 Thread John Snow
The general approach is to set bits close to the boundaries of where we are truncating and ensure that everything appears to have gone OK. We test growing and shrinking by different amounts: - Less than the granularity - Less than the granularity, but across a boundary - Less than sizeof(unsigned

[Qemu-devel] [PATCH v6 04/21] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-04-17 Thread John Snow
The new command pair is added to manage a 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 granu

[Qemu-devel] [PATCH v6 05/21] block: Introduce bdrv_dirty_bitmap_granularity()

2015-04-17 Thread John Snow
This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 8 ++-- include/block/block.h | 1 +

[Qemu-devel] [PATCH v6 07/21] hbitmap: add hbitmap_merge

2015-04-17 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 v6 00/21] block: transactionless incremental backup series

2015-04-17 Thread John Snow
It's spring! The winter snow has thawed and so here is a new patch series to enter your life and warm your heart. This patchset enables the in-memory part of the incremental backup feature, without transactional support. Support for transactions was separated into a separate series which is also

[Qemu-devel] [PATCH v6 02/21] qapi: Add optional field "name" to block dirty bitmap

2015-04-17 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 v6 03/21] qmp: Ensure consistent granularity type

2015-04-17 Thread John Snow
We treat this field with a variety of different types everywhere in the code. Now it's just uint32_t. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi --- block.c | 11 ++- block/mirror.c| 4 ++-- inclu

[Qemu-devel] [PATCH v6 01/21] docs: incremental backup documentation

2015-04-17 Thread John Snow
Signed-off-by: John Snow --- docs/bitmaps.md | 352 1 file changed, 352 insertions(+) create mode 100644 docs/bitmaps.md diff --git a/docs/bitmaps.md b/docs/bitmaps.md new file mode 100644 index 000..f066b48 --- /dev/null +++ b/docs/b

Re: [Qemu-devel] Character order of ATA identity

2015-04-17 Thread John Snow
On 04/16/2015 02:07 PM, 乔天香 wrote: Hi, all Hi! I'm learning operating system and trying to write a little toy kernel. Before doing disk I/O, I issued the *ATA identify* command to obtain information about the master device on the primary channel. When I ran my code with QEMU, I found it gi

Re: [Qemu-devel] [PATCH v2 05/11] block: add transactional callbacks feature

2015-04-17 Thread John Snow
On 04/17/2015 11:41 AM, Max Reitz wrote: On 27.03.2015 20:19, John Snow wrote: The goal here is to add a new method to transactions that allows developers to specify a callback that will get invoked only once all jobs spawned by a transaction are completed, allowing developers the chance to pe

Re: [Qemu-devel] [PATCH v5 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-04-17 Thread John Snow
On 04/17/2015 06:51 PM, Eric Blake wrote: On 04/08/2015 04:19 PM, John Snow wrote: 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 "t

Re: [Qemu-devel] [PATCH v5 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > 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

Re: [Qemu-devel] [PATCH v5 11/21] qmp: add block-dirty-bitmap-clear

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > 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

Re: [Qemu-devel] [PATCH v5 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-04-17 Thread Eric Blake
On 04/17/2015 05:02 PM, John Snow wrote: >>> { 'type': 'DriveBackup', >>> 'data': { 'device': 'str', 'target': 'str', '*format': 'str', >>> 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', >>> -'*speed': 'int', >>> +'*speed': 'int', '*bitmap': 'str', >

Re: [Qemu-devel] [PATCH v5 09/21] block: Add bitmap successors

2015-04-17 Thread John Snow
On 04/17/2015 06:43 PM, Eric Blake wrote: On 04/08/2015 04:19 PM, John Snow wrote: 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

Re: [Qemu-devel] [PATCH v5 12/21] qmp: Add dirty bitmap status field in query-block

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > Add the "frozen" status booleans, to inform clients > when a bitmap is occupied doing a task. > > Signed-off-by: Fam Zheng > Signed-off-by: John Snow > Reviewed-by: Max Reitz > Reviewed-by: Stefan Hajnoczi > --- > block.c | 1 + > qapi/b

Re: [Qemu-devel] [PATCH v5 09/21] block: Add bitmap successors

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > 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. >

[Qemu-devel] [Bug 1445633] [NEW] Creating a passthrough USB device causes excessive CPU usage in the guest

2015-04-17 Thread P. J. Reed
Public bug reported: My host machine is a Lenovo X1 Carbon (3rd gen) laptop running 64-bit Ubuntu Linux 14.04. My guest machine is running 64-bit Ubuntu Linux 12.04. My QEMU was compiled moments ago from the git repository, and it says its version is: qemu-x86_64 version 2.2.93, Copyright (c)

Re: [Qemu-devel] [PATCH v5 07/21] hbitmap: add hbitmap_merge

2015-04-17 Thread John Snow
On 04/17/2015 11:23 AM, Eric Blake wrote: On 04/08/2015 04:19 PM, John Snow wrote: 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 mac

Re: [Qemu-devel] [PATCH v12 4/9] hw/vfio/platform: add capability to start IRQ propagation

2015-04-17 Thread Alex Williamson
On Fri, 2015-04-17 at 17:31 +0200, Eric Auger wrote: > Hi Alex, > On 04/17/2015 12:04 AM, Alex Williamson wrote: > > On Thu, 2015-03-19 at 17:16 +, Eric Auger wrote: > >> Add a reset notify function that enables to start the propagation of > >> interrupts to the guest. > >> > >> Signed-off-by:

[Qemu-devel] kvm guest-host separation

2015-04-17 Thread Andrei Bacs
Hello, I would like to implement some security checks in the qemu user process that would monitor the disk I/O of a KVM guest. I am trying to understand if this is a good level for the implementation (such that the security checks are safe) or I need to do this at a lower level (possibly in the hy

[Qemu-devel] Multiple monitors

2015-04-17 Thread tom289332
Hello, What are the possible ways to use multiple monitors with qemu (running locally)? (I asked this on qemu-discuss last week, but got no responses, so I'm trying here.) I read somewhere that spice supports multiple monitors. But I'm worried that with spice being network-based, it won't be f

Re: [Qemu-devel] [[PATCH] 5/7] target-arm: Add TTBR regime function and use

2015-04-17 Thread Greg Bellows
On Thu, Apr 16, 2015 at 1:03 PM, Peter Maydell wrote: > On 27 March 2015 at 19:10, Greg Bellows wrote: > > Add a utility function for choosing the correct TTBR system register > based on > > the specified MMU index. Add use of function on physical address lookup. > > > @@ -5376,20 +5390,26 @@ st

Re: [Qemu-devel] [PATCH v1 RFC 34/34] char: introduce support for TLS encrypted TCP chardev backend

2015-04-17 Thread Eric Blake
On 04/17/2015 08:22 AM, Daniel P. Berrange wrote: > This integrates support for QIOChannelTLS object in the TCP > chardev backend. If the 'tls-cred=NAME' option is passed with > the '-chardev tcp' argument, then it will setup the chardev > such that the client is required to establish a TLS handsha

Re: [Qemu-devel] vmdk: improve streamOptimized vmdk support

2015-04-17 Thread devsk
Fam: Any updates on this? Thanks On Tuesday, March 3, 2015 12:54 AM, Fam Zheng wrote: On Tue, 03/03 09:36, Milos Vyletel wrote: > On Sun, Mar 1, 2015 at 9:50 PM, Sunil Kumar > wrote: > > Any update on this Milos? > > > > Thanks. > > > > I did look at this yesterday and unfortunate

Re: [Qemu-devel] [PATCH v5 18/21] iotests: add QMP event waiting queue

2015-04-17 Thread John Snow
On 04/17/2015 09:33 AM, Max Reitz wrote: On 09.04.2015 00:20, John Snow wrote: A filter is added to allow callers to request very specific events to be pulled from the event queue, while leaving undesired events still in the stream. This allows to poll for completion data for multiple asynchr

Re: [Qemu-devel] [RFC PATCH] vl.c: add -semihosting-config "arg" sub-argument

2015-04-17 Thread Liviu Ionescu
> On 16 Apr 2015, at 12:27, Leon Alrae wrote: > > ... I believe it would be much easier if you sent the patches first I just did this. > On 16 Apr 2015, at 17:22, Peter Maydell wrote: > it is nothing like > the way QEMU's system-emulator mode handles other command line > arguments. generall

Re: [Qemu-devel] [PATCH v1 RFC 25/34] io: add QIOTask class for async operations

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 07:06:04PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 18:11, Daniel P. Berrange wrote: > > > > +task = qio_task_new(OBJECT(ioc), > > +func, opaque, destroy); > > + > > +qio_channel_tls_handshake_task(ioc, task); > > + > > +object_u

Re: [Qemu-devel] [PATCH v2 06/16] hw/intc/arm_gic: Add Interrupt Group Registers

2015-04-17 Thread Peter Maydell
On 14 April 2015 at 20:13, Peter Maydell wrote: > On 30 October 2014 at 22:12, Greg Bellows wrote: >> From: Fabian Aggeler >> >> Interrupt Group Registers (previously called Interrupt Security >> Registers) as defined in GICv1 with Security Extensions or GICv2 allow >> to configure interrupts as

[Qemu-devel] [PATCH] --semihosting-cmdline added

2015-04-17 Thread Liviu Ionescu
This patch adds a new option (--semihosting-cmdline) to define the entire command line to be passed via semihosting, since -kernal and -append might generate very long lines. This option must be placed at the end, all subsequent arguments are passed to the application. Other changes: - typedef st

Re: [Qemu-devel] [PATCH v1 RFC 25/34] io: add QIOTask class for async operations

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 18:11, Daniel P. Berrange wrote: > > +task = qio_task_new(OBJECT(ioc), > +func, opaque, destroy); > + > +qio_channel_tls_handshake_task(ioc, task); > + > +object_unref(OBJECT(task)); > > The second ref taken at time of qio_channel_add_watch_full

Re: [Qemu-devel] [PATCH v2 11/11] iotests: 124 - transactional failure test

2015-04-17 Thread Max Reitz
On 27.03.2015 20:20, John Snow wrote: Use a transaction to request an incremental backup across two drives. Coerce one of the jobs to fail, and then re-run the transaction. Verify that no bitmap data was lost due to the partial transaction failure. Signed-off-by: John Snow --- tests/qemu-iot

Re: [Qemu-devel] [PATCH v5 19/21] iotests: add simple incremental backup case

2015-04-17 Thread John Snow
On 04/17/2015 10:33 AM, Max Reitz wrote: On 09.04.2015 00:20, John Snow wrote: Signed-off-by: John Snow --- tests/qemu-iotests/124 | 174 +++-- tests/qemu-iotests/124.out | 4 +- 2 files changed, 172 insertions(+), 6 deletions(-) I was happi

Re: [Qemu-devel] [PATCH v2 10/11] block: drive_backup transaction callback support

2015-04-17 Thread Max Reitz
On 27.03.2015 20:20, John Snow wrote: This patch actually implements the transactional callback system for the drive_backup transaction. This line is probably not intended to be indented (I always wanted to make that pun). (1) We manually pick up a reference to the bitmap if present to

Re: [Qemu-devel] [PATCH v5 15/21] block: Resize bitmaps on bdrv_truncate

2015-04-17 Thread John Snow
On 04/17/2015 09:25 AM, Max Reitz wrote: On 09.04.2015 00:19, John Snow wrote: Signed-off-by: John Snow --- block.c| 18 ++ include/qemu/hbitmap.h | 10 ++ util/hbitmap.c | 48 3 files change

Re: [Qemu-devel] [PATCH v2 08/11] block: move transactions beneath qmp interfaces

2015-04-17 Thread Eric Blake
On 04/17/2015 10:01 AM, Max Reitz wrote: > On 27.03.2015 20:20, John Snow wrote: >> In general, since transactions may reference QMP function helpers, >> it would be nice for them to sit beneath them. >> >> This will avoid the need for forward declaring any QMP interfaces, >> which would be aggrava

Re: [Qemu-devel] [PATCH v2 08/11] block: move transactions beneath qmp interfaces

2015-04-17 Thread John Snow
On 04/17/2015 12:01 PM, Max Reitz wrote: On 27.03.2015 20:20, John Snow wrote: In general, since transactions may reference QMP function helpers, it would be nice for them to sit beneath them. This will avoid the need for forward declaring any QMP interfaces, which would be aggravating to upd

Re: [Qemu-devel] [PATCH v5 01/21] docs: incremental backup documentation

2015-04-17 Thread Eric Blake
On 04/17/2015 09:50 AM, John Snow wrote: > > > On 04/17/2015 11:06 AM, Eric Blake wrote: >> On 04/08/2015 04:19 PM, John Snow wrote: >>> Reviewed-by: Max Reitz >>> Signed-off-by: John Snow >>> --- >>> docs/bitmaps.md | 311 >>> >>> 1 f

Re: [Qemu-devel] [PATCH v2 05/14] exec.c: Convert subpage memory ops to _with_attrs

2015-04-17 Thread Alex Bennée
Peter Maydell writes: > On 17 April 2015 at 17:15, Alex Bennée wrote: >> >> Peter Maydell writes: >> >>> Convert the subpage memory ops to _with_attrs; this will allow >>> us to pass the attributes through to the underlying access >>> functions. (Nothing uses the attributes yet.) >>> >>> Signe

Re: [Qemu-devel] [PATCH v5 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-04-17 Thread John Snow
On 04/17/2015 09:17 AM, Max Reitz wrote: On 09.04.2015 00:19, John Snow wrote: 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"

Re: [Qemu-devel] [PATCH v2 05/14] exec.c: Convert subpage memory ops to _with_attrs

2015-04-17 Thread Peter Maydell
On 17 April 2015 at 17:15, Alex Bennée wrote: > > Peter Maydell writes: > >> Convert the subpage memory ops to _with_attrs; this will allow >> us to pass the attributes through to the underlying access >> functions. (Nothing uses the attributes yet.) >> >> Signed-off-by: Peter Maydell >> Reviewe

Re: [Qemu-devel] [PATCH v2 05/14] exec.c: Convert subpage memory ops to _with_attrs

2015-04-17 Thread Alex Bennée
Peter Maydell writes: > Convert the subpage memory ops to _with_attrs; this will allow > us to pass the attributes through to the underlying access > functions. (Nothing uses the attributes yet.) > > Signed-off-by: Peter Maydell > Reviewed-by: Paolo Bonzini > Reviewed-by: Edgar E. Iglesias >

Re: [Qemu-devel] [PATCH v2 09/11] qmp: Add an implementation wrapper for qmp_drive_backup

2015-04-17 Thread Max Reitz
On 27.03.2015 20:20, John Snow wrote: We'd like to be able to specify the callback given to backup_start manually in the case of transactions, so split apart qmp_drive_backup into an implementation and a wrapper. Switch drive_backup_prepare to use the new wrapper, but don't overload the callback

Re: [Qemu-devel] [PATCH v1 RFC 25/34] io: add QIOTask class for async operations

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 05:57:24PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 17:49, Daniel P. Berrange wrote: > > > In this case I even think you're leaking the task. You do object_ref > > > twice (once at creation time, once before qio_channel_add_watch_full) > > > and only have one objec

Re: [Qemu-devel] [PATCH v1 RFC 04/34] qom: add object_new_propv / object_new_proplist constructors

2015-04-17 Thread Eric Blake
On 04/17/2015 08:22 AM, Daniel P. Berrange wrote: > It is reasonably common to want to create an object, set a > number of properties, register it in the hierarchy and then > mark it as complete (if a user creatable type). This requires > quite alot of error prone, verbose, boilerplate code to achi

Re: [Qemu-devel] [PATCH v2 04/14] Add MemTxAttrs to the IOTLB

2015-04-17 Thread Alex Bennée
Peter Maydell writes: > Add a MemTxAttrs field to the IOTLB, and allow target-specific > code to set it via a new tlb_set_page_with_attrs() function; > pass the attributes through to the device when making IO accesses. > > Signed-off-by: Peter Maydell > Reviewed-by: Paolo Bonzini > Reviewed-by

Re: [Qemu-devel] [PATCH v2 03/14] Make CPU iotlb a structure rather than a plain hwaddr

2015-04-17 Thread Alex Bennée
Peter Maydell writes: > Make the CPU iotlb a structure rather than a plain hwaddr; > this will allow us to add transaction attributes to it. > > Signed-off-by: Peter Maydell > Reviewed-by: Paolo Bonzini > Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Bennée -- Alex Bennée

Re: [Qemu-devel] [PATCH v1 RFC 23/34] io: add QIOChannelSocket class

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 17:52, Daniel P. Berrange wrote: >>> > > +QIOChannelSocket * >>> > > +qio_channel_socket_accept(QIOChannelSocket *ioc, >>> > > + Error **errp); >> > >> > Does it make sense for a passive socket to be a QIOChannelSocket? We >> > have already a pretty decent

[Qemu-devel] [PATCH v1 RFC 29/34] ui: convert VNC server to use QEMUIOChannelSocket classes

2015-04-17 Thread Daniel P. Berrange
The minimal first step conversion to use QEMUIOChannelSocket classes instead of directly using POSIX sockets API. This will later be extended to also cover the TLS, SASL and websockets code. Signed-off-by: Daniel P. Berrange --- ui/vnc-auth-sasl.c | 39 ++-- ui/vnc-auth-vencrypt.c | 45 ++-

Re: [Qemu-devel] [PATCH v2 08/11] block: move transactions beneath qmp interfaces

2015-04-17 Thread Max Reitz
On 27.03.2015 20:20, John Snow wrote: In general, since transactions may reference QMP function helpers, it would be nice for them to sit beneath them. This will avoid the need for forward declaring any QMP interfaces, which would be aggravating to update in so many places. Signed-off-by: John

[Qemu-devel] [PATCH v1 RFC 27/34] io: pull Buffer code out of VNC module

2015-04-17 Thread Daniel P. Berrange
The Buffer code in the VNC server is useful for the IO channel code, so pull it out into a shared module, QIOBuffer. Signed-off-by: Daniel P. Berrange --- include/io/buffer.h | 118 io/Makefile.objs| 1 + io/buffer.c | 65 ++

Re: [Qemu-devel] [PATCH v2 02/14] memory: Replace io_mem_read/write with memory_region_dispatch_read/write

2015-04-17 Thread Alex Bennée
Peter Maydell writes: > Rather than retaining io_mem_read/write as simple wrappers around > the memory_region_dispatch_read/write functions, make the latter > public and change all the callers to use them, since we need to > touch all the callsites anyway to add MemTxAttrs and MemTxResult > supp

Re: [Qemu-devel] [PATCH v2 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-17 Thread Alex Bennée
Peter Maydell writes: > Define an API so that devices can register MemoryRegionOps whose read > and write callback functions are passed an arbitrary pointer to some > transaction attributes and can return a success-or-failure status code. > This will allow us to model devices which: > * behave

[Qemu-devel] [PATCH v1 RFC 12/34] crypto: add a gcrypt cipher implementation

2015-04-17 Thread Daniel P. Berrange
If we are linking to gnutls already and gnutls is built against gcrypt, then we should use gcrypt as a cipher backend in preference to our built-in backend. This will be used when linking against GNUTLS 1.x and many GNUTLS 2.x versions. Signed-off-by: Daniel P. Berrange --- configure

[Qemu-devel] [PATCH v1 RFC 10/34] crypto: move built-in D3DES implementation into crypto/

2015-04-17 Thread Daniel P. Berrange
To prepare for a generic internal cipher API, move the built-in D3DES implementation into the crypto/ directory. This is not in fact a normal D3DES implementation, it is D3DES with double & triple length modes removed, and the key bytes in reversed bit order. IOW it is crippled specifically for th

Re: [Qemu-devel] [PATCH v1 RFC 25/34] io: add QIOTask class for async operations

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 05:16:26PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 16:22, Daniel P. Berrange wrote: > > A number of I/O operations need to be performed asynchronously > > to avoid blocking the main loop. The caller of such APIs need > > to provide a callback to be invoked on compl

[Qemu-devel] [PATCH v1 RFC 13/34] crypto: add a nettle cipher implementation

2015-04-17 Thread Daniel P. Berrange
If we are linking to gnutls already and gnutls is built against nettle, then we should use nettle as a cipher backend in preference to our built-in backend. This will be used when linking against some GNUTLS 2.x versions and all GNUTLS 3.x versions. Signed-off-by: Daniel P. Berrange --- configu

Re: [Qemu-devel] [PATCH v1 RFC 25/34] io: add QIOTask class for async operations

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 17:49, Daniel P. Berrange wrote: > > In this case I even think you're leaking the task. You do object_ref > > twice (once at creation time, once before qio_channel_add_watch_full) > > and only have one object_unref. I would just do without reference > > counting, and add a qio_tas

Re: [Qemu-devel] [PATCH v1 RFC 01/34] ui: remove check for failure of qemu_acl_init()

2015-04-17 Thread Eric Blake
On 04/17/2015 08:22 AM, Daniel P. Berrange wrote: > The qemu_acl_init() function has long since stopped being able > to return NULL, since g_malloc will abort on OOM. As such the > checks for NULL were unreachable code. > > Signed-off-by: Daniel P. Berrange > --- > ui/vnc.c | 8 > 1 fil

Re: [Qemu-devel] [PATCH v1 RFC 23/34] io: add QIOChannelSocket class

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 05:28:09PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 16:22, Daniel P. Berrange wrote: > > Implement a QIOChannel subclass that supports sockets I/O > > > > TBD check errno handling of windows port & fix watch impl > > > > Signed-off-by: Daniel P. Berrange > > ---

Re: [Qemu-devel] [[PATCH] 7/7] target-arm: Add WFx instruction trap support

2015-04-17 Thread Peter Maydell
On 17 April 2015 at 16:47, Greg Bellows wrote: > > > On Thu, Apr 16, 2015 at 1:22 PM, Peter Maydell > wrote: >> >> On 27 March 2015 at 19:10, Greg Bellows wrote: >> > Add support for trapping WFI and WFE instructions to the proper EL when >> > SCTLR/SCR/HCR settings apply. >> > >> > Signed-off-b

Re: [Qemu-devel] [PATCH v5 01/21] docs: incremental backup documentation

2015-04-17 Thread John Snow
On 04/17/2015 11:06 AM, Eric Blake wrote: On 04/08/2015 04:19 PM, John Snow wrote: Reviewed-by: Max Reitz Signed-off-by: John Snow --- docs/bitmaps.md | 311 1 file changed, 311 insertions(+) create mode 100644 docs/bitmaps.md di

Re: [Qemu-devel] [PATCH v2 07/11] block: add delayed bitmap successor cleanup

2015-04-17 Thread Max Reitz
On 27.03.2015 20:20, John Snow wrote: Allow bitmap successors to carry reference counts. We can in a later patch use this ability to clean up the dirty bitmap according to both the individual job's success and the success of all jobs in the transaction group. The code for cleaning up a bitmap i

Re: [Qemu-devel] [[PATCH] 7/7] target-arm: Add WFx instruction trap support

2015-04-17 Thread Greg Bellows
On Thu, Apr 16, 2015 at 1:22 PM, Peter Maydell wrote: > On 27 March 2015 at 19:10, Greg Bellows wrote: > > Add support for trapping WFI and WFE instructions to the proper EL when > > SCTLR/SCR/HCR settings apply. > > > > Signed-off-by: Greg Bellows > > --- > > target-arm/op_helper.c | 75 > +++

Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 05:01:24PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 16:56, Paolo Bonzini wrote: > > > > > > On 17/04/2015 16:22, Daniel P. Berrange wrote: > >> A QOM property can be parsed as enum using the visit_type_enum() > >> helper method, but this forces callers to use the

Re: [Qemu-devel] [PATCH v2 05/11] block: add transactional callbacks feature

2015-04-17 Thread Max Reitz
On 27.03.2015 20:19, John Snow wrote: The goal here is to add a new method to transactions that allows developers to specify a callback that will get invoked only once all jobs spawned by a transaction are completed, allowing developers the chance to perform actions conditionally pending complete

Re: [Qemu-devel] [PATCH v2 06/11] block: add refcount to Job object

2015-04-17 Thread Max Reitz
On 27.03.2015 20:20, John Snow wrote: If we want to get at the job after the life of the job, we'll need a refcount for this object. This may occur for example if we wish to inspect the actions taken by a particular job after a transactional group of jobs runs, and further actions are required.

Re: [Qemu-devel] [PATCH 1/4] hw/s390x/virtio-ccw: Add virtio_ccw_device_plugged for virtio-ccw

2015-04-17 Thread Peter Maydell
On 17 April 2015 at 13:13, Shannon Zhao wrote: > Add virtio_ccw_device_plugged, it can be used to get backend's features. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- > hw/s390x/virtio-ccw.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/hw/s390x/vi

Re: [Qemu-devel] [PATCH v12 4/9] hw/vfio/platform: add capability to start IRQ propagation

2015-04-17 Thread Eric Auger
Hi Alex, On 04/17/2015 12:04 AM, Alex Williamson wrote: > On Thu, 2015-03-19 at 17:16 +, Eric Auger wrote: >> Add a reset notify function that enables to start the propagation of >> interrupts to the guest. >> >> Signed-off-by: Eric Auger >> >> --- >> v10 -> v11: >> - comment reword >> >> v8 -

Re: [Qemu-devel] [PATCH v1 RFC 23/34] io: add QIOChannelSocket class

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 16:22, Daniel P. Berrange wrote: > Implement a QIOChannel subclass that supports sockets I/O > > TBD check errno handling of windows port & fix watch impl > > Signed-off-by: Daniel P. Berrange > --- > include/io/channel-socket.h | 168 + > io/Makefile.objs

Re: [Qemu-devel] [PATCH v5 07/21] hbitmap: add hbitmap_merge

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > 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_

Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 05:19:31PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 17:11, Daniel P. Berrange wrote: > > > On second thought (after seeing patch 7), please add a property type > > > argument here. We lose introspection of enum property types otherwise. > > > > Can you give me a p

Re: [Qemu-devel] [PATCH v1 RFC 06/34] qom: add a object_property_add_enum helper method

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 17:11, Daniel P. Berrange wrote: > > On second thought (after seeing patch 7), please add a property type > > argument here. We lose introspection of enum property types otherwise. > > Can you give me a pointer to where we lose introspection ? The hostmem > code just registers its

Re: [Qemu-devel] [PATCH v5 06/21] hbitmap: cache array lengths

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > As a convenience: between incremental backups, bitmap migrations > and bitmap persistence we seem to need to recalculate these a lot. > > Because the lengths are a little bit-twiddly, let's just solidly > cache them and be done with it. > > Reviewed-by:

Re: [Qemu-devel] [PATCH v1 RFC 25/34] io: add QIOTask class for async operations

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 16:22, Daniel P. Berrange wrote: > A number of I/O operations need to be performed asynchronously > to avoid blocking the main loop. The caller of such APIs need > to provide a callback to be invoked on completion/error and > need access to the error, if any. The small QIOTask provi

Re: [Qemu-devel] [PATCH v1 RFC 04/34] qom: add object_new_propv / object_new_proplist constructors

2015-04-17 Thread Daniel P. Berrange
On Fri, Apr 17, 2015 at 04:55:26PM +0200, Paolo Bonzini wrote: > > > On 17/04/2015 16:22, Daniel P. Berrange wrote: > > + > > +Object *object_new_proplist(const char *typename, > > +const char *id, > > +Error **errp, > > +

Re: [Qemu-devel] [PATCH v3] vhost: fix log base address

2015-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2015 at 04:04:38PM +0100, Peter Maydell wrote: > On 17 April 2015 at 15:56, Michael S. Tsirkin wrote: > > VHOST_SET_LOG_BASE got an incorrect address, causing > > migration errors and potentially even memory corruption. > > > > Reported-by: Wen Congyang > > Signed-off-by: Michael

[Qemu-devel] [PATCH v4] vhost: fix log base address

2015-04-17 Thread Michael S. Tsirkin
VHOST_SET_LOG_BASE got an incorrect address, causing migration errors and potentially even memory corruption. Reported-by: Wen Congyang Signed-off-by: Michael S. Tsirkin --- changed (uint64_t)(unsigned long) to (uintptr_t). Untested. Wen Congyang, can you pls test and confirm. hw/virtio/vhost

Re: [Qemu-devel] [PATCH v2 04/11] block: re-add BlkTransactionState

2015-04-17 Thread Max Reitz
On 27.03.2015 20:19, John Snow wrote: Now that the structure formerly known as BlkTransactionState has been renamed to something sensible (BlkActionState), re-introduce an actual BlkTransactionState that actually manages state for the entire Transaction. In the process, convert the old QSIMPLEQ

Re: [Qemu-devel] [PATCH v5 01/21] docs: incremental backup documentation

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > Reviewed-by: Max Reitz > Signed-off-by: John Snow > --- > docs/bitmaps.md | 311 > > 1 file changed, 311 insertions(+) > create mode 100644 docs/bitmaps.md > > diff --git a/docs/bitmaps.md b/do

Re: [Qemu-devel] [PATCH v1 RFC 07/34] qom: don't pass string table to object_get_enum method

2015-04-17 Thread Paolo Bonzini
On 17/04/2015 16:22, Daniel P. Berrange wrote: > Now that properties can be explicitly registered as an enum > type, there is no need to pass the string table to the > object_get_enum method. The object property registration > already has a pointer to the string table. > > In changing this metho

Re: [Qemu-devel] [PATCH v3] vhost: fix log base address

2015-04-17 Thread Peter Maydell
On 17 April 2015 at 15:56, Michael S. Tsirkin wrote: > VHOST_SET_LOG_BASE got an incorrect address, causing > migration errors and potentially even memory corruption. > > Reported-by: Wen Congyang > Signed-off-by: Michael S. Tsirkin > --- > > Built only. > Will test and report next week. > Wen C

Re: [Qemu-devel] [PATCH 3/4] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net

2015-04-17 Thread Peter Maydell
On 17 April 2015 at 15:50, Shannon Zhao wrote: > The backwards compatibility is that with this patch the virtio-net-pci can > still set these properties through the qemu comand line, right? > > As I mentioned off list and in the cover letter, the virtio-net-pci has the > ability to access the chil

  1   2   3   >