[Qemu-devel] [PATCH 07/55] block: Make BlockDriver method bdrv_set_locked() return void

2011-07-20 Thread Markus Armbruster
The only caller is bdrv_set_locked(), and it ignores the value. Callees always return 0, except for FreeBSD's cdrom_set_locked(), which returns -ENOTSUP when the device is in a terminally wedged state. Signed-off-by: Markus Armbruster --- block/raw-posix.c | 10 +++--- block/raw.c |

Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-20 16:48, Avi Kivity wrote: > On 07/20/2011 05:45 PM, Jan Kiszka wrote: >>> >>> (that's the whole point - it can be made invisible by something outside >>> the cirrus card's knowledge). >>> >>> Note - with kvm, there is still a race between syncing the bitmap and >>> removing the reg

[Qemu-devel] [PATCH 24/55] ide/atapi: Track tray locked state

2011-07-20 Thread Markus Armbruster
We already track it in BlockDriverState. Just like tray open/close state, we should track it in the device models instead, because it's device state. Signed-off-by: Markus Armbruster --- hw/ide/atapi.c|1 + hw/ide/internal.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) di

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Jan Kiszka
On 2011-07-20 18:02, Avi Kivity wrote: > On 07/20/2011 06:58 PM, Jan Kiszka wrote: >> On 2011-07-20 16:54, Avi Kivity wrote: >>> On 07/20/2011 05:37 PM, Michael S. Tsirkin wrote: > > If you do a memory_region_set_log() immediately after > memory_region_init_ram(), then as soon as t

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

2011-07-20 Thread Markus Armbruster
Device models should be able to use them without an unclean include of block_int.h. Signed-off-by: Markus Armbruster --- block.h | 15 +++ block_int.h | 18 -- hw/ide/core.c |1 - 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/block.h

[Qemu-devel] [PATCH] darwin-user: Remove two unused variables

2011-07-20 Thread Stefan Weil
cppcheck report: darwin-user/signal.c:322: style: Unused variable: i darwin-user/signal.c:322: style: Variable 'err' is assigned a value that is never used Signed-off-by: Stefan Weil --- darwin-user/signal.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/darwin-user/si

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

2011-07-20 Thread Michael Roth
On 07/20/2011 03:01 PM, Michael Roth wrote: On 07/20/2011 02:31 PM, Luiz Capitulino wrote: 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

[Qemu-devel] [RFC v5 25/86] vga: convert vga and its derivatives to the memory API

2011-07-20 Thread Avi Kivity
Convert all vga memory to the memory API. Note we need to fall back to get_system_memory(), since the various buses don't pass the vga window as a memory region. We no longer need to sync the dirty bitmap of the cirrus mapped memory banks, since the memory API takes care of that for us. Signed-o

Re: [Qemu-devel] [PATCH] SPARC64: treat UA2007 ASI_BLK_* as translating ASIs.

2011-07-20 Thread Blue Swirl
Thanks, applied. On Mon, Jul 18, 2011 at 8:32 AM, Tsuneo Saito wrote: > UA2007 ASI_BLK_* should be added in is_translating_asi(). > > Signed-off-by: Tsuneo Saito > --- >  target-sparc/op_helper.c |    3 ++- >  1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/target-sparc/op_help

[Qemu-devel] [RFC v5 65/86] arm_gic: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/arm_gic.c | 22 -- hw/armv7m_nvic.c |4 +++- hw/mpcore.c | 37 + hw/realview_gic.c | 38 +- 4 files changed, 45 insertions(+), 56 deletions(-) diff -

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

2011-07-20 Thread Jan Kiszka
On 2011-07-20 19:43, Avi Kivity wrote: > On 07/20/2011 08:41 PM, Jan Kiszka wrote: >> 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) >> >

Re: [Qemu-devel] [PATCH] Avoid CPU endian memory accesses in devices

2011-07-20 Thread Blue Swirl
On Fri, Jul 15, 2011 at 12:56 AM, Alexander Graf wrote: > > > > > Am 14.07.2011 um 21:34 schrieb Blue Swirl : > >> Don't compile virtio.c in hwlib, it depends on memory accesses >> performed in CPU endianness. >> >> Make loads and stores in CPU endianness unavailable to devices >> and poison them

[Qemu-devel] [RFC v5 19/86] pci: pass address space to pci bus when created

2011-07-20 Thread Avi Kivity
This is now done sloppily, via get_system_memory(). Eventually callers will be converted to stop using that. Signed-off-by: Avi Kivity --- hw/apb_pci.c |2 ++ hw/bonito.c|4 +++- hw/grackle_pci.c |5 +++-- hw/gt64xxx.c |4 +++- hw/pc.h|4 +++

[Qemu-devel] [RFC v5 12/86] memory: add ioeventfd support

2011-07-20 Thread Avi Kivity
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 --- memory.c | 218 ++

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

2011-07-20 Thread Jan Kiszka
On 2011-07-20 18:34, Marcelo Tosatti wrote: > 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

[Qemu-devel] [PATCH 39/55] block/raw: Fix to forward method bdrv_media_changed()

2011-07-20 Thread Markus Armbruster
Block driver "raw" forwards most methods to the underlying block driver. However, it doesn't implement method bdrv_media_changed(). Makes bdrv_media_changed() always return -ENOTSUP. I believe -fda /dev/fd0 gives you raw over host_floppy, and disk change detection (fdc register 7 bit 7) is broken

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/17/2011 02:13 PM, Avi Kivity wrote: New in this version: MemoryRegionOps gained .old_mmio and .old_portio members, which allow reusing old-style callbacks with the new API. All uses were converted, except for eepro100.c, which uses the same MemoryRegionOps for both portio and m

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

2011-07-20 Thread Marcelo Tosatti
On Wed, Jul 20, 2011 at 12:02:07AM -0400, Umesh Deshpande wrote: > This patch creates a separate thread for the guest migration on the target > side. > > > Signed-off-by: Umesh Deshpande What for, if its not contending for anything?

[Qemu-devel] [RFC v5 33/86] pci: pass I/O address space to new PCI bus

2011-07-20 Thread Avi Kivity
This lets us register BARs in the I/O address space. Signed-off-by: Avi Kivity --- hw/apb_pci.c |1 + hw/bonito.c|1 + hw/grackle_pci.c |8 ++-- hw/gt64xxx.c |4 +++- hw/pc.h|4 +++- hw/pc_piix.c |6 +- hw/pci.c |

[Qemu-devel] [RFC v5 58/86] pci: remove pci_register_bar()

2011-07-20 Thread Avi Kivity
Superceded by pci_register_bar_region(). The implementations are folded together. Signed-off-by: Avi Kivity --- hw/pci.c | 42 +- hw/pci.h |3 --- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 481eb7e..e9

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-20 Thread Avi Kivity
On 07/20/2011 07:10 PM, Michael S. Tsirkin wrote: > and vga could do it if the vnc display > is disconnected, or if the update rate is so high it can just assume > all memory is dirty. Yes, but it's not something *devices* should be doing. No one knows about the frame buffer except the vga

Re: [Qemu-devel] [PATCH] SPARC64: fix VIS1 SIMD signed compare instructions

2011-07-20 Thread Blue Swirl
Thanks, applied. On Mon, Jul 18, 2011 at 9:00 AM, Tsuneo Saito wrote: > The destination registers of SIMD signed compare instructions > (fcmp*<16|32>) are not FP registers but general purpose r registers. > Comparisons should be freg_rs1 CMP freg_rs2, that were reversed. > > Signed-off-by: Tsuneo

[Qemu-devel] [PATCH] guest agent: qemu-ga, remove unused variables

2011-07-20 Thread Michael Roth
--- qemu-ga.c | 25 - 1 files changed, 4 insertions(+), 21 deletions(-) diff --git a/qemu-ga.c b/qemu-ga.c index 4530d3d..6e2f61f 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -37,10 +37,8 @@ struct GAState { JSONMessageParser parser; GMainLoop *main_loop; -gu

[Qemu-devel] [PATCH 44/55] spitz tosa: Simplify "drive is suitable for microdrive" test

2011-07-20 Thread Markus Armbruster
We try the drive defined with -drive if=ide,index=0 (or equivalent sugar). We use it only if (dinfo && bdrv_is_inserted(dinfo->bdrv) && !bdrv_is_removable(dinfo->bdrv)). This is a convoluted way to test for "drive media can't be removed". The only way to create such a drive with -drive if=ide is

[Qemu-devel] [RFC v5 01/86] xen: fix xen-mapcache build on non-Xen capable targets

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- xen-mapcache.h | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/xen-mapcache.h b/xen-mapcache.h index 606b8af..da874ca 100644 --- a/xen-mapcache.h +++ b/xen-mapcache.h @@ -9,6 +9,10 @@ #ifndef XEN_MAPCACHE_H #

[Qemu-devel] [RFC v5 47/86] ne2000: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ne2000-isa.c | 14 +++--- hw/ne2000.c | 77 +- hw/ne2000.h |8 + 3 files changed, 59 insertions(+), 40 deletions(-) diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c index e41dbba..ce7b365 1

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

2011-07-20 Thread Avi Kivity
This eases the transition to the new API. Signed-off-by: Avi Kivity --- memory.c | 10 ++ memory.h | 10 ++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index bb04952..e4446a0 100644 --- a/memory.c +++ b/memory.c @@ -14,6 +14,7 @@ #incl

[Qemu-devel] [RFC v5 78/86] sh_pci: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/sh_pci.c | 63 +++--- 1 files changed, 42 insertions(+), 21 deletions(-) diff --git a/hw/sh_pci.c b/hw/sh_pci.c index cd86501..76061bb 100644 --- a/hw/sh_pci.c +++ b/hw/sh_pci.c @@ -33,13 +33,16 @@ typedef str

Re: [Qemu-devel] [QAPI+QGA 2/3] QAPI code generation infrastructure v7

2011-07-20 Thread Luiz Capitulino
On Tue, 19 Jul 2011 14:50:28 -0500 Michael Roth wrote: > This is Set 2/3 of the QAPI+QGA patchsets. > > These patches apply on top of master (set1 merged), and can also be obtained > from: > git://repo.or.cz/qemu/mdroth.git qapi-backport-set2-v7 > > (Set1+2 are a backport of some of the QAPI-re

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

2011-07-20 Thread Avi Kivity
On 07/20/2011 08:29 PM, Blue Swirl wrote: > + > +static bool memory_region_ioeventfd_before(MemoryRegionIoeventfd a, > + MemoryRegionIoeventfd b) > +{ > +if (a.addr.start< b.addr.start) return true; > +if (a.addr.start> b.addr.start) retur

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

2011-07-20 Thread Avi Kivity
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 Caveats: - some devices (mostly boards) still grab a global memory

[Qemu-devel] [RFC v5 63/86] apb_pci: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/apb_pci.c | 83 ++ 1 files changed, 37 insertions(+), 46 deletions(-) diff --git a/hw/apb_pci.c b/hw/apb_pci.c index 1638226..ace8878 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -70,7 +70,9 @@ do { pri

[Qemu-devel] [RFC v5 51/86] sun4u: convert to memory API

2011-07-20 Thread Avi Kivity
fixes memory leak on repeated BAR map/unmap Signed-off-by: Avi Kivity --- hw/sun4u.c | 55 +-- 1 files changed, 25 insertions(+), 30 deletions(-) diff --git a/hw/sun4u.c b/hw/sun4u.c index d7dcaf0..74a06a8 100644 --- a/hw/sun4u.c +++ b/hw/su

[Qemu-devel] [PATCH 19/23] PPC: KVM: Add stubs for kvm helper functions

2011-07-20 Thread Alexander Graf
We have a bunch of helper functions that don't have any stubs for them in case we don't have CONFIG_KVM enabled. That didn't bite us so far, because gcc can optimize them out pretty well, but we should really provide them. Signed-off-by: Alexander Graf --- target-ppc/kvm_ppc.h | 26 +++

[Qemu-devel] [PATCH V2 3/3] vl.c: Check the asked ram_size later.

2011-07-20 Thread Anthony PERARD
As a Xen guest can have more than 2GB of RAM on a 32bit host, we move the conditions after than we now if we run one Xen or not. Signed-off-by: Anthony PERARD --- vl.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index fcd7395..c2efedf 100644

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

2011-07-20 Thread Isaku Yamahata
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 Yamahata wrote: > Hi. This clean up looks good b

[Qemu-devel] [RFC v5 81/86] ppce500_pci: convert to sysbus_init_mmio_cb2()

2011-07-20 Thread Avi Kivity
Not a huge step forward, but at least we now have a 1:1 relationship between registration and unregistration. Signed-off-by: Avi Kivity --- hw/ppce500_pci.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c index 6a9f979..439

[Qemu-devel] [RFC v5 73/86] pcie_host: convert to memory API

2011-07-20 Thread Avi Kivity
Assuming that mmcfg size cannot change at runtime. Signed-off-by: Avi Kivity --- hw/pcie_host.c | 98 ++- hw/pcie_host.h | 12 +++--- 2 files changed, 31 insertions(+), 79 deletions(-) diff --git a/hw/pcie_host.c b/hw/pcie_host.c index b74

[Qemu-devel] [RFC v5 84/86] pci: add pci_address_space()

2011-07-20 Thread Avi Kivity
Returns the PCI address space. Useful for bridges that can obscure part of the PCI address space. 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/pci.c index e6a3e56..ec114a1 100644 --- a/hw/pci

[Qemu-devel] [RFC v5 02/86] Hierarchical memory region API

2011-07-20 Thread Avi Kivity
The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled. This allows a device to configure a memory region once, then hand it off to its parent bus to map it according to

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

2011-07-20 Thread Michael S. Tsirkin
On Wed, Jul 20, 2011 at 07:10:57PM +0200, Jan Kiszka wrote: > 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 20

[Qemu-devel] [PATCH V2 1/3] cpu-common: Have a ram_addr_t of uint64 with Xen.

2011-07-20 Thread Anthony PERARD
In Xen case, memory can be bigger than the host memory. that mean a 32bits host (and QEMU) should be able to handle a RAM address of 64bits. Signed-off-by: Anthony PERARD --- cpu-common.h |8 exec.c |9 + xen-all.c|2 +- 3 files changed, 14 insertions(+), 5

[Qemu-devel] [RFC v5 60/86] pci: rename pci_register_bar_region() to pci_register_bar()

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ac97.c |4 ++-- hw/cirrus_vga.c |5 ++--- hw/e1000.c|5 ++--- hw/eepro100.c |7 +++ hw/es1370.c |2 +- hw/ide/cmd646.c | 14 +- hw/ide/ich.c |2 +- hw/ide/piix.c |3 +-- hw/ide/vi

[Qemu-devel] [RFC v5 40/86] ide: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/ide/cmd646.c | 208 +++ hw/ide/pci.c| 25 --- hw/ide/pci.h| 19 - hw/ide/piix.c | 64 + hw/ide/via.c| 65 + 5 files changed, 261 insertions(+), 120 d

[Qemu-devel] [PATCH 11/23] PPC: E500: Use spin code for secondary CPUs

2011-07-20 Thread Alexander Graf
When running with more than one CPU in -kernel mode, we need to have the secondary CPUs spin in a special u-boot compatible loop that reads out a so called "spin table" and checks for updates. This patch makes sure secondary CPUs use the spin code and execute it first thing when they execute. Sig

[Qemu-devel] [PATCH 22/23] PPC: E500: Update cpu-release-addr property in cpu nodes

2011-07-20 Thread Alexander Graf
The guest OS wants to know where the guest spins, so let's tell him while updating the CPU nodes with the frequencies anyways. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_

[Qemu-devel] [RFC v5 64/86] apic: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/apic.c | 25 ++--- 1 files changed, 10 insertions(+), 15 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 9febf40..7d0b0f6 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -80,6 +80,7 @@ typedef struct APICState APICState; struct APICState

[Qemu-devel] [RFC v5 85/86] vga: drop get_system_memory() from vga devices and derivatives

2011-07-20 Thread Avi Kivity
Instead, use the bus accessors, or get the address space directly from the board constructor. Signed-off-by: Avi Kivity --- hw/cirrus_vga.c | 13 ++--- hw/mips_jazz.c |4 +++- hw/pc.c |4 +++- hw/pc.h |5 +++-- hw/qxl.c|2 +- hw/vga-isa-mm.c |

[Qemu-devel] [RFC v5 57/86] pci: convert pci rom to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pci.c | 20 +++- hw/pci.h |3 ++- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 6aca1af..481eb7e 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1857,11 +1857,6 @@ static uint8_t pci_find_capability_list(P

[Qemu-devel] [RFC v5 06/86] memory: abstract address space operations

2011-07-20 Thread Avi Kivity
Prepare for multiple address space support by abstracting away the details of registering a memory range with qemu's flat representation into an AddressSpace object. Note operations which are memory specific are not abstracted, since they will never be called on I/O address spaces anyway. Signed-

[Qemu-devel] [RFC v5 79/86] arm11mpcore: use sysbus_init_mmio_cb2

2011-07-20 Thread Avi Kivity
This tells the sysbus code it need not use IO_MEM_UNASSIGNED. Signed-off-by: Avi Kivity --- hw/arm11mpcore.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c index 3bbd885..6b119b7 100644 --- a/hw/arm11mpcore.c +++ b/hw/arm11mpcor

Re: [Qemu-devel] [PATCH] Makefile: Minor cscope fixups

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 6:41 AM, Alexandre Raymond wrote: > -Create cscope symbols for assembly files in addition to .c/.h files. > -Create cscope database with full path instead of relative path so cscope >  can be used with CSCOPE_DB in any directory. > > Signed-off-by: Alexandre Raymond > ---

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Eric Blake
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 mapping to use the already-passed fd instead. Which implies that s

[Qemu-devel] [PATCH 16/23] PPC: E500: Remove mpc8544_copy_soc_cell

2011-07-20 Thread Alexander Graf
We don't need mpc8544_copy_soc_cell anymore, since we're explicitly reading host values and writing guest values respectively. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 24 1 files changed, 0 insertions(+), 24 deletions(-) diff --git a/hw/ppce500_mpc8

[Qemu-devel] [RFC v5 86/86] 440fx: fix PAM, PCI holes

2011-07-20 Thread Avi Kivity
The current implementation of PAM and the PCI holes is broken in several ways: - PCI BARs are not restricted to the PCI hole (a BAR may hide memory) - PCI devices do not respect PAM (if a PCI device maps a region while PAM maps the region to RAM, the request will be honored) This patch fi

[Qemu-devel] [RFC v5 14/86] exec.c: initialize memory map

2011-07-20 Thread Avi Kivity
Allocate the root memory region and initialize it. Signed-off-by: Avi Kivity --- exec.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 8277900..2bbd14c 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,8 @@ #include "kvm.h" #includ

[Qemu-devel] [RFC v5 20/86] pci: add MemoryRegion based BAR management API

2011-07-20 Thread Avi Kivity
Allow registering a BAR using a MemoryRegion. Once all users are converted, pci_register_bar() and pci_register_bar_simple() will be removed. Signed-off-by: Avi Kivity --- hw/pci.c | 47 +++ hw/pci.h |3 +++ 2 files changed, 42 insertions(+), 8

[Qemu-devel] [RFC v5 03/86] memory: implement dirty tracking

2011-07-20 Thread Avi Kivity
Currently dirty tracking is implemented by passing through all calls to the underlying cpu_physical_memory_*() calls. Signed-off-by: Avi Kivity --- memory.c | 39 +++ memory.h |1 + 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/memory.c

[Qemu-devel] [RFC v5 34/86] pci: allow I/O BARs to be registered with pci_register_bar_region()

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/pci.c | 43 +++ hw/pci.h |1 + hw/pci_internals.h |3 ++- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 2659d96..980840f 100644 --- a/hw/pci.c +++ b/

[Qemu-devel] [RFC v5 44/86] intel-hda: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/intel-hda.c | 35 +++ 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/hw/intel-hda.c b/hw/intel-hda.c index 5a2bc3a..1e4c71e 100644 --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -177,7 +177,7 @@ struct IntelHDAStat

[Qemu-devel] [RFC v5 55/86] msix: convert to memory API

2011-07-20 Thread Avi Kivity
The msix table is defined as a subregion, to allow for a BAR that mixes device specific regions with the msix table. Signed-off-by: Avi Kivity --- hw/ivshmem.c| 11 + hw/msix.c | 64 +++ hw/msix.h |6 +--- hw/pci

[Qemu-devel] [RFC v5 72/86] onenand: convert to memory API

2011-07-20 Thread Avi Kivity
Signed-off-by: Avi Kivity --- hw/onenand.c | 70 +++-- 1 files changed, 38 insertions(+), 32 deletions(-) diff --git a/hw/onenand.c b/hw/onenand.c index 71c1ab4..fe53090 100644 --- a/hw/onenand.c +++ b/hw/onenand.c @@ -23,6 +23,7 @@ #include

[Qemu-devel] [PATCH 49/55] block: Declare qemu_blockalign() in block.h, not block_int.h

2011-07-20 Thread Markus Armbruster
Device models should be able to use it without an unclean include of block_int.h. Signed-off-by: Markus Armbruster --- block.h |2 ++ block_int.h |2 -- hw/sd.c |1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/block.h b/block.h index b6eaaba..8f52abb 10064

[Qemu-devel] [RFC v5 70/86] tusb6010: move declarations to new file tusb6010.h

2011-07-20 Thread Avi Kivity
Avoid #include hell. Signed-off-by: Avi Kivity --- hw/devices.h |7 --- hw/nseries.c |1 + hw/tusb6010.c |2 +- hw/tusb6010.h | 10 ++ 4 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 hw/tusb6010.h diff --git a/hw/devices.h b/hw/devices.h index c

[Qemu-devel] [RFC v5 27/86] cirrus: simplify bitblt BAR 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 | 81 +-- 1 files changed, 13 insertions(+), 68 deletions(-) diff --git a/hw/cirrus_vga.c b/

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Blue Swirl
On Wed, Jul 20, 2011 at 4:46 PM, Eric Blake wrote: > On 07/20/2011 07:25 AM, Jes Sorensen wrote: >>> >>> I think if libvirt wants qemu to use an fd instead of a file name, it >>> shouldn't pass a file name but an fd in the first place. Which means >>> that the two that we need are support for an f

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

2011-07-20 Thread Luiz Capitulino
On Wed, 20 Jul 2011 15:05:39 -0500 Michael Roth wrote: > On 07/20/2011 03:01 PM, Michael Roth wrote: > > On 07/20/2011 02:31 PM, Luiz Capitulino wrote: > >> 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

Re: [Qemu-devel] live snapshot wiki updated

2011-07-20 Thread Cleber Rosa
On 07/20/2011 10:34 AM, Anthony Liguori wrote: On 07/20/2011 08:50 AM, Cleber Rosa wrote: Just as a reminder: with DAC, if a guest is compromised and somehow escalates to QEMU, it could disable its isolation (ie, by setting their own image files world readable). I guess we shouldn't try to fix t

[Qemu-devel] [RFC v5 38/86] eepro100: convert to memory API

2011-07-20 Thread Avi Kivity
Note: the existing code aliases the flash BAR into the MMIO bar. This is probably a bug. This patch does not correct the problem. Signed-off-by: Avi Kivity --- hw/eepro100.c | 182 - 1 files changed, 37 insertions(+), 145 deletions(-) d

[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(-)

[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 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

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] [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 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] [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

[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

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] [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

[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 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 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] [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 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] [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] [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] [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 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 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] [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

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

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

[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] [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] [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

[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

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 @@ >>

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

[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

[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

<    1   2   3   4   >