Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-17 Thread Alexander Graf
> Am 18.01.2014 um 05:24 schrieb Christoffer Dall : > >> On Fri, Jan 17, 2014 at 06:52:57PM +, Peter Maydell wrote: >>> On 17 January 2014 17:53, Peter Maydell wrote: >>> Specifically, the KVM API says "here's a uint8_t[] byte >>> array and a length", and the current QEMU code treats that >

[Qemu-devel] [PATCH] linux-user: Implement BLKPG ioctl

2014-01-17 Thread Andreas Färber
Signed-off-by: Andreas Färber --- My first such patch, so take with care! linux-user/ioctls.h| 1 + linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 1 + linux-user/syscall_types.h | 13 + 4 files changed, 16 insertions(+) diff --git a/linux-user/ioctls.h b

[Qemu-devel] [PATCH] tap-linux: Get features once and use it many times

2014-01-17 Thread Kusanagi Kouichi
Signed-off-by: Kusanagi Kouichi --- net/tap-linux.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/net/tap-linux.c b/net/tap-linux.c index 36c09e2..812bf2d 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -52,14 +52,17 @@ int tap_open(char *ifname, int ifn

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-17 Thread Christoffer Dall
On Fri, Jan 17, 2014 at 06:52:57PM +, Peter Maydell wrote: > On 17 January 2014 17:53, Peter Maydell wrote: > > Specifically, the KVM API says "here's a uint8_t[] byte > > array and a length", and the current QEMU code treats that > > as "this is a byte array written as if the guest CPU > > (a

[Qemu-devel] [Bug 423910] Re: [needs-packaging] openbios-sparc has no installation candidate

2014-01-17 Thread Brian Murray
*** This is an automated message *** This bug is tagged needs-packaging which identifies it as a request for a new package in Ubuntu. As a part of the managing needs-packaging bug reports specification, https://wiki.ubuntu.com/QATeam/Specs/NeedsPackagingBugs, all needs- packaging bug reports have

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

2014-01-17 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:52 (+0100), Kevin Wolf a écrit : > 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,

Re: [Qemu-devel] [PATCH v3 13/29] block: Introduce bdrv_co_do_pwritev()

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 | 24 ++-- 1 file cha

Re: [Qemu-devel] [PATCH v3 10/29] block: Introduce bdrv_co_do_preadv()

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 | 64 +++

Re: [Qemu-devel] [PATCH v3 29/29] block: Switch bdrv_io_limits_intercept() to byte granularity

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 --- block.c | 13 + 1 fil

Re: [Qemu-devel] [PATCH v3 27/29] qemu-io: New command 'sleep'

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 i

Re: [Qemu-devel] [PATCH v3 26/29] blkdebug: Make required alignment configurable

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 1 file changed, 16 inse

Re: [Qemu-devel] [PATCH v3 24/29] block: Make bdrv_pwrite() a bdrv_prwv_co() wrapper

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 --- include/block/block.h | 1 -

Re: [Qemu-devel] [PATCH v3 21/29] block: Assert serialisation assumptions in pwritev

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 fr

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

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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 | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-

Re: [Qemu-devel] [PATCH v3 14/29] block: Switch BdrvTrackedRequest to byte granularity

2014-01-17 Thread Max Reitz
On 17.01.2014 15:15, Kevin Wolf wrote: 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(-) Reviewed-by:

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

2014-01-17 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:51 (+0100), Kevin Wolf a écrit : > 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

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

2014-01-17 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:53 (+0100), Kevin Wolf a écrit : > 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

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

2014-01-17 Thread Benoît Canet
Le Friday 17 Jan 2014 à 15:14:54 (+0100), Kevin Wolf a écrit : > 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 > --- > util/oslib-posix

Re: [Qemu-devel] [PATCHv6 5/6] qemu-iotests: fix expected output of test 067

2014-01-17 Thread Max Reitz
On 15.01.2014 09:01, Fam Zheng wrote: On Wed, 01/15 08:01, Peter Lieven wrote: On 15.01.2014 07:54, Fam Zheng wrote: On Mon, 01/13 11:21, Peter Lieven wrote: Signed-off-by: Peter Lieven --- tests/qemu-iotests/067.out |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --

[Qemu-devel] RFC: ACPI, HPET._CRS, MacOSX vs. WinXP

2014-01-17 Thread Gabriel L. Somlo
On Fri, Jan 10, 2014 at 05:13:11PM +0100, Igor Mammedov wrote: > > On Fri, Jan 10, 2014 at 01:37:14PM +0100, Paolo Bonzini wrote: > > > Il 09/01/2014 22:44, Gabriel L. Somlo ha scritto: > > > > 1. hardcode "IRQNoFlags(){2, 8}" and require -no-hpet to prevent XP > > > >from bluescreening. Basica

[Qemu-devel] [PATCH v3] target-ppc: gdbstub allow byte swapping for, reading/writing registers

2014-01-17 Thread Thomas Falcon
This patch allows registers to be properly read from and written to when using the gdbstub to debug a ppc guest running in little endian mode. It accomplishes this goal by byte swapping the values of any registers if the MSR:LE value is set. Signed-off-by: Thomas Falcon --- Differences from v2:

[Qemu-devel] [PULL 7/7] vfio: fix mapping of MSIX bar

2014-01-17 Thread Alex Williamson
From: Alexey Kardashevskiy VFIO virtualizes MSIX table for the guest but not mapping the part of a BAR which contains an MSIX table. Since vfio_mmap_bar() mmaps chunks before and after the MSIX table, they have to be aligned to the host page size which may be TARGET_PAGE_MASK (4K) or 64K in case

[Qemu-devel] [PULL 5/7] vfio-pci: Fail initfn on DMA mapping errors

2014-01-17 Thread Alex Williamson
The vfio-pci initfn will currently succeed even if DMA mappings fail. A typical reason for failure is if the user does not have sufficient privilege to lock all the memory for the guest. In this case, the device gets attached, but can only access a portion of guest memory and is extremely unlikely

[Qemu-devel] [PULL 4/7] vfio: Filter out bogus mappings

2014-01-17 Thread Alex Williamson
Since 57271d63 we now see spurious mappings with the upper bits set if 64bit PCI BARs are sized while enabled. The guest writes a mask of 0x to the lower BAR to size it, then restores it, then writes the same mask to the upper BAR resulting in a spurious BAR mapping into the last 4G of the

[Qemu-devel] [PULL 2/7] vfio: warn if host device rom can't be read

2014-01-17 Thread Alex Williamson
From: Bandan Das If the device rom can't be read, report an error to the user. This alerts the user that the device has a bad state that is causing rom read failure or option rom loading has been disabled from the device boot menu (among other reasons). Signed-off-by: Bandan Das Signed-off-by:

[Qemu-devel] [PULL 6/7] kvm: initialize qemu_host_page_size

2014-01-17 Thread Alex Williamson
From: Alexey Kardashevskiy There is a HOST_PAGE_ALIGN macro which makes sense for KVM accelerator but it uses qemu_host_page_size/qemu_host_page_mask which initialized for TCG only. This moves qemu_host_page_size/qemu_host_page_mask initialization from TCG's page_init() and adds a call for it fr

[Qemu-devel] [PULL 3/7] vfio: Do not reattempt a failed rom read

2014-01-17 Thread Alex Williamson
From: Bandan Das During lazy rom loading, if rom read fails, and the guest attempts a read again, vfio will again attempt it. Add a boolean to prevent this. There could be a case where a failed rom read might succeed the next time because of a device reset or such, but it's best to exclude unpred

[Qemu-devel] [PULL 1/7] vfio: Destroy memory regions

2014-01-17 Thread Alex Williamson
Somehow this has been lurking for a while; we remove our subregions from the base BAR and VGA region mappings, but we don't destroy them, creating a leak and more serious problems when we try to migrate after removing these devices. Add the trivial bit of final cleanup to remove these entirely. S

[Qemu-devel] [PULL 0/7] vfio pull request

2014-01-17 Thread Alex Williamson
Hi Anthony, The following changes since commit 1cf892ca2689c84960b4ce4d2723b6bee453711c: SPARC: Fix LEON3 power down instruction (2014-01-15 15:37:33 +1000) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20140117.0 for you to fetch ch

Re: [Qemu-devel] Question on pointers in the qemu user space emulation

2014-01-17 Thread Erik de Castro Lopo
Peter Maydell wrote: > On 17 January 2014 06:33, Erik de Castro Lopo wrote: > > I'm currently working on implementing a missing part of a linux-user > > syscall. This syscall includes a function pointer for a callback. > > Which syscall? Callbacks from the kernel are pretty tricky. > Basically y

[Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn())

2014-01-17 Thread Eduardo Habkost
On Wed, Jan 15, 2014 at 03:37:04PM +0100, Igor Mammedov wrote: > On Wed, 15 Jan 2014 20:24:01 +0800 > Chen Fan wrote: > > On Tue, 2014-01-14 at 11:40 +0100, Igor Mammedov wrote: > > > On Tue, 14 Jan 2014 17:27:20 +0800 > > > Chen Fan wrote: > > > > > > > the intend of this patch is to register c

[Qemu-devel] [PATCH 2/8] target-arm: A64: Add SIMD three-different ABDL instructions

2014-01-17 Thread Peter Maydell
Implement the absolute-difference instructions in the SIMD three-different group: SABAL, SABAL2, UABAL, UABAL2, SABDL, SABDL2, UABDL, UABDL2. Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) di

Re: [Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-17 Thread Peter Maydell
On 17 January 2014 17:53, Peter Maydell wrote: > Specifically, the KVM API says "here's a uint8_t[] byte > array and a length", and the current QEMU code treats that > as "this is a byte array written as if the guest CPU > (a) were in TARGET_WORDS_BIGENDIAN order and (b) wrote its > I/O access to

[Qemu-devel] [PATCH 7/8] target-arm: A64: Add simple SIMD 3-same floating point ops

2014-01-17 Thread Peter Maydell
Implement a simple subset of the SIMD 3-same floating point operations. This includes a common helper function used for both scalar and vector ops; FABD is the only currently implemented shared op. Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 191

[Qemu-devel] [PATCH 4/8] target-arm: A64: Add top level decode for SIMD 3-same group

2014-01-17 Thread Peter Maydell
Add top level decode for the A64 SIMD three regs same group (C3.6.16), splitting it into the pairwise, logical, float and integer subgroups. Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 45 - 1 file changed, 44 insertions(+), 1 deletio

[Qemu-devel] [PATCH 6/8] target-arm: A64: Add integer ops from SIMD 3-same group

2014-01-17 Thread Peter Maydell
Add some of the integer operations in the SIMD 3-same group: specifically, the comparisons, addition and subtraction. Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 141 - 1 file changed, 140 insertions(+), 1 deletion(-) diff --git a/ta

[Qemu-devel] [PATCH 5/8] target-arm: A64: Add logic ops from SIMD 3 same group

2014-01-17 Thread Peter Maydell
From: Alex Bennée Add support for the logical operations (ORR, AND, BIC, ORN, EOR, BSL, BIT and BIF) from the SIMD 3 register same group (C3.6.16). Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 68 +- 1 fil

[Qemu-devel] [PATCH 8/8] target-arm: A64: Add SIMD shift by immediate

2014-01-17 Thread Peter Maydell
From: Alex Bennée This implements a subset of the AdvSIMD shift operations (namely all the none saturating or narrowing ones). The actual shift generation code itself is common for both the scalar and vector cases but wrapped with either vector element iteration or the fp reg access. The roundin

[Qemu-devel] [PATCH 1/8] target-arm: A64: Add SIMD three-different multiply accumulate insns

2014-01-17 Thread Peter Maydell
Add support for the multiply-accumulate instructions from the SIMD three-different instructions group (C3.6.15): * skeleton decode of unallocated encodings and split of the group into its three sub-parts * framework for handling the 64x64->128 widening subpart * implementation of the multiply

[Qemu-devel] [PATCH 0/8] target-arm: A64 Neon instructions, set 2

2014-01-17 Thread Peter Maydell
This is the second set of patches for A64 Neon. The last patch set did a complete coverage of some of the smaller and simpler instruction groupings; this patch set attacks a few of the larger groupings (3-same; scalar 3-same; 3-different; shift-imm; scalar shift-imm) and doesn't attempt complete co

[Qemu-devel] [PATCH 3/8] target-arm: A64: Add SIMD scalar 3 same add, sub and compare ops

2014-01-17 Thread Peter Maydell
Implement the add, sub and compare ops from the SIMD "scalar three same" group. Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 131 - 1 file changed, 130 insertions(+), 1 deletion(-) diff --git a/target-arm/translate-a64.c b/target-arm/

[Qemu-devel] KVM and variable-endianness guest CPUs

2014-01-17 Thread Peter Maydell
[This seemed like a good jumping off point for this question.] On 16 January 2014 17:51, Alexander Graf wrote: > Am 16.01.2014 um 18:41 schrieb Peter Maydell : >> Also see my remarks on the previous patch series suggesting >> that we should look at this in a more holistic way than >> just randoml

Re: [Qemu-devel] [PATCH] block: do not allow read-only=on and snapshot=on to be used together

2014-01-17 Thread Kevin Wolf
Am 16.01.2014 um 20:20 hat Jeff Cody geschrieben: > On Thu, Jan 16, 2014 at 10:39:30AM +0100, Kevin Wolf wrote: > > Am 14.01.2014 um 20:12 hat Jeff Cody geschrieben: > > > Having both read-only=on and snapshot=on together does not make sense; > > > currently, the read-only argument is effectively i

Re: [Qemu-devel] linux-user: interrupting syscalls

2014-01-17 Thread Peter Maydell
This is resurrecting a two year old waffly proposal (full text here: http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg00384.html) because I realised my idea was broken. On 4 December 2011 16:29, Peter Maydell wrote: > When run natively, this program will block until you send it a > SIGUSR1

Re: [Qemu-devel] [PATCH 2/2] block: resize backing image during active layer commit, if needed

2014-01-17 Thread Jeff Cody
On Wed, Jan 15, 2014 at 01:58:29PM +0800, Fam Zheng wrote: > On Mon, 01/13 15:18, Jeff Cody wrote: > > 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

Re: [Qemu-devel] [PATCH 1/2] kvm: initialize qemu_host_page_size

2014-01-17 Thread Paolo Bonzini
Il 17/01/2014 16:34, Alex Williamson ha scritto: >> Acked-by: Paolo Bonzini > > How should this go in? With your ack I could include it in my vfio tree > with patch 2/2. Sound ok? Thanks, Yup, thanks! This is just a small enabler, the real meat is in patch 2 so it makes sense for you to pick

Re: [Qemu-devel] [PATCH 0/2] block: commits of snapshots larger than backing files

2014-01-17 Thread Jeff Cody
On Fri, Jan 17, 2014 at 03:17:10PM +0800, Stefan Hajnoczi wrote: > On Mon, Jan 13, 2014 at 03:18:44PM -0500, Jeff Cody wrote: > > If a snapshot is larger than a backing file, then the offline bdrv_commit > > and > > the live active layer commit will fail with an i/o error (usually). A live > > co

[Qemu-devel] [PULL 0/3] xen-170114

2014-01-17 Thread Stefano Stabellini
The following changes since commit 1cf892ca2689c84960b4ce4d2723b6bee453711c: SPARC: Fix LEON3 power down instruction (2014-01-15 15:37:33 +1000) are available in the git repository at: git://xenbits.xen.org/people/sstabellini/qemu-dm.git xen-170114 for you to fetch changes up to 794798e36ed

[Qemu-devel] [PULL 1/3] xenfb: map framebuffer read-only and handle unmap errors

2014-01-17 Thread Stefano Stabellini
The framebuffer is needlessly mapped (PROT_READ | PROT_WRITE), map it PROT_READ instead. The framebuffer is unmapped by replacing the framebuffer pages with anonymous shared memory, calling mmap. Check for return errors and print a warning. Signed-off-by: Stefano Stabellini --- hw/display/xenfb

[Qemu-devel] [Bug 1254786] Re: qemu-m68k-static: illegal instruction ebc0 during debootstrap second stage

2014-01-17 Thread Ken Sharp
"Debian currently runs on the 68020, 68030, 68040 and 68060 processors" http://www.debian.org/ports/m68k/ >From 2006: https://lists.debian.org/debian-devel-announce/2006/01/msg5.html So I really don't know. :-/ -- You received this bug notification because you are a member of qemu- devel-ml

[Qemu-devel] [PULL 3/3] xen_pt: Fix passthrough of device with ROM.

2014-01-17 Thread Stefano Stabellini
From: Anthony PERARD QEMU does not need and should not allocate memory for the ROM of a passthrough PCI device. So this patch initialize the particular region like any other PCI BAR of a passthrough device. When a guest will access the ROM, Xen will take care of the IO, QEMU will not be involved

[Qemu-devel] [PULL 2/3] xen_pt: Fix debug output.

2014-01-17 Thread Stefano Stabellini
From: Anthony PERARD Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini Reviewed-by: Konrad Rzeszutek Wilk --- hw/xen/xen_pt.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index d58cb61..eee4354 100644 --- a/hw/xen/x

Re: [Qemu-devel] [PATCH 1/2] kvm: initialize qemu_host_page_size

2014-01-17 Thread Alex Williamson
On Fri, 2014-01-17 at 13:55 +0100, Paolo Bonzini wrote: > Il 16/01/2014 07:21, Alexey Kardashevskiy ha scritto: > > There is a HOST_PAGE_ALIGN macro which makes sense for KVM accelerator > > but it uses qemu_host_page_size/qemu_host_page_mask which initialized > > for TCG only. > > > > This moves

Re: [Qemu-devel] Question on pointers in the qemu user space emulation

2014-01-17 Thread Peter Maydell
On 17 January 2014 06:33, Erik de Castro Lopo wrote: > I'm currently working on implementing a missing part of a linux-user > syscall. This syscall includes a function pointer for a callback. Which syscall? Callbacks from the kernel are pretty tricky. Basically you need to register a host functio

Re: [Qemu-devel] [PULL 10/42] qtest: Fix the bug about disable vnc causes "make check" fail

2014-01-17 Thread Andreas Färber
Am 15.01.2014 11:22, schrieb Kevin Wolf: > From: Kewei Yu > > When we disable vnc from "./configure", QEMU can't use the vnc option. > So qtest can't use the "vnc -none ", otherwise "make check" fails. > If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to > drop it. > >

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

2014-01-17 Thread Andreas Färber
Am 16.01.2014 11:03, schrieb Kevin Wolf: > Am 15.01.2014 um 16:19 hat Eric Blake geschrieben: >> On 01/15/2014 03:22 AM, Kevin Wolf wrote: >>> From: Max Reitz >>> >>> Add structures to support blkdebug and blkverify in blockdev-add. >>> >>> Signed-off-by: Max Reitz >>> Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH v3 23/29] block: Make bdrv_pread() a bdrv_prwv_co() wrapper

2014-01-17 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] [PATCH v3 17/29] block: Generalise and optimise COR serialisation

2014-01-17 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 v3 14/29] block: Switch BdrvTrackedRequest to byte granularity

2014-01-17 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 328f592..85f28ab 1006

[Qemu-devel] [PATCH v3 25/29] iscsi: Set bs->request_alignment

2014-01-17 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] [PATCH v3 28/29] qemu-iotests: Test pwritev RMW logic

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

[Qemu-devel] [PATCH v3 19/29] block: Allow wait_serialising_requests() at any point

2014-01-17 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] [PATCH v3 27/29] qemu-io: New command 'sleep'

2014-01-17 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] [PATCH v3 26/29] blkdebug: Make required alignment configurable

2014-01-17 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 1 file changed, 16 insertions(+) diff --git a/block/blkdebug.c b/

[Qemu-devel] [Bug 423910] Re: openbios-sparc has no installation candidate

2014-01-17 Thread Ken Sharp
(Actually PPC is available in Saucy but that's by-the-by anyway) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/423910 Title: openbios-sparc has no installation candidate Status in QEMU: Invalid

[Qemu-devel] [Bug 423910] Re: openbios-sparc has no installation candidate

2014-01-17 Thread Ken Sharp
Both are available in Debian. http://packages.debian.org/search?keywords=openbios I imagine there's a status page for Ubuntu somewhere showing packaging problems but I wouldn't know where to look for that. ** Tags removed: no-installation-candidate openbios-sparc package-manager qemu ** Tags adde

[Qemu-devel] [PATCH v3 29/29] block: Switch bdrv_io_limits_intercept() to byte granularity

2014-01-17 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 --- block.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-)

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

2014-01-17 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 --- include/block/block.h | 1 - 2 files changed, 9 insertions(+), 56 dele

Re: [Qemu-devel] Question on pointers in the qemu user space emulation

2014-01-17 Thread Christopher Covington
Hi Erik, On 01/17/2014 01:33 AM, Erik de Castro Lopo wrote: > Hi all, > > I'm currently working on implementing a missing part of a linux-user > syscall. This syscall includes a function pointer for a callback. > > If one has a 64 bit user space emulation running on a 32 bit host, > how does one

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

2014-01-17 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] [PATCH v3 22/29] block: Change coroutine wrapper to byte granularity

2014-01-17 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 53d9bd5..2a7d1b3 100644 --- a/block.c +++ b/block.c @@ -69,11 +69,11 @@ static int coroutine

[Qemu-devel] [PATCH v3 21/29] block: Assert serialisation assumptions in pwritev

2014-01-17 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] [PATCH v3 20/29] block: Align requests in bdrv_co_do_pwritev()

2014-01-17 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 v3 15/29] block: Allow waiting for overlapping requests between begin/end

2014-01-17 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] [PATCH v3 13/29] block: Introduce bdrv_co_do_pwritev()

2014-01-17 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 | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) dif

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

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

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

2014-01-17 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 --- block.c | 62 +++

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

2014-01-17 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] [PATCH v3 16/29] block: Make zero-after-EOF work with larger alignment

2014-01-17 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 | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 18d

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

2014-01-17 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 v3 08/29] raw: Probe required direct I/O alignment

2014-01-17 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 v3 01/29] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2014-01-17 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 --- block.c | 19 ++

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

2014-01-17 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 | 64 +

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

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

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

2014-01-17 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 v3 04/29] qemu_memalign: Allow small alignments

2014-01-17 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 --- util/oslib-posix.c | 5 + 1 file changed, 5 insertions(+) diff --git a/util/oslib-posix.c

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

2014-01-17 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 --- block.c | 5 - block/stream.c| 2 ++ in

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

2014-01-17 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 v3 05/29] block: Detect unaligned length in bdrv_qiov_is_aligned()

2014-01-17 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/

[Qemu-devel] [PATCH] target-ppc: ppc64 target's virtio can be either endian. (v3)

2014-01-17 Thread Greg Kurz
We base it on the OS endian, as reflected by the endianness of the interrupt vectors (handled through the ILE bit in the LPCR register). This patch implements virtio_get_byteswap() over LPCR. Using first_cpu to fetch the registers from KVM may look arbitrary and awkward, but it is okay because KV

Re: [Qemu-devel] [PATCH 1/2] kvm: initialize qemu_host_page_size

2014-01-17 Thread Paolo Bonzini
Il 16/01/2014 07:21, Alexey Kardashevskiy ha scritto: > There is a HOST_PAGE_ALIGN macro which makes sense for KVM accelerator > but it uses qemu_host_page_size/qemu_host_page_mask which initialized > for TCG only. > > This moves qemu_host_page_size/qemu_host_page_mask initialization from > TCG's

Re: [Qemu-devel] device_add error handling regressed in v1.5.0

2014-01-17 Thread Paolo Bonzini
Il 17/01/2014 11:23, Markus Armbruster ha scritto: > e0a83fc2c1582dc8d4453849852ebe6c258b7c3a is the first bad commit > commit e0a83fc2c1582dc8d4453849852ebe6c258b7c3a > Author: Paolo Bonzini > Date: Tue Apr 2 15:50:00 2013 +0200 > > qom: do nothing on unparent of object without parent >

[Qemu-devel] device_add error handling regressed in v1.5.0

2014-01-17 Thread Markus Armbruster
Watch this: $ upstream-qemu -nodefaults -S -display none -monitor stdio QEMU 1.7.50 monitor - type 'help' for more information (qemu) device_add e1000,netdev=xxx Property 'e1000.netdev' can't find value 'xxx' (qemu) info qtree bus: main-system-bus type System de

Re: [Qemu-devel] [PATCH 2/9] qapi: Add optional field "name" to block dirty bitmap

2014-01-17 Thread Stefan Hajnoczi
On Mon, Jan 13, 2014 at 06:39:41PM +0800, Fam Zheng wrote: > diff --git a/block.c b/block.c > index 6ad0368..16ef61b 100644 > --- a/block.c > +++ b/block.c > @@ -52,6 +52,7 @@ > struct BdrvDirtyBitmap { > HBitmap *bitmap; > int refcnt; > +char name[1024]; Is there a reason for a fix

Re: [Qemu-devel] [PATCH 1/6] qemu-fd-exchange: provide common methods for exchange fd

2014-01-17 Thread Daniel P. Berrange
On Wed, Jan 08, 2014 at 05:12:51PM +0800, Lei Li wrote: > Signed-off-by: Lei Li > --- > include/qemu/fd-exchange.h | 25 +++ > util/Makefile.objs |1 + > util/qemu-fd-exchange.c| 97 > > 3 files changed, 123 insertions(+),

Re: [Qemu-devel] [PATCH 0/9] QMP: Introduce incremental drive-backup with in-memory dirty bitmap

2014-01-17 Thread Stefan Hajnoczi
On Mon, Jan 13, 2014 at 06:39:39PM +0800, Fam Zheng wrote: > This implements incremental backup. > > A few new QMP commands related to dirty bitmap are added: > > dirty-bitmap-add * > dirty-bitmap-disable * > dirty-bitmap-remove > > (*: also supported as transactions) > > As the

Re: [Qemu-devel] [RFC PATCH v4 0/4] qemu-img: add preallocation=full

2014-01-17 Thread Stefan Hajnoczi
On Fri, Dec 27, 2013 at 11:05:50AM +0800, Hu Tao wrote: > This series implements full image preallocation to create a non-sparse image > file at creation time, both for raw and qcow2 format. The purpose is to avoid > performance deterioration of the guest cause by sparse image. > > v4: - remove b

Re: [Qemu-devel] [PATCH 00/13 v7] Make 'dump-guest-memory' dump in kdump-compressed format

2014-01-17 Thread Qiao Nuohan
On 01/17/2014 04:50 PM, Christian Borntraeger wrote: What is the reason for that? Looking over the patch set, there seem to be no architecture folder involved and others like s390x also have the dump-guest-memory support. [...] I found dump-guest-memory have support s390/ppc. I do not restrict

Re: [Qemu-devel] [RFC PATCH v4 3/4] raw-posix: Add full image preallocation option

2014-01-17 Thread Stefan Hajnoczi
On Fri, Dec 27, 2013 at 11:05:53AM +0800, Hu Tao wrote: > diff --git a/block/raw-posix.c b/block/raw-posix.c > index 6f6b8c1..a722d27 100644 > --- a/block/raw-posix.c > +++ b/block/raw-posix.c > @@ -1160,17 +1160,52 @@ static int64_t > raw_get_allocated_file_size(BlockDriverState *bs) > retur

Re: [Qemu-devel] [PATCH 00/13 v7] Make 'dump-guest-memory' dump in kdump-compressed format

2014-01-17 Thread Christian Borntraeger
On 17/01/14 08:46, qiaonuohan wrote: > Hi, all > > The last version is here: > http://lists.nongnu.org/archive/html/qemu-devel/2014-01/msg00209.html > > Command 'dump-guest-memory' was introduced to dump guest's memory. But the > vmcore's format is only elf32 or elf64. The message is here: > http

  1   2   >