[Qemu-devel] [PATCH v3] char: restore read callback on a reattached (hotplug) chardev

2013-12-11 Thread Gal Hammer
Fix a bug that was introduced in commit 386a5a1e. A removal of a device set the chr handlers to NULL. However when the device is plugged back, its read callback is not restored so data can't be transftered from the host to the guest (e.g. via the virtio-serial port). https://bugzilla.redhat.com/sh

Re: [Qemu-devel] [PATCH 01/22] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2013-12-11 Thread Thomas Huth
On Thu, 12 Dec 2013 10:57:49 +0800 Wenchao Xia wrote: > > >> +static int bdrv_refresh_limits(BlockDriverState *bs) > >> +{ > >> +BlockDriver *drv = bs->drv; > >> + > >> +memset(&bs->bl, 0, sizeof(bs->bl)); > >> + > >> +if (!drv) { > >> +return 0; > >> +} else if (drv->bdr

Re: [Qemu-devel] [PATCH v3 0/6] Add error_abort and associated cleanups

2013-12-11 Thread Markus Armbruster
Peter Crosthwaite writes: > On Wed, Dec 11, 2013 at 11:57 PM, Markus Armbruster wrote: >> Peter Crosthwaite writes: >> >>> Following our discussion RE self asserting API calls, here is a spin of >>> my proposal. This series obsoletes the need for _nofail variants for >>> Error ** accepting APIs

Re: [Qemu-devel] [PATCH 07/22] block: rename buffer_alignment to guest_block_size

2013-12-11 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

Re: [Qemu-devel] [PATCH 06/22] block: Don't use guest sector size for qemu_blockalign()

2013-12-11 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

Re: [Qemu-devel] [PATCH v3 04/21] qapi: extend qdict_flatten() for QLists

2013-12-11 Thread Fam Zheng
On 2013年12月12日 02:10, Max Reitz wrote: Reversing qdict_array_split(), qdict_flatten() should flatten QLists as well by interpreting them as QDicts where every entry's key is its index. This allows bringing QDicts with QLists from QMP commands to the same form as they would be given as command-li

Re: [Qemu-devel] [PATCH 01/22] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2013-12-11 Thread Peter Lieven
Am 11.12.2013 22:08, schrieb Kevin Wolf: > This function separates filling the BlockLimits from bdrv_open(), which > allows it to call it from other operations which may change the limits > (e.g. modifications to the backing file chain or bdrv_reopen) > > Signed-off-by: Kevin Wolf > --- > block.c

Re: [Qemu-devel] [PATCH v3 04/21] qapi: extend qdict_flatten() for QLists

2013-12-11 Thread Fam Zheng
On 2013年12月12日 02:10, Max Reitz wrote: Reversing qdict_array_split(), qdict_flatten() should flatten QLists as well by interpreting them as QDicts where every entry's key is its index. This allows bringing QDicts with QLists from QMP commands to the same form as they would be given as command-li

Re: [Qemu-devel] [PATCH 00/22] block: Support for 512b-on-4k emulation

2013-12-11 Thread Peter Lieven
Should it be possible to boot from a 4K-native drive with this series? If yes, I will run some test with some new iSCSI arrays we got for testing they can export 4k blocksize LUNs. Anyway, can you please include the patch from Paolo which sets the bs->request_alignment = iscsilun->block_size in is

Re: [Qemu-devel] [PATCH v2 0/4] X86/KVM: enable Intel MPX for KVM

2013-12-11 Thread Liu, Jinsong
Paolo Bonzini wrote: > Il 11/12/2013 09:31, Liu, Jinsong ha scritto: >> Paolo, comments for version 2? > > I think I commented that it's fine, I'm just waiting for a rebase on > top of the generic patches. > > Paolo > Thanks! common MPX definiation patches have been checked in tip tree (both Q

Re: [Qemu-devel] save compiled qemu traces.

2013-12-11 Thread Xin Tong
On Thu, Dec 12, 2013 at 1:07 PM, Xin Tong wrote: > see questions below. > > On Tue, Dec 10, 2013 at 12:25 AM, Alex Bennée wrote: >> >> trent.t...@gmail.com writes: >> >>> Does anyone have profiles on how much time QEMU spends in translating >>> instructions. QEMU does not have a baseline interpre

Re: [Qemu-devel] [PATCH V4 5/9] qapi script: use same function to generate enum string

2013-12-11 Thread Eric Blake
On 12/10/2013 10:48 PM, Wenchao Xia wrote: > Prior to this patch, qapi-visit.py used custom code to generate enum > names used for handling a qapi union. Fix it to instead reuse common > code, with identical generated results, and allowing future updates to > generation to only need to touch one pl

Re: [Qemu-devel] save compiled qemu traces.

2013-12-11 Thread Xin Tong
see questions below. On Tue, Dec 10, 2013 at 12:25 AM, Alex Bennée wrote: > > trent.t...@gmail.com writes: > >> Does anyone have profiles on how much time QEMU spends in translating >> instructions. QEMU does not have a baseline interpreter nor does it >> translate on trace-granularity. so i ima

Re: [Qemu-devel] [PATCH v6 00/10] Drop in_use from BlockDriverState and enable point-in-time snapshot exporting over NBD

2013-12-11 Thread Ian Main
On Wed, Dec 11, 2013 at 10:46:49AM +0800, Fam Zheng wrote: > On 2013年11月28日 16:39, Fam Zheng wrote: > >This series adds for point-in-time snapshot NBD exporting based on > >blockdev-backup (variant of drive-backup with existing device as target). > > > >We get a thin point-in-time snapshot by COW m

Re: [Qemu-devel] [PATCH 05/22] block: Detect unaligned length in bdrv_qiov_is_aligned()

2013-12-11 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

Re: [Qemu-devel] [PATCH 04/22] qemu_memalign: Allow small alignments

2013-12-11 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

Re: [Qemu-devel] [PATCH 03/22] block: Update BlockLimits when they might have changed

2013-12-11 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

Re: [Qemu-devel] [PATCH 02/22] block: Inherit opt_transfer_length

2013-12-11 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

Re: [Qemu-devel] [PATCH 01/22] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2013-12-11 Thread Wenchao Xia
>> +static int bdrv_refresh_limits(BlockDriverState *bs) >> +{ >> +BlockDriver *drv = bs->drv; >> + >> +memset(&bs->bl, 0, sizeof(bs->bl)); >> + >> +if (!drv) { >> +return 0; >> +} else if (drv->bdrv_refresh_limits) { >> +return drv->bdrv_refresh_limits(bs); >> +

Re: [Qemu-devel] [PATCH RFC 2/2] rng-egd: introduce a parameter to set buffer size

2013-12-11 Thread Amos Kong
On Tue, Dec 10, 2013 at 09:58:19AM -0700, Eric Blake wrote: > On 12/09/2013 07:10 AM, Amos Kong wrote: Hi Eric, > > This patch makes the buffer size configurable, the max > > buffer size is 65536. > > > > -object rng-egd,chardev=chr0,id=rng0,buf_size=1024 > > > > Signed-off-by: Amos Kong > >

Re: [Qemu-devel] [PATCH 01/22] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2013-12-11 Thread Wenchao Xia
于 2013/12/12 5:08, Kevin Wolf 写道: > This function separates filling the BlockLimits from bdrv_open(), which > allows it to call it from other operations which may change the limits > (e.g. modifications to the backing file chain or bdrv_reopen) > > Signed-off-by: Kevin Wolf > --- > block.c

Re: [Qemu-devel] [PATCH] target-i386: clear guest TSC on reset

2013-12-11 Thread Fernando Luis Vázquez Cao
On 12/09/2013 05:50 PM, Fernando Luis Vázquez Cao wrote: On 12/06/2013 11:22 PM, Marcelo Tosatti wrote: On Fri, Dec 06, 2013 at 05:24:18PM +0900, Fernando Luis Vázquez Cao wrote: I also wanted to make sure that the initialization that we do in kvm_arch_vcpu_postcreate on power up and the subseq

Re: [Qemu-devel] Postcopy codebase status?

2013-12-11 Thread Isaku Yamahata
On Wed, Dec 11, 2013 at 03:37:18PM +, "Dr. David Alan Gilbert" wrote: > Hi Isaku, Benoit, > I'm starting to look at postcopy and was looking back through > the mailing list at your code and comments and just wondered if there > were any more updates. > > Isaku: The last code drop to the

[Qemu-devel] [PATCH v2] tcg/i386: fix a comment

2013-12-11 Thread Aurelien Jarno
The comments apply to 8-bit stores, not 8-byte stores. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/i386/tcg-target.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 7ac8e45..495b901 100644 --- a/tcg/i386/

Re: [Qemu-devel] [PATCH v10 5/5] hw/arm: add cubieboard support

2013-12-11 Thread Li Guang
Peter Crosthwaite wrote: On Wed, Dec 11, 2013 at 8:31 PM, Peter Maydell wrote: On 11 December 2013 10:24, Peter Crosthwaite wrote: On Wed, Dec 11, 2013 at 7:56 PM, Peter Maydell wrote: On 11 December 2013 05:59, Peter Crosthwaite wrote: On Mon, Dec 9, 2013 at

[Qemu-devel] issue with vgabios lfb and virtio vga

2013-12-11 Thread Dave Airlie
Hi Gerd, so I have a bit of a conflict I'm not sure how best to handle between how vgabios.c locates its LFB and how virtio requires the BAR get laid out. So virtio-pci requires the BARs are laid out for MSI support with the config i/o ports at BAR 0, and MSI BAR at BAR 1. Now the vgabios.c does

Re: [Qemu-devel] [PATCH 3/5] qom: catch errors in object_property_add_child

2013-12-11 Thread Eric Blake
On 12/10/2013 10:00 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > qom/object.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org s

Re: [Qemu-devel] [PATCH 2/5] qom: fix leak for objects created with -object

2013-12-11 Thread Eric Blake
On 12/10/2013 10:00 AM, Paolo Bonzini wrote: > The object must be unref-ed when its variable goes out of scope. > > Signed-off-by: Paolo Bonzini > --- > vl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266

Re: [Qemu-devel] [PATCH 1/5] rng: initialize file descriptor to -1

2013-12-11 Thread Eric Blake
On 12/10/2013 10:00 AM, Paolo Bonzini wrote: > The file descriptor is never initialized to -1, which makes rng-random > close stdin if an object is created and immediately destroyed. If we > change it to -1, we also need to protect qemu_set_fd_handler from > receiving a bogus file descriptor. > >

Re: [Qemu-devel] [PATCH] inet_listen_opts: add error checking

2013-12-11 Thread Eric Blake
On 12/11/2013 05:00 AM, Gerd Hoffmann wrote: > Don't use atoi() function which doesn't detect errors, switch to > strtol and error out on failures. Also add a range check while > being at it. > > Signed-off-by: Gerd Hoffmann > --- > /* lookup */ > -if (port_offset) > -snprintf(

Re: [Qemu-devel] [PATCH v3 0/6] Add error_abort and associated cleanups

2013-12-11 Thread Peter Crosthwaite
On Wed, Dec 11, 2013 at 11:57 PM, Markus Armbruster wrote: > Peter Crosthwaite writes: > >> Following our discussion RE self asserting API calls, here is a spin of >> my proposal. This series obsoletes the need for _nofail variants for >> Error ** accepting APIs. Is also greatly reduces the verbo

[Qemu-devel] [PATCH 16/22] block: Make zero-after-EOF work with larger alignment

2013-12-11 Thread Kevin Wolf
Odd file sizes could make bdrv_aligned_preadv() shorten the request in non-aligned ways. Fix it by rounding to the required alignment instead of 512 bytes. Signed-off-by: Kevin Wolf --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index b4f6

[Qemu-devel] [PATCH 06/22] block: Don't use guest sector size for qemu_blockalign()

2013-12-11 Thread Kevin Wolf
bs->buffer_alignment is set by the device emulation and contains the logical block size of the guest device. This isn't something that the block layer should know, and even less something to use for determining the right alignment of buffers to be used for the host. The new BlockLimits field opt_m

[Qemu-devel] [PATCH 01/22] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2013-12-11 Thread Kevin Wolf
This function separates filling the BlockLimits from bdrv_open(), which allows it to call it from other operations which may change the limits (e.g. modifications to the backing file chain or bdrv_reopen) Signed-off-by: Kevin Wolf --- block.c | 21 block/iscsi.c

[Qemu-devel] [PATCH v2 1/8] target-arm: A64: add support for ld/st pair

2013-12-11 Thread Peter Maydell
From: Alex Bennée This patch support the basic load and store pair instructions and includes the generic helper functions: * do_gpr_st() * do_fp_st() * do_gpr_ld() * do_fp_ld() * read_cpu_reg_sp() * gen_check_sp_alignment() The last function gen_check_sp_alignment() is a NULL op cur

[Qemu-devel] [PATCH v2 6/8] target-arm: A64: add support for move wide instructions

2013-12-11 Thread Peter Maydell
From: Alex Bennée This patch adds emulation for the mov wide instructions (MOVN, MOVZ, MOVK). Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target-arm/translate-a64.c | 51 -- 1 file changed, 49 insertio

[Qemu-devel] [PATCH v2 5/8] target-arm: A64: add support for add, addi, sub, subi

2013-12-11 Thread Peter Maydell
From: Alex Bennée Implement the non-carry forms of addition and subtraction (immediate, extended register and shifted register). This includes the code to calculate NZCV if the instruction calls for setting the flags. Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell Reviewed-by: Richard

[Qemu-devel] [PATCH v2 0/8] target-arm: A64 decoder set 3: loads, stores, misc integer

2013-12-11 Thread Peter Maydell
Here's version 2 of the third set of A64 decoder patches (loads, stores, misc integer). Changes v1->v2: * merged ldp and stp into one function/patch * minor cleanup as per RTH review * use the new tcg ops for guest load/store * catch the missing UNALLOCATED cases for load/store * add missing

[Qemu-devel] [PATCH v2 8/8] target-arm: A64: implement SVC, BRK

2013-12-11 Thread Peter Maydell
From: Alexander Graf Add decoding for the exception generating instructions, and implement SVC (syscalls) and BRK (software breakpoint). Signed-off-by: Alexander Graf Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target-arm/translate-a64.c | 51 +

[Qemu-devel] [PATCH v2 4/8] target-arm: A64: add support for ld/st with index

2013-12-11 Thread Peter Maydell
From: Alex Bennée This adds support for the pre/post-index ld/st forms with immediate offsets as well as the un-scaled immediate form (which are all variations on the same 9-bit immediate instruction form). Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell --- target-arm/translate-a64.c

[Qemu-devel] [PATCH v2 3/8] target-arm: A64: add support for ld/st with reg offset

2013-12-11 Thread Peter Maydell
From: Alex Bennée This adds support for the load/store forms using a register offset. Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 144 - 1 file changed, 143 insertions(+), 1 deletion(-) diff --git a/targ

[Qemu-devel] [PATCH v2 2/8] target-arm: A64: add support for ld/st unsigned imm

2013-12-11 Thread Peter Maydell
From: Alex Bennée This adds support for the forms of ld/st with a 12 bit unsigned immediate offset. Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell --- Changes - split off cpu_read_reg_sp for earlier use --- target-arm/translate-a64.c | 89

[Qemu-devel] [PATCH v2 7/8] target-arm: A64: add support for 3 src data proc insns

2013-12-11 Thread Peter Maydell
From: Alexander Graf This patch adds emulation for the "Data-processing (3 source)" family of instructions, namely MADD, MSUB, SMADDL, SMSUBL, SMULH, UMADDL, UMSUBL, UMULH. Signed-off-by: Alexander Graf Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell --- Changes: - Use tcg ops for

Re: [Qemu-devel] [PATCH 4/9] target-arm: A64: add support for ld/st with reg offset

2013-12-11 Thread Alex Bennée
r...@twiddle.net writes: > On 12/10/2013 06:16 AM, Alex Bennée wrote: >> However my preference unless there is a strong objection would be to >> clean that up in later patches. For one thing the more instructions each >> patch handles the longer it takes to run the instruction validation on >> th

[Qemu-devel] [PATCH 14/22] block: Switch BdrvTrackedRequest to byte granularity

2013-12-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block.c | 52 +++ block/backup.c| 7 ++- include/block/block_int.h | 4 ++-- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/block.c b/block.c index a80db2e..fa888d9 1006

Re: [Qemu-devel] [SeaBIOS] [BUG] Windows 7 fails to start with new vgabios binaries

2013-12-11 Thread Kevin O'Connor
On Tue, Dec 10, 2013 at 04:55:36AM -0500, Gal Hammer wrote: > Kevin, > > The patch was verified and it solves the problem on Windows 7 official > release as well. Thanks. I pushed this patch to seabios git master. -Kevin > > - Original Message - > From: "Kevin O'Connor" > To: "Gerd

[Qemu-devel] [PATCH 15/22] block: Allow waiting for overlapping requests between begin/end

2013-12-11 Thread Kevin Wolf
Previously, it was not possible to use wait_for_overlapping_requests() between tracked_request_begin()/end() because it would wait for itself. Ignore the current request in the overlap check and run more of the bdrv_co_do_preadv/pwritev code with a BdrvTrackedRequest present. Signed-off-by: Kevin

Re: [Qemu-devel] [RFC PATCH 04/14] NUMA: convert -numa option to use OptsVisitor

2013-12-11 Thread Paolo Bonzini
Il 11/12/2013 19:51, Eric Blake ha scritto: >> > +{ 'union': 'NumaOptions', >> > + 'data': { >> > +'node': 'NumaNodeOptions' }} > Why do we need a union, if there's no alternative, and since nothing > else in the series adds an alternative? Because these structures are used to parse command-l

[Qemu-devel] [PATCH 17/22] block: Generalise and optimise COR serialisation

2013-12-11 Thread Kevin Wolf
Change the API so that specific requests can be marked serialising. Only these requests are checked for overlaps then. This means that during a Copy on Read operation, not all requests overlapping other requests are serialised any more, but only those that actually overlap with the specific COR re

[Qemu-devel] [PATCH 18/22] block: Make overlap range for serialisation dynamic

2013-12-11 Thread Kevin Wolf
Copy on Read wants to serialise with all requests touching the same cluster, so wait_serialising_requests() rounded to cluster boundaries. Other users like alignment RMW will have different requirements, though (requests touching the same sector), so make it dynamic. Signed-off-by: Kevin Wolf ---

Re: [Qemu-devel] [V2 PATCH 02/18] target-ppc: Add ISA2.06 bpermd Instruction

2013-12-11 Thread Richard Henderson
On 12/11/2013 11:16 AM, Tom Musta wrote: > This patch adds the Bit Permute Doubleword (bpermd) instruction, > which was introduced in Power ISA 2.06 as part of the base 64-bit > architecture. > > V2: Addressing stylistic comments from Richard Henderson. > > Signed-off-by: Tom Musta > --- > targ

[Qemu-devel] [PATCH 20/22] block: Change coroutine wrapper to byte granularity

2013-12-11 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/block.c b/block.c index 98ea723..5e2e092 100644 --- a/block.c +++ b/block.c @@ -69,11 +69,11 @@ static int coroutine_fn bdrv_co_readv_em(Blo

[Qemu-devel] [PATCH 11/22] block: Introduce bdrv_aligned_pwritev()

2013-12-11 Thread Kevin Wolf
This separates the part of bdrv_co_do_writev() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver. Signed-off-by: Kevin Wolf --- block.c | 62 +++

[Qemu-devel] [PATCH 13/22] block: Introduce bdrv_co_do_pwritev()

2013-12-11 Thread Kevin Wolf
This is going to become the bdrv_co_do_preadv() equivalent for writes. In this patch, however, just a function taking byte offsets is created, it doesn't align anything yet. Signed-off-by: Kevin Wolf --- block.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH 21/22] block: Make bdrv_pread() a bdrv_prwv_co() wrapper

2013-12-11 Thread Kevin Wolf
Instead of implementing the alignment adjustment here, use the now existing functionality of bdrv_co_do_preadv(). Signed-off-by: Kevin Wolf --- block.c | 49 + 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH 07/22] block: rename buffer_alignment to guest_block_size

2013-12-11 Thread Kevin Wolf
From: Paolo Bonzini The alignment field is now set to the value that is promised to the guest, rather than required by the host. The next patches will make QEMU aware of the host-provided values, so make this clear. The alignment is also not about memory buffers, but about the sectors on the di

[Qemu-devel] [PATCH 19/22] block: Align requests in bdrv_co_do_pwritev()

2013-12-11 Thread Kevin Wolf
This patch changes bdrv_co_do_pwritev() to actually be what its name promises. If requests aren't properly aligned, it performs a RMW. Requests touching the same block are serialised against the RMW request. Further optimisation of this is possible by differentiating types of requests (concurrent

[Qemu-devel] [PATCH 09/22] block: Introduce bdrv_aligned_preadv()

2013-12-11 Thread Kevin Wolf
This separates the part of bdrv_co_do_readv() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver. Signed-off-by: Kevin Wolf --- block.c | 61

[Qemu-devel] [PATCH 22/22] block: Make bdrv_pwrite() a bdrv_prwv_co() wrapper

2013-12-11 Thread Kevin Wolf
Instead of implementing the alignment adjustment here, use the now existing functionality of bdrv_co_do_pwritev(). Signed-off-by: Kevin Wolf --- block.c | 64 +--- 1 file changed, 9 insertions(+), 55 deletions(-) diff --git a/block.c b

[Qemu-devel] [PATCH 12/22] block: write: Handle COR dependency after I/O throttling

2013-12-11 Thread Kevin Wolf
First waiting for all COR requests to complete and calling the throttling function afterwards means that the request could be delayed and we still need to wait for the COR request even if it was issued only after the throttled write request. Signed-off-by: Kevin Wolf --- block.c | 8 1

[Qemu-devel] [PATCH 04/22] qemu_memalign: Allow small alignments

2013-12-11 Thread Kevin Wolf
The functions used by qemu_memalign() require an alignment that is at least sizeof(void*). Adjust it if it is too small. Signed-off-by: Kevin Wolf --- util/oslib-posix.c | 5 + 1 file changed, 5 insertions(+) diff --git a/util/oslib-posix.c b/util/oslib-posix.c index e00a44c..54f8932 100644

[Qemu-devel] [PATCH 00/22] block: Support for 512b-on-4k emulation

2013-12-11 Thread Kevin Wolf
This patch series adds code to the block layer that allows performing I/O requests in smaller granularities than required by the host backend (most importantly, O_DIRECT restrictions). It achieves this for reads by rounding the request to host-side block boundary, and for writes by performing a rea

[Qemu-devel] [PATCH 10/22] block: Introduce bdrv_co_do_preadv()

2013-12-11 Thread Kevin Wolf
Similar to bdrv_pread(), which aligns byte-aligned request to 512 byte sectors, bdrv_co_do_preadv() takes a byte-aligned request and aligns it to the alignment specified in bs->request_alignment. Signed-off-by: Kevin Wolf --- block.c | 63 +

[Qemu-devel] [PATCH 08/22] raw: Probe required direct I/O alignment

2013-12-11 Thread Kevin Wolf
From: Paolo Bonzini Add a bs->request_alignment field that contains the required offset/length alignment for I/O requests and fill it in the raw block drivers. Use ioctls if possible, else see what alignment it takes for O_DIRECT to succeed. While at it, also expose the memory alignment requirem

[Qemu-devel] [PATCH 03/22] block: Update BlockLimits when they might have changed

2013-12-11 Thread Kevin Wolf
When reopening with different flags, or when backing files disappear from the chain, the limits may change. Make sure they get updated in these cases. Signed-off-by: Kevin Wolf --- block.c | 5 - block/stream.c| 2 ++ include/block/block.h | 1 + 3 files changed, 7 inse

[Qemu-devel] [PATCH 05/22] block: Detect unaligned length in bdrv_qiov_is_aligned()

2013-12-11 Thread Kevin Wolf
For an O_DIRECT request to succeed, it's not only necessary that all base addresses in the qiov are aligned, but also that each length in it is aligned. Signed-off-by: Kevin Wolf --- block.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block.c b/block.c index 8eae359..62c5a75 100644 --

[Qemu-devel] [PATCH 02/22] block: Inherit opt_transfer_length

2013-12-11 Thread Kevin Wolf
When there is a format driver between the backend, it's not guaranteed that exposing the opt_transfer_length for the format driver results in the optimal requests (because of fragmentation etc.), but it can't make things worse, so let's just do it. Signed-off-by: Kevin Wolf --- block.c | 18

[Qemu-devel] [PATCH] target-m68k: Replace qemu_assert by hw_error

2013-12-11 Thread Stefan Weil
hw_error is already used for target-arm and target-s390x. Using it for target-m68k fixes this compiler warning with Darwin because hw_error is declared with QEMU_NORETURN: target-m68k/translate.c:671:13: warning: variable 'offset' is used uninitialized whenever switch default is taken [-Wsometim

[Qemu-devel] A question about virtio inside qemu

2013-12-11 Thread Yaodong Yang
Hi community,I have a quick question about the virtio inside qemu. When the user application sends to a specific virtual disk a large number of read requests in a very short time, where should these requests be queued? Inside the virtqueue? virtqueue available ring or the underlying bdrv_read_aio()

Re: [Qemu-devel] [V2 PATCH 11/18] softfloat: Fix float64_to_uint32

2013-12-11 Thread Tom Musta
On 12/11/2013 1:53 PM, Peter Maydell wrote: > On 11 December 2013 19:16, Tom Musta wrote: >> uint32 float64_to_uint32( float64 a STATUS_PARAM ) >> { >> -int64_t v; >> +uint64_t v; >> uint32 res; >> >> -v = float64_to_int64(a STATUS_VAR); >> -if (v < 0) { >> -res = 0;

[Qemu-devel] [PATCH] block/vvfat: Fix compiler warnings for OpenBSD

2013-12-11 Thread Stefan Weil
The buildbot shows these compiler warnings: block/vvfat.c: In function 'create_short_and_long_name': block/vvfat.c:620: warning: array size (8) smaller than bound length (11) block/vvfat.c:620: warning: array size (8) smaller than bound length (11) block/vvfat.c:635: warning: array size (8) smalle

[Qemu-devel] [PATCH v3 07/21] blkdebug: Use command-line in read_config()

2013-12-11 Thread Max Reitz
Use qemu_config_parse_qdict() to parse the command-line options in addition to the config file. Signed-off-by: Max Reitz --- block/blkdebug.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index f7c898f..584b1d6 100644 ---

[Qemu-devel] [V2 PATCH 02/18] target-ppc: Add ISA2.06 bpermd Instruction

2013-12-11 Thread Tom Musta
This patch adds the Bit Permute Doubleword (bpermd) instruction, which was introduced in Power ISA 2.06 as part of the base 64-bit architecture. V2: Addressing stylistic comments from Richard Henderson. Signed-off-by: Tom Musta --- target-ppc/helper.h |1 + target-ppc/int_helper.c | 2

[Qemu-devel] [V2 PATCH 09/18] softfloat: Fix Handling of Small Negatives in float64_to_uint64

2013-12-11 Thread Tom Musta
The float64_to_uint64 routine exits early for all negative numbers. While the integer result is always correctly returned as 0, the exception flags are also always set to float_flag_invalid. This is incorrect for those cases where a small negative number (-1 < x < 0) rounds to zero. In such a cas

[Qemu-devel] [PULL 21/28] hpet: inverse polarity when pin above ISA_NUM_IRQS

2013-12-11 Thread Michael S. Tsirkin
From: Liu Ping Fan According to hpet spec, hpet irq is high active. But according to ICH spec, there is inversion before the input of ioapic. So the OS will expect low active on this IRQ line. (On bare metal, if OS driver claims high active on this line, spurious irq is generated) We fold the em

[Qemu-devel] [PATCH 1/5] target-s390: Convert to new qemu_ld/st opcodes

2013-12-11 Thread Richard Henderson
Simplistic search and replace only. Cleanups to follow. Signed-off-by: Richard Henderson --- target-s390x/translate.c | 154 +++ 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index

[Qemu-devel] [V2 PATCH 05/18] target-ppc: Add ISA 2.06 divwe[u][o] Instructions

2013-12-11 Thread Tom Musta
This patch addes the Signed and Unsigned Divide Word Extended instructions which were introduced in Power ISA 2.06. V2: Eliminating extraneous code in the overflow case per comments from Richard Henderson. Fixed corner case bug in divweu (check for (RA) >= (RB)). Signed-off-by: Tom Musta ---

Re: [Qemu-devel] [PATCH 5/11 v3 FIXED] qdev: add "hotplugable" property to Device

2013-12-11 Thread Markus Armbruster
Please spell it "pluggable", both in C identifiers and strings.

[Qemu-devel] [PATCH v3 05/21] qemu-option: Add qemu_config_parse_qdict()

2013-12-11 Thread Max Reitz
This function basically parses command-line options given as a QDict replacing a config file. For instance, the QDict {"section.opt1": 42, "section.opt2": 23} corresponds to the config file: [section] opt1 = 42 opt2 = 23 It is possible to specify multiple sections and also multiple sections of t

Re: [Qemu-devel] [V2 PATCH 12/18] softfloat: Fix float64_to_uint32_round_to_zero

2013-12-11 Thread Peter Maydell
On 11 December 2013 19:16, Tom Musta wrote: > The float64_to_uint32_round_to_zero routine is incorrect. > > For example, the following test pattern: > > 425F81378DC0CD1F / 0x1.f81378dc0cd1fp+38 > > will erroneously set the inexact flag. > > This patch re-implements the routine to temporarily f

[Qemu-devel] [V2 PATCH 17/18] target-ppc: Enable frsqrtes on Power7 and Power8

2013-12-11 Thread Tom Musta
The frsqrtes instruction was introduced prior to ISA 2.06 and is support on both the Power7 and Power8 processors. However, this instruction is handled as illegal in the current QEMU emulation machines. This patch enables the existing implemention of frsqrtes in the P7 and P8 machines. Signed-of

Re: [Qemu-devel] [V2 PATCH 11/18] softfloat: Fix float64_to_uint32

2013-12-11 Thread Peter Maydell
On 11 December 2013 19:16, Tom Musta wrote: > uint32 float64_to_uint32( float64 a STATUS_PARAM ) > { > -int64_t v; > +uint64_t v; > uint32 res; > > -v = float64_to_int64(a STATUS_VAR); > -if (v < 0) { > -res = 0; > -float_raise( float_flag_invalid STATUS_VAR)

Re: [Qemu-devel] [PATCH] [PATCH RFC v4] qemu-monitor: HMP cpu-add wrapper

2013-12-11 Thread Jason J. Herne
On 12/11/2013 01:24 PM, Jason J. Herne wrote: I forgot to modify the subject line to remove "[PATCH RFC v4]". My apologies! -- -- Jason J. Herne (jjhe...@linux.vnet.ibm.com)

[Qemu-devel] [PATCH 2/5] target-s390: Simplify op_clc

2013-12-11 Thread Richard Henderson
New opcodes can unify 4 different code paths. Signed-off-by: Richard Henderson --- target-s390x/translate.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 8fc8259..8f8567e 100644 --- a/

Re: [Qemu-devel] [V2 PATCH 00/18] target-ppc: Base ISA V2.06 for Power7/Power8

2013-12-11 Thread Peter Maydell
On 11 December 2013 19:42, Tom Musta wrote: > On 12/11/2013 1:40 PM, Peter Maydell wrote: >> All patches which touch fpu/ need to come with a statement >> (in the cover letter is fine) that the changes are licensed under >> both the softfloat-2a and -2b licenses [or under some license >> compatibl

[Qemu-devel] [PATCH 3/5] target-s390: Simplify op_cs, op_soc, op_stm

2013-12-11 Thread Richard Henderson
Unifying 2 different code paths each. Signed-off-by: Richard Henderson --- target-s390x/translate.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 8f8567e..3e88c23 100644 --- a/target-s39

[Qemu-devel] [PULL 06/28] pci: fix address space size for bridge

2013-12-11 Thread Michael S. Tsirkin
Address space size for bridge should be full 64 bit, so we should use UINT64_MAX not INT64_MAX as it's size. Signed-off-by: Michael S. Tsirkin --- hw/pci/pci_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index 290abab..f728

Re: [Qemu-devel] [V2 PATCH 00/18] target-ppc: Base ISA V2.06 for Power7/Power8

2013-12-11 Thread Tom Musta
On 12/11/2013 1:40 PM, Peter Maydell wrote: > On 11 December 2013 19:16, Tom Musta wrote: >> Additionally, some bugs in the common floating point library (softfloat) >> are fixed. > >> fpu/softfloat.c | 73 +-- > > All patches which touch fpu/ need to come with a statement

[Qemu-devel] [PULL 26/28] acpi unit-test: adjust the test data structure for better handling

2013-12-11 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Ensure more then one instance of test_data may exist at a given time. It will help to compare different acpi table versions. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- tests/acpi-test.c | 55

Re: [Qemu-devel] [V2 PATCH 00/18] target-ppc: Base ISA V2.06 for Power7/Power8

2013-12-11 Thread Peter Maydell
On 11 December 2013 19:16, Tom Musta wrote: > Additionally, some bugs in the common floating point library (softfloat) > are fixed. > fpu/softfloat.c | 73 +-- All patches which touch fpu/ need to come with a statement (in the cover letter is fine) that the changes are lice

[Qemu-devel] [PULL 19/28] ACPI DSDT: Make control method `IQCR` serialized

2013-12-11 Thread Michael S. Tsirkin
Forward-port the following commit from seabios: commit 995bbeef78b338370f426bf8d0399038c3fa259c Author: Paul Menzel Date: Thu Oct 3 11:30:52 2013 +0200 The ASL Optimizing Compiler version 20130823-32 [Sep 11 2013] issues the following warning. $ make […]

Re: [Qemu-devel] [PATCH v3 4/4] tcg/optimize: add known-zero bits compute for load ops

2013-12-11 Thread Richard Henderson
On 12/11/2013 06:13 AM, Aurelien Jarno wrote: > Cc: Richard Henderson > Cc: Paolo Bonzini > Signed-off-by: Aurelien Jarno > --- > tcg/optimize.c | 33 + > 1 file changed, 33 insertions(+) Reviewed-by: Richard Henderson r~

[Qemu-devel] [PATCH 0/5] target-s390: Use the new qemu_ld/st opcodes

2013-12-11 Thread Richard Henderson
The first patch is purely mechanical. The subsequent patches tidy things up as allowed by the new interfaces. r~ Richard Henderson (5): target-s390: Convert to new qemu_ld/st opcodes target-s390: Simplify op_clc target-s390: Simplify op_cs, op_soc, op_stm target-s390: Simplify op_icm,

[Qemu-devel] [PATCH 4/5] target-s390: Simplify op_icm, op_stcm

2013-12-11 Thread Richard Henderson
Loads and stores can now be shared, along with the surrounding code. Signed-off-by: Richard Henderson --- target-s390x/translate.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 3e88c23..

[Qemu-devel] [V2 PATCH 03/18] target-ppc: Add ISA2.06 divdeu[o] Instructions

2013-12-11 Thread Tom Musta
This patch adds the Divide Doubleword Extended Unsigned instructions. This instruction requires dividing a 128-bit value by a 64 bit value. Since 128 bit integer division is not supported in TCG, a helper is used, providing a repeated difference algorithm. V2: Moved the 128-bit divide routine in

[Qemu-devel] [PATCH 5/5] target-s390: Use little-endian ops for LOAD/STORE REVERSED

2013-12-11 Thread Richard Henderson
We don't need separate bswap with the new qemu_ld/st opcodes. Signed-off-by: Richard Henderson --- target-s390x/insn-data.def | 12 +- target-s390x/translate.c | 58 ++ 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/target-s

[Qemu-devel] [V2 PATCH 07/18] target-ppc: Add ISA 2.06 stbcx. and sthcx. Instructions

2013-12-11 Thread Tom Musta
This patch adds the byte and halfword variants of the Store Conditional instructions. A common macro is introduced and the existing implementations of stwcx. and stdcx. are re-implemented using this macro. V2: Re-implemented gen_conditional_store() and STCX macro per comments from Richard. Sign

[Qemu-devel] [V2 PATCH 15/18] target-ppc: Add ISA 2.06 ftdiv Instruction

2013-12-11 Thread Tom Musta
This patch adds the Floating Point Test for Divide instruction which was introduced in Power ISA 2.06. Signed-off-by: Tom Musta --- target-ppc/fpu_helper.c | 56 ++ target-ppc/helper.h |2 + target-ppc/translate.c | 17 ++ 3 fi

[Qemu-devel] [V2 PATCH 18/18] target-ppc: Add ISA2.06 lfiwzx Instruction

2013-12-11 Thread Tom Musta
This patch adds the Load Floating Point as Integer Word and Zero Indexed (lfiwzx) instruction which was introduced in Power ISA 2.06. Signed-off-by: Tom Musta --- target-ppc/translate.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c

[Qemu-devel] [V2 PATCH 11/18] softfloat: Fix float64_to_uint32

2013-12-11 Thread Tom Musta
The float64_to_uint32 has several flaws: - for numbers between 2**32 and 2**64, the inexact exception flag may get incorrectly set. In this case, only the invalid flag should be set. test pattern: 425F81378DC0CD1F / 0x1.f81378dc0cd1fp+38 - for numbers between 2**63 and 2**64, inc

  1   2   3   4   >