Re: [Qemu-devel] Emulating Ethernet controller based on Cortex-A15 platforms

2014-01-24 Thread Peter Crosthwaite
On Sat, Jan 25, 2014 at 5:18 PM, rajan pathak wrote: > Thanks Andreas and Peter Crosthwate for your response .Your comments are > really helpful. > > What I understood of your answers that firstly, I need to have keystone > soc's initialized/emulated inside hw/arm, Yes. right(it would be equival

Re: [Qemu-devel] Emulating Ethernet controller based on Cortex-A15 platforms

2014-01-24 Thread rajan pathak
Thanks Andreas and Peter Crosthwate for your response .Your comments are really helpful. What I understood of your answers that firstly, I need to have keystone soc's initialized/emulated inside hw/arm,right(it would be equivalent of adding machine model) ? To what extent ,we should emulate the S

[Qemu-devel] [Bug 1263747] Re: Arm64 fails to run a binary which runs OK on real hardware

2014-01-24 Thread sumanth
>> runs OK on real aarch64 hardware. May I know which hardware you are talking about. Is there an aarch64 hardware target available ? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1263747 Title: A

Re: [Qemu-devel] Keysymbol interpretation missing in QEMU's VNC server?

2014-01-24 Thread Gonglei (Arei)
Hi, Would you give me some advice. Thanks! I thank we can only need reserve four Qemu console, Ctrl +1 for graphic show, Ctrl+2 for monitor console, Ctrl + 3 for serial, Ctrl+4 for parallel. And then will not conflict with "de" keymay. Best regards, -Gonglei > -Original Message- > From

Re: [Qemu-devel] AmigaOS 4.x on QEMU

2014-01-24 Thread François Revol
On 25/01/2014 01:20, BALATON Zoltan wrote: > On Sun, 12 Jan 2014, Alpha Mule wrote: >> Hi. AmigaOS 4.x runs natively on some niche PowerPC boards. I was >> wondering about the viability of running AmigaOS 4.x on QEMU. >> >> Specifically, I was wondering if there has been any development on >> that

Re: [Qemu-devel] AmigaOS 4.x on QEMU

2014-01-24 Thread BALATON Zoltan
On Sun, 12 Jan 2014, Alpha Mule wrote: Hi. AmigaOS 4.x runs natively on some niche PowerPC boards. I was wondering about the viability of running AmigaOS 4.x on QEMU. Specifically, I was wondering if there has been any development on that and/or what needs to be done to get it fully working. An

Re: [Qemu-devel] [PATCH 20/24] target-arm: Implement AArch64 MPIDR

2014-01-24 Thread Peter Crosthwaite
On Wed, Jan 22, 2014 at 6:12 AM, Peter Maydell wrote: > Implement the AArch64 MPIDR system register. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite > --- > target-arm/helper.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/target-arm/helper.c b

Re: [Qemu-devel] [PATCH 18/24] target-arm: Implement AArch64 VBAR_EL1

2014-01-24 Thread Peter Crosthwaite
On Wed, Jan 22, 2014 at 6:12 AM, Peter Maydell wrote: > Implement the A64 view of the VBAR system register. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite > --- > target-arm/cpu.h| 2 +- > target-arm/helper.c | 9 - > 2 files changed, 9 insertions(+), 2 deletions(

Re: [Qemu-devel] [PATCH] ACPI: Add IRQ resource to HPET._CRS on Mac OS X

2014-01-24 Thread Gabriel L. Somlo
On Fri, Jan 24, 2014 at 10:18:04PM +0100, Alexander Graf wrote: > > In the mean time I updated the bootloader I was using (chameleon) to > > the latest svn (2345), and was able to bring up Lion in addition to > > SnowLeopard. > > Did Chameleon patch this up itself in the dsdt maybe? >From a curso

Re: [Qemu-devel] [PATCH 19/24] target-arm: Implement AArch64 TTBR*

2014-01-24 Thread Peter Maydell
On 24 January 2014 23:44, Peter Crosthwaite wrote: > On Wed, Jan 22, 2014 at 6:12 AM, Peter Maydell > wrote: >> Implement the AArch64 TTBR* registers. For v7 these were already 64 bits >> to handle LPAE, but implemented as two separate uint32_t fields. >> Combine them into a single uint64_t whic

Re: [Qemu-devel] Emulating Ethernet controller based on Cortex-A15 platforms

2014-01-24 Thread Peter Crosthwaite
On Fri, Jan 24, 2014 at 7:52 AM, Andreas Färber wrote: > Am 23.01.2014 21:02, schrieb rajan pathak: >>> I'm not clear what you're trying to do here; could >>> you try rephrasing your question? Are you just trying >>> to use the existing working QEMU emulation of a >>> Cortex-A15 board and ethernet

Re: [Qemu-devel] Possible bug in monitor code

2014-01-24 Thread Luiz Capitulino
On Wed, 22 Jan 2014 17:53:52 +0200 Stratos Psomadakis wrote: > Hi, > > we've encountered a weird issue regarding monitor (qmp and hmp) behavior > with qemu-1.7 (and qemu-1.5). The following steps will reproduce the issue: > > 1) Client A connects to qmp socket with socat > 2) Client A g

Re: [Qemu-devel] [PATCH 19/24] target-arm: Implement AArch64 TTBR*

2014-01-24 Thread Peter Crosthwaite
On Wed, Jan 22, 2014 at 6:12 AM, Peter Maydell wrote: > Implement the AArch64 TTBR* registers. For v7 these were already 64 bits > to handle LPAE, but implemented as two separate uint32_t fields. > Combine them into a single uint64_t which can be used for all purposes. > Since this requires touchi

Re: [Qemu-devel] [PATCH 04/24] target-arm: Log bad system register accesses with LOG_UNIMP

2014-01-24 Thread Peter Crosthwaite
On Wed, Jan 22, 2014 at 6:12 AM, Peter Maydell wrote: > Log guest attempts to access unimplemented system registers via > the LOG_UNIMP reporting mechanism (for both the 32 bit and 64 bit > instruction sets). This is particularly useful for debugging > problems where the guest is trying to use a s

Re: [Qemu-devel] [PATCH 03/24] target-arm: Restrict check_ap() use of S and R bits to v6 and earlier

2014-01-24 Thread Peter Crosthwaite
On Wed, Jan 22, 2014 at 6:12 AM, Peter Maydell wrote: > The SCTLR bits S and R (8 and 9) only exist in ARMv6 and earlier. > In ARMv7 these bits RAZ, and in ARMv8 they are reassigned. Guard > the use of them in check_ap() so that we don't get incorrect results > for ARMv8 CPUs. > > Signed-off-by: P

Re: [Qemu-devel] [PATCH v2] cpu: implementing victim TLB for QEMUsystem emulated TLBB

2014-01-24 Thread BALATON Zoltan
On Fri, 24 Jan 2014, Alex Bennée wrote: trent.t...@gmail.com writes: Attaching data in excel which could not be sent with the patch at the same time. If you can attach the summary of the data as plain text that would be useful. Not all of us have access to a Windows box with Excell! Opens

[Qemu-devel] [PATCH] monitor: Add device_add type argument completion.

2014-01-24 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles --- monitor.c | 25 + 1 file changed, 25 insertions(+) diff --git a/monitor.c b/monitor.c index 845f608..cf91544 100644 --- a/monitor.c +++ b/monitor.c @@ -4254,6 +4254,26 @@ static const char *next_arg_type(const char *typestr) return

[Qemu-devel] [PATCH target-arm v2] display: avoid multi-statement macro

2014-01-24 Thread Paolo Bonzini
For blizzard, pl110 and tc6393xb this is harmless, but for pxa2xx Coverity noticed that it is used inside an "if" statement. Fix it because it's the file with the highest number of defects in the whole QEMU tree! Use "do...while(0)", or just remove the semicolon if there's a single statement in th

Re: [Qemu-devel] [PATCH] ACPI: Add IRQ resource to HPET._CRS on Mac OS X

2014-01-24 Thread Alexander Graf
> Am 24.01.2014 um 17:46 schrieb "Gabriel L. Somlo" : > >> On Tue, Jan 21, 2014 at 08:38:51PM +0200, Michael S. Tsirkin wrote: >>> On Tue, Jan 21, 2014 at 01:11:01PM -0500, Gabriel L. Somlo wrote: >>> Apple hardware invariably adds "IRQNoFlags() {0, 8}" to HPET._CRS, >>> and, at least on piix+sm

[Qemu-devel] [PULL 45/93] vmdk: Check for overhead when opening

2014-01-24 Thread Kevin Wolf
From: Fam Zheng Report an error if file size is even smaller than metadata. Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vmdk.c | 7 +++ tests/qemu-iotests/059 | 6 ++ tests/qemu-iotests/059.out | 5 + 3 files changed, 18 insertions(+) diff --git

[Qemu-devel] [PULL 54/93] block: Allow the user to define "node-name" option both on command line and QMP.

2014-01-24 Thread Kevin Wolf
From: Benoît Canet Signed-off-by: Benoit Canet Signed-off-by: Kevin Wolf --- block.c | 35 +++ qapi-schema.json | 2 ++ 2 files changed, 37 insertions(+) diff --git a/block.c b/block.c index 8562685..f043669 100644 --- a/block.c +++ b/block.c @@ -735,

[Qemu-devel] [PULL 32/93] blkdebug: Allow command-line file configuration

2014-01-24 Thread Kevin Wolf
From: Max Reitz Introduce the "image" option as an alternative to specifying the image through the filename. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/blkdebug.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/block/blkdebug.c b/block/blkdeb

[Qemu-devel] [PULL 64/93] block: Fix bdrv_commit return value

2014-01-24 Thread Kevin Wolf
bdrv_commit() could return 0 or 1 on success, depending on whether or not the last sector was allocated in the overlay and whether the overlay format had a .bdrv_make_empty callback. Most callers ignored it, but qemu-img commit would print an error message while the operation actually succeeded.

[Qemu-devel] [PULL 49/93] sheepdog: fix 'qemu-img map'

2014-01-24 Thread Kevin Wolf
From: Liu Yuan It was muted in the previous commit 4bc74be9. Let's revive it since nothing prevents us to do it. With this patch, following command will work as other formats: $ qemu-img map sheepdog:image Cc: qemu-devel@nongnu.org Cc: Kevin Wolf Cc: Stefan Hajnoczi Signed-off-by: Liu Yuan

[Qemu-devel] [PULL 56/93] qmp: Allow to change password on named block driver states.

2014-01-24 Thread Kevin Wolf
From: Benoît Canet Signed-off-by: Benoit Canet Reviewed-by: Fam Zheng There was two candidate ways to implement named node manipulation: 1) { 'command': 'block_passwd', 'data': {'*device': 'str', '*node-name': 'str', 'password': 'str'} } 2) { 'command':

[Qemu-devel] [PULL 58/93] qmp: Allow block_resize to manipulate bs graph nodes.

2014-01-24 Thread Kevin Wolf
From: Benoît Canet Signed-off-by: Benoit Canet Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- blockdev.c | 18 ++ hmp.c| 2 +- qapi-schema.json | 10 -- qmp-commands.hx | 3 ++- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/

[Qemu-devel] [PULL 75/93] block: Introduce bdrv_aligned_pwritev()

2014-01-24 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 Reviewed-by: Max Reitz Reviewed-by: Benoit Canet

[Qemu-devel] [PULL 53/93] block: Add bs->node_name to hold the name of a bs node of the bs graph.

2014-01-24 Thread Kevin Wolf
From: Benoît Canet Add the minimum of code to prepare for the following patches. Signed-off-by: Benoit Canet Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block.c | 57 +++ include/block/block.h | 1 + include/block/bl

[Qemu-devel] [PULL 57/93] block: Create authorizations mechanism for external snapshot and resize.

2014-01-24 Thread Kevin Wolf
From: Benoît Canet Signed-off-by: Benoit Canet Signed-off-by: Kevin Wolf --- block.c | 65 --- block/blkverify.c | 2 +- blockdev.c| 2 +- include/block/block.h | 20 +++ include/block/block

[Qemu-devel] [PULL 22/93] qemu-option: Add qemu_config_parse_qdict()

2014-01-24 Thread Kevin Wolf
From: 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 mult

[Qemu-devel] [PULL 50/93] drive mirror:fix memory leak

2014-01-24 Thread Kevin Wolf
From: Zhang Min In the function mirror_iteration() -> qemu_iovec_init(), it allocates memory for op->qiov.iov, when the write request calls back, but in the function mirror_iteration_done(), it only frees the op, not free the op->qiov.iov, so this causes memory leak. It should use qemu_iovec_des

[Qemu-devel] [PULL 35/93] qapi: Add "errno" to the list of polluted words

2014-01-24 Thread Kevin Wolf
From: Max Reitz Using "errno" directly as an identifier results in various syntax errors; therefore it should be added to the list of polluted words. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scri

[Qemu-devel] [PULL 68/93] qemu_memalign: Allow small alignments

2014-01-24 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 Reviewed-by: Wenchao Xia Reviewed-by: Max Reitz Reviewed-by: Benoît Canet --- util/oslib-posix.c | 5 + 1 file changed, 5 insertions(+) diff

[Qemu-devel] [PULL 65/93] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2014-01-24 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 Reviewed-by: Max Reitz Reviewed-by: Benoit Canet --- block.c

Re: [Qemu-devel] [PATCH 0/2] acpi: Fix PCI hole handling on SRAT table

2014-01-24 Thread Eduardo Habkost
On Thu, Jan 09, 2014 at 05:12:41PM -0200, Eduardo Habkost wrote: > The original SeaBIOS code used the RamSize variable, that was used by > SeaBIOS for the size of RAM below 4GB, not for all RAM. When copied to > QEMU, the code was changed to use the full RAM size, and this broke the > build_srat()

[Qemu-devel] [PULL 55/93] qmp: Add QMP query-named-block-nodes to list the named BlockDriverState nodes.

2014-01-24 Thread Kevin Wolf
From: Benoît Canet Signed-off-by: Benoit Canet Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block.c | 18 + block/qapi.c | 109 +- blockdev.c| 5 +++ include/block/block.h | 1 + include/bl

Re: [Qemu-devel] [PATCH 1/5] KVM: fix coexistence of KVM and Hyper-V leaves

2014-01-24 Thread Paolo Bonzini
Il 24/01/2014 20:08, Marcelo Tosatti ha scritto: > kvm_arch_init_vcpu's initialization of the KVM leaves at 0x4100 > is broken, because KVM_CPUID_FEATURES is left at 0x4001. Move > it to 0x4101 if Hyper-V is enabled. > > Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_para.h

[Qemu-devel] [PULL 60/93] block/curl: Implement the libcurl timer callback interface

2014-01-24 Thread Kevin Wolf
From: Peter Maydell libcurl versions 7.16.0 and later have a timer callback interface which must be implemented in order for libcurl to make forward progress (it will sometimes rely on being called back on the timeout if there are no file descriptors registered). Implement the callback, and use a

[Qemu-devel] [PULL 30/93] block: Allow recursive "file"s

2014-01-24 Thread Kevin Wolf
From: Max Reitz It should be possible to use a format as a driver for a file which in turn requires another file, i.e., nesting file formats. Allowing nested file formats results in e.g. qcow2 BlockDriverStates never being directly passed to bdrv_open_common() from bdrv_file_open(), but instead

[Qemu-devel] [PULL 01/93] rbd: switch from pipe to QEMUBH completion notification

2014-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi rbd callbacks are called from non-QEMU threads. Up until now a pipe was used to signal completion back to the QEMU iothread. The pipe writer code handles EAGAIN using select(2). The select(2) API is not scalable since fd_set size is static. FD_SET() can write beyond the

Re: [Qemu-devel] [PATCH 1/5] KVM: fix coexistence of KVM and Hyper-V leaves

2014-01-24 Thread Marcelo Tosatti
On Fri, Jan 24, 2014 at 05:17:52PM +0100, Paolo Bonzini wrote: > kvm_arch_init_vcpu's initialization of the KVM leaves at 0x4100 > is broken, because KVM_CPUID_FEATURES is left at 0x4001. Move > it to 0x4101 if Hyper-V is enabled. > > Signed-off-by: Paolo Bonzini arch/x86/include/as

[Qemu-devel] [PULL 24/93] blkdebug: Use command-line in read_config()

2014-01-24 Thread Kevin Wolf
From: Max Reitz Use qemu_config_parse_qdict() to parse the command-line options in addition to the config file. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/blkdebug.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[Qemu-devel] [PULL 37/93] qemu-io: Make filename optional

2014-01-24 Thread Kevin Wolf
From: Max Reitz Giving a filename is actually not essential, since it can be specified through the options as well - on the contrary: Sometimes a filename must not be given. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- qemu-io.c | 8 +--- 1 file changed,

[Qemu-devel] [PULL 17/93] qemu-io: add command completion

2014-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi Autocomplete qemu-io commands at the interactive prompt. Note this only completes command names and not their options. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- include/qemu-io.h | 3 +++ qemu-io-cmds.c| 15 +++ qemu-io.c | 8

[Qemu-devel] [PULL 43/93] dataplane: fix shadowed return value

2014-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi Propagate the error return value from get_indirect(). This bug was introduced in commit 4d684832 ("vring: create a common function to parse descriptors"). Reviewed-by: Markus Armbruster Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 19/93] blkdebug: Don't require sophisticated filename

2014-01-24 Thread Kevin Wolf
From: Max Reitz If the filename is not prefixed by "blkdebug:" in blkdebug_parse_filename(), the blkdebug driver was not selected through that protocol prefix, but by an explicit command line option (file.driver=blkdebug or something similar). Contrary to the current reaction, this is not a probl

[Qemu-devel] [PULL 91/93] qemu-io: New command 'sleep'

2014-01-24 Thread Kevin Wolf
There is no easy way to check that a request correctly waits for a different request. With a sleep command we can at least approximate it. Signed-off-by: Kevin Wolf --- qemu-io-cmds.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/qemu-io-cmds.c b

[Qemu-devel] [PULL 76/93] block: write: Handle COR dependency after I/O throttling

2014-01-24 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 Reviewed-by: Max Reitz Revie

[Qemu-devel] [PULL 33/93] blkverify: Allow command-line configuration

2014-01-24 Thread Kevin Wolf
From: Max Reitz Introduce the "test" and "raw" options for specifying images. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/blkverify.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index e15

[Qemu-devel] [PULL 29/93] block: Use bdrv_open_image() in bdrv_open()

2014-01-24 Thread Kevin Wolf
From: Max Reitz Using bdrv_open_image() instead of bdrv_file_open() directly in bdrv_open() is easier. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/block.c b/block.c index 76b6c25..9e4e85

[Qemu-devel] [PULL 74/93] block: Introduce bdrv_co_do_preadv()

2014-01-24 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 Reviewed-by: Max Reitz Reviewed-by: Benoit Canet --- block.c | 64 ++

[Qemu-devel] [PULL 73/93] block: Introduce bdrv_aligned_preadv()

2014-01-24 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 Reviewed-by: Wenchao Xia Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro

2014-01-24 Thread Peter Maydell
On 24 January 2014 17:53, Paolo Bonzini wrote: > Il 24/01/2014 18:52, Peter Maydell ha scritto: >> On 24 January 2014 17:47, Paolo Bonzini wrote: >>> --- a/hw/display/blizzard_template.h >>> +++ b/hw/display/blizzard_template.h >>> @@ -21,21 +21,21 @@ >>> #define SKIP_PIXEL(to) to += des

[Qemu-devel] [PULL 81/93] block: Generalise and optimise COR serialisation

2014-01-24 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] [PULL 34/93] blkverify: Don't require protocol filename

2014-01-24 Thread Kevin Wolf
From: Max Reitz If the filename is not prefixed by "blkverify:" in blkverify_parse_filename(), the blkverify driver was not selected through that protocol prefix, but by an explicit command line (or QMP) option (like driver=blkverify). If blkverify_parse_filename() has been called, a filename ha

Re: [Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro

2014-01-24 Thread Peter Maydell
On 24 January 2014 17:47, Paolo Bonzini wrote: > For blizzard, pl110 and tc6393xb this is harmless, but for pxa2xx > Coverity noticed that it is used inside an "if" statement. > Fix it because it's the file with the highest number of defects > in the whole QEMU tree! > > Signed-off-by: Paolo Bonzi

[Qemu-devel] [PULL 93/93] block: Switch bdrv_io_limits_intercept() to byte granularity

2014-01-24 Thread Kevin Wolf
Request sizes used to be rounded down to the next sector boundary, allowing to bypass the I/O limit. Now all requests are accounted for with their exact byte size. Reported-by: Wenchao Xia Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 13 + 1 file changed, 5 insert

[Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro

2014-01-24 Thread Paolo Bonzini
For blizzard, pl110 and tc6393xb this is harmless, but for pxa2xx Coverity noticed that it is used inside an "if" statement. Fix it because it's the file with the highest number of defects in the whole QEMU tree! Signed-off-by: Paolo Bonzini --- hw/display/blizzard_template.h | 10 +- hw

[Qemu-devel] [PULL 44/93] qcow2: fix wrong value of L1E_OFFSET_MASK, L2E_OFFSET_MASK and REFT_OFFSET_MASK

2014-01-24 Thread Kevin Wolf
From: Hu Tao Accoring to qcow spec, the offset fields in l1e, l2e and ref table entry start at bit 9. The offset is cluster offset, and the smallest possible cluster size is 512 bytes. Signed-off-by: Hu Tao Signed-off-by: Kevin Wolf --- block/qcow2.h | 6 +++--- 1 file changed, 3 insertions(+

[Qemu-devel] [PULL 84/93] block: Align requests in bdrv_co_do_pwritev()

2014-01-24 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] [PULL 88/93] block: Make bdrv_pwrite() a bdrv_prwv_co() wrapper

2014-01-24 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 Reviewed-by: Max Reitz --- block.c | 64 --- include/block/block.h | 1 - 2 files changed,

[Qemu-devel] [PULL 86/93] block: Change coroutine wrapper to byte granularity

2014-01-24 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/block.c b/block.c index e1b2c8d..fefa3f2 100644 --- a/block.c +++ b/block.c @@ -70,11 +70,11 @@ static int coroutine

[Qemu-devel] [PULL 82/93] block: Make overlap range for serialisation dynamic

2014-01-24 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 Rev

[Qemu-devel] [PULL 83/93] block: Allow wait_serialising_requests() at any point

2014-01-24 Thread Kevin Wolf
We can only have a single wait_serialising_requests() call per request because otherwise we can run into deadlocks where requests are waiting for each other. The same is true when wait_serialising_requests() is not at the very beginning of a request, so that other requests can be issued between the

[Qemu-devel] [PULL 80/93] block: Make zero-after-EOF work with larger alignment

2014-01-24 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 Reviewed-by: Max Reitz Reviewed-by: Benoit Canet --- block.c | 7 --- 1 file changed, 4 insertions(+), 3 del

[Qemu-devel] [PULL 77/93] block: Introduce bdrv_co_do_pwritev()

2014-01-24 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 Reviewed-by: Max Reitz Reviewed-by: Benoit Canet --- block.c | 24 ++-- 1

[Qemu-devel] [PULL 85/93] block: Assert serialisation assumptions in pwritev

2014-01-24 Thread Kevin Wolf
If a request calls wait_serialising_requests() and actually has to wait in this function (i.e. a coroutine yield), other requests can run and previously read data (like the head or tail buffer) could become outdated. In this case, we would have to restart from the beginning to read in the updated d

[Qemu-devel] [PULL 79/93] block: Allow waiting for overlapping requests between begin/end

2014-01-24 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

[Qemu-devel] [PULL 78/93] block: Switch BdrvTrackedRequest to byte granularity

2014-01-24 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Benoit Canet --- block.c | 52 +++ block/backup.c| 7 ++- include/block/block_int.h | 4 ++-- 3 files changed, 42 insertions(+), 21 deletions(-) diff --

[Qemu-devel] [PULL 71/93] block: rename buffer_alignment to guest_block_size

2014-01-24 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] [PULL 59/93] qmp: Allow to take external snapshots on bs graphs node.

2014-01-24 Thread Kevin Wolf
From: Benoît Canet Signed-off-by: Benoit Canet Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- blockdev.c | 55 --- hmp.c| 4 +++- qapi-schema.json | 13 ++--- qmp-commands.hx | 11 ++- 4 files change

[Qemu-devel] [PULL 69/93] block: Detect unaligned length in bdrv_qiov_is_aligned()

2014-01-24 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 Reviewed-by: Wenchao Xia Reviewed-by: Max Reitz --- block.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/

Re: [Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro

2014-01-24 Thread Paolo Bonzini
Il 24/01/2014 18:52, Peter Maydell ha scritto: On 24 January 2014 17:47, Paolo Bonzini wrote: For blizzard, pl110 and tc6393xb this is harmless, but for pxa2xx Coverity noticed that it is used inside an "if" statement. Fix it because it's the file with the highest number of defects in the whole

[Qemu-devel] [PULL 67/93] block: Update BlockLimits when they might have changed

2014-01-24 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 Reviewed-by: Wenchao Xia Reviewed-by: Max Reitz Reviewed-by: Benoît Canet --- block.c | 5 - block

[Qemu-devel] [PULL 62/93] block: resize backing image during active layer commit, if needed

2014-01-24 Thread Kevin Wolf
From: Jeff Cody If the top image to commit is the active layer, and also larger than the base image, then an I/O error will likely be returned during block-commit. For instance, if we have a base image with a virtual size 10G, and a active layer image of size 20G, then committing the snapshot vi

[Qemu-devel] [PULL 66/93] block: Inherit opt_transfer_length

2014-01-24 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 Reviewed-by: Wenchao X

[Qemu-devel] [PULL 92/93] qemu-iotests: Test pwritev RMW logic

2014-01-24 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c| 7 ++ block/blkdebug.c | 8 ++ include/block/block.h | 8 ++ tests/qemu-iotests/077 | 278 + tests/qemu-iotests/077.out | 202 +++

[Qemu-devel] [PULL 63/93] block: update block commit documentation regarding image truncation

2014-01-24 Thread Kevin Wolf
From: Jeff Cody This updates the documentation for commiting snapshot images. Specifically, this highlights what happens when the base image is either smaller or larger than the snapshot image being committed. In the case of the base image being smaller, it is resized to the larger size of the s

[Qemu-devel] [PULL 52/93] qapi: Add "backing" to BlockStats

2014-01-24 Thread Kevin Wolf
From: Fam Zheng Currently there is no way to query BlockStats of the backing chain. This adds "backing" field into BlockStats to make it possible. The comment of "parent" is reworded. Signed-off-by: Fam Zheng Reviewed-by: Benoit Canet Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- b

[Qemu-devel] [PULL 90/93] blkdebug: Make required alignment configurable

2014-01-24 Thread Kevin Wolf
The new 'align' option of blkdebug can be used in order to emulate backends with a required 4k alignment on hosts which only really require 512 byte alignment. Signed-off-by: Kevin Wolf --- block/blkdebug.c | 16 qapi-schema.json | 3 +++ 2 files changed, 19 insertions(+) diff

[Qemu-devel] [PULL 48/93] Documentation: qemu-img: Mention SIGUSR1 progress report

2014-01-24 Thread Kevin Wolf
Document the SIGUSR1 behaviour of qemu-img. Also, added compare to the list of subcommands that support -p. Signed-off-by: Kevin Wolf Reviewed-by: Benoit Canet --- qemu-img.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu-img.texi b/qemu-img.texi index 778e967..f

[Qemu-devel] [PULL 61/93] block: resize backing file image during offline commit, if necessary

2014-01-24 Thread Kevin Wolf
From: Jeff Cody Currently, if an image file is logically larger than its backing file, committing it via 'qemu-img commit' will fail. For instance, if we have a base image with a virtual size 10G, and a snapshot image of size 20G, then committing the snapshot offline with 'qemu-img commit' will

[Qemu-devel] [PULL 72/93] raw: Probe required direct I/O alignment

2014-01-24 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] [PULL 70/93] block: Don't use guest sector size for qemu_blockalign()

2014-01-24 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] [PULL 89/93] iscsi: Set bs->request_alignment

2014-01-24 Thread Kevin Wolf
From: Paolo Bonzini The iSCSI backend already gets the block size from the READ CAPACITY command it sends. Save it so that the generic block layer gets it too. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/iscsi.c | 1 + 1 file changed, 1 insertion(

[Qemu-devel] [PULL 47/93] qemu-progress: Fix progress printing on SIGUSR1

2014-01-24 Thread Kevin Wolf
Since commit a7aae221 ('Switch SIG_IPI to SIGUSR1'), SIGUSR1 is blocked during startup, breaking the progress report in tools. This patch reenables the signal when initialising a progress report. Signed-off-by: Kevin Wolf Reviewed-by: Benoit Canet --- util/qemu-progress.c | 10 ++ 1 fi

[Qemu-devel] [PULL 42/93] block: fix backing file segfault

2014-01-24 Thread Kevin Wolf
From: Peter Feiner When a backing file is opened such that (1) a protocol is directly used as the block driver and (2) the block driver has bdrv_file_open, bdrv_open_backing_file segfaults. The problem arises because bdrv_open_common returns without setting bd->backing_hd->file. To effect (1), y

[Qemu-devel] [PULL 46/93] qemu-progress: Drop unused include

2014-01-24 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Benoit Canet --- util/qemu-progress.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/qemu-progress.c b/util/qemu-progress.c index 9a3f96c..ad33fee 100644 --- a/util/qemu-progress.c +++ b/util/qemu-progress.c @@ -24,7 +24,6 @@ #include "qemu-comm

[Qemu-devel] [PULL 87/93] block: Make bdrv_pread() a bdrv_prwv_co() wrapper

2014-01-24 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 Reviewed-by: Max Reitz --- block.c | 49 + 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/

[Qemu-devel] [PULL 39/93] tests: Add test for qdict_flatten()

2014-01-24 Thread Kevin Wolf
From: Max Reitz Add a test case for qdict_flatten() in tests/check-qdict.c. This test case covers the flattening of subordinate QLists as well. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/check-qdict.c | 76

[Qemu-devel] [PULL 36/93] qapi: QMP interface for blkdebug and blkverify

2014-01-24 Thread Kevin Wolf
From: Max Reitz Add structures to support blkdebug and blkverify in blockdev-add. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- qapi-schema.json | 113 +-- 1 file changed, 109 insertions(+), 4 deletions(-) diff --git a/qapi-schema.

[Qemu-devel] [PULL 21/93] qapi: extend qdict_flatten() for QLists

2014-01-24 Thread Kevin Wolf
From: Max Reitz 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-line options, thereby all

[Qemu-devel] [PULL 20/93] qdict: Add qdict_array_split()

2014-01-24 Thread Kevin Wolf
From: Max Reitz This function splits a QDict consisting of entries prefixed by incrementally enumerated indices into a QList of QDicts. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c

[Qemu-devel] [PULL 51/93] vmdk: Fix format specific information (create type) for streamOptimized

2014-01-24 Thread Kevin Wolf
From: Fam Zheng Previously the field is wrong: $ ./qemu-img create -f vmdk -o subformat=streamOptimized /tmp/a.vmdk 1G $ ./qemu-img info /tmp/a.vmdk image: /tmp/a.vmdk file format: vmdk virtual size: 1.0G (1073741824 bytes) disk size: 12K Format specific information:

[Qemu-devel] [PULL 40/93] iotests: Test new blkdebug/blkverify interface

2014-01-24 Thread Kevin Wolf
From: Max Reitz Add a test for the new blkdebug/blkverify interface. This test is not written in Python, although it uses QMP. This is because it invokes the qemu-io HMP command, which outputs errors to stderr instead of returning them through QMP. Filtering and testing that output is easier in

[Qemu-devel] [PULL 28/93] block: Add bdrv_open_image()

2014-01-24 Thread Kevin Wolf
From: Max Reitz Add a common function for opening images to be used for block drivers specified through BlockdevRefs in an option QDict. The difference from bdrv_file_open() is that this function may invoke bdrv_open() instead, allowing auto-detection of the driver to be used; and second, it auto

[Qemu-devel] [PULL 41/93] iotests: Test file format nesting

2014-01-24 Thread Kevin Wolf
From: Max Reitz Add a test for nested image formats. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/072 | 69 ++ tests/qemu-iotests/072.out | 21 ++ tests/qemu-iotests/group | 1 + 3 files changed, 91 in

[Qemu-devel] [PULL 38/93] tests: Add test for qdict_array_split()

2014-01-24 Thread Kevin Wolf
From: Max Reitz Add a test case for qdict_array_split() in tests/check-qdict.c. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/check-qdict.c | 80 + 1 file changed, 80 insertions(+) diff --git a/tests/

[Qemu-devel] [PULL 18/93] blkdebug: Use errp for read_config()

2014-01-24 Thread Kevin Wolf
From: Max Reitz Use an Error variable in the read_config() function. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/blkdebug.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/blkdebug.c b/bloc

[Qemu-devel] [PULL 31/93] blockdev: Move "file" to legacy_opts

2014-01-24 Thread Kevin Wolf
From: Max Reitz Specifying the image filename through the "file" option is a legacy option and should not be supported by blockdev-add (in that case, giving a string for "file" references an existing block device). Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf ---

  1   2   >