Re: [Qemu-devel] [PATCH 1/2] hw/exynos4210_gic.c: Introduce n_in and n_out propeties.

2012-04-12 Thread Peter Maydell
On 12 April 2012 04:23, Evgeny Voevodin wrote: > On 11.04.2012 19:17, Peter Maydell wrote: >> >> The right way to check for validity of properties in the init >> function is to use hw_error() with a reasonably friendly message. >> > > Ok! What's about irq handlers? Is assert() possible? Yes, asse

Re: [Qemu-devel] Build broken -- linux-user: take RESERVED_VA into account for g2h_valid()

2012-04-12 Thread Peter Maydell
On 12 April 2012 05:50, Stefan Weil wrote: > Please use 'uintptr_t' instead of 'unsigned long'. > > It does not matter in this special case, but guest_base and > reserved_va will be changed by my patches for w64 to use > uintptr_t. The data types 'long' and 'unsigned long' are > should be avoided.

Re: [Qemu-devel] [PATCH 1/3] virtio_balloon: Remove unnecessarily persistent state

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 12, 2012 at 03:36:33PM +1000, David Gibson wrote: > The main virtio_balloon state structure contains the fields num_pfns and > array 'pfns'. Although they are stored here persistently, the lifetime of > useful data in there is never more than one function - they're essentially > used a

[Qemu-devel] [PATCH v2 0/2] Exynos4210 IRQ Gate improvement

2012-04-12 Thread Evgeny Voevodin
First patch makes access to gate_irq[] using size of input group. Second patch introduces n_in and n_out Irq Gate propeties and applies them to exynos4210 boards. With these properties one can configure gate to group n_in inputs and pass them to n_out outputs. Gate will make input groups of n_in/n

[Qemu-devel] [PATCH v2 1/2] hw/exynos4210.c: Access gate_irq by using group size.

2012-04-12 Thread Evgeny Voevodin
New EXYNOS4210_IRQ_GATE_GROUP_SIZE introduced and EXYNOS4210_IRQ_GATE_NINPUTS changed from 8 to 4, because having 8 inputs makes an input group of size 4 and access to second's group first input leads to pass it into third instead of second output of gate. Signed-off-by: Evgeny Voevodin --- hw/e

[Qemu-devel] [PATCH v2 2/2] hw/exynos4210_gic.c: Introduce n_in and n_out propeties.

2012-04-12 Thread Evgeny Voevodin
With these properties irq gate could be tuned to mux up to QDEV_MAX_IRQ inputs and ouputs. Gate will group inputs into groups of size n_in/n_out each. Signed-off-by: Evgeny Voevodin --- hw/exynos4210.c |2 + hw/exynos4210_gic.c | 69 +++--- 2

Re: [Qemu-devel] [PATCH 0/7] Miscellaneous fixes for block and snapshots

2012-04-12 Thread Paolo Bonzini
Il 05/04/2012 17:42, Paolo Bonzini ha scritto: > These patches fix a few miscellaneous bugs in live snapshots and block > streaming. > > Paolo Bonzini (7): > block: add mode argument to blockdev-snapshot-sync > block: fail live snapshot if disk has no medium > block: fix snapshot with QED fo

Re: [Qemu-devel] [PATCH 1/3] virtio_balloon: Remove unnecessarily persistent state

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 12, 2012 at 03:36:33PM +1000, David Gibson wrote: > The main virtio_balloon state structure contains the fields num_pfns and > array 'pfns'. Although they are stored here persistently, the lifetime of > useful data in there is never more than one function - they're essentially > used a

Re: [Qemu-devel] [PATCH 2/3] virtio_balloon: Fix endian bug

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 12, 2012 at 03:36:34PM +1000, David Gibson wrote: > Although virtio config space fields are usually in guest-native endian, > the spec for the virtio balloon device explicitly states that both fields > in its config space are little-endian. > > However, the current virtio_balloon drive

Re: [Qemu-devel] [PATCH 7/7 v5] VMXNET3 paravirtualized device implementation Interface type "vmxnet3" added.

2012-04-12 Thread Stefan Hajnoczi
On Wed, Apr 11, 2012 at 9:45 PM, Paolo Bonzini wrote: > Il 11/04/2012 21:10, Anthony Liguori ha scritto: >> On 04/11/2012 02:08 PM, Paolo Bonzini wrote: >>> Il 11/04/2012 19:25, Anthony Liguori ha scritto: > > Off the top of my head: issues with v5: > polluting global namespace, must s

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Kevin Wolf
Am 11.04.2012 19:29, schrieb Jeff Cody: > When block streaming an image, if a base name is passed in that > is a relative name, but not accessible from the top-level snapshot, > then the relative name is stored incorrectly in the image file. > > For instance, given a snapshot case of: > > /tmp/a/

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Always set LC_ALL=C for makeinfo

2012-04-12 Thread Stefan Hajnoczi
On Wed, Apr 11, 2012 at 09:30:13PM +0200, Stefan Weil wrote: > Am 27.03.2012 19:15, schrieb Stefan Weil: > >Otherwise the generated file qemu-doc.html will contain "Anhang" > >instead of "Appendix" with a German locale (de_DE.UTF-8). > > > >Signed-off-by: Stefan Weil > >--- > > Makefile |2 +-

Re: [Qemu-devel] Intermittent e1000 failure on qemu-kvm 1.0

2012-04-12 Thread Chris Webb
Stefan Hajnoczi writes: > On Tue, Apr 3, 2012 at 5:37 PM, Chris Webb wrote: > > Stefan Hajnoczi writes: > > > > > >> >> Are you sure no other guest has the same MAC address or IP address? > >> >> This weird behavior sounds similar to what happens when you have > >> >> multiple devices on a netw

Re: [Qemu-devel] [PATCH] target-microblaze: added PetaLogix copyright

2012-04-12 Thread Edgar E. Iglesias
On Thu, Apr 12, 2012 at 02:30:30PM +1000, Peter A. G. Crosthwaite wrote: > Microblaze cpu development has been driven and funded by PetaLogix. Added (c) > PetaLogix line accordingly. I've applied this, thanks. > > Signed-off-by: Peter A. G. Crosthwaite > --- > target-microblaze/helper.c|

Re: [Qemu-devel] [PATCH v2 2/3] target-microblaze: QOM'ify CPU reset

2012-04-12 Thread Edgar E. Iglesias
On Thu, Apr 12, 2012 at 03:25:30AM +0200, Andreas Färber wrote: > Hello John, > > Am 12.04.2012 03:14, schrieb John Williams: > > 2012/4/12 Andreas Färber : > >> Move code from cpu_state_reset() to QOM mb_cpu_reset(). > >> > >> Signed-off-by: Andreas Färber > >> --- > >> target-microblaze/cpu.c

Re: [Qemu-devel] [PATCH] avoid repeating contain header file

2012-04-12 Thread Stefan Hajnoczi
On Wed, Apr 11, 2012 at 09:02:21AM +0800, Wanpeng Li wrote: > Signed-off-by: Wanpeng Li > --- > hw/ps2.h | 29 + > 1 files changed, 29 insertions(+), 0 deletions(-) In this case I think adding the license header is okay, it matches the hw/ps2.c file. But it's best

Re: [Qemu-devel] Fiber switching and stack protection

2012-04-12 Thread Kevin Wolf
Am 06.04.2012 12:38, schrieb Pavel Dovgaluk: > Hello. > > > > Recently I tried to build qemu-1.0 with MinGW and start it with qcow > file created with previous version of qemu. > > But after starting guest Windows loading process qemu had closed because > of an exception. > > > > I figured

Re: [Qemu-devel] [PATCH 3/3] virtio_balloon: Bugfixes for PAGE_SIZE != 4k

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 12, 2012 at 03:36:35PM +1000, David Gibson wrote: > The virtio_balloon device is specced to always operate on 4k pages. The > virtio_balloon driver has a feeble attempt at reconciling this with a > lerge kernel page size, but it is (a) exactly wrong (it shifts the pfn in > the wrong di

[Qemu-devel] [PATCH v2 0/2] MSI/MSIX injection for Xen HVM guests

2012-04-12 Thread Stefano Stabellini
Hi all, this patch series by Wei Liu implements a simple Xen APIC module and use it to deliver MSI/MSIX for Xen HVM guests. The second version of this series includes the "or later" copyright clause for xen_apic.c and a fix to the return value of xen_apic_mem_read (thanks Peter for finding it out)

[Qemu-devel] [PATCH v2 1/2] Xen: basic HVM MSI injection support.

2012-04-12 Thread Stefano Stabellini
From: "Wei Liu" Signed-off-by: Wei Liu Signed-off-by: Stefano Stabellini --- hw/xen.h |1 + xen-all.c |5 + xen-stub.c |4 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/xen.h b/hw/xen.h index b46879c..e5926b7 100644 --- a/hw/xen.h +++ b/hw/xen.h @@

[Qemu-devel] [PATCH v2 2/2] Xen: Add xen-apic support and hook it up.

2012-04-12 Thread Stefano Stabellini
From: "Wei Liu" Signed-off-by: Wei Liu Signed-off-by: Stefano Stabellini Acked-by: Paolo Bonzini CC: Jan Kiszka CC: Peter Maydell --- Makefile.target |2 +- hw/pc.c |8 + hw/xen_apic.c | 90 +++ 3 files changed, 99

Re: [Qemu-devel] Build broken -- linux-user: take RESERVED_VA into account for g2h_valid()

2012-04-12 Thread Peter Maydell
On 12 April 2012 08:41, Peter Maydell wrote: > On 12 April 2012 05:50, Stefan Weil wrote: >> Please use 'uintptr_t' instead of 'unsigned long'. >> >> It does not matter in this special case, but guest_base and >> reserved_va will be changed by my patches for w64 to use >> uintptr_t. The data type

Re: [Qemu-devel] Fiber switching and stack protection

2012-04-12 Thread Paolo Bonzini
Il 12/04/2012 12:13, Kevin Wolf ha scritto: > I guess it's this non-thread-local TLS once again, basically a compiler bug. > > Paolo, wasn't there a compiler option that works around the problem? > > Kevin I asked to test it (-D_MT) but never got any answer. Paolo

[Qemu-devel] [PATCH] bsd-user: fix compile failure

2012-04-12 Thread Peter Maydell
bsd-user doesn't actually support reserving a memory area for the guest address space, but we need to at least define the reserved_va global so that cpu-all.h's RESERVED_VA macro will work correctly. This fixes a compilation error introduced in commit which added a use of RESERVED_VA to h2g_valid(

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > index 5e8b261..0e7af51 100644 > --- a/hw/acpi_piix4.c > +++ b/hw/acpi_piix4.c > @@ -48,7 +48,7 @@ > #define PIIX4_PCI_HOTPLUG_STATUS 2 > > struct pci_status { > -uint32_t up;

Re: [Qemu-devel] [PATCH 1/7] block: add mode argument to blockdev-snapshot-sync

2012-04-12 Thread Kevin Wolf
Am 05.04.2012 17:42, schrieb Paolo Bonzini: > This was missing in the patch that added the argument. > > Signed-off-by: Paolo Bonzini > --- > qmp-commands.hx |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qmp-commands.hx b/qmp-commands.hx > index 9447871..a5accc9 10

Re: [Qemu-devel] Intermittent e1000 failure on qemu-kvm 1.0

2012-04-12 Thread Stefan Hajnoczi
On Thu, Apr 12, 2012 at 10:37 AM, Chris Webb wrote: > Stefan Hajnoczi writes: > >> On Tue, Apr 3, 2012 at 5:37 PM, Chris Webb wrote: >> > Stefan Hajnoczi writes: >> > >> > >> >> >> Are you sure no other guest has the same MAC address or IP address? >> >> >> This weird behavior sounds similar to

Re: [Qemu-devel] [PATCH 3/7] block: fix snapshot with QED format

2012-04-12 Thread Kevin Wolf
Am 05.04.2012 17:42, schrieb Paolo Bonzini: > QED's opaque data includes a pointer back to the BlockDriverState. > Creating a snapshot whose format is QED breaks the relationship when > bdrv_append shuffles data between bs_new and bs_top. To avoid this, > add a "rebind" function that tells the dri

Re: [Qemu-devel] [PATCH 0/7] Miscellaneous fixes for block and snapshots

2012-04-12 Thread Kevin Wolf
Am 12.04.2012 10:16, schrieb Paolo Bonzini: > Il 05/04/2012 17:42, Paolo Bonzini ha scritto: >> These patches fix a few miscellaneous bugs in live snapshots and block >> streaming. >> >> Paolo Bonzini (7): >> block: add mode argument to blockdev-snapshot-sync >> block: fail live snapshot if dis

[Qemu-devel] [PATCH] hw/arm_mptimer: Reset the qemu_timer at reset

2012-04-12 Thread Peter Maydell
On reset of the mpcore timer/watchdog block we need to delete the qemu_timer in case it was running. Signed-off-by: Peter Maydell --- hw/arm_mptimer.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/arm_mptimer.c b/hw/arm_mptimer.c index df7fb4c..fe43cbb 100644 ---

Re: [Qemu-devel] [PATCH] coroutine-gthread.c: Avoid threading APIs deprecated in GLib 2.31

2012-04-12 Thread Peter Maydell
Ping^3 ? On 3 April 2012 12:54, Peter Maydell wrote: > Ping^2 ? > > On 14 March 2012 14:50, Peter Maydell wrote: >> Ping? >> >> On 3 March 2012 14:52, Peter Maydell wrote: >>> The GLib threading APIs were revamped in GLib 2.31 and a number >>> of the old interfaces were deprecated, which means

Re: [Qemu-devel] [PATCH] bsd-user: fix compile failure

2012-04-12 Thread Andreas Färber
Am 12.04.2012 12:22, schrieb Peter Maydell: > bsd-user doesn't actually support reserving a memory area for the > guest address space, but we need to at least define the reserved_va > global so that cpu-all.h's RESERVED_VA macro will work correctly. > > This fixes a compilation error introduced in

[Qemu-devel] [PATCH v2] bsd-user: fix compile failure

2012-04-12 Thread Peter Maydell
bsd-user doesn't actually support reserving a memory area for the guest address space, but we need to at least define the reserved_va global so that cpu-all.h's RESERVED_VA macro will work correctly. This fixes a compilation error introduced in commit 39879bb which added a use of RESERVED_VA to h2

[Qemu-devel] [PATCH V4 3/8] hw/cirrus_vga.c: replace register_ioport*

2012-04-12 Thread Julien Grall
This patch replaces all register_ioport* with portio_*. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/cirrus_vga.c | 38 ++ 1 files changed, 22 insertions(+), 16 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirru

[Qemu-devel] [PATCH V4 7/8] hw/apm.c: replace register_ioport*

2012-04-12 Thread Julien Grall
This patch replaces all register_ioport* by a MemorySection. It permits to use the new Memory stuff like listener. Moreover, the PCI is added as an argument for apm_init, so we can register IO inside the pci IO address space. Signed-off-by: Julien Grall --- hw/acpi_piix4.c |2 +- hw/apm.c

[Qemu-devel] [PATCH V4 5/8] hw/pc.c: replace register_ioport*

2012-04-12 Thread Julien Grall
This patch replaces all register_ioport* with portio_* or isa_register_portio_list. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/pc.c | 58 +++--- 1 files changed, 43 insertions(+), 15 deletions(-)

[Qemu-devel] [PATCH V4 1/8] isa: add isa_address_space_io

2012-04-12 Thread Julien Grall
This function permits to retrieve ISA IO address space. It will be usefull when we need to pass IO address space as argument. Signed-off-by: Julien Grall --- hw/isa-bus.c |5 + hw/isa.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/isa-bus

Re: [Qemu-devel] [RFC PATCH v3 0/9] Replication agent module

2012-04-12 Thread Stefan Hajnoczi
On Thu, Apr 5, 2012 at 1:17 PM, Ori Mamluk wrote: This series looks like patches on top of your last series. Please consolidate them into logical commits that build up the feature rather than a series that shows the editing steps you took when writing this code. This makes it easier to review b

[Qemu-devel] [PATCH 00/26] My block patches queue for 1.1

2012-04-12 Thread Paolo Bonzini
Here is my block patches queue for 1.1. Patches 1-6 are cleanups to tools and aio.c that let filesystems use timers when running under qemu-io. Patches 7-12 are bugfixes from last week's series, patches 13-14 are new. Patches 15-19 are fixes to qemu-io and qemu-iotests. Patches 20-22 are fixes

[Qemu-devel] [PATCH 01/26] qemu-io: use main_loop_wait

2012-04-12 Thread Paolo Bonzini
This will let timers run during aio_read and aio_write commands, though not during synchronous commands. Signed-off-by: Paolo Bonzini --- cmd.c | 10 +- qemu-io.c |7 --- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cmd.c b/cmd.c index 0806e18..7ffbb71 100

[Qemu-devel] [PATCH 02/26] qemu-tool: map vm_clock to rt_clock

2012-04-12 Thread Paolo Bonzini
QED uses vm_clock timers so that images are not touched during and after migration. This however does not apply to qemu-io and qemu-img. Treat vm_clock as a synonym for rt_clock there, and enable it. Signed-off-by: Paolo Bonzini --- qemu-tool.c |3 +-- 1 file changed, 1 insertion(+), 2 dele

[Qemu-devel] [PATCH V4 6/8] hw/dma.c: replace register_ioport*

2012-04-12 Thread Julien Grall
This patch replaces all register_ioport* be the new memory API functions. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/dma.c | 108 + 1 files changed, 72 insertions(+), 36 deletions(-) diff

[Qemu-devel] [PATCH 23/26] block: implement is_allocated for raw

2012-04-12 Thread Paolo Bonzini
Either FIEMAP, or SEEK_DATA+SEEK_HOLE can be used to implement the is_allocated callback for raw files. Ext4, btrfs and XFS all support it. Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 102 + block/raw.c |8 + 2 files ch

[Qemu-devel] [PATCH 05/26] aio: return "AIO in progress" state from qemu_aio_wait

2012-04-12 Thread Paolo Bonzini
The definition of when qemu_aio_flush should loop is much simpler than it looks. It just has to call qemu_aio_wait until it makes no progress and all flush callbacks return false. qemu_aio_wait is the logical place to tell the caller about this. Signed-off-by: Paolo Bonzini --- aio.c |

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Eric Blake
On 04/12/2012 02:50 AM, Kevin Wolf wrote: >> + >> +src = realpath(current, NULL); > > My POSIX manpage says: > > "If resolved_name is a null pointer, the behavior of realpath() is > implementation-defined." > > It seems to have been standardised by now, but I'm not sure if it is a > good id

[Qemu-devel] [PATCH 25/26] stream: move is_allocated_above to block.c

2012-04-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block.c| 49 + block.h|4 block/stream.c | 53 ++--- 3 files changed, 55 insertions(+), 51 deletions(-) diff --git a/block.c b/block.c ind

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Paolo Bonzini
Il 12/04/2012 14:10, Eric Blake ha scritto: > Worse, there are known compliance bugs; realpath() on Solaris 10 will > return a relative answer for relative input, for example. I don't know > if glib provides a more portable alternative function, but I'd start by > searching that. No, it doesn't.

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Daniel P. Berrange
On Thu, Apr 12, 2012 at 02:13:18PM +0200, Paolo Bonzini wrote: > Il 12/04/2012 14:10, Eric Blake ha scritto: > > Worse, there are known compliance bugs; realpath() on Solaris 10 will > > return a relative answer for relative input, for example. I don't know > > if glib provides a more portable alt

[Qemu-devel] [PATCH v3 3/3] target-microblaze: QOM'ify CPU init

2012-04-12 Thread Andreas Färber
Move code from cpu_mb_init() to a QOM initfn. Signed-off-by: Andreas Färber Tested-by: Peter A. G. Crosthwaite --- target-microblaze/cpu.c | 12 target-microblaze/translate.c |3 --- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/target-microblaze/cpu.c

[Qemu-devel] [PATCH v3 1/3] target-microblaze: QOM'ify CPU

2012-04-12 Thread Andreas Färber
Embed CPUMBState as first member of QOM MicroBlazeCPU. Signed-off-by: Andreas Färber Tested-by: Peter A. G. Crosthwaite --- Makefile.target |1 + target-microblaze/cpu-qom.h | 71 + target-microblaze/cpu.c | 59 ++

[Qemu-devel] [PATCH v3 0/3] QOM'ify MicroBlaze CPU

2012-04-12 Thread Andreas Färber
Hi Edgar, Here's a rebased version of MicroBlaze CPU QOM'ification. Available from: git://github.com/afaerber/qemu-cpu.git qom-cpu-microblaze.v3 https://github.com/afaerber/qemu-cpu/commits/qom-cpu-microblaze.v3 Regards, Andreas Cc: Edgar E. Iglesias Cc: Peter A. G. Crosthwaite Cc: John Willi

[Qemu-devel] [PATCH v3 2/3] target-microblaze: QOM'ify CPU reset

2012-04-12 Thread Andreas Färber
Move code from cpu_state_reset() to QOM mb_cpu_reset(). Signed-off-by: Andreas Färber Tested-by: Peter A. G. Crosthwaite --- target-microblaze/cpu.c | 51 - target-microblaze/translate.c | 51 +--- 2 files cha

Re: [Qemu-devel] [PATCH v2 2/3] target-microblaze: QOM'ify CPU reset

2012-04-12 Thread Andreas Färber
Am 12.04.2012 11:50, schrieb Edgar E. Iglesias: > On Thu, Apr 12, 2012 at 03:25:30AM +0200, Andreas Färber wrote: >> Am 12.04.2012 03:14, schrieb John Williams: >>> 2012/4/12 Andreas Färber : diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index ea646fe..194131b 100644

[Qemu-devel] [PATCH 17/26] qemu-io: fix the alloc command

2012-04-12 Thread Paolo Bonzini
Because sector_num is not updated, the loop would either go on forever or return garbage. Signed-off-by: Paolo Bonzini --- qemu-io.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 43643c8..27a0c3c 100644 --- a/qemu-io.c +++ b/qemu-io.

[Qemu-devel] [PATCH V4 2/8] hw/acpi_piix4.c: replace register_ioport*

2012-04-12 Thread Julien Grall
This patch replaces all register_ioport* with the new memory API. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/acpi_piix4.c | 150 +-- 1 files changed, 112 insertions(+), 38 deletions(-) diff --git

[Qemu-devel] [PATCH 10/26] block: fix snapshot on QED

2012-04-12 Thread Paolo Bonzini
QED's opaque data includes a pointer back to the BlockDriverState. This breaks when bdrv_append shuffles data between bs_new and bs_top. To avoid this, add a "rebind" function that tells the driver about the new relationship between the BlockDriverState and its opaque. The patch also adds rebind t

[Qemu-devel] [PATCH 15/26] qemu-iotests: strip spaces from qemu-img/qemu-io/qemu command lines

2012-04-12 Thread Paolo Bonzini
A trailing space is left when qemu-img has no arguments, for example if -nocache is not used. This becomes an empty argument after split() and causes qemu-io to fail. Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/iotests.py |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) d

[Qemu-devel] [PATCH 04/26] aio: remove process_queue callback and qemu_aio_process_queue

2012-04-12 Thread Paolo Bonzini
Both unused after the previous patch. Signed-off-by: Paolo Bonzini --- aio.c | 29 ++--- block/curl.c | 10 -- block/iscsi.c |4 ++-- block/nbd.c|8 block/rbd.c|5 ++--- block/sheepdog.c | 11 +++

[Qemu-devel] [PATCH 21/26] stream: fix ratelimiting corner case

2012-04-12 Thread Paolo Bonzini
This fixes inability to make progress in streaming if the quota is set to less than the amount of data that an I/O operation has to write. In this case, limit->dispatched + n will always be above the quota and, due to the "goto retry" to recheck cancellation and allocation, streaming will livelock

[Qemu-devel] [PATCH 24/26] stream: tweak usage of bdrv_co_is_allocated

2012-04-12 Thread Paolo Bonzini
is_allocated_base has complex semantics that are not really usable outside streaming. Split the check in two parts, where the allocated state for the top bs is moved to the caller. The resulting function is more generally useful. Signed-off-by: Paolo Bonzini --- block/stream.c | 52 +

[Qemu-devel] [PATCH 06/26] aio: simplify qemu_aio_wait

2012-04-12 Thread Paolo Bonzini
The do...while loop can never loop, because select will just not return 0 when invoked with infinite timeout. Signed-off-by: Paolo Bonzini --- aio.c | 133 +++-- 1 file changed, 64 insertions(+), 69 deletions(-) diff --git a/aio.c b/a

[Qemu-devel] [PATCH 18/26] stream: fix sectors not allocated test

2012-04-12 Thread Paolo Bonzini
The test on sectors not allocated can fail if the L1/L2 tables are not on disk yet. Allow tests to shutdown the VM early. Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/030|1 + tests/qemu-iotests/iotests.py | 10 ++ 2 files changed, 7 insertions(+), 4 deletions(-) d

[Qemu-devel] [PATCH 14/26] block: fix allocation size for dirty bitmap

2012-04-12 Thread Paolo Bonzini
Also reuse elsewhere the new constant for sizeof(unsigned long) * 8. The dirty bitmap is allocated in bits but declared as unsigned long. Thus, its memory block is accessed beyond its end unless the image is a multiple of 64 chunks (i.e. a multiple of 64 MB). Signed-off-by: Paolo Bonzini --- bl

[Qemu-devel] [PATCH 22/26] stream: do not copy unallocated sectors from the base

2012-04-12 Thread Paolo Bonzini
Unallocated sectors should really never be accessed by the guest, so there's no need to copy them during the streaming process. If they are read by the guest during streaming, guest-initiated copy-on-read will copy them (we're in the base == NULL case, which enables copy on read). If they are read

[Qemu-devel] [PATCH 12/26] block: update in-memory backing file and format

2012-04-12 Thread Paolo Bonzini
These are needed to print "info block" output correctly. QCOW2 does this because it needs it to write the header, but QED does not, and common code is the right place to do it. Reviewed-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- block.c| 11 +-- block/stream.c | 11 ---

[Qemu-devel] [PATCH V4 0/8] memory: unify ioport registration

2012-04-12 Thread Julien Grall
This is the fourth version of patch series about ioport registration. For the moment some part of QEMU use register_ioport* functions to register ioport. These functions don't permit the logging of range with Memory Listener. Modifications between V1 and V2: - Remove the use of get_system_io.

[Qemu-devel] [PATCH V4 4/8] hw/serial.c: replace register_ioport*

2012-04-12 Thread Julien Grall
This patch replaces all register_ioport* with a MemoryRegion. It permits to use the new Memory stuff like listener. For more flexibility, the IO address space is passed as an argument. Signed-off-by: Julien Grall --- hw/mips_mipssim.c |3 ++- hw/pc.h |2 +- hw/serial.c |

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Jeff Cody
On 04/12/2012 04:50 AM, Kevin Wolf wrote: > Am 11.04.2012 19:29, schrieb Jeff Cody: >> When block streaming an image, if a base name is passed in that >> is a relative name, but not accessible from the top-level snapshot, >> then the relative name is stored incorrectly in the image file. >> >> For

[Qemu-devel] [PATCH 19/26] stream: add testcase for partial streaming

2012-04-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/030 | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index 3efb6cd..9c74dd2 100755 --- a/tests/qemu-iotests/030 +++ b/tests/qemu-iotests/030 @@ -23,

[Qemu-devel] [PATCH 08/26] block: add mode argument to blockdev-snapshot-sync

2012-04-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qmp-commands.hx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index c09ee85..4d4c749 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -759,7 +759,7 @@ EQMP { .name = "blockdev-sn

[Qemu-devel] [PATCH 26/26] stream: move rate limiting to a separate header file

2012-04-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/stream.c | 31 ++-- include/qemu/ratelimit.h | 50 ++ 2 files changed, 52 insertions(+), 29 deletions(-) create mode 100644 include/qemu/ratelimit.h diff --git a/block/stream

[Qemu-devel] [PATCH 07/26] block: add the support to drain throttled requests

2012-04-12 Thread Paolo Bonzini
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu [ Iterate until all block devices have processed all requests, add comments. - Paolo ] Signed-off-by: Paolo Bonzini --- block.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 4b9

[Qemu-devel] [PATCH 13/26] block: open backing file as read-only when probing for size

2012-04-12 Thread Paolo Bonzini
bdrv_img_create will temporarily open the backing file to probe its size. However, this could be done with a read-write open if the wrong flags are passed to bdrv_img_create. Since there is really no documentation on what flags can be passed, assume that bdrv_img_create receives the flags with whi

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] pseries: Fix RTAS based config access

2012-04-12 Thread Andreas Färber
Am 02.04.2012 06:17, schrieb David Gibson: > On the pseries platform, access to PCI config space is via RTAS calls( > which go to the hypervisor) rather than MMIO. This means we don't use > the same code path as nearly everyone else which goes through pci_host.c > and we're missing some of the par

[Qemu-devel] [PATCH 09/26] block: fail live snapshot if disk has no medium

2012-04-12 Thread Paolo Bonzini
Reviewed-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- blockdev.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 0c2440e..748e192 100644 --- a/blockdev.c +++ b/blockdev.c @@ -756,14 +756,17 @@ void qmp_transaction(BlockdevActionLis

[Qemu-devel] [PATCH V4 8/8] smb: replace_register_ioport*

2012-04-12 Thread Julien Grall
This patch fix smb_ioport_* to be compliant with read/write memory callback. Moreover it replaces all register_ioport* which use theses functions by the new Memory API. Signed-off-by: Julien Grall --- hw/acpi_piix4.c | 16 ++-- hw/pm_smbus.c |7 --- hw/pm_smbus.h |6

[Qemu-devel] [PATCH 03/26] posix-aio: merge posix_aio_process_queue and posix_aio_read

2012-04-12 Thread Paolo Bonzini
posix_aio_read already calls qemu_aio_process_queue, and dually qemu_aio_process_queue is always followed by a select loop that calls posix_aio_read. No races are possible, so there is no need for a separate process_queue callback. Signed-off-by: Paolo Bonzini --- posix-aio-compat.c | 44

[Qemu-devel] [PATCH 11/26] block: push bdrv_change_backing_file error checking up from drivers

2012-04-12 Thread Paolo Bonzini
This check applies to all drivers, but QED lacks it. Reviewed-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- block.c |5 + block/qcow2.c |5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index b1be146..91bdefe 100644 --- a/block.c +++

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Kevin Wolf
Am 12.04.2012 15:17, schrieb Jeff Cody: >>> + * >>> + * Returns NULL if no relative or absolute path can be found. >>> + */ >>> +static char *path_find_relative(char *current, char *backing) >>> +{ >>> +char *src; >>> +char *dest; >>> +char *src_tmp; >>> +char *src_dir; >>> +cha

[Qemu-devel] [PATCH 20/26] stream: pass new base image format to bdrv_change_backing_file

2012-04-12 Thread Paolo Bonzini
When an image is modified to point to the new backing file, the backing file format is set to NULL, which means auto-probe. This is wrong, in fact it is a small security problem. Reviewed-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- block/stream.c |7 +-- 1 file changed, 5 insertion

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] pseries: Fix RTAS based config access

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 12, 2012 at 02:29:33PM +0200, Andreas Färber wrote: > Am 02.04.2012 06:17, schrieb David Gibson: > > On the pseries platform, access to PCI config space is via RTAS calls( > > which go to the hypervisor) rather than MMIO. This means we don't use > > the same code path as nearly everyon

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Paolo Bonzini
Il 12/04/2012 15:41, Kevin Wolf ha scritto: >> > >> > As the comments pointed out by Eric and Paolo indicate, the issue is >> > worse on some platforms. It would be nice to be able to rely on >> > canonicalize_file_name(), so I like Daniel's suggestion of pulling in >> > Paolo's proposed glib patc

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Jeff Cody
On 04/12/2012 09:41 AM, Kevin Wolf wrote: > Am 12.04.2012 15:17, schrieb Jeff Cody: + * + * Returns NULL if no relative or absolute path can be found. + */ +static char *path_find_relative(char *current, char *backing) +{ +char *src; +char *dest; +

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments

2012-04-12 Thread Kevin Wolf
Am 12.04.2012 16:12, schrieb Paolo Bonzini: > Il 12/04/2012 15:41, Kevin Wolf ha scritto: As the comments pointed out by Eric and Paolo indicate, the issue is worse on some platforms. It would be nice to be able to rely on canonicalize_file_name(), so I like Daniel's suggestion

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-12 Thread Alex Williamson
On Thu, 2012-04-12 at 13:28 +0300, Michael S. Tsirkin wrote: > On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > > index 5e8b261..0e7af51 100644 > > --- a/hw/acpi_piix4.c > > +++ b/hw/acpi_piix4.c > > @@ -48,7 +48,7 @@ > > #define

[Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()

2012-04-12 Thread Andreas Färber
Wrap setting of Object::realized property, error reporting and exit(1) into a helper function. It is the equivalent of qdev_init_nofail(). Signed-off-by: Andreas Färber Cc: Anthony Liguori Cc: Paolo Bonzini Cc: Peter Maydell --- Hi Paolo, please consider appending this patch to your push-push

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()

2012-04-12 Thread Anthony Liguori
On 04/12/2012 08:44 AM, Andreas Färber wrote: Wrap setting of Object::realized property, error reporting and exit(1) into a helper function. It is the equivalent of qdev_init_nofail(). I don't like this. If for no reason other than, a much more specific justification is needed for this. I ab

Re: [Qemu-devel] [PATCH 2/2] Xen: Add xen-apic support and hook it up.

2012-04-12 Thread Wei Liu
On Thu, Apr 12, 2012 at 1:02 AM, Eric Blake wrote: > On 04/11/2012 10:17 AM, Stefano Stabellini wrote: >> On Wed, 11 Apr 2012, Peter Maydell wrote: >>> On 5 April 2012 10:35, Wei Liu wrote: --- /dev/null +++ b/hw/xen_apic.c @@ -0,0 +1,90 @@ +/* + * Xen basic APIC sup

[Qemu-devel] [PATCH 2/2] versatiblepb: add NOR flash support

2012-04-12 Thread Eric Bénard
- add support for the 64MB NOR CFI01 flash available at 0x3400 on the versatilepb board http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/BBAJIHEC.html - give the possibility to boot from the flash if no kernel is provided to qemu - initial idea from http://lists.gnu.org/ar

Re: [Qemu-devel] current git master compile fails on Debian 4.0

2012-04-12 Thread Kai NODA
Hi Paolo, I've encountered the same problem as Erik on my RHEL5 machine with glib 2.12, and made a patch to replace GHashTableIter with g_hash_table_find(). https://github.com/nodakai/QEMU/commit/4a9dd009feb1d78e3566069336a0d1b9a296bd23 I think it's an almost same approach with yours, but have not

[Qemu-devel] [PATCH 17/19] qemu-iotests: Add -o and make v3 the default for qcow2

2012-04-12 Thread Kevin Wolf
This adds an -o option to qemu-iotests, which is an option string that is passed through to qemu-img create -o... This allows testing different subformat with a command like './check -qcow2 -o compat=0.10'. For qcow2, if no compat option is specified, compat=1.1 is the new default. Signed-off-by:

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()

2012-04-12 Thread Andreas Färber
Am 12.04.2012 16:59, schrieb Paolo Bonzini: > Il 12/04/2012 16:47, Anthony Liguori ha scritto: >> >>> Wrap setting of Object::realized property, error reporting and exit(1) >>> into a helper function. It is the equivalent of qdev_init_nofail(). >> >> I don't like this. >> >> If for no reason other

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()

2012-04-12 Thread Paolo Bonzini
Il 12/04/2012 15:58, Andreas Färber ha scritto: > The big clash that Paolo and I had turned out to stem from tackling two > virtually inconsolable goals, both under the banner of "realize": I think the code was similar enough that the goals are not unreconcilable (though QOM goals can certainly be

[Qemu-devel] [PATCH 07/19] qcow2: Refactor qcow2_free_any_clusters

2012-04-12 Thread Kevin Wolf
Zero clusters will add another cluster type. Refactor the open-coded cluster type detection into a switch of QCOW2_CLUSTER_* options so that the detection is in a single place. This makes it easier to add new cluster types. Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 41

Re: [Qemu-devel] [PATCH 0/5] PCI hotplug fixes/cleanup

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 12, 2012 at 08:57:18AM -0600, Alex Williamson wrote: > On Wed, 2012-04-11 at 10:40 +0300, Michael S. Tsirkin wrote: > > On Tue, Apr 10, 2012 at 04:07:41PM -0600, Alex Williamson wrote: > > > > Some points I remember > > > > - power on is better called slot enabled > > > > - guests dont

[Qemu-devel] [PATCH 17.5/19] qemu-iotests: Fix test 031 for qcow2 v3 support

2012-04-12 Thread Kevin Wolf
qcow2.py must be updated to work with version 3 images at all, the output has changed since the feature table extension has been added, and version 2 and version 3 images can't possibly have the same test output. Change the test case to completely ignore IMGOPTS and run the test for both compat=1.

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()

2012-04-12 Thread Paolo Bonzini
Il 12/04/2012 16:47, Anthony Liguori ha scritto: > >> Wrap setting of Object::realized property, error reporting and exit(1) >> into a helper function. It is the equivalent of qdev_init_nofail(). > > I don't like this. > > If for no reason other than, a much more specific justification is > need

[Qemu-devel] [PATCH 13/19] qcow2: Support for feature table header extension

2012-04-12 Thread Kevin Wolf
Instead of printing an ugly bitmask, qemu can now print a more helpful string even for yet unknown features. Signed-off-by: Kevin Wolf --- block/qcow2.c | 66 +--- block/qcow2.h | 12 ++ 2 files changed, 69 insertions(+), 9 deletion

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()

2012-04-12 Thread Anthony Liguori
On 04/12/2012 09:04 AM, Andreas Färber wrote: Am 12.04.2012 16:59, schrieb Paolo Bonzini: Il 12/04/2012 16:47, Anthony Liguori ha scritto: Wrap setting of Object::realized property, error reporting and exit(1) into a helper function. It is the equivalent of qdev_init_nofail(). I don't like

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()

2012-04-12 Thread Anthony Liguori
On 04/12/2012 10:15 AM, Paolo Bonzini wrote: Il 12/04/2012 15:58, Andreas Färber ha scritto: The big clash that Paolo and I had turned out to stem from tackling two virtually inconsolable goals, both under the banner of "realize": I think the code was similar enough that the goals are not unre

  1   2   >