Re: [Qemu-devel] [PATCH 26/27] block/parallels: optimize linear image expansion

2015-04-22 Thread Denis V. Lunev
On 22/04/15 17:25, Denis V. Lunev wrote: On 22/04/15 17:18, Stefan Hajnoczi wrote: On Wed, Mar 11, 2015 at 01:28:20PM +0300, Denis V. Lunev wrote: Plain image expansion spends a lot of time to update image file size. This seriously affects the performance. The following simple test qemu_img

[Qemu-devel] [PATCH v2 3/4] scripts: qmp-shell: add transaction subshell

2015-04-22 Thread John Snow
Add a special processing mode to craft transactions. By entering transaction( the shell will enter a special mode where each subsequent command will be saved as a transaction instead of executed as an individual command. The transaction can be submitted by entering ) on a line by itself.

[Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread John Snow
This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use True or False literals instead of JSON's lowercased 'true' and 'false' literals. qmp-shell currently allows you to describe values as JSON expressions:

[Qemu-devel] [PATCH v2 1/4] scripts: qmp-shell: refactor helpers

2015-04-22 Thread John Snow
Refactor the qmp-shell command line processing function into two components. This will be used to allow sub-expressions, which will assist us in adding transactional support to qmp-shell. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com ---

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

2015-04-22 Thread Max Reitz
On 18.04.2015 01:49, 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 Zheng

Re: [Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread John Snow
On 04/22/2015 12:21 PM, John Snow wrote: This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use True or False literals instead of JSON's lowercased 'true' and 'false' literals. qmp-shell currently allows you to

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

2015-04-22 Thread Max Reitz
On 18.04.2015 01:49, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- docs/bitmaps.md | 352 1 file changed, 352 insertions(+) create mode 100644 docs/bitmaps.md Reviewed-by: Max Reitz mre...@redhat.com

[Qemu-devel] Trouble with numlock and SDL

2015-04-22 Thread Erik Rull
Hi all, I'm struggling a bit with the numlock state when using SDL. On SDL 1.2.13 I have the problem that the numlock state is inverted for QEMU - but it is switchable. On SDL 1.2.14 and 1.2.15 I can't enable the number input in any state of the numlock key. With VNC everything is fine. I read

[Qemu-devel] [PATCH v2 0/4] scripts: qmp-shell: add transaction support

2015-04-22 Thread John Snow
The qmp-shell is a little rudimentary, but it can be hacked to give us some transactional support without too much difficulty. (1) Prep. (2) Add support for serializing json arrays (3) Allow users to use 'single quotes' instead of double quotes (4) Add a special transaction( ... ) syntax that

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

2015-04-22 Thread Max Reitz
On 18.04.2015 01:49, 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_LEVELS) ~=

Re: [Qemu-devel] [PATCH] translate-all: use bitmap helpers for PageDesc's bitmap

2015-04-22 Thread Emilio G. Cota
On Wed, Apr 22, 2015 at 15:13:05 +0200, Paolo Bonzini wrote: On 21/03/2015 07:25, Emilio G. Cota wrote: Note that this test if (b ((1 len) - 1)) can be simplified to if (b 1) , since we know that iff the first bit of a tb is set, all other bits from that tb are set too.

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

2015-04-22 Thread Max Reitz
On 18.04.2015 01:50, 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 us to poll for completion data for multiple asynchronous events in any arbitrary order. A

Re: [Qemu-devel] [PATCH 05/27] block/parallels: add get_block_status

2015-04-22 Thread Denis V. Lunev
On 22/04/15 15:39, Stefan Hajnoczi wrote: On Wed, Mar 11, 2015 at 01:27:59PM +0300, Denis V. Lunev wrote: +static int64_t coroutine_fn parallels_co_get_block_status(BlockDriverState *bs, +int64_t sector_num, int nb_sectors, int *pnum) +{ +BDRVParallelsState *s = bs-opaque; +

Re: [Qemu-devel] [PATCH 06/27] block/parallels: provide _co_readv routine for parallels format driver

2015-04-22 Thread Denis V. Lunev
On 22/04/15 15:41, Stefan Hajnoczi wrote: On Wed, Mar 11, 2015 at 01:28:00PM +0300, Denis V. Lunev wrote: Main approach is taken from qcow2_co_readv. The patch drops coroutine lock for the duration of IO operation and peforms normal scatter-gather IO using standard QEMU backend.

Re: [Qemu-devel] [PATCH 08/27] block/parallels: _co_writev callback for Parallels format

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:02PM +0300, Denis V. Lunev wrote: +static coroutine_fn int parallels_co_writev(BlockDriverState *bs, +int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) +{ +BDRVParallelsState *s = bs-opaque; +uint64_t bytes_done = 0; +QEMUIOVector

Re: [Qemu-devel] [PATCH 08/27] block/parallels: _co_writev callback for Parallels format

2015-04-22 Thread Denis V. Lunev
On 22/04/15 16:08, Stefan Hajnoczi wrote: On Wed, Mar 11, 2015 at 01:28:02PM +0300, Denis V. Lunev wrote: +static int64_t allocate_cluster(BlockDriverState *bs, int64_t sector_num) +{ +BDRVParallelsState *s = bs-opaque; +uint32_t idx, offset, tmp; +int64_t pos; +int ret; + +

Re: [Qemu-devel] [PATCH 10/27] block/parallels: support parallels image creation

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:04PM +0300, Denis V. Lunev wrote: Do not even care to create WithoutFreeSpace image, it is obsolete. Always create WithouFreSpacExt one. The code also does not spend a lot of efforts to fill cylinders and heads fields, they are not used actually in a real life

Re: [Qemu-devel] [PATCH 05/27] block/parallels: add get_block_status

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:27:59PM +0300, Denis V. Lunev wrote: +static int64_t coroutine_fn parallels_co_get_block_status(BlockDriverState *bs, +int64_t sector_num, int nb_sectors, int *pnum) +{ +BDRVParallelsState *s = bs-opaque; +int64_t offset; + +

Re: [Qemu-devel] [PATCH 08/27] block/parallels: _co_writev callback for Parallels format

2015-04-22 Thread Denis V. Lunev
On 11/03/15 13:28, Denis V. Lunev wrote: Support write on Parallels images. The code is almost the same as one in the previous patch implemented scatter-gather IO for read. Signed-off-by: Denis V. Lunev d...@openvz.org Reviewed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf

Re: [Qemu-devel] [PATCH COLO v3 04/14] Add new block driver interfaces to control block replication

2015-04-22 Thread Eric Blake
On 04/03/2015 04:01 AM, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Cc: Luiz Capitulino lcapitul...@redhat.com Cc: Michael Roth mdr...@linux.vnet.ibm.com

Re: [Qemu-devel] [PATCH 09/27] iotests, parallels: test for write into Parallels image

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:03PM +0300, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev d...@openvz.org Reviewed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com --- tests/qemu-iotests/076 | 5 +

[Qemu-devel] [PATCH v2 4/4] scripts: qmp-shell: Add verbose flag

2015-04-22 Thread John Snow
Add a verbose flag that shows the QMP command that was constructed, to allow for later copy/pasting, reference, debugging, etc. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- scripts/qmp/qmp-shell | 21 - 1 file changed, 16

Re: [Qemu-devel] [PATCH] x86: Fix Opteron xlevels

2015-04-22 Thread Eduardo Habkost
On Wed, Apr 22, 2015 at 04:59:49PM +0200, Alexander Graf wrote: On 04/22/2015 04:23 PM, Eduardo Habkost wrote: On Tue, Apr 21, 2015 at 04:15:14PM +0200, Alexander Graf wrote: On 04/21/2015 04:16 PM, Eduardo Habkost wrote: On Tue, Apr 21, 2015 at 04:04:21PM +0200, Alexander Graf wrote: The AMD

Re: [Qemu-devel] using scsi megasas causes Windows 8 bluescreen

2015-04-22 Thread Alex Fishman
Hannes, megasas-gen2 crashes as well -Alex On Wed, Apr 22, 2015 at 1:23 PM, Hannes Reinecke h...@suse.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/22/2015 12:19 PM, Stefan Hajnoczi wrote: On Tue, Apr 21, 2015 at 10:49:48AM +0300, Alex Fishman wrote: I'm trying to

[Qemu-devel] [PATCH v2] translate-all: use bitmap helpers for PageDesc's bitmap

2015-04-22 Thread Emilio G. Cota
Here we have an open-coded byte-based bitmap implementation. Get rid of it since there's a ulong-based implementation to be used by all code. Signed-off-by: Emilio G. Cota c...@braap.org --- translate-all.c | 40 +++- 1 file changed, 7 insertions(+), 33

Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache

2015-04-22 Thread Alberto Garcia
On Wed 22 Apr 2015 12:26:02 PM CEST, Stefan Hajnoczi wrote: Large disk images need large L2 caches in order to maximize their I/O performance. However setting a correct size for the cache is not necessarily easy since apart from the image size, it also depends on other factors like its usage

Re: [Qemu-devel] [PATCH 08/27] block/parallels: _co_writev callback for Parallels format

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:02PM +0300, Denis V. Lunev wrote: +static int64_t allocate_cluster(BlockDriverState *bs, int64_t sector_num) +{ +BDRVParallelsState *s = bs-opaque; +uint32_t idx, offset, tmp; +int64_t pos; +int ret; + +idx = sector_num / s-tracks; +

Re: [Qemu-devel] [PATCH] translate-all: remove redundant page_find from tb_invalidate_phys_page

2015-04-22 Thread Paolo Bonzini
On 08/04/2015 23:37, Emilio G. Cota wrote: The callers have just looked up the page descriptor, so there's no point in searching again for it. Signed-off-by: Emilio G. Cota c...@braap.org --- translate-all.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 18/27] block/parallels: implement parallels_check method of block driver

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:12PM +0300, Denis V. Lunev wrote: The check is very simple at the moment. It calculates necessary stats and fix only the following errors: - space leak at the end of the image. This would happens due to preallocation - clusters outside the image are zeroed.

Re: [Qemu-devel] [PATCH] target-arm: Adjust id_aa64pfr0 when has_el3 CPU property disabled

2015-04-22 Thread Greg Bellows
On Tue, Apr 21, 2015 at 9:18 PM, Sergey Fedorov serge.f...@gmail.com wrote: Signed-off-by: Sergey Fedorov serge.f...@gmail.com --- target-arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 986f04c..327b1e5 100644 ---

Re: [Qemu-devel] [PATCH 20/27] iotests, parallels: check for incorrectly closed image in tests

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:14PM +0300, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev d...@openvz.org Reviwed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com --- tests/qemu-iotests/115 | 9 +

Re: [Qemu-devel] [PATCH 21/27] block/parallels: no need to flush on each block allocation table update

2015-04-22 Thread Denis V. Lunev
On 22/04/15 17:05, Stefan Hajnoczi wrote: On Wed, Mar 11, 2015 at 01:28:15PM +0300, Denis V. Lunev wrote: From the point of guest each write to real disk prior to disk barrier operation could be lost. Therefore there is no problem that not synced new block is lost due to not updated allocation

Re: [Qemu-devel] [PATCH] x86: Fix Opteron xlevels

2015-04-22 Thread Eduardo Habkost
On Tue, Apr 21, 2015 at 04:15:14PM +0200, Alexander Graf wrote: On 04/21/2015 04:16 PM, Eduardo Habkost wrote: On Tue, Apr 21, 2015 at 04:04:21PM +0200, Alexander Graf wrote: The AMD Opteron family has different xlevel levels depending on the generation. I looked up Gen1, Gen2 and Gen3

Re: [Qemu-devel] [PATCH 19/27] block/parallels: implement incorrect close detection

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:13PM +0300, Denis V. Lunev wrote: The software driver must set inuse field in Parallels header to 0x746F6E59 when the image is opened in read-write mode. The presence of this magic in the header on open forces image consistency check. There is an unfortunate

Re: [Qemu-devel] [PATCH 23/27] block/parallels: create bat_entry_off helper

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:17PM +0300, Denis V. Lunev wrote: calculate offset of the BAT entry in the image file. Signed-off-by: Denis V. Lunev d...@openvz.org Reviewed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com ---

Re: [Qemu-devel] [PATCH 14/27] block/parallels: create bat2sect helper

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:08PM +0300, Denis V. Lunev wrote: deduplicate copy/paste arithmetcs Signed-off-by: Denis V. Lunev d...@openvz.org Reviewed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com --- block/parallels.c | 12

Re: [Qemu-devel] [PATCH v3 0/27] write/create for Parallels images with reasonable performance

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:27:54PM +0300, Denis V. Lunev wrote: This patchset provides an ability to create of/write to Parallels images and some testing of the new code. Readings and writings are optimized out and I expect the same or slightly better performance as qcow2. This patchset

Re: [Qemu-devel] [PATCH 26/27] block/parallels: optimize linear image expansion

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:20PM +0300, Denis V. Lunev wrote: Plain image expansion spends a lot of time to update image file size. This seriously affects the performance. The following simple test qemu_img create -f parallels -o cluster_size=64k ./1.hds 64G qemu_io -n -c write -P 0x11 0

Re: [Qemu-devel] [PATCH 26/27] block/parallels: optimize linear image expansion

2015-04-22 Thread Denis V. Lunev
On 22/04/15 17:18, Stefan Hajnoczi wrote: On Wed, Mar 11, 2015 at 01:28:20PM +0300, Denis V. Lunev wrote: Plain image expansion spends a lot of time to update image file size. This seriously affects the performance. The following simple test qemu_img create -f parallels -o cluster_size=64k

Re: [Qemu-devel] [PATCH v3 1/2] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net

2015-04-22 Thread Cornelia Huck
On Tue, 21 Apr 2015 18:51:10 +0800 shannon.z...@linaro.org wrote: I'd drop the leading hw/net/ from the subject. From: Shannon Zhao shannon.z...@linaro.org Move DEFINE_VIRTIO_NET_FEATURES to the backend virtio-net. The transports just sync the host features from backend. Meanwhile move

Re: [Qemu-devel] [PATCH 2/5] scripts: qmp-shell: add support for [] expressions

2015-04-22 Thread Eric Blake
On 04/21/2015 08:02 PM, John Snow wrote: qmp-shell currently allows you to describe values as JSON expressions: key={key:{key2:val}} But it does not currently support arrays, which are needed for serializing and deserializing transactions: key=[{type:drive-backup,data:{...}}] Add

Re: [Qemu-devel] [PATCH 03/27] block/parallels: switch to bdrv_read

2015-04-22 Thread Denis V. Lunev
On 22/04/15 15:23, Stefan Hajnoczi wrote: On Wed, Mar 11, 2015 at 01:27:57PM +0300, Denis V. Lunev wrote: From: Roman Kagan rka...@parallels.com Switch the .bdrv_read method implementation from using bdrv_pread() to bdrv_read() on the underlying file, since the latter is subject to i/o

Re: [Qemu-devel] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-22 Thread Daniel P. Berrange
On Wed, Apr 22, 2015 at 10:23:04AM +0100, Daniel P. Berrange wrote: On Fri, Apr 17, 2015 at 04:53:02PM +0800, Chen Fan wrote: backgrond: Live migration is one of the most important features of virtualization technology. With regard to recent virtualization techniques, performance of

Re: [Qemu-devel] [PATCH] translate-all: use bitmap helpers for PageDesc's bitmap

2015-04-22 Thread Paolo Bonzini
On 21/03/2015 07:25, Emilio G. Cota wrote: Note that this test if (b ((1 len) - 1)) can be simplified to if (b 1) , since we know that iff the first bit of a tb is set, all other bits from that tb are set too. I don't think this optimization is valid, unfortunately. It is

Re: [Qemu-devel] [PATCH 12/27] parallels: change copyright information in the image header

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:06PM +0300, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev d...@openvz.org Reviwed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com --- block/parallels.c | 6 +- 1 file changed, 5

Re: [Qemu-devel] [PATCH 12/27] parallels: change copyright information in the image header

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:06PM +0300, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev d...@openvz.org Reviwed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com --- block/parallels.c | 6 +- 1 file changed, 5

Re: [Qemu-devel] [PATCH 15/27] block/parallels: keep BAT bitmap data in little endian in memory

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:09PM +0300, Denis V. Lunev wrote: This will allow to use this data as buffer to BAT update directly without any intermediate buffers. Signed-off-by: Denis V. Lunev d...@openvz.org Reviewed-by: Roman Kagan rka...@parallels.com CC: Kevin Wolf kw...@redhat.com

[Qemu-devel] About address mapping between host and guest in QEMU

2015-04-22 Thread Wenjie Liu
Hi all, I have a little problem about the address mapping between host and guest in QEMU. I have got the guest physical address and the host virtual base address of guest's memory space which by check the ramblocks list. So, can I access to the guest's memory content by simply add the guest

Re: [Qemu-devel] [PATCH 22/27] block/parallels: improve image reading performance

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:16PM +0300, Denis V. Lunev wrote: Try to perform IO for the biggest continuous block possible. The performance for sequential read is increased from 220 Gb/sec to 360 Gb/sec for continous image on my SSD HDD. Please, can I have your SSD drive? :) Did you mean

Re: [Qemu-devel] [PATCH 2/5] scripts: qmp-shell: add support for [] expressions

2015-04-22 Thread John Snow
On 04/22/2015 10:28 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: qmp-shell currently allows you to describe values as JSON expressions: key={key:{key2:val}} But it does not currently support arrays, which are needed for serializing and deserializing transactions:

Re: [Qemu-devel] [RFC 00/10] MultiThread TCG.

2015-04-22 Thread Peter Maydell
On 22 April 2015 at 13:26, Frederic Konrad fred.kon...@greensocs.com wrote: [re summary of design] Does that makes sense? Oops, I think that I lost that email in the flow of stuff through the mailing list. I think Alex is going to be doing the bulk of the review on this for Linaro, so I'll let

Re: [Qemu-devel] [PATCH 13/27] block/parallels: rename catalog_ names to bat_

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:07PM +0300, Denis V. Lunev wrote: BAT means 'block allocation table'. Thus this name is clean and shorter on writing. Some obvious formatting fixes in the old code were made to make checkpatch happy. Signed-off-by: Denis V. Lunev d...@openvz.org Reviewed-by:

Re: [Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to 1st system call

2015-04-22 Thread Chen Gang
On 4/22/15 05:31, Peter Maydell wrote: On 21 April 2015 at 22:23, Chen Gang xili_gchen_5...@hotmail.com wrote: On 4/22/15 05:15, Peter Maydell wrote: will work in place of both of the above (and does this CPU really only have two kinds of compare-immediate? Some of the case labels suggest

Re: [Qemu-devel] [PATCH 21/27] block/parallels: no need to flush on each block allocation table update

2015-04-22 Thread Stefan Hajnoczi
On Wed, Mar 11, 2015 at 01:28:15PM +0300, Denis V. Lunev wrote: From the point of guest each write to real disk prior to disk barrier operation could be lost. Therefore there is no problem that not synced new block is lost due to not updated allocation table if QEMU is crashed. This situation

Re: [Qemu-devel] [PATCH 3/5] scripts: qmp-shell: allow single-quotes in JSON expressions

2015-04-22 Thread John Snow
On 04/22/2015 10:34 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: As a convenience for the user, replace any single quotes given with double quotes so that the data will deserialize correctly via json.loads(). Signed-off-by: John Snow js...@redhat.com ---

Re: [Qemu-devel] [PATCH 1/5] scripts: qmp-shell: refactor helpers

2015-04-22 Thread Eric Blake
On 04/21/2015 08:02 PM, John Snow wrote: Refactor the qmp-shell command line processing function into two components. This will be used to allow sub-expressions, which will assist us in adding transactional support to qmp-shell. Signed-off-by: John Snow js...@redhat.com ---

Re: [Qemu-devel] [PATCH 3/5] scripts: qmp-shell: allow single-quotes in JSON expressions

2015-04-22 Thread John Snow
On 04/22/2015 10:34 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: As a convenience for the user, replace any single quotes given with double quotes so that the data will deserialize correctly via json.loads(). Signed-off-by: John Snow js...@redhat.com ---

Re: [Qemu-devel] [PATCH 4/5] scripts: qmp-shell: add transaction subshell

2015-04-22 Thread Eric Blake
On 04/22/2015 09:02 AM, John Snow wrote: Yeah, not a big deal. The function that invokes this one actually explicitly checks for an empty string and avoids __build_cmd already. If it gets spaces, It actually currently errors out with list index out of range which is not helpful or

Re: [Qemu-devel] [PATCH 4/5] scripts: qmp-shell: add transaction subshell

2015-04-22 Thread Eric Blake
On 04/21/2015 08:02 PM, John Snow wrote: Add a special processing mode to craft transactions. By entering transaction( the shell will enter a special mode where each subsequent command will be saved as a transaction instead of executed as an individual command. The transaction can be

Re: [Qemu-devel] [PATCH 5/5] scripts: qmp-shell: Add verbose flag

2015-04-22 Thread Eric Blake
On 04/21/2015 08:02 PM, John Snow wrote: Add a verbose flag that shows the QMP command that was constructed, to allow for later copy/pasting, reference, debugging, etc. Very useful. Signed-off-by: John Snow js...@redhat.com --- scripts/qmp/qmp-shell | 21 - 1 file

Re: [Qemu-devel] [PATCH 4/5] scripts: qmp-shell: add transaction subshell

2015-04-22 Thread John Snow
On 04/22/2015 10:48 AM, Eric Blake wrote: On 04/21/2015 08:02 PM, John Snow wrote: Add a special processing mode to craft transactions. By entering transaction( the shell will enter a special mode where each subsequent command will be saved as a transaction instead of executed as an

Re: [Qemu-devel] [PATCH 3/5] scripts: qmp-shell: allow single-quotes in JSON expressions

2015-04-22 Thread Eric Blake
On 04/22/2015 09:04 AM, John Snow wrote: But it's still worth thinking about whether there is a more robust solution to be used. I done looked it up: I can probably squash patches 23 with a single fix to use the ast.literal_eval() function, which does accept single or double quotes,

Re: [Qemu-devel] About address mapping between host and guest in QEMU

2015-04-22 Thread Wenjie Liu
In http://vm-kernel.org/blog/2009/07/10/qemu-internal-part-2-softmmu/, the following equation is mentioned. host_virtual_address = phys_ram_base(qemu variable) + guest_physical_address – guest_physical_address_base(0 in MIPS) I think I have got the phys_ram_base and guest_physical_address, but

Re: [Qemu-devel] [PATCH 3/5] scripts: qmp-shell: allow single-quotes in JSON expressions

2015-04-22 Thread Eric Blake
On 04/21/2015 08:02 PM, John Snow wrote: As a convenience for the user, replace any single quotes given with double quotes so that the data will deserialize correctly via json.loads(). Signed-off-by: John Snow js...@redhat.com --- scripts/qmp/qmp-shell | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH] x86: Fix Opteron xlevels

2015-04-22 Thread Alexander Graf
On 04/22/2015 04:23 PM, Eduardo Habkost wrote: On Tue, Apr 21, 2015 at 04:15:14PM +0200, Alexander Graf wrote: On 04/21/2015 04:16 PM, Eduardo Habkost wrote: On Tue, Apr 21, 2015 at 04:04:21PM +0200, Alexander Graf wrote: The AMD Opteron family has different xlevel levels depending on the

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

2015-04-22 Thread Max Reitz
On 17.04.2015 20:23, John Snow wrote: 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

Re: [Qemu-devel] [PATCH] acpi: add a missing backslash to the \_SB scope.

2015-04-22 Thread Igor Mammedov
On Tue, 21 Apr 2015 14:53:54 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 21, 2015 at 12:33:36PM +0100, Peter Maydell wrote: On 21 April 2015 at 11:09, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 21, 2015 at 11:26:12AM +0300, Gal Hammer wrote: A predefined scope

Re: [Qemu-devel] [PATCH 5/6] [wip] tseg, part1, not (yet) tested

2015-04-22 Thread Gerd Hoffmann
Hi, A unified patchset (not necessarily posted, just pushed somewhere) would be helpful down the road -- IIRC this one was claimed unapplicable to current master. (Which is also why I didn't try the info mtree command, see elsewhere in the thread -- I didn't try to build the series.)

Re: [Qemu-devel] [PATCH] hda-codec: use smaller dynamic range for input amplifier

2015-04-22 Thread Gerd Hoffmann
Hi, The right solution for this problem would be to implement proper dB scaling in QEMU and the audio backends (such as spice). Can we try this please? While this clean solution is not available, I suggest to decrease the dynamic range for the the emulated Amps in the QEMU hda codec.

[Qemu-devel] [PATCH v8 09/16] spapr_events: event-scan RTAS interface

2015-04-22 Thread Michael Roth
From: Tyrel Datwyler tyr...@linux.vnet.ibm.com We don't actually rely on this interface to surface hotplug events, and instead rely on the similar-but-interrupt-driven check-exception RTAS interface used for EPOW events. However, the existence of this interface is needed to ensure guest kernels

Re: [Qemu-devel] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-22 Thread Daniel P. Berrange
On Wed, Apr 22, 2015 at 06:01:56PM +0100, Dr. David Alan Gilbert wrote: * Daniel P. Berrange (berra...@redhat.com) wrote: On Fri, Apr 17, 2015 at 04:53:02PM +0800, Chen Fan wrote: backgrond: Live migration is one of the most important features of virtualization technology. With

[Qemu-devel] [PATCH v2 5/9] target-arm: Extend FP checks to use an EL

2015-04-22 Thread Greg Bellows
Extend the ARM disassemble context to take a target exception EL instead of a boolean enable. This change reverses the polarity of the check making a value of 0 indicate floating point enabled (no exception). Signed-off-by: Greg Bellows greg.bell...@linaro.org --- target-arm/cpu.h | 63

[Qemu-devel] [PATCH v2 3/9] target-arm: Update interrupt handling to use target EL

2015-04-22 Thread Greg Bellows
Updated the interrupt handling to utilize and report through the target EL exception field. This includes consolidating and cleaning up code where needed. Target EL is now calculated once in arm_cpu_exec_interrupt() and do_interrupt was updated to use the target_el exception field. The necessary

[Qemu-devel] [PATCH v2 7/9] target-arm: Add EL3 and EL2 TCR checking

2015-04-22 Thread Greg Bellows
Updated get_phys_addr_lpae to check the appropriate TTBCR/TCR depending on the current EL. Support includes using the different TCR format as well as checks to insure TTBR1 is not used when in EL2 or EL3. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- target-arm/helper.c | 45

[Qemu-devel] [PATCH v2 8/9] target-arm: Add WFx syndrome function

2015-04-22 Thread Greg Bellows
Adds a utility function for creating a WFx exception syndrome Signed-off-by: Greg Bellows greg.bell...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/internals.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target-arm/internals.h

[Qemu-devel] [PATCH v2 9/9] target-arm: Add WFx instruction trap support

2015-04-22 Thread Greg Bellows
Add support for trapping WFI and WFE instructions to the proper EL when SCTLR/SCR/HCR settings apply. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- v1 - v2 - Replace check loop with simpler if checks. - Changed WFx syncdrome function to take bool - Changed return of uint32_t to int -

Re: [Qemu-devel] [PATCH 6/8] docs: Document how to stream to an intermediate layer

2015-04-22 Thread Max Reitz
On 16.04.2015 17:12, Alberto Garcia wrote: Signed-off-by: Alberto Garcia be...@igalia.com --- docs/live-block-ops.txt | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-devel] [PATCH 7/8] qemu-iotests: fix test_stream_partial()

2015-04-22 Thread Max Reitz
On 16.04.2015 17:12, Alberto Garcia wrote: This test is streaming to the top layer using the intermediate image as the base. This is a mistake since block-stream never copies data from the base image and its backing chain, so this is effectively a no-op. In addition to fixing the base

[Qemu-devel] [PATCH v2 6/9] target-arm: Add TTBR regime function and use

2015-04-22 Thread Greg Bellows
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. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- target-arm/helper.c | 24 +++- 1 file changed, 19 insertions(+), 5

Re: [Qemu-devel] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-22 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: On Wed, Apr 22, 2015 at 06:12:25PM +0100, Dr. David Alan Gilbert wrote: * Daniel P. Berrange (berra...@redhat.com) wrote: On Wed, Apr 22, 2015 at 06:01:56PM +0100, Dr. David Alan Gilbert wrote: * Daniel P. Berrange (berra...@redhat.com)

Re: [Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread Eric Blake
On 04/22/2015 11:18 AM, Eric Blake wrote: On 04/22/2015 10:21 AM, John Snow wrote: This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use True or False literals instead of JSON's lowercased 'true' and 'false'

Re: [Qemu-devel] [PATCH 8/8] qemu-iotests: test streaming to an intermediate layer

2015-04-22 Thread Max Reitz
On 16.04.2015 17:12, Alberto Garcia wrote: This adds test_stream_intermediate(), similar to test_stream() but streams to the intermediate image instead. Signed-off-by: Alberto Garcia be...@igalia.com --- tests/qemu-iotests/030 | 18 +- tests/qemu-iotests/030.out | 4 ++--

Re: [Qemu-devel] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-22 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: On Fri, Apr 17, 2015 at 04:53:02PM +0800, Chen Fan wrote: backgrond: Live migration is one of the most important features of virtualization technology. With regard to recent virtualization techniques, performance of network I/O is

[Qemu-devel] [PATCH v2 0/9] target-arm: EL3 trap support

2015-04-22 Thread Greg Bellows
Initial patchset adding support for trapping to an EL other than EL1. Support includes changes to interfaces to allow specification of the target EL. Also includes the addition of the ARMv8 CPTR system registers used for controlling the trapping of features. --- v1 - v2 - Removed use of MAX

[Qemu-devel] [PATCH v2 4/9] target-arm: Add AArch64 CPTR registers

2015-04-22 Thread Greg Bellows
Adds CPTR_EL2/3 system registers definitions and access function. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- v2 - v3 - Broke out cptr and cpacr access functions - Added HCPTR register entry as alias of CPTR_EL2 - Added HCPTR and CPTR_EL2 no_el2 register entries. - Fixed cptr_access

[Qemu-devel] [PATCH v2 2/9] target-arm: Extend helpers to route exceptions

2015-04-22 Thread Greg Bellows
Updated the various helper routines to set the target EL as needed using a dedicated function. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- v1 - v2 - Add utility function for determining the target exception EL. - Replaced uses of MAX with the above function when setting the target

Re: [Qemu-devel] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-22 Thread Daniel P. Berrange
On Wed, Apr 22, 2015 at 06:12:25PM +0100, Dr. David Alan Gilbert wrote: * Daniel P. Berrange (berra...@redhat.com) wrote: On Wed, Apr 22, 2015 at 06:01:56PM +0100, Dr. David Alan Gilbert wrote: * Daniel P. Berrange (berra...@redhat.com) wrote: On Fri, Apr 17, 2015 at 04:53:02PM +0800,

Re: [Qemu-devel] [PATCH 2/8] block: allow block jobs in any arbitrary node

2015-04-22 Thread Max Reitz
On 16.04.2015 17:12, Alberto Garcia wrote: Currently, block jobs can only be owned by root nodes. This patch allows block jobs to be in any arbitrary node, by making the following changes: - Block jobs can now be identified by the node name of their BlockDriverState in addition to the device

Re: [Qemu-devel] [PATCH 2/2] x86: Fix Opteron xlevels

2015-04-22 Thread Alexander Graf
Am 22.04.2015 um 17:53 schrieb Eduardo Habkost ehabk...@redhat.com: On Wed, Apr 22, 2015 at 12:38:11AM +0200, Alexander Graf wrote: The AMD Opteron family has different xlevel levels depending on the generation. I looked up Gen1, Gen2 and Gen3 hardware and adapted the levels according to

Re: [Qemu-devel] [PATCH 5/8] block: Add QMP support for streaming to an intermediate layer

2015-04-22 Thread Max Reitz
On 16.04.2015 17:12, Alberto Garcia wrote: This patch makes the 'device' paramater of the 'block-stream' command accept a node name as well as a device name. In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Since

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

2015-04-22 Thread Max Reitz
On 18.04.2015 01:50, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- block.c| 18 ++ include/qemu/hbitmap.h | 10 ++ util/hbitmap.c | 48 3 files changed, 76 insertions(+)

Re: [Qemu-devel] [PATCH 2/2] x86: Fix Opteron xlevels

2015-04-22 Thread Eduardo Habkost
On Wed, Apr 22, 2015 at 07:19:22PM +0200, Alexander Graf wrote: Am 22.04.2015 um 17:53 schrieb Eduardo Habkost ehabk...@redhat.com: On Wed, Apr 22, 2015 at 12:38:11AM +0200, Alexander Graf wrote: The AMD Opteron family has different xlevel levels depending on the generation. I

Re: [Qemu-devel] [PATCH 2/2] x86: Fix Opteron xlevels

2015-04-22 Thread Eduardo Habkost
On Wed, Apr 22, 2015 at 12:38:11AM +0200, Alexander Graf wrote: The AMD Opteron family has different xlevel levels depending on the generation. I looked up Gen1, Gen2 and Gen3 hardware and adapted the levels according to real silicon. The reason this came up is that there is a sanity check

[Qemu-devel] [PATCH v2 1/9] target-arm: Add exception target el infrastructure

2015-04-22 Thread Greg Bellows
Add a CPU state exception target EL field that will be used for communicating the EL to which an exception should be routed. Add a disassembly context field for tracking the EL3 architecture needed for determining the target exception EL. Add a target EL argument to the generic exception helper

Re: [Qemu-devel] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-22 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: On Wed, Apr 22, 2015 at 06:01:56PM +0100, Dr. David Alan Gilbert wrote: * Daniel P. Berrange (berra...@redhat.com) wrote: On Fri, Apr 17, 2015 at 04:53:02PM +0800, Chen Fan wrote: backgrond: Live migration is one of the most important

Re: [Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread Eric Blake
On 04/22/2015 10:21 AM, John Snow wrote: This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use True or False literals instead of JSON's lowercased 'true' and 'false' literals. qmp-shell currently allows you

Re: [Qemu-devel] [PATCH 4/8] block: Support streaming to an intermediate layer

2015-04-22 Thread Max Reitz
On 16.04.2015 17:12, Alberto Garcia wrote: This makes sure that the image we are steaming into is open in read-write mode during the operation. Operation blockers are also set in all intermediate nodes, since they will be removed from the chain afterwards. Finally, this also unblocks the

Re: [Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions

2015-04-22 Thread John Snow
On 04/22/2015 01:18 PM, Eric Blake wrote: On 04/22/2015 10:21 AM, John Snow wrote: This includes support for [] expressions, single-quotes in QMP expressions (which is not strictly a part of JSON), and the ability to use True or False literals instead of JSON's lowercased 'true' and 'false'

Re: [Qemu-devel] [PATCH v2 6/9] target-arm: Add TTBR regime function and use

2015-04-22 Thread Sergey Fedorov
On 22.04.2015 10:09, 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. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- target-arm/helper.c | 24

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-04-22 Thread Stefan Berger
On 04/22/2015 03:00 AM, Igor Mammedov wrote: On Thu, 16 Apr 2015 10:05:35 -0400 Stefan Berger stef...@linux.vnet.ibm.com wrote: On 04/16/2015 09:35 AM, Igor Mammedov wrote: On Wed, 15 Apr 2015 18:38:43 -0400 Stefan Berger stef...@linux.vnet.ibm.com wrote: The following series of patches

  1   2   3   >