[Qemu-devel] [RFC v5 10/86] memory: add backward compatibility for old portio registration

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- memory.c | 32 memory.h | 17 + 2 files changed, 49 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index 62bd60b..bb04952 100644 --- a/memory.c +++ b/memory.c @@ -211,6 +211,21 @@ static AddressSpa

[Qemu-devel] [ANNOUNCE] libguestfs 1.12 released

2011-07-20 Thread Richard W.M. Jones
libguestfs is a library and a set of tools for reading, writing, managing, inspecting, rescuing and resizing disk images and offline and live virtual machines. I'm pleased to announce the release of libguestfs 1.12, the next stable branch of libguestfs. There are many changes and new features in

[Qemu-devel] [RFC v5 09/86] memory: I/O address space support

2011-07-20 Thread Avi Kivity
Allow registering I/O ports via the same mechanism as mmio ranges. Signed-off-by: Avi Kivity --- exec-memory.h |3 ++ memory.c | 60 - memory.h |2 + 3 files changed, 64 insertions(+), 1 deletions(-) diff --git a/exec-m

[Qemu-devel] [PATCH V2 2/3] xen: Fix the memory registration to reflect of what is done by Xen.

2011-07-20 Thread Anthony PERARD
A Xen guest memory is allocated by libxc. But this memory is not allocated continuously, instead, it leaves the VGA IO memory space not allocated, same for the MMIO space (at HVM_BELOW_4G_MMIO_START of size HVM_BELOW_4G_MMIO_LENGTH). So to reflect that, we do not register the physical memory for t

[Qemu-devel] [RFC v5 61/86] pci: remove support for pre memory API BARs

2011-07-20 Thread Avi Kivity
Not used anymore. Signed-off-by: Avi Kivity --- hw/pci.c | 33 ++--- 1 files changed, 2 insertions(+), 31 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 6ed08ae..e6a3e56 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -848,18 +848,7 @@ static void pci_unregister_io_re

Re: [Qemu-devel] [PATCH v8 3/4] guest agent: qemu-ga daemon

2011-07-20 Thread Luiz Capitulino
On Tue, 19 Jul 2011 15:41:54 -0500 Michael Roth wrote: > This is the actual guest daemon, it listens for requests over a > virtio-serial/isa-serial/unix socket channel and routes them through > to dispatch routines, and writes the results back to the channel in > a manner similar to QMP. > > A s

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 4:51 PM, Kevin Wolf wrote: > Am 20.07.2011 15:25, schrieb Jes Sorensen: >> On 07/20/11 12:01, Kevin Wolf wrote: > Right, we're stuck with the two horros of NFS and selinux, so we need > something that gets around the problem. In a sane world we would simply > sa

Re: [Qemu-devel] [PATCHv2] target-arm: support for ARM1176JZF-s cores

2011-07-20 Thread Jamie Iles
On Wed, Jul 20, 2011 at 03:35:19PM +0100, Peter Maydell wrote: > On 19 July 2011 13:32, Jamie Iles wrote: > > Add support for v6K ARM1176JZF-S.  This core includes the VA<->PA > > translation capability and security extensions. > > > +static uint32_t arm1176_cp15_c0_c1[8] = > > +{ 0x111, 0x11, 0x

[Qemu-devel] [RFC v5 74/86] ppc405_uc: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ppc405_uc.c | 117 +--- 1 files changed, 52 insertions(+), 65 deletions(-) diff --git a/hw/ppc405_uc.c b/hw/ppc405_uc.c index 06a053b..e5b18fe 100644 --- a/hw/ppc405_uc.c +++ b/hw/ppc405_uc.c @@ -259,6 +259,7 @

[Qemu-devel] [RFC v5 35/86] rtl8139: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/rtl8139.c | 72 ++--- 1 files changed, 38 insertions(+), 34 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 5214b8c..dfbab90 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -474,7 +474,6 @@ typedef

Re: [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path

2011-07-20 Thread Marcelo Tosatti
On Tue, Jul 19, 2011 at 11:48:22PM +0200, Jan Kiszka wrote: > On 2011-07-19 13:46, Michael Tokarev wrote: > > If we do, it results in double monitor_resume() (second being called > > from migrate_fd_cleanup() anyway) and monitor suspend count becoming > > negative. > > > > Cc'ing people from `git

[Qemu-devel] [PATCH 40/55] block: Leave tracking media change to device models

2011-07-20 Thread Markus Armbruster
hw/fdc.c is the only one that cares. Signed-off-by: Markus Armbruster --- block.c | 20 ++-- block_int.h |1 - hw/fdc.c| 40 ++-- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/block.c b/block.c index c12f037..

[Qemu-devel] [RFC v5 59/86] pci: fold BAR mapping function into its caller

2011-07-20 Thread Avi Kivity
There is only one function, so no need for a function pointer. Signed-off-by: Avi Kivity --- hw/pci.c | 25 + hw/pci.h |1 - 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index e9e4874..e6a759a 100644 --- a/hw/pci.c +++ b/hw/pci

[Qemu-devel] [PATCH 14/23] PPC: KVM: Add generic function to read host clockfreq

2011-07-20 Thread Alexander Graf
We need to find out the host's clock-frequency when running on KVM, so let's export a respective function. Signed-off-by: Alexander Graf --- target-ppc/kvm.c | 65 ++ target-ppc/kvm_ppc.h |1 + 2 files changed, 66 insertions(+), 0 deletio

[Qemu-devel] [RFC v5 21/86] sysbus: add MemoryRegion based memory management API

2011-07-20 Thread Avi Kivity
Allow registering sysbus device memory using a MemoryRegion. Once all users are converted, sysbus_init_mmio() and sysbus_init_mmio_cb() will be removed. Signed-off-by: Avi Kivity --- hw/sysbus.c | 27 --- hw/sysbus.h |3 +++ 2 files changed, 27 insertions(+), 3 del

[Qemu-devel] [RFC v5 41/86] ivshmem: convert to memory API

2011-07-20 Thread Avi Kivity
excluding msix. Signed-off-by: Avi Kivity --- hw/ivshmem.c | 148 -- 1 files changed, 50 insertions(+), 98 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 3055dd2..f80e7b6 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -56,11

[Qemu-devel] [PATCH 25/55] ide/atapi: Switch from BlockDriverState's locked to own tray_locked

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/ide/atapi.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 8634e6b..237657f 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -777,8 +777,9 @@ static void cmd_mode_sense(IDEState *s, uint8

[Qemu-devel] [RFC v5 66/86] arm_sysctl: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/arm_sysctl.c | 27 ++- 1 files changed, 10 insertions(+), 17 deletions(-) diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index 9225b58..ee90aff 100644 --- a/hw/arm_sysctl.c +++ b/hw/arm_sysctl.c @@ -17,6 +17,7 @@ typedef struct {

[Qemu-devel] [RFC v5 30/86] cirrus: simplify linear framebuffer access functions

2011-07-20 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 74 ++- 1 files changed, 8 insertions(+), 66 deletions(-) diff --git a/hw/cirrus_vga.c b/h

[Qemu-devel] [PATCH 02/23] PPC: Move openpic to target specific code compilation

2011-07-20 Thread Alexander Graf
The MPIC has some funny feature where it maps different registers to an MMIO region depending which CPU accesses them. To be able to reflect that, we need to make OpenPIC be compiled in the target code, so it can access cpu_single_env. Signed-off-by: Alexander Graf --- Makefile.objs |1 -

[Qemu-devel] [PATCH 53/55] nbd: Clean up use of block_int.h

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- block/nbd.c |1 + nbd.c |1 + nbd.h |2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 7a52f62..2e365ac 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -28,6 +28,7 @@ #include "qemu-c

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-20 Thread Richard W.M. Jones
On Wed, Jul 20, 2011 at 07:51:29AM -0500, Anthony Liguori wrote: > Given the large number of reports we've gotten in the past where > poor performance was caused by the expectation that a user had KVM > enabled and really didn't, I think it's more important to > overcommunicate to the user here. >

[Qemu-devel] [RFC v5 05/86] Internal interfaces for memory API

2011-07-20 Thread Avi Kivity
get_system_memory() provides the root of the memory hierarchy. This interface is intended to be private between memory.c and exec.c. If this file is included elsewhere, it should be regarded as a bug (or TODO item). However, it will be temporarily needed for the conversion to hierarchical memory

Re: [Qemu-devel] [RFC v4 11/58] memory: add ioeventfd support

2011-07-20 Thread Blue Swirl
On Sun, Jul 17, 2011 at 2:13 PM, Avi Kivity wrote: > As with the rest of the memory API, the caller associates an eventfd > with an address, and the memory API takes care of registering or > unregistering when the address is made visible or invisible to the > guest. > > Signed-off-by: Avi Kivity

[Qemu-devel] [RFC v5 52/86] ehci: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/usb-ehci.c | 36 +--- 1 files changed, 9 insertions(+), 27 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index a4758f9..95d12e0 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -368,8 +368,7 @@ struct EHCIState {

[Qemu-devel] [RFC v5 13/86] memory: separate building the final memory map into two steps

2011-07-20 Thread Avi Kivity
Instead of adding and deleting regions in one pass, do a delete pass followed by an add pass. This fixes the following case: from: 0x-0x0fff ram (a1) 0x1000-0x1fff mmio (a2) 0x2000-0x2fff ram (a3) to: 0x-0x2fff ram (b1) The single pass algorithm removed a1, added b2, then rem

[Qemu-devel] [RFC v5 32/86] exec.c: fix initialization of system I/O memory region

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- exec.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/exec.c b/exec.c index 81fd6f4..d1c27b2 100644 --- a/exec.c +++ b/exec.c @@ -3822,7 +3822,7 @@ static void memory_map_init(void) set_system_memory_map(system_memory); system_i

[Qemu-devel] [PATCH 04/23] PPC: Add CPU local MMIO regions to MPIC

2011-07-20 Thread Alexander Graf
The MPIC exports a register set for each CPU connected to it. They can all be accessed through specific registers or using a shadow page that is mapped differently depending on which CPU accesses it. This patch implements the shadow map, making it possible for guests to access the CPU local regist

[Qemu-devel] [RFC v5 77/86] sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback

2011-07-20 Thread Avi Kivity
sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove a region. Provide an alternative that calls an unmap callback, so the removal may be done non-destructively. Signed-off-by: Avi Kivity --- hw/sysbus.c | 15 +++ hw/sysbus.h |3 +++ 2 files changed, 18 inser

[Qemu-devel] [PATCH 22/55] block: Drop tray status tracking, no longer used

2011-07-20 Thread Markus Armbruster
Commit 4be9762a is now completely redone. Signed-off-by: Markus Armbruster --- block.c |1 - block_int.h |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 2b1eb4d..ba24bf1 100644 --- a/block.c +++ b/block.c @@ -2775,7 +2775,6 @@ int bdrv_eje

[Qemu-devel] [PATCH] m68k: Add uc5282 machine

2011-07-20 Thread Joel Sherrill
From: Till Straumann Add m68k machine support for Arcturus Networks Inc. uC5282 board. Also include a fix for the FEC ethernet controller. Signed-off-by: Joel Sherrill --- This patch has been previously submitted and ignored. The RTEMS Project has been using this patch since at least 2009 w

[Qemu-devel] [PATCH] guest agent: qemu-ga daemon

2011-07-20 Thread Michael Roth
This is the actual guest daemon, it listens for requests over a virtio-serial/isa-serial/unix socket channel and routes them through to dispatch routines, and writes the results back to the channel in a manner similar to QMP. A shorthand invocation: qemu-ga -d Is equivalent to: qemu-ga -m v

[Qemu-devel] [RFC v5 62/86] Introduce QEMU_NEW()

2011-07-20 Thread Avi Kivity
qemu_malloc() is type-unsafe as it returns a void pointer. Introduce QEMU_NEW() (and QEMU_NEWZ()), which return the correct type. Signed-off-by: Avi Kivity --- qemu-common.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu-common.h b/qemu-common.h index c2b79bd..e

[Qemu-devel] [RFC v5 76/86] stellaris_enet: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/stellaris_enet.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c index 6a0583a..b33bcd9 100644 --- a/hw/stellaris_enet.c +++ b/hw/stellaris_enet.c @@ -69,7 +69,7 @@ ty

[Qemu-devel] [RFC v5 15/86] ioport: register ranges by byte aligned addresses always

2011-07-20 Thread Avi Kivity
The I/O port space is byte addressable, even for word and long accesses. An example is the VMware svga card, which has long ports on offsets 0, 1, and 2. Signed-off-by: Avi Kivity --- ioport.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ioport.c b/ioport.c index

[Qemu-devel] [PATCH 13/55] ide: Use a table to declare which drive kinds accept each command

2011-07-20 Thread Markus Armbruster
No functional change. It would be nice to have handler functions in the table, like commit e1a064f9 did for ATAPI. Left for another day. Signed-off-by: Markus Armbruster --- hw/ide/core.c | 104 +++-- 1 files changed, 79 insertions(+), 25 de

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 12:00 PM, Blue Swirl wrote: Let's have files A, B, C etc. with backing files AA etc. How would libvirt know that when QEMU wants to write to file CA, this is because it's needed to access C, or is it just trickery by a devious guest to corrupt storage? The fix for CVE-2010-2238 al

[Qemu-devel] [PATCH 35/55] scsi-disk: Avoid physical/virtual tray state mismatch

2011-07-20 Thread Markus Armbruster
When scsi-cd is backed by a physical drive, we want the physical tray match the virtual one. To that end, we call bdrv_eject() on guest's load/eject, and bdrv_lock_medium() on guest's prevent/allow removal. But we don't set the initial state on device model init. Fix that. While there, also unlo

[Qemu-devel] [RFC v5 69/86] gt64xxx.c: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/gt64xxx.c | 36 +++- 1 files changed, 15 insertions(+), 21 deletions(-) diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index d541558..6af9782 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -227,7 +227,7 @@ #define PCI_MAPPING_ENTRY(r

[Qemu-devel] [RFC v5 80/86] versatile_pci: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/versatile_pci.c | 94 --- 1 files changed, 44 insertions(+), 50 deletions(-) diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index bf7fadd..14cfb48 100644 --- a/hw/versatile_pci.c +++ b/hw/versatile_pci.c @@

[Qemu-devel] [PATCH 51/55] block: Reset buffer alignment on detach

2011-07-20 Thread Markus Armbruster
BlockDriverState member buffer_alignment is initially 512. The device model may set them, with bdrv_set_buffer_alignment(). If the device model gets detached (hot unplug), the device's alignment is left behind. Only okay because device hot unplug automatically destroys the BlockDriverState. But

[Qemu-devel] [RFC v5 31/86] Integrate I/O memory regions into qemu

2011-07-20 Thread Avi Kivity
get_system_io() returns the root I/O memory region. Signed-off-by: Avi Kivity --- exec-memory.h |2 ++ exec.c| 10 ++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/exec-memory.h b/exec-memory.h index aad21b5..3acb15f 100644 --- a/exec-memory.h +++ b/exec-m

Re: [Qemu-devel] Wiki spam

2011-07-20 Thread Stefan Weil
Am 15.07.2011 23:06, schrieb Anthony Liguori: On 07/15/2011 12:24 PM, Stefan Weil wrote: Wiki spammers are still very active on qemu.org (see http://wiki.qemu.org/Special:RecentChanges). The QEMU wiki needs more technical protection against spam and also more administrators who can remove spam

[Qemu-devel] [RFC v5 67/86] arm_timer: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/arm_timer.c | 55 --- 1 files changed, 20 insertions(+), 35 deletions(-) diff --git a/hw/arm_timer.c b/hw/arm_timer.c index dac9e70..ee15ca5 100644 --- a/hw/arm_timer.c +++ b/hw/arm_timer.c @@ -176,6 +176,7 @@

[Qemu-devel] [PATCH 07/23] PPC: Remove cINT code from MPIC

2011-07-20 Thread Alexander Graf
The current code treats some bits in IDE as special for critical interrupts. While there is logic to route interrupts as critical, that happens through a different register. So for now I'm just removing the check to enable up to 32 virtual CPUs. Signed-off-by: Alexander Graf --- hw/openpic.c |

[Qemu-devel] [PATCH 21/23] PPC: E500: Remove unneeded CPU nodes

2011-07-20 Thread Alexander Graf
We should only keep CPU nodes in the device tree around that we really have virtual CPUs for. So remove all superfluous entries that we just keep there in case someone wants to create a lot of vCPUs. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |6 ++ 1 files changed, 6 inser

[Qemu-devel] [RFC v5 29/86] vga: simplify vga window mmio access functions

2011-07-20 Thread Avi Kivity
Make use of the memory API's ability to satisfy multi-byte accesses via multiple single-byte accesses. We have to keep vga_mem_{read,write}b() since they're used by cirrus. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c |4 +- hw/vga.c| 56 +++---

[Qemu-devel] [RFC v5 56/86] pci: remove pci_register_bar_simple()

2011-07-20 Thread Avi Kivity
Superceded by pci_register_bar_region(). --- hw/pci.c | 17 - hw/pci.h |3 --- 2 files changed, 0 insertions(+), 20 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 980840f..6aca1af 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -903,7 +903,6 @@ void pci_register_bar(PCIDevice *

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 02:01 PM, Blue Swirl wrote: Either because CA was mentioned as a backing file for C (in which case libvirt already knows about it, because either libvirt handed C to qemu at startup time after already parsing C's headers to learn that CA is a backing file, or because libvirt called

[Qemu-devel] [PATCH 06/23] PPC: Fix IPI support in MPIC

2011-07-20 Thread Alexander Graf
The current IPI support in the MPIC code is incomplete and doesn't work. This code adds proper support for IPIs in MPIC by using the IDE register to remember which CPUs IPIs are still outstanding to. New triggers through the IPI trigger register only add to the list of CPUs we want to IPI. Signed-

[Qemu-devel] [RFC v5 83/86] isa: add isa_address_space()

2011-07-20 Thread Avi Kivity
A helper that returns the address space used by ISA devices. Useful for getting rid of isa_mem_base, multiple ISA buses, or ISA buses behind bridges. Signed-off-by: Avi Kivity --- hw/isa-bus.c |7 +++ hw/isa.h |1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/

[Qemu-devel] [PATCH 18/23] PPC: KVM: Remove kvmppc_read_host_property

2011-07-20 Thread Alexander Graf
We just got rid of the last user of kvmppc_read_host_property, so we can now safely remove it. Signed-off-by: Alexander Graf --- target-ppc/kvm_ppc.c | 35 --- target-ppc/kvm_ppc.h | 11 --- 2 files changed, 0 insertions(+), 46 deletions(-) diff --git

Re: [Qemu-devel] [RFC 3/4] A separate thread for the VM migration

2011-07-20 Thread Marcelo Tosatti
On Wed, Jul 20, 2011 at 12:00:44AM -0400, Umesh Deshpande wrote: > This patch creates a separate thread for the guest migration on the source > side. The migration routine is called from the migration clock. > > Signed-off-by: Umesh Deshpande > --- > arch_init.c |8 +++ > buffered_

Re: [Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-20 Thread Jan Kiszka
On 2011-07-20 18:45, Michael S. Tsirkin wrote: > On Wed, Jul 20, 2011 at 06:18:43PM +0200, Jan Kiszka wrote: >> On 2011-07-20 18:17, Isaku Yamahata wrote: >>> On Wed, Jul 20, 2011 at 04:27:08PM +0200, Jan Kiszka wrote: On 2011-07-20 14:15, Jan Kiszka wrote: > On 2011-07-20 14:00, Isaku Yam

[Qemu-devel] [RFC v5 36/86] ac97: convert to memory API

2011-07-20 Thread Avi Kivity
fixes BAR sizing as well. Signed-off-by: Avi Kivity --- hw/ac97.c | 88 +++- 1 files changed, 51 insertions(+), 37 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 0b59896..bcddaa6 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -160,8 +1

[Qemu-devel] [PATCH 00/23] SMP support for MPC8544DS

2011-07-20 Thread Alexander Graf
Due to popular demand, I got involved in the dirty arts of SMP programming :). This patch set adds support for the MPC8544DS board (e500v2) to run with up to 32 virtual CPUs. This works fine with emulation and Linux guests. It also works with KVM when disabling the DEC trick in ppc_spin.c - someth

[Qemu-devel] [RFC v5 16/86] pc: grab system_memory

2011-07-20 Thread Avi Kivity
While eventually this should come from the machine initialization function, take a short cut to avoid converting all machines now. Signed-off-by: Avi Kivity --- hw/pc.c |3 ++- hw/pc.h |4 +++- hw/pc_piix.c |8 +++- 3 files changed, 12 insertions(+), 3 deletions(-) dif

[Qemu-devel] [RFC v5 75/86] ppc4xx_sdram: convert to memory API

2011-07-20 Thread Avi Kivity
Clumsy due to the lack of clipping support, needed for changing exposed ram size. Signed-off-by: Avi Kivity --- hw/ppc405.h|9 ++--- hw/ppc405_boards.c | 18 +- hw/ppc405_uc.c | 12 hw/ppc440.c|7 +-- hw/ppc4xx.h|2

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 9:17 PM, Eric Blake wrote: > On 07/20/2011 12:00 PM, Blue Swirl wrote: Let's have files A, B, C etc. with backing files AA etc. How would libvirt know that when QEMU wants to write to file CA, this is because it's needed to access C, or is it just tricke

[Qemu-devel] [RFC v5 08/86] memory: late initialization of ram_addr

2011-07-20 Thread Avi Kivity
For non-RAM memory regions, we cannot tell whether this is an I/O region or an MMIO region. Since the qemu backing registration is different for the two, we have to defer initialization until we know which address space we are in. These shenanigans will be removed once the backing registration is

[Qemu-devel] [RFC v5 54/86] xen-platform: convert to memory API

2011-07-20 Thread Avi Kivity
Since this device bypasses PCI and registers I/O ports directly with the system bus, it needs further attention. Signed-off-by: Avi Kivity --- hw/xen_platform.c | 83 1 files changed, 51 insertions(+), 32 deletions(-) diff --git a/hw/xen_pl

[Qemu-devel] [RFC v5 23/86] pci: add API to get a BAR's mapped address

2011-07-20 Thread Avi Kivity
This is a hack, for devices that have a back-channel to read this address back outside the normal configuration mechanisms, such as VMware svga. Signed-off-by: Avi Kivity --- hw/pci.c |5 + hw/pci.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pc

[Qemu-devel] [PATCH 37/55] ide/atapi: Preserve tray state on migration

2011-07-20 Thread Markus Armbruster
Use a subsection, so that migration to older version still works, provided the tray is closed and unlocked. Signed-off-by: Markus Armbruster --- hw/ide/core.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c in

[Qemu-devel] [RFC v5 46/86] ppc: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/cuda.c |6 ++- hw/escc.c | 42 +-- hw/escc.h |2 +- hw/heathrow_pic.c | 29 -- hw/ide.h |2 +- hw/ide/macio.c| 36 --- hw/mac_dbdma.c| 32 +

Re: [Qemu-devel] [RFC v5 00/86] Memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-20 18:49, Avi Kivity wrote: > New in this version: > - more mindless conversions; I believe there are no longer any destructive > operations in the tree (IO_MEM_UNASSIGNED) > - fix memory map generation bug (patch 13) > - proper 440FX PAM/SMRAM and PCI holes > This on top fix

[Qemu-devel] [RFC v5 43/86] ahci: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ide/ahci.c | 31 +-- hw/ide/ahci.h |2 +- hw/ide/ich.c |3 +-- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 1f008a3..e207ca0 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci

[Qemu-devel] [PATCH 2/2] target-arm: Mark 1136r1 as a v6K core

2011-07-20 Thread Peter Maydell
The 1136r1 is actually a v6K core (unlike the 1136r0); mark it as such, thus enabling the TLS registers, NOP hints, CLREX, half and byte wide exclusive load/stores, etc. The VA-to-PA translation registers are not present on 1136r1, so introduce a new feature flag for them, which is enabled on 1176

Re: [Qemu-devel] [PATCH 2/6] xen: add mapcache stubs

2011-07-20 Thread Alexander Graf
On 20.07.2011, at 18:41, Stefan Weil wrote: > Am 19.07.2011 04:53, schrieb Alexander Graf: >> During the transition to get rid of CONFIG_XEN_MAPCACHE we lost the mapcache >> stubs along the way. Nobody realized it because the commands were guarded by >> if (xen_enabled()) clauses that made gcc op

Re: [Qemu-devel] [PATCH v8 3/4] guest agent: qemu-ga daemon

2011-07-20 Thread Luiz Capitulino
On Wed, 20 Jul 2011 14:25:06 -0500 Michael Roth wrote: > On 07/20/2011 12:56 PM, Luiz Capitulino wrote: > > On Tue, 19 Jul 2011 15:41:54 -0500 > > Michael Roth wrote: > > > >> This is the actual guest daemon, it listens for requests over a > >> virtio-serial/isa-serial/unix socket channel and ro

[Qemu-devel] [RFC v5 17/86] pc: convert pc_memory_init() to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pc.c | 59 --- hw/pc.h |1 + 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 369566a..1c9d89a 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -41,6 +41,7 @@ #include "sys

[Qemu-devel] [PATCH V2 0/3] Enable QEMU to handle more than 2GB with Xen.

2011-07-20 Thread Anthony PERARD
Hi all, Update on this series: - Use a RAM address of 64bits only on 64bits targets when Xen is enable. - Add some comment on the memory registration done for Xen. Xen is not limited by the QEMU's virtual address space for the allocation of the guest RAM. So even with a QEMU 32bits, a Xen gu

Re: [Qemu-devel] [PATCH v8 3/4] guest agent: qemu-ga daemon

2011-07-20 Thread Michael Roth
On 07/20/2011 12:56 PM, Luiz Capitulino wrote: On Tue, 19 Jul 2011 15:41:54 -0500 Michael Roth wrote: This is the actual guest daemon, it listens for requests over a virtio-serial/isa-serial/unix socket channel and routes them through to dispatch routines, and writes the results back to the ch

Re: [Qemu-devel] [PATCH] exec.h cleanup

2011-07-20 Thread Blue Swirl
On Sun, Jul 17, 2011 at 6:31 PM, Peter Maydell wrote: > On 17 July 2011 13:31, Blue Swirl wrote: >> diff --git a/target-arm/iwmmxt_helper.c b/target-arm/iwmmxt_helper.c >> index ebe6eb9..fbd3547 100644 >> --- a/target-arm/iwmmxt_helper.c >> +++ b/target-arm/iwmmxt_helper.c >> @@ -23,7 +23,7 @@ >>

[Qemu-devel] [RFC v5 22/86] usb-ohci: convert to MemoryRegion

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/usb-ohci.c | 42 +- 1 files changed, 17 insertions(+), 25 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 8491d59..337b250 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -62,7 +62,7 @@ typedef struct OHCI

[Qemu-devel] [PATCH 0/2] support 1176, 1136r1's v6k features

2011-07-20 Thread Peter Maydell
This patchset is Jamie's 1176 patch plus one which sits on top of it and adds support for the v6k features in the 1136r1. (I've included Jamie's patch (a) as a convenience to clean the commit comment up and (b) because of this dependency.) Specifically the 1136r1 is a v6K core and supports TLS reg

Re: [Qemu-devel] [PATCH v5 00/10] trace-state: make the behaviour of "disable" consistent across all backends

2011-07-20 Thread Lluís
Stefan Hajnoczi writes: > I did leave some comments, mainly #ifdef reduction. But let's merge the > next version. I'm leaving on vacations until 13th august, so I'll fix it based on your comments when I come back. Hope that's not a problem. Bye, bye! :) Lluis -- "And it's much the same thin

[Qemu-devel] [Bug 504368] Re: sdl window intermittently scales instead of resizing

2011-07-20 Thread Michal Suchanek
My window manager maximizes all windows. I am running kvm 0.14. Initially the VM is displayed 1:1 in the top left corner leaving large portion of the window black. Resizing the window or rebooting the VM causes the output to be scaled which is horrendous. There are three issues here: there is no

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 8:47 PM, Eric Blake wrote: > On 07/20/2011 11:27 AM, Blue Swirl wrote: >>> >>> We've already told you - qemu must have a way to be passed fds which are >>> associated with names, and when a file refers to another backing file by >>> name, then qemu falls back on its fd/name

Re: [Qemu-devel] [PATCH 2/6] xen: add mapcache stubs

2011-07-20 Thread Avi Kivity
On 07/19/2011 05:53 AM, Alexander Graf wrote: During the transition to get rid of CONFIG_XEN_MAPCACHE we lost the mapcache stubs along the way. Nobody realized it because the commands were guarded by if (xen_enabled()) clauses that made gcc optimize out the respective calls. Except those build

[Qemu-devel] [RFC v5 39/86] es1370: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/es1370.c | 43 +-- 1 files changed, 25 insertions(+), 18 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c index 1ed62b7..6a01797 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -268,6 +268,7 @@ struct chan { typedef str

[Qemu-devel] [RFC v5 82/86] sysbus: remove sysbus_init_mmio_cb()

2011-07-20 Thread Avi Kivity
This problem with this function is that it is not reversible - it is impossible to know where things are registered and unregister them exactly. As there are no more users, we can remove it. Signed-off-by: Avi Kivity --- hw/sysbus.c | 12 hw/sysbus.h |2 -- 2 files changed, 0

[Qemu-devel] [PATCH 17/55] ide/atapi: Switch from BlockDriverState's tray_open to own

2011-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/ide/atapi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index fee567b..96f7c31 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -510,7 +510,7 @@ static unsigned int event_status_media(IDEStat

[Qemu-devel] [RFC v5 68/86] armv7m: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/armv7m.c | 24 ++-- 1 files changed, 10 insertions(+), 14 deletions(-) diff --git a/hw/armv7m.c b/hw/armv7m.c index 83f3393..a932f16 100644 --- a/hw/armv7m.c +++ b/hw/armv7m.c @@ -106,31 +106,27 @@ static void bitband_writel(void *opaque, t

[Qemu-devel] [PATCH 1/2] target-arm: support for ARM1176JZF-s cores

2011-07-20 Thread Peter Maydell
From: Jamie Iles Add support for v6K ARM1176JZF-S. This core includes the VA<->PA translation capability and security extensions. Signed-off-by: Jamie Iles Reviewed-by: Peter Maydell --- target-arm/cpu.h|1 + target-arm/helper.c | 23 +++ 2 files changed, 24 ins

[Qemu-devel] [PATCH 47/55] block: Move BlockConf & friends from block_int.h to block.h

2011-07-20 Thread Markus Armbruster
It's convenience stuff for block device models, so block.h isn't the ideal home either, but better than block_int.h. Permits moving some #include "block_int.h" from device model .h into .c. Signed-off-by: Markus Armbruster --- block.h | 38 ++ blo

[Qemu-devel] [RFC v5 18/86] pc: move global memory map out of pc_init1() and into its callers

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pc_piix.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index d83854c..f2d0476 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -68,7 +68,8 @@ static void ioapic_init(IsaIrqState *isa_irq_state)

[Qemu-devel] [RFC v5 71/86] omap_gpmc/nseries/tusb6010: convert to memory API

2011-07-20 Thread Avi Kivity
Somewhat clumsy since it needs a variable sized region. Signed-off-by: Avi Kivity --- hw/omap.h |3 ++- hw/omap_gpmc.c | 54 ++ hw/tusb6010.c | 30 +- hw/tusb6010.h |7 +-- 4 files changed, 50

[Qemu-devel] [RFC v5 24/86] vmsvga: don't remember pci BAR address in callback any more

2011-07-20 Thread Avi Kivity
We're going to remove the callback, so we can't use it to save the address. Use the pci API instead. Signed-off-by: Avi Kivity --- hw/vmware_vga.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 354c221..190b005 100644

[Qemu-devel] [PATCH 50/55] block: New bdrv_set_buffer_alignment()

2011-07-20 Thread Markus Armbruster
Device models should be able to set it without an unclean include of block_int.h. Signed-off-by: Markus Armbruster --- block.c |6 -- block.h |1 + hw/ide/core.c |2 +- hw/scsi-disk.c |3 +-- hw/virtio-blk.c |3 +-- 5 files changed, 8 insertions(+), 7 d

[Qemu-devel] [RFC v5 07/86] memory: rename MemoryRegion::has_ram_addr to ::terminates

2011-07-20 Thread Avi Kivity
I/O regions will not have ram_addrs, so this is a better name. Signed-off-by: Avi Kivity --- memory.c | 18 +- memory.h |2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/memory.c b/memory.c index 7187223..5fda4a0 100644 --- a/memory.c +++ b/memory.c @@

[Qemu-devel] [PATCH 48/55] hw: Trim superfluous #include "block_int.h"

2011-07-20 Thread Markus Armbruster
Including it in device models is unclean, including it without a reason adds insult to injury. Signed-off-by: Markus Armbruster --- hw/fdc.c|1 - hw/ide/cmd646.c |1 - hw/ide/ich.c|1 - hw/ide/isa.c|1 - hw/ide/macio.c |1 - hw/ide/microdr

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
On 07/20/2011 11:20 AM, Blue Swirl wrote: There could still be some issues: Let's have files A, B, C etc. with backing files AA etc. How would libvirt know that when QEMU wants to write to file CA, this is because it's needed to access C, or is it just trickery by a devious guest to corrupt stora

[Qemu-devel] [RFC v5 53/86] uhci: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/usb-uhci.c | 42 -- 1 files changed, 28 insertions(+), 14 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 2ef4c5b..6d1dd54 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -132,6 +132,7 @@ typedef struct UH

[Qemu-devel] [RFC v5 49/86] i6300esb: convert to memory API

2011-07-20 Thread Avi Kivity
Also add missing destructor. Signed-off-by: Avi Kivity --- hw/wdt_i6300esb.c | 43 +-- 1 files changed, 29 insertions(+), 14 deletions(-) diff --git a/hw/wdt_i6300esb.c b/hw/wdt_i6300esb.c index 53786ce..abc2e17 100644 --- a/hw/wdt_i6300esb.c +++ b/hw/w

Re: [Qemu-devel] [PATCH 2/6] xen: add mapcache stubs

2011-07-20 Thread Alexander Graf
On 20.07.2011, at 17:12, Avi Kivity wrote: > On 07/19/2011 05:53 AM, Alexander Graf wrote: >> During the transition to get rid of CONFIG_XEN_MAPCACHE we lost the mapcache >> stubs along the way. Nobody realized it because the commands were guarded by >> if (xen_enabled()) clauses that made gcc op

[Qemu-devel] [PATCH] sh4: Fix potential crash in debug code

2011-07-20 Thread Stefan Weil
cppcheck reports this error: qemu/hw/sh_intc.c:390: error: Possible null pointer dereference: s - otherwise it is redundant to check if s is null at line 385 If s were NULL, the printf() statement would crash. Setting braces fixes this bug. Signed-off-by: Stefan Weil --- hw/sh_intc.c |9 +

Re: [Qemu-devel] [PATCH 2/6] xen: add mapcache stubs

2011-07-20 Thread Stefan Weil
Am 19.07.2011 04:53, schrieb Alexander Graf: During the transition to get rid of CONFIG_XEN_MAPCACHE we lost the mapcache stubs along the way. Nobody realized it because the commands were guarded by if (xen_enabled()) clauses that made gcc optimize out the respective calls. This patch adds th

[Qemu-devel] [RFC v5 48/86] pcnet: convert to memory API

2011-07-20 Thread Avi Kivity
Also related chips. Signed-off-by: Avi Kivity --- hw/lance.c | 31 ++- hw/pcnet-pci.c | 74 +-- hw/pcnet.h |4 ++- 3 files changed, 61 insertions(+), 48 deletions(-) diff --git a/hw/lance.c b/hw/lance.c inde

[Qemu-devel] [RFC v5 42/86] virtio-pci: convert to memory API

2011-07-20 Thread Avi Kivity
except msix. [jan: fix build] Signed-off-by: Avi Kivity --- hw/virtio-pci.c | 74 ++ hw/virtio-pci.h |2 +- 2 files changed, 31 insertions(+), 45 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index d685243..c114e1a 100644

[Qemu-devel] [RFC v5 45/86] lsi53c895a: convert to memory API

2011-07-20 Thread Avi Kivity
An optimization that fast-pathed DMA reads from the SCRIPTS memory was removed int the process. Likely it breaks with iommus anyway. Signed-off-by: Avi Kivity --- hw/lsi53c895a.c | 258 --- 1 files changed, 56 insertions(+), 202 deletions(-)

  1   2   3   4   >