Re: [Qemu-devel] [RFC PATCH 0/3] move global bdrv_states out of block.c

2013-09-19 Thread Wenchao Xia
On 09/18/2013 10:03 PM, Stefan Hajnoczi wrote: On Tue, Aug 27, 2013 at 03:49:22PM +0800, Wenchao Xia wrote: In order to support multiple caller from different thread, global inside block layer should be carefully treated. bdrv_states represent a group of bds* which is now used by qemu, so it is

Re: [Qemu-devel] [PATCH 4/5] block: cow - used QEMU_PACKED for on-disk structures

2013-09-19 Thread Markus Armbruster
Jeff Cody writes: > On Thu, Sep 19, 2013 at 12:01:24PM -0700, Richard Henderson wrote: >> On 09/19/2013 11:43 AM, Jeff Cody wrote: >> > cow_header_v2 is read and written directly from the image file >> > with bdrv_pread()/bdrv_pwrite(), and as such should be packed to >> > avoid unintentional pad

Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize

2013-09-19 Thread Wenchao Xia
On 09/17/2013 06:01 PM, Paolo Bonzini wrote: > Il 17/09/2013 08:44, Wenchao Xia ha scritto: >> Just one question: where is the caller of .instance_finalize(), did >> I missed that patch? > It's called by qom/object.c. > > Paolo > I see, thanks for tipping.

Re: [Qemu-devel] Hibernate and qemu-nbd

2013-09-19 Thread Stefan Hajnoczi
On Thu, Sep 19, 2013 at 10:44 PM, Mark Trumpold wrote: > >>-Original Message- >>From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >>Sent: Wednesday, September 18, 2013 06:12 AM >>To: 'Mark Trumpold' >>Cc: qemu-devel@nongnu.org, 'Paul Clements', nbd-gene...@lists.sourceforge.net, >>bonz...@

Re: [Qemu-devel] [PATCH 4/5] block: cow - used QEMU_PACKED for on-disk structures

2013-09-19 Thread Jeff Cody
On Thu, Sep 19, 2013 at 12:01:24PM -0700, Richard Henderson wrote: > On 09/19/2013 11:43 AM, Jeff Cody wrote: > > cow_header_v2 is read and written directly from the image file > > with bdrv_pread()/bdrv_pwrite(), and as such should be packed to > > avoid unintentional padding. > > > > Also change

[Qemu-devel] [PATCH 1/2] block: qemu-iotests - add basic ability to use binary sample images

2013-09-19 Thread Jeff Cody
For image formats that are not "QEMU native", but supported for compatibility, it is useful to verify that an image created with the 'gold standard' native tool can be read / written to successfully by QEMU. In addition to testing non-native images, this could also be useful to test against image

[Qemu-devel] [PATCH 2/2] block: qemu-iotests for vhdx, read sample dynamic image

2013-09-19 Thread Jeff Cody
This adds the VHDX format to the qemu-iotests format, and adds a read test. The test reads from an existing sample image, that was created with Hyper-V under Windwos Server 2012. The image file is a 1GB dynamic image, with 32MB blocks. The pattern 0xa5 exists from 0MB-33MB (past a block size bou

[Qemu-devel] [PATCH 0/2] qemu-iotests with sample images, vhdx read test

2013-09-19 Thread Jeff Cody
This provides: Patch 1/2: A basic framework for using sample image files. This is intended to be sample images created with the image format native tool; e.g. a VHDX image created with Hyper-V. Patch 2/2: VHDX read test on a sample image created with Hyper-V. Jeff Cody

Re: [Qemu-devel] [PATCH 00/11] sclp related fixes and sclp line mode console

2013-09-19 Thread Alexander Graf
On 18.09.2013, at 05:19, Christian Borntraeger wrote: > Alex, > > here is a bunch of fixes/changes for sclp/eventfacility followed by a > move of the ebcdic conversion into a stand-alone header file and the > sclp line mode console. Reviewed-by: Alexander Graf Alex

Re: [Qemu-devel] [PATCH 11/11] s390/sclplmconsole: Add support for SCLP line-mode console

2013-09-19 Thread Alexander Graf
On 18.09.2013, at 05:19, Christian Borntraeger wrote: > From: Heinz Graalfs > > Add simple support for SCLP line-mode also known as operating > system messages. This can be added in addition to or instead of > the SCLP full screen console with -device sclplmconsole. > > Signed-off-by: Heinz Gr

Re: [Qemu-devel] [PATCH 02/11] s390/sclpconsole: Add code to support live migration for sclpconsole

2013-09-19 Thread Anthony Liguori
On Thu, Sep 19, 2013 at 10:07 PM, Alexander Graf wrote: > > On 18.09.2013, at 05:19, Christian Borntraeger wrote: > >> From: Heinz Graalfs >> >> This patch adds the necessary life migration pieces to the sclp code >> by using vmstate_register. >> >> Signed-off-by: Heinz Graalfs >> Signed-off-by:

Re: [Qemu-devel] [PATCH 10/11] s390/ebcdic: Move conversion tables to header file

2013-09-19 Thread Alexander Graf
On 18.09.2013, at 05:19, Christian Borntraeger wrote: > From: Heinz Graalfs > > Move conversion tables to header file. > - In SCLP line mode processing EBCDIC/ASCII conversion is needed. > - An additional EBCDIC to ASCII conversion function is added. > > Signed-off-by: Heinz Graalfs > Sig

Re: [Qemu-devel] [PATCH 03/11] s390/sclpquiesce: Add code to support live migration

2013-09-19 Thread Alexander Graf
On 18.09.2013, at 05:19, Christian Borntraeger wrote: > From: Heinz Graalfs > > This patch adds the necessary life migration pieces to sclpquiesce > by using the vmstate_register. > > Signed-off-by: Heinz Graalfs > Signed-off-by: Christian Borntraeger > --- > hw/s390x/sclpquiesce.c | 13

Re: [Qemu-devel] [PATCH 02/11] s390/sclpconsole: Add code to support live migration for sclpconsole

2013-09-19 Thread Alexander Graf
On 18.09.2013, at 05:19, Christian Borntraeger wrote: > From: Heinz Graalfs > > This patch adds the necessary life migration pieces to the sclp code > by using vmstate_register. > > Signed-off-by: Heinz Graalfs > Signed-off-by: Christian Borntraeger > --- > hw/char/sclpconsole.c | 19 +++

Re: [Qemu-devel] [PATCH 1/3] roms: use formal MAKE variable reference in roms Makefile

2013-09-19 Thread Bruce Rogers
>>> On 9/19/2013 at 03:00 PM, Bruce Rogers wrote: > In order to properly support recursive make commands, convert > references of make to be $(MAKE). This will for example enable > parallel makes of each of the rom source trees covered by this > makefile. > I perhaps should clarify the above s

[Qemu-devel] Qemu-KVM VETH

2013-09-19 Thread Tim Epkes
Any plans to provide VETH support for Qemu-KVM. It is a great pt-pt tie when when connecting to KVM's on the same machine. I have multiple reasons for doing so (one is educational). Thanks Tim

[Qemu-devel] [RFC 04/16] tcg: Compress TCGLabelQemuLdst

2013-09-19 Thread Richard Henderson
Pack all of the non-pointer data into one 32-bit word. Use TCGReg. Signed-off-by: Richard Henderson --- tcg/tcg.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index b99302a..16048ca 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -216,14

[Qemu-devel] [RFC 14/16] tcg: Implement indirect memory registers

2013-09-19 Thread Richard Henderson
That is, global_mem registers whose base is another global_mem register, rather than a fixed register. Signed-off-by: Richard Henderson --- tcg/tcg.c | 104 ++ tcg/tcg.h | 2 ++ 2 files changed, 73 insertions(+), 33 deletions(-) diff

[Qemu-devel] [RFC 08/16] tcg: Change temp_dead argument to TCGTemp

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 35e0c7c..ee11c94 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1649,19 +1649,16 @@ static TCGReg tcg_reg_alloc(TCGC

Re: [Qemu-devel] [PATCHv2 07/20] block: honour alignment and limit in bdrv_co_do_write_zeroes

2013-09-19 Thread Peter Lieven
Am 19.09.2013 um 22:07 schrieb Eric Blake : > On 09/17/2013 07:48 AM, Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> block.c | 57 + >> 1 file changed, 41 insertions(+), 16 deletions(-) >> >> diff --git a/block.c b/block.c >

Re: [Qemu-devel] [PATCHv2 13/20] block: introduce bdrv_zeroize

2013-09-19 Thread Peter Lieven
Am 19.09.2013 um 22:26 schrieb Eric Blake : > On 09/17/2013 07:48 AM, Peter Lieven wrote: >> this patch adds a call to completely zero out a block device. >> the operation is sped up by checking the block status and >> only writing zeroes to the device if they currently do not >> return zeroes. o

Re: [Qemu-devel] [PATCHv2 18/20] qemu-img: add support for fully allocated images

2013-09-19 Thread Peter Lieven
Am 19.09.2013 um 22:36 schrieb Eric Blake : > On 09/17/2013 07:48 AM, Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> qemu-img.c |8 +--- >> 1 file changed, 5 insertions(+), 3 deletions(-) >> >> diff --git a/qemu-img.c b/qemu-img.c >> index 3e5e388..7600b58 100644 >> --- a/q

[Qemu-devel] [RFC 11/16] tcg: Introduce temp_load

2013-09-19 Thread Richard Henderson
Unify all of the places that realize a temporary into a register. Signed-off-by: Richard Henderson --- tcg/tcg.c | 192 +- 1 file changed, 90 insertions(+), 102 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 579541c..6526305 100

[Qemu-devel] [PATCH 2/3] roms: make and install isa vgabios binary

2013-09-19 Thread Bruce Rogers
Add the isa vgabios binary to the list of vgabios binaries we make and install to pc-bios. Do this for both to the seabios as well as the lgpl based vgabios source trees. Signed-off-by: Bruce Rogers --- roms/Makefile | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) di

[Qemu-devel] [PATCH 0/3] roms: various improvements to roms/Makefile

2013-09-19 Thread Bruce Rogers
While attempting to use roms/Makefile to build the x86 firmware from source I encountered some issues that needed to be worked around. These patches improve the makefile to handle more of the x86 firmware binaries and to better handle recursive make usage. Bruce Rogers (3): roms: use formal MAKE

[Qemu-devel] [PATCH 3/3] roms: make and install sgabios binary

2013-09-19 Thread Bruce Rogers
Add a make target for sgabios. Since the sgabios makefile is not parallel friendly, do the make in two steps, each of which allows for a parallel make. Signed-off-by: Bruce Rogers --- roms/Makefile |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/roms/Makefile b/ro

[Qemu-devel] [PATCH 1/3] roms: use formal MAKE variable reference in roms Makefile

2013-09-19 Thread Bruce Rogers
In order to properly support recursive make commands, convert references of make to be $(MAKE). This will for example enable parallel makes of each of the rom source trees covered by this makefile. Signed-off-by: Bruce Rogers --- roms/Makefile | 14 +++--- 1 files changed, 7 insertions

[Qemu-devel] [RFC 02/16] tcg: Introduce TCGTempType

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index dade849..554a4ee 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -379,16 +379,18 @@ static inline TCGCond tcg_high_cond(TCGCond c) } } -#de

[Qemu-devel] [RFC 16/16] target-sparc: Use global registers for the register window

2013-09-19 Thread Richard Henderson
Via indirection off cpu_regwptr. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 49 ++-- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 7a51d7f..6395ad3 100644

[Qemu-devel] [RFC 10/16] tcg: Change temp_save argument to TCGTemp

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 0ca8dbe..579541c 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1690,10 +1690,9 @@ static void temp_sync(TCGContext *s, TCGTemp *ts, TCGRegS

[Qemu-devel] [RFC 15/16] target-sparc: Tidy global register initialization

2013-09-19 Thread Richard Henderson
Create tables for the various global registers that need allocation. Remove one level of indirection from gregnames and fregnames. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 160 +-- 1 file changed, 71 insertions(+), 89 deletions(

[Qemu-devel] [RFC 09/16] tcg: Change temp_sync argument to TCGTemp

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index ee11c94..0ca8dbe 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1664,10 +1664,8 @@ static inline void temp_dead(TCGContext *s, TCGTemp *ts)

[Qemu-devel] [RFC 13/16] tcg: Use temp_idx

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index a69186a..3591491 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -808,7 +808,7 @@ static void tcg_reg_alloc_start(TCGContext *s) static char *tcg_get_arg

[Qemu-devel] [RFC 05/16] tcg: More use of TCGReg where appropriate

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 26 +++--- tcg/tcg.h | 8 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 8fc5588..13dc8f5 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -341,7 +341,7 @@ static inline void tcg_

[Qemu-devel] [RFC 12/16] tcg: Tidy temporary allocation

2013-09-19 Thread Richard Henderson
In particular, make sure the memory is memset before use. Continues the increased use of TCGTemp pointers instead of integer indices where appropriate. Signed-off-by: Richard Henderson --- tcg/tcg.c | 128 +- 1 file changed, 60 insertio

[Qemu-devel] [RFC 06/16] tcg: Remove tcg_get_arg_str_i32/64

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 10 -- tcg/tcg.h | 5 - 2 files changed, 15 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 13dc8f5..7d379ac 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -832,16 +832,6 @@ static char *tcg_get_arg_str_idx(TCGContext *s, char *buf,

[Qemu-devel] [RFC 01/16] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr

2013-09-19 Thread Richard Henderson
Thus, use cpu_env as the parameter, not TCG_AREG0 directly. Update all uses in the translators. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 40 +++-- target-arm/translate.c| 20 +-- target-cris/translate.c | 24 ++--- target-

[Qemu-devel] [RFC 07/16] tcg: Change reg_to_temp to TCGTemp pointer

2013-09-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 113 ++ tcg/tcg.h | 4 +-- 2 files changed, 56 insertions(+), 61 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 7d379ac..35e0c7c 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -809,29

[Qemu-devel] [RFC 03/16] tcg: Change ts->mem_reg to ts->mem_base

2013-09-19 Thread Richard Henderson
Chain the temporaries together via pointers intstead of indices. The mem_reg value is now mem_base->reg. This will be important later. This does require that the frame pointer have a global temporary allocated for it. This is simple bar the existing reserved_regs check. Signed-off-by: Richard H

[Qemu-devel] [RFC 00/16] TCG indirect registers

2013-09-19 Thread Richard Henderson
This is an attempt to improve performance of target-sparc by exposing the windowed registers as TCG globals, and all the optimization that we can do there. This is done via allowing tcg_global_mem_new to be used with any base pointer, not just off of a fixed register. Thus the sparc windowed regis

Re: [Qemu-devel] Hibernate and qemu-nbd

2013-09-19 Thread Mark Trumpold
>-Original Message- >From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >Sent: Wednesday, September 18, 2013 06:12 AM >To: 'Mark Trumpold' >Cc: qemu-devel@nongnu.org, 'Paul Clements', nbd-gene...@lists.sourceforge.net, >bonz...@stefanha-thinkpad.redhat.com, w...@uter.be >Subject: Re: [Qemu

Re: [Qemu-devel] [PATCH 0/8] [PATCH RFC v3] s390 cpu hotplug

2013-09-19 Thread Jason J. Herne
On 09/05/2013 07:25 AM, Andreas Färber wrote: Am 05.09.2013 12:40, schrieb Christian Borntraeger: On 04/09/13 14:45, Andreas Färber wrote: ... To cope with device_add s390-cpu adding the device to /machine/peripheral/ or /machine/peripheral-anon/device[0] I *think* we'll need link<>, which wou

Re: [Qemu-devel] [PATCHv2 12/20] iscsi: add bdrv_co_write_zeroes

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 59 > + > 1 file changed, 59 insertions(+) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtu

Re: [Qemu-devel] [PATCH 4/5] hw: arm_gic: Support setting/getting binary point reg

2013-09-19 Thread Christoffer Dall
On Thu, Sep 19, 2013 at 08:48:35PM +0100, Christoffer Dall wrote: > On Sat, Sep 14, 2013 at 10:46:37AM +0100, Peter Maydell wrote: > > On 14 September 2013 02:52, Christoffer Dall > > wrote: > > > On Fri, Sep 06, 2013 at 03:41:04PM +0100, Peter Maydell wrote: > > >> The TCG QEMU GIC model is curre

Re: [Qemu-devel] [PATCHv2 07/20] block: honour alignment and limit in bdrv_co_do_write_zeroes

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block.c | 57 + > 1 file changed, 41 insertions(+), 16 deletions(-) > > diff --git a/block.c b/block.c > index 177720e..74ec342 100644 > --- a/block.c > +++

Re: [Qemu-devel] [PATCHv2 19/20] qemu-img: conditionally zero out target on convert

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > if the target has_zero_init = 0, but supports efficiently > writing zeroes by unmapping we call bdrv_zeroize to > avoid fully allocating the target. this currently You don't like the shift key, do you? :) s/this/This/ if you care about grammar in comm

Re: [Qemu-devel] [PATCHv2 18/20] qemu-img: add support for fully allocated images

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > qemu-img.c |8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 3e5e388..7600b58 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -100,8 +100,10 @@ st

Re: [Qemu-devel] [PATCH 4/5] hw: arm_gic: Support setting/getting binary point reg

2013-09-19 Thread Christoffer Dall
On Sat, Sep 14, 2013 at 10:46:37AM +0100, Peter Maydell wrote: > On 14 September 2013 02:52, Christoffer Dall > wrote: > > On Fri, Sep 06, 2013 at 03:41:04PM +0100, Peter Maydell wrote: > >> The TCG QEMU GIC model is currently adopting the > >> "GIC without Security Extensions" model, which implie

[Qemu-devel] [PATCH] tcg: Use bitmaps for free temporaries

2013-09-19 Thread Richard Henderson
We previously allocated 32-bits per temp for the next_free_temp entry. We now allocate 4 bits per temp across the 4 bitmaps. Using a linked list meant that if a translator is tweeked, resulting in temps being freed in a different order, that would have follow-on effects throughout the TB. Always

Re: [Qemu-devel] [PATCHv2 10/20] iscsi: set limits in BlockDriverState

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 10 ++ > 1 file changed, 10 insertions(+) Reviewed-by: Eric Blake > > diff --git a/block/iscsi.c b/block/iscsi.c > index aabcddb..21b1ecf 100644 > --- a/block/iscsi.c > +++ b/block/iscs

Re: [Qemu-devel] [PATCHv2 09/20] iscsi: simplify iscsi_co_discard

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > now that bdrv_co_discard can handle limits we do not need > the request split logic here anymore. > > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 67 > + > 1 file changed, 25 insertio

Re: [Qemu-devel] [PATCHv2 13/20] block: introduce bdrv_zeroize

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > this patch adds a call to completely zero out a block device. > the operation is sped up by checking the block status and > only writing zeroes to the device if they currently do not > return zeroes. optionally the zero writing can be sped up > by setti

Re: [Qemu-devel] [PATCH 5/8] [PATCH RFC v3] s390-qemu: cpu hotplug - ipi_states enhancements

2013-09-19 Thread Jason J. Herne
On 09/05/2013 08:01 AM, Andreas Färber wrote: Am 01.08.2013 16:12, schrieb Jason J. Herne: From: "Jason J. Herne" ... This is what got us into the link<> discussion last time. If we do for (i = 0; i < ARRAY_SIZE(ipi_states); i++) { name = g_strdup_printf("cpu[%i]", i); object_pro

Re: [Qemu-devel] [PATCHv2 11/20] iscsi: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 16 +++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > @@ -1522,7 +1534,9 @@ static BlockDriver bdrv_iscsi = { > .bdrv_aio_writev = iscsi_aio_writev, > .bdrv_aio_flu

Re: [Qemu-devel] [PATCHv2 08/20] block: honour alignment and limit in bdrv_co_discard

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block.c | 34 +- > 1 file changed, 33 insertions(+), 1 deletion(-) > > diff --git a/block.c b/block.c > index 74ec342..ecc5be4 100644 > --- a/block.c > +++ b/block.c > @@ -4181,7 +

Re: [Qemu-devel] [PATCHv2 17/20] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > this patch does 2 things: > a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. > b) use the newly introduced bdrv_has_discard_zeroes() to return the >zero state of an unallocated block. the used callout to >bdrv_has_zero_init

Re: [Qemu-devel] [PATCH 4/5] block: cow - used QEMU_PACKED for on-disk structures

2013-09-19 Thread Richard Henderson
On 09/19/2013 11:43 AM, Jeff Cody wrote: > cow_header_v2 is read and written directly from the image file > with bdrv_pread()/bdrv_pwrite(), and as such should be packed to > avoid unintentional padding. > > Also change struct cow_header_v2 to a typedef, and some minor > code style changes to keep

Re: [Qemu-devel] [PATCHv2 06/20] block: add discard and write_zeroes limits and alignment to BlockDriverState

2013-09-19 Thread Peter Lieven
Am 19.09.2013 20:53, schrieb Eric Blake: > On 09/17/2013 07:48 AM, Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> include/block/block_int.h | 12 >> 1 file changed, 12 insertions(+) > Reviewed-by: Eric Blake > >> + >> +/* optimal alignment for write zeroes reques

Re: [Qemu-devel] [PATCHv2 06/20] block: add discard and write_zeroes limits and alignment to BlockDriverState

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > include/block/block_int.h | 12 > 1 file changed, 12 insertions(+) Reviewed-by: Eric Blake > + > +/* optimal alignment for write zeroes requests in sectors */ > +int64_t write_zeroes_alignm

[Qemu-devel] [PATCH 0/5] block: use QEMU_PACKED for on-disk structures

2013-09-19 Thread Jeff Cody
Several block image formats did not consistently use packed attributes when directly reading / writing structures from disk (mainly image format headers). These series updates the image formats (see list below), to use QEMU_PACKED for on-disk structs. (Some minor code cleanup may also have ensued

[Qemu-devel] [PATCH 4/5] block: cow - used QEMU_PACKED for on-disk structures

2013-09-19 Thread Jeff Cody
cow_header_v2 is read and written directly from the image file with bdrv_pread()/bdrv_pwrite(), and as such should be packed to avoid unintentional padding. Also change struct cow_header_v2 to a typedef, and some minor code style changes to keep checkpatch.pl happy. Signed-off-by: Jeff Cody ---

Re: [Qemu-devel] [PATCHv2 05/20] block/raw: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block/raw_bsd.c | 56 > +-- > 1 file changed, 34 insertions(+), 22 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266

[Qemu-devel] [PATCH 5/5] block: qed - use QEMU_PACKED for on-disk structures

2013-09-19 Thread Jeff Cody
QEDHeader is read, and written, directly from on-disk images via bdrv_pread()/write(). To avoid any unintentional padding, these structs should be packed. Signed-off-by: Jeff Cody --- block/qed.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qed.h b/block/qed.h index

[Qemu-devel] [PATCH 3/5] block: qcow2 - used QEMU_PACKED for on-disk structures

2013-09-19 Thread Jeff Cody
QCowHeader and QCowExtension are structs that reside in the on-disk image format, and are read and written directly via bdrv_pread()/write(), and as such should be packed to avoid any unintentional struct padding. Signed-off-by: Jeff Cody --- block/qcow2.c | 2 +- block/qcow2.h | 2 +- 2 files c

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-19 Thread Andriy Gapon
on 19/09/2013 19:53 Paolo Bonzini said the following: > Il 19/09/2013 16:36, Andriy Gapon ha scritto: >> Not sure how the code ends up at 0x9315 after that. > > Events are dropped, probably corresponding to more emulation. I've got a trace without dropped events between the last "normal" instruct

[Qemu-devel] [PATCH 2/5] block: vpc - use QEMU_PACKED for on-disk structures

2013-09-19 Thread Jeff Cody
The VHD footer and header structs (vhd_footer and vhd_dyndisk_header) are on-disk structures for the image format, and as such should be packed. Go ahead and make these typedefs as well, with the preferred QEMU naming convention, so that the packed attribute is used consistently with the struct.

[Qemu-devel] [PATCH 1/5] block: vdi - use QEMU_PACKED for on-disk structures

2013-09-19 Thread Jeff Cody
The header struct VdiHeader is an on-disk structure for the image format, and as such should be packed. Signed-off-by: Jeff Cody --- block/vdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index dcbc27c..f8bdc92 100644 --- a/block/vdi.c +++ b/blo

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-19 Thread Andriy Gapon
on 19/09/2013 20:26 Paolo Bonzini said the following: > I don't think that's what happens. It's more likely that for some > reason the emulator mis-parses the instruction. > > Please confirm with "info cpus" that QEMU is looping there (just in > case), and attach the output of "info registers" (y

[Qemu-devel] increasing number of vhost devices

2013-09-19 Thread Antonin Bas
Hi all, In the most versions of the linux kernel (3.9+), kvm has increased the number of user memory slots to 125: #define KVM_SOFT_MAX_VCPUS 160 #define KVM_USER_MEM_SLOTS 125 /* memory slots that are not exposed to userspace */ #define KVM_PRIVATE_MEM_SLOTS 3 #define KVM_MEM_SLOTS_NUM (KVM_USER

Re: [Qemu-devel] [PATCH] Ensure PCIR is aligned to 4 bytes

2013-09-19 Thread Sebastian Herbszt
Brad Smith wrote: > On 20/01/13 1:12 PM, David Woodhouse wrote: >> The PCI Firmware Specification apparently requires that the PCI Data >> Structure be DWORD-aligned. The implementation in OVMF also requires >> this, so vgabios ROMs don't work there. With this fixed, I can now >> initialise the VGA

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-19 Thread Paolo Bonzini
Il 19/09/2013 16:36, Andriy Gapon ha scritto: > Not sure how the code ends up at 0x9315 after that. Events are dropped, probably corresponding to more emulation. > And here is original assembly code: > rret_tramp: movw $MEM_ESPR-0x08,%sp # Reset stack pointer > pushal

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: do not relay a previous driver's WCE configuration to the current

2013-09-19 Thread Eric Blake
On 09/19/2013 10:48 AM, Paolo Bonzini wrote: > The following sequence happens: > Hence, whenever the guest is reset, the cache mode of the disk should > be reset to whatever was specified in the "-drive" option. With this > change, the Linux virtio-blk driver finds that writeback caching is > ena

Re: [Qemu-devel] [PATCH 1/2] blockdev: do not default cache.no-flush to true

2013-09-19 Thread Eric Blake
On 09/19/2013 10:48 AM, Paolo Bonzini wrote: > That's why all my VMs were so fast lately. :) > > This changed in 1.6.0 by mistake in patch 29c4e2b (blockdev: Split up > 'cache' option, 2013-07-18). And my name is tied to that one as a reviewer. Sorry for letting it through in the first place. >

Re: [Qemu-devel] [PATCH 2/2] qemu-kvm: paravirt: add feature kvm_pv_unhalt

2013-09-19 Thread Paolo Bonzini
Il 18/09/2013 19:35, Andreas Färber ha scritto: > Am 18.09.2013 16:41, schrieb Andrew Jones: >> I don't know yet if want this feature on by default, so for now I'm >> just adding support for "-cpu ...,+kvm_pv_unhalt". >> >> Signed-off-by: Andrew Jones >> --- >> target-i386/cpu.c | 2 +- >> 1 file

Re: [Qemu-devel] [RFC] Enabling x2apic on most (all?) x86 CPU models

2013-09-19 Thread Paolo Bonzini
Il 19/09/2013 18:58, Eduardo Habkost ha scritto: >> > >> > I disagree, since this would also affect TCG. I would prefer to add >> > x2apic only to models that really have it and would be open to generally >> > enabling it for kvm_enabled() in instance_init/registration (so that >> > users can disa

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-19 Thread Andriy Gapon
on 19/09/2013 19:53 Paolo Bonzini said the following: > 1) Can you try loading the kvm_intel module with > emulate_invalid_guest_state=0? Will do. > 2) What are the contents of fs and gs? Why are they not zeroed? > Perhaps that is causing invalid guest state emulation to run, and then > somethin

[Qemu-devel] [PATCH 1/2] blockdev: do not default cache.no-flush to true

2013-09-19 Thread Paolo Bonzini
That's why all my VMs were so fast lately. :) This changed in 1.6.0 by mistake in patch 29c4e2b (blockdev: Split up 'cache' option, 2013-07-18). Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c

Re: [Qemu-devel] block/stream.c -Werror build failure

2013-09-19 Thread Stefan Weil
Am 19.09.2013 18:52, schrieb Andreas Färber: > Hello, > > As reported yesterday on IRC, since the last round of pulls I am getting > the following warning-treated-as-error: > > CCblock/stream.o > /home/andreas/QEMU/qemu/block/stream.c: In function ‘stream_run’: > /home/andreas/QEMU/qemu/block

Re: [Qemu-devel] [PATCH V3] target-i386: forward CPUID cache leaves when -cpu host is used

2013-09-19 Thread Paolo Bonzini
Il 02/09/2013 17:06, Benoît Canet ha scritto: > Some users running cpu intensive tasks checking the cache CPUID leaves at > startup and making decisions based on the result reported that the guest was > not reflecting the host CPUID leaves when -cpu host is used. > > This patch fix this. > > Sign

Re: [Qemu-devel] [PATCH v5 0/8] Add metadata overlap checks

2013-09-19 Thread Eric Blake
On 09/19/2013 09:07 AM, Max Reitz wrote: > Hi, > > I've done some benchmarks regarding this series now. In particular, I've > created a 7G image, installed Arch Linux to a partition in the first 2G > and created an empty ext4 partition for benchmarking in the remaining 5G. Thank you for doing thi

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-19 Thread Paolo Bonzini
Il 19/09/2013 19:18, Andriy Gapon ha scritto: > on 19/09/2013 19:53 Paolo Bonzini said the following: >> 1) Can you try loading the kvm_intel module with >> emulate_invalid_guest_state=0? > > Will do. > >> 2) What are the contents of fs and gs? Why are they not zeroed? >> Perhaps that is causing

[Qemu-devel] [PATCH 2/2] virtio-blk: do not relay a previous driver's WCE configuration to the current

2013-09-19 Thread Paolo Bonzini
The following sequence happens: - the SeaBIOS virtio-blk driver does not support the WCE feature, which causes QEMU to disable writeback caching - the Linux virtio-blk driver resets the device, finds WCE is available but writeback caching is disabled; tells block layer to not send cache flush comm

Re: [Qemu-devel] [RFC] Enabling x2apic on most (all?) x86 CPU models

2013-09-19 Thread Eduardo Habkost
(CCing Paolo, as he was involved in the previous discussion about TCG vs KVM CPU models) On Thu, Sep 19, 2013 at 01:50:58PM +0200, Andreas Färber wrote: > Hi, > > Am 18.09.2013 22:39, schrieb Eduardo Habkost: > > Hi, > > > > I would like to get your opinion on this: > > > > Currently we have x2

Re: [Qemu-devel] [PATCH] block: Fix compiler warning (-Werror=uninitialized)

2013-09-19 Thread Andreas Färber
Am 17.09.2013 18:43, schrieb Stefan Weil: > The patch fixes a warning from gcc (Debian 4.6.3-14+rpi1) 4.6.3: > > block/stream.c:141:22: error: > ‘copy’ may be used uninitialized in this function [-Werror=uninitialized] > > This is not a real bug - a better compiler would not complain. > > Now 'c

Re: [Qemu-devel] [PATCH] block: Fix compiler warning (-Werror=uninitialized)

2013-09-19 Thread Paolo Bonzini
Il 19/09/2013 18:59, Andreas Färber ha scritto: > Am 17.09.2013 18:43, schrieb Stefan Weil: >> The patch fixes a warning from gcc (Debian 4.6.3-14+rpi1) 4.6.3: >> >> block/stream.c:141:22: error: >> ‘copy’ may be used uninitialized in this function [-Werror=uninitialized] >> >> This is not a real b

Re: [Qemu-devel] block/stream.c -Werror build failure

2013-09-19 Thread Andreas Färber
Am 19.09.2013 18:59, schrieb Stefan Weil: > Am 19.09.2013 18:52, schrieb Andreas Färber: >> Hello, >> >> As reported yesterday on IRC, since the last round of pulls I am getting >> the following warning-treated-as-error: >> >> CCblock/stream.o >> /home/andreas/QEMU/qemu/block/stream.c: In fun

[Qemu-devel] block/stream.c -Werror build failure

2013-09-19 Thread Andreas Färber
Hello, As reported yesterday on IRC, since the last round of pulls I am getting the following warning-treated-as-error: CCblock/stream.o /home/andreas/QEMU/qemu/block/stream.c: In function ‘stream_run’: /home/andreas/QEMU/qemu/block/stream.c:111:14: error: ‘copy’ may be used uninitialized i

[Qemu-devel] [PATCH 0/2] Serious bugs in the handling of writeback caching

2013-09-19 Thread Paolo Bonzini
The first bug is simply that in 1.6.0 the default was changed by mistake to cache=unsafe. This affects all block drivers. It is fixed in the first patch. The second is that Linux guests that support the CONFIG_WCE option were mistaken into thinking that caching was writethrough, and thus did not

Re: [Qemu-devel] [PATCH] linux-user: Fix wrong use of stat instead of stat64 for sparc64

2013-09-19 Thread Stefan Weil
Am 06.09.2013 19:24, schrieb Stefan Weil: > Am 06.09.2013 19:16, schrieb Peter Maydell: >> On 6 September 2013 17:46, Stefan Weil wrote: >>> This test case is fixed now: >>> sparc64-linux-user/qemu-sparc64 /usr/gnemul/qemu-sparc64/busybox ls -l >>> block.c >>> >>> Signed-off-by: Stefan Weil >>>

[Qemu-devel] [Bug 1221797] Re: virt-install gets stuck during downloading install.img

2013-09-19 Thread Shivakumar
I guess it could be a problem with the mirror you are using. Have you tried using a different mirror. Following is what I tried and I was able to boot centos virt-install \ -n test \ -r 1024 \ --disk path=/tmp/test.img,size=3 \ --vcpus=1 \ --os-type linux \ --os-variant=rhel6 \ --network bridge=vi

Re: [Qemu-devel] Why X grabs for absolute windows?

2013-09-19 Thread Paolo Bonzini
Il 19/09/2013 12:18, Gerd Hoffmann ha scritto: > >> > Similar patches to SDL have been rejected before because it breaks the >> > API, so I don't see the bug in SDL getting resolved. > Oh, didn't realize the bug is in the sdl library. That is a bit more > complicated then. SDL would need a new g

Re: [Qemu-devel] [PATCH] .travis.yml: basic compile and check recipes

2013-09-19 Thread Alex Bennée
stefa...@gmail.com writes: > On Wed, Sep 18, 2013 at 03:35:07PM +0100, Alex Bennée wrote: >> >> stefa...@gmail.com writes: >> >> > >> > Looks useful. To get more code coverage, flesh out the build >> > environment: >> >> Thanks. Am I dreaming or are there some system image tests somewhere as

Re: [Qemu-devel] Why X grabs for absolute windows?

2013-09-19 Thread Burton, Ross
On 19 September 2013 17:23, Paolo Bonzini wrote: >>> > Similar patches to SDL have been rejected before because it breaks the >>> > API, so I don't see the bug in SDL getting resolved. >> Oh, didn't realize the bug is in the sdl library. That is a bit more >> complicated then. SDL would need a n

Re: [Qemu-devel] [PATCH] .travis.yml: basic compile and check recipes

2013-09-19 Thread Stefan Hajnoczi
On Thu, Sep 19, 2013 at 6:01 PM, Alex Bennée wrote: > > stefa...@gmail.com writes: > >> On Wed, Sep 18, 2013 at 03:35:07PM +0100, Alex Bennée wrote: >>> >>> stefa...@gmail.com writes: >>> >>> > >>> > Looks useful. To get more code coverage, flesh out the build >>> > environment: >>> >>> Thanks. A

Re: [Qemu-devel] Merging the quorum block driver

2013-09-19 Thread Eric Blake
On 09/19/2013 07:21 AM, Kevin Wolf wrote: > > I was thinking more along the lines of: > > -drive if=none,file.driver=quorum,format=raw,\ >file.children[0].file.filename=/nfs1/test.qcow2, \ Note that this requires shell quoting to protect you from globbing changing the argv hande

Re: [Qemu-devel] [PATCH v5 0/8] Add metadata overlap checks

2013-09-19 Thread Max Reitz
Hi, I've done some benchmarks regarding this series now. In particular, I've created a 7G image, installed Arch Linux to a partition in the first 2G and created an empty ext4 partition for benchmarking in the remaining 5G. My first test consisted of running bonnie++ ("bonnie++ -d [scratch pa

Re: [Qemu-devel] Merging the quorum block driver

2013-09-19 Thread Daniel P. Berrange
On Thu, Sep 19, 2013 at 08:51:39AM -0600, Eric Blake wrote: > On 09/19/2013 07:21 AM, Kevin Wolf wrote: > > > > > I was thinking more along the lines of: > > > > -drive if=none,file.driver=quorum,format=raw,\ > >file.children[0].file.filename=/nfs1/test.qcow2, \ > > Note that th

Re: [Qemu-devel] [PATCHv2 20/20] block/raw: copy block limits and alignment information on raw_open

2013-09-19 Thread Paolo Bonzini
Il 19/09/2013 09:29, Peter Lieven ha scritto: > On 18.09.2013 10:48, Paolo Bonzini wrote: >> Il 17/09/2013 15:48, Peter Lieven ha scritto: >>> Signed-off-by: Peter Lieven >>> --- >>> block/raw_bsd.c |4 >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/block/raw_bsd.c b/block/ra

Re: [Qemu-devel] [PATCHv2 04/20] block: introduce bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-09-19 Thread Eric Blake
On 09/17/2013 07:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > block.c | 29 + > include/block/block.h |2 ++ > include/block/block_int.h | 13 + > 3 files changed, 44 insertions(+) Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH] block: Fix compiler warning (-Werror=uninitialized)

2013-09-19 Thread Stefan Hajnoczi
On Tue, Sep 17, 2013 at 06:43:16PM +0200, Stefan Weil wrote: > The patch fixes a warning from gcc (Debian 4.6.3-14+rpi1) 4.6.3: > > block/stream.c:141:22: error: > ‘copy’ may be used uninitialized in this function [-Werror=uninitialized] > > This is not a real bug - a better compiler would not co

  1   2   >