Statistics
| Branch: | Revision:

root / include @ 5b50e790

# Date Author Comment
986a2998 07/27/2013 01:04 am Andreas Färber

gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions

This avoids polluting the global namespace with a non-prefixed macro and
makes it obvious in the call sites that we return.

Semi-automatic conversion using, e.g.,
sed i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target*/gdbstub.c...

5b50e790 07/27/2013 01:04 am Andreas Färber

cpu: Introduce CPUClass::gdb_{read,write}_register()

Completes migration of target-specific code to new target-*/gdbstub.c.

Acked-by: Michael Walle <> (for lm32)
Acked-by: Max Filippov <> (for xtensa)
Signed-off-by: Andreas Färber <>

a0e372f0 07/27/2013 12:23 am Andreas Färber

cpu: Introduce CPUState::gdb_num_regs and CPUClass::gdb_num_core_regs

CPUState::gdb_num_regs replaces num_g_regs.
CPUClass::gdb_num_core_regs replaces NUM_CORE_REGS.

Allows building gdb_register_coprocessor() for xtensa, too.

As a side effect this should fix coprocessor register numbering for SMP....

38e478ec 07/27/2013 12:05 am Stefan Weil

kvm: Change prototype of kvm_update_guest_debug()

Passing a CPUState pointer instead of a CPUArchState pointer eliminates
the last target dependent data type in sysemu/kvm.h.

It also simplifies the code.

Signed-off-by: Stefan Weil <>
Acked-by: Paolo Bonzini <>...

f0ef1cf4 07/26/2013 09:04 pm Anthony Liguori

Merge remote-tracking branch 'rth/tcg-next' into staging

  1. By Claudio Fontana (1) and others
  2. Via Richard Henderson
    • rth/tcg-next:
      tcg: Remove temp_buf
      tcg/aarch64: Implement tlb lookup fast path
      tcg/aarch64: implement ldst 12bit scaled uimm offset...
874ec3c5 07/25/2013 11:56 pm Anthony Liguori

Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging

  • riku/linux-user-for-upstream: (21 commits)
    linux-user: Handle compressed ISA encodings when processing MIPS exceptions
    linux-user: Unlock mmap_lock when resuming guest from page_unprotect...
61fcb628 07/25/2013 04:12 pm Paolo Bonzini

isa_mmio: delete

It is not used anymore.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>
Message-id:
Signed-off-by: Anthony Liguori <>

f03d07d4 07/23/2013 06:57 pm Anthony Liguori

Merge remote-tracking branch 'quintela/migration.next' into staging

  1. By Michael R. Hines (8) and others
  2. Via Juan Quintela
    • quintela/migration.next:
      migration: add autoconvergence documentation
      Fix real mode guest segments dpl value in savevm
      Fix real mode guest migration...
3988982c 07/23/2013 06:57 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

  • Fix NULL pointer dereference in gdbstub
  • Introduce vaddr type
  • Introduce CPUClass::set_pc()
  • Introduce CPUClass::synchronize_from_tb()
  • Introduce CPUClass::get_phys_page_debug()...
732f9e89 07/23/2013 05:28 pm Alexander Graf

linux-user: fix segmentation fault passing with h2g(x) != x

When forwarding a segmentation fault into the guest process, we were passing
the host's address directly into the guest process's signal descriptor.

That obviously confused the guest process, since it didn't know what to make...

ed4fbd10 07/23/2013 02:06 pm Michael R. Hines

rdma: account for the time spent in MIG_STATE_SETUP through QMP

Using the previous patches, we're now able to timestamp the SETUP
state. Once we have this time, let the user know about it in the
schema.

Reviewed-by: Juan Quintela <>
Reviewed-by: Eric Blake <>...

2da776db 07/23/2013 12:12 pm Michael R. Hines

rdma: core logic

Code that does need to be visible is kept
well contained inside this file and this is the only
new additional file to the entire patch.

This file includes the entire protocol and interfaces
required to perform RDMA migration.

Also, the configure and Makefile modifications to link...

44c3b58c 07/23/2013 12:11 pm Michael R. Hines

rdma: introduce ram_handle_compressed()

This gives RDMA shared access to madvise() on the destination side
when an entire chunk is found to be zero.

Reviewed-by: Juan Quintela <>
Reviewed-by: Paolo Bonzini <>
Reviewed-by: Chegu Vinod <>...

db6b81d4 07/23/2013 03:41 am Andreas Färber

gdbstub: Change gdb_handlesig() argument to CPUState

Prepares for changing GDBState::c_cpu to CPUState.

Signed-off-by: Andreas Färber <>

00b941e5 07/23/2013 03:41 am Andreas Färber

cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook

Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

f17ec444 07/23/2013 03:41 am Andreas Färber

exec: Change cpu_memory_rw_debug() argument to CPUState

Propagate X86CPU in kvmvapic for simplicity.

Signed-off-by: Andreas Färber <>

f3659eee 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug()

Make inline target_memory_rw_debug() always available and change its
argument to CPUState. Let it check if CPUClass::memory_rw_debug provides
a specialized callback and fall back to cpu_memory_rw_debug() otherwise....

eac8b355 07/23/2013 03:41 am Andreas Färber

cpu: Move gdb_regs field from CPU_COMMON to CPUState

Prepares for changing gdb_register_coprocessor() argument to CPUState.

Signed-off-by: Andreas Färber <>

22169d41 07/23/2013 03:41 am Andreas Färber

gdbstub: Change gdb_register_coprocessor() argument to CPUState

Signed-off-by: Andreas Färber <>

bdf7ae5b 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()

Where no extra implementation is needed, fall back to CPUClass::set_pc().

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

ed2803da 07/23/2013 03:41 am Andreas Färber

cpu: Move singlestep_enabled field from CPU_COMMON to CPUState

Prepares for changing cpu_single_step() argument to CPUState.

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

3825b28f 07/23/2013 03:41 am Andreas Färber

cpu: Change cpu_single_step() argument to CPUState

Use CPUState::env_ptr for now.

Needed for GdbState::c_cpu.

Signed-off-by: Andreas Färber <>

62278814 07/23/2013 03:41 am Andreas Färber

kvm: Change kvm_{insert,remove}_breakpoint() argument to CPUState

CPUArchState is no longer directly used since converting CPU loops to
CPUState.

Prepares for changing GDBState::c_cpu to CPUState.

Signed-off-by: Andreas Färber <>

9e0c5422 07/23/2013 03:41 am Andreas Färber

gdbstub: Change syscall callback argument to CPUState

Callback implementations were specific to arm and m68k, so can easily
cast to ARMCPU and M68kCPU respectively.

Prepares for changing GDBState::c_cpu to CPUState.

Signed-off-by: Andreas Färber <>

577f42c0 07/23/2013 03:41 am Andreas Färber

cpu: Introduce vaddr type

vaddr is to target_ulong what uintmax_t is to unsigned int.

Its purpose is to allow turning per-target functions with target_ulong
arguments into CPUClass hooks.

Suggested-by: Peter Maydell <>
Signed-off-by: Andreas Färber <>

f45748f1 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::set_pc() for gdb_set_cpu_pc()

This moves setting the Program Counter from gdbstub into target code.
Use vaddr type as upper-bound replacement for target_ulong.

Signed-off-by: Andreas Färber <>

caad4eb3 07/23/2013 01:37 am Andreas Färber

scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()

Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline()
return an Error**. Prepare qdev initfns for QOM realize error model.

Signed-off-by: Andreas Färber <>

ce724398 07/23/2013 01:37 am Hu Tao

sysbus: Document SysBusDeviceClass::init and realize semantics

Signed-off-by: Hu Tao <>
[AF: Syntax and wording changes]
Signed-off-by: Andreas Färber <>

ce88812f 07/23/2013 01:37 am Hu Tao

q35: Use type-safe cast instead of direct access of parent dev

And remove variables if possible.

Signed-off-by: Hu Tao <>
[AF: Converted remaining access and renamed to parent_obj]
Signed-off-by: Andreas Färber <>

2dc6bebd 07/22/2013 11:41 pm Peter Maydell

bitops: Provide sextract32() and sextract64()

A common operation in instruction decoding is to take a field
from an instruction that represents a signed integer in some
arbitrary number of bits, and sign extend it into a C signed
integer type for manipulation. Provide new functions sextract32()...

24cb36a6 07/22/2013 09:54 pm Peter Maydell

configure: Make NPTL non-optional

Now all linux-user targets support building with NPTL, we can make it
mandatory. This is a good idea because: * NPTL is no longer new and experimental; it is completely standard * in practice, linux-user without NPTL is nearly useless for...

549c272b 07/22/2013 06:14 pm Anthony Liguori

Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130722' into staging

arm-devs queue

  1. gpg: Signature made Mon 22 Jul 2013 06:38:52 AM CDT using RSA key ID 14360CDE
  2. gpg: Can't check signature: public key not found
  1. By Peter Maydell (8) and Soren Brinkmann (2)...
84aee0de 07/22/2013 02:00 pm Soren Brinkmann

hw/loader: Support ramdisk with u-boot header

Introduce 'load_ramdisk()' which can load "normal" ramdisks and ramdisks
with a u-boot header.
To enable this and leverage synergies 'load_uimage()' is refactored to
accomodate this additional use case.

Signed-off-by: Soren Brinkmann <>...

3b1cceb8 07/19/2013 02:58 pm Peter Maydell

arm/boot: Allow boards to modify the FDT blob

Add a callback hook in arm_boot_info to allow board models to
modify the device tree blob if they need to. (The major expected
use case is to add virtio-mmio nodes for virtio-mmio transports
that exist in QEMU but not in the hardware.)...

97c38f8c 07/19/2013 02:58 pm Peter Maydell

device_tree: Add qemu_devtree_setprop_sized_cells() utility functions

We already have a qemu_devtree_setprop_cells() which sets a dtb
property to an array of cells whose values are specified by varargs.
However for the fairly common case of setting a property to a list...

e63c0ba1 07/19/2013 02:58 pm Peter Maydell

virtio: Add support for guest setting of queue size

The MMIO virtio transport spec allows the guest to tell the host how
large the queue size is. Add virtio_queue_set_num() function which
implements this in the QEMU common virtio support code.

Signed-off-by: Peter Maydell <>...

6ce69d1c 07/19/2013 02:58 pm Peter Maydell

virtio: Support transports which can specify the vring alignment

Support virtio transports which can specify the vring alignment
(ie where the guest communicates this to the host) by providing
a new virtio_queue_set_align() function. (The default alignment...

9154b02c 07/19/2013 07:29 am Stefan Hajnoczi

dataplane: sync virtio.c and vring.c virtqueue state

Load the virtio.c state into vring.c when we start dataplane mode and
vice versa when stopping dataplane mode. This patch makes it possible
to start and stop dataplane any time while the guest is running....

dcc772e2 07/19/2013 07:29 am Liu Ping Fan

QEMUBH: make AioContext's bh re-entrant

BH will be used outside big lock, so introduce lock to protect
between the writers, ie, bh's adders and deleter. The lock only
affects the writers and bh's callback does not take this extra lock.
Note that for the same AioContext, aio_bh_poll() can not run in...

4105eaaa 07/19/2013 07:29 am Peter Lieven

block: add bdrv_write_zeroes()

Signed-off-by: Peter Lieven <>
Reviewed-by: Kevin Wolf <>
Signed-off-by: Stefan Hajnoczi <>

323004a3 07/19/2013 07:29 am Peter Lieven

block-migration: efficiently encode zero blocks

this patch adds a efficient encoding for zero blocks by
adding a new flag indicating a block is completely zero.

additionally bdrv_write_zeros() is used at the destination
to efficiently write these zeroes. depending on the implementation...

e9acb8ce 07/18/2013 04:12 pm Anthony Liguori

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci,net,pc enhancements

This includes some fixes and enhancements that accumulated in my tree:
pci fixes by dkoch, virtio-net enhancements by akong and mst,
and a fix for xen pc by mst.

Signed-off-by: Michael S. Tsirkin <>...

f290e498 07/15/2013 11:21 pm Richard Henderson

Merge git://github.com/hw-claudio/qemu-aarch64-queue into tcg-next

a2817782 07/15/2013 11:16 pm Richard Henderson

tcg: Remove temp_buf

All targets have been converted to allocating space for temporaries
on the stack. No need to allocate space within the CPU_COMMON block.

Signed-off-by: Richard Henderson <>

6453a3a6 07/15/2013 10:49 pm Anthony Liguori

Merge remote-tracking branch 'quintela/migration.next' into staging

  1. By Chegu Vinod
  2. Via Juan Quintela
    • quintela/migration.next:
      Force auto-convegence of live migration
      Add 'auto-converge' migration capability
      Introduce async_run_on_cpu()

Message-id: ...

488f069b 07/15/2013 09:26 pm Michael S. Tsirkin

virtio-net: add feature bit for any header s/g

Old qemu versions required that 1st s/g entry is the header.

Since QEMU 1.5, patchset titled "virtio-net: iovec handling cleanup"
removed this limitation but a feature bit is needed so guests know it's
safe to lay out header differently....

b1be4280 07/15/2013 09:23 pm Amos Kong

net: add support of mac-programming over macvtap in QEMU side

Currently macvtap based macvlan device is working in promiscuous
mode, we want to implement mac-programming over macvtap through
Libvirt for better performance.

Design:
QEMU notifies Libvirt when rx-filter config is changed in guest,...

c6d8ed24 07/15/2013 02:13 pm Jani Kokkonen

tcg/aarch64: Implement tlb lookup fast path

Supports CONFIG_QEMU_LDST_OPTIMIZATION

Signed-off-by: Jani Kokkonen <>
Reviewed-by: Richard Henderson <>
Reviewed-by: Claudio Fontana <>

56983463 07/15/2013 10:51 am Kevin Wolf

cpus: Add return value for vm_stop()

If flushing the block devices fails, return an error. The VM is stopped
anyway.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Stefan Hajnoczi <>

f0f0fdfe 07/15/2013 10:51 am Kevin Wolf

block: Add return value for bdrv_flush_all()

bdrv_flush() can fail, and bdrv_flush_all() should return an error as
well if this happens for a block device. It returns the first error
return now, but still at least tries to flush the remaining devices even...

98289620 07/15/2013 10:49 am Kevin Wolf

block: Don't parse protocol from file.filename

One of the major reasons for doing something new for -blockdev and
blockdev-add was that the old block layer code parses filenames instead
of just taking them literally. So we should really leave it untouched...

bde1e2ec 07/12/2013 09:34 pm Chegu Vinod

Add 'auto-converge' migration capability

The auto-converge migration capability allows the user to specify if they
choose live migration seqeunce to automatically detect and force convergence.

Signed-off-by: Chegu Vinod <>
Reviewed-by: Paolo Bonzini <>...

3c02270d 07/12/2013 08:36 pm Chegu Vinod

Introduce async_run_on_cpu()

Introduce an asynchronous version of run_on_cpu() i.e. the caller
doesn't have to block till the call back routine finishes execution
on the target vcpu.

Signed-off-by: Chegu Vinod <>
Reviewed-by: Paolo Bonzini <>...

03ee3b1e 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Move processing to io

Soon we will introduce intermediate processing pauses which will
allow the bottom half to restart a DMA request that couldn't be
fulfilled yet.

For that to work, move the processing variable into the io struct
which is what DMA providers work with....

80fc95d8 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Support unaligned DMA access

The DBDMA engine really just reads bytes from a producing device (IDE
in our case) and shoves these bytes into memory. It doesn't care whether
any alignment takes place or not.

Our code today however assumes that block accesses always happen on...

f2f963fd 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Move defines into header file

We usually keep struct and constant definitions in header files. Move
them there to stay consistent and to make access to fields easier.

Signed-off-by: Alexander Graf <>

d1e562de 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Introduce kick function

The DBDMA engine really is running all the time, waiting for input. However
we don't want to waste cycles constantly polling.

So introduce a kick function that data providers can call to notify the
DBDMA controller of new input....

d2f0ce21 07/11/2013 07:51 pm Alexander Graf

PPC: dbdma: Move static bh variable to device struct

The DBDMA controller has a bottom half to asynchronously process DMA
request queues.

This bh was stored as a gross static variable. Move it into the device
struct instead.

While at it, move all users of it to the new generic kick function....

5e2ac519 07/10/2013 08:42 pm Seiji Aguchi

add timestamp to error_report()

[Issue]
When we offer a customer support service and a problem happens
in a customer's system, we try to understand the problem by
comparing what the customer reports with message logs of the
customer's system.

In this case, we often need to know when the problem happens....

51455c59 07/10/2013 06:54 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

  • Fix for OpenRISCCPU subclasses
  • Fix for gdbstub CPU selection
  • Move linux-user CPU functions into new header
  • CPUState part 10 refactoring: first_cpu, next_cpu, cpu_single_env et al....
4268b096 07/10/2013 12:49 pm Don Koch

pci: fix BRDIGE typo

Fix typo in macro name: PCI_CLASS_BRDIGE_PCI_INF_SUB.

Signed-off-by: Don Koch <>
Signed-off-by: Michael S. Tsirkin <>

e78e9ae4 07/10/2013 12:49 pm Don Koch

pci-bridge: update mappings for migration/restore

Fix for LP#1187529: Devices on PCI bridge stop working when
live-migrated. Update bridge mappings for all PCI bridge
devices in get_pci_config_device().

Signed-off-by: Don Koch <>
Signed-off-by: Michael S. Tsirkin <>

a0762859 07/09/2013 10:33 pm Andreas Färber

log: Change log_cpu_state[_mask]() argument to CPUState

Since commit 878096eeb278a8ac1ccd6667af73e026f29b4cf5 (cpu: Turn
cpu_dump_{state,statistics}() into CPUState hooks) CPUArchState is no
longer needed.

Add documentation and make the functions available through qemu/log.h...

91b1df8c 07/09/2013 10:33 pm Andreas Färber

cpu: Move reset logging to CPUState

x86 was using additional CPU_DUMP_* flags, so make that configurable in
CPUClass::reset_dump_flags.

This adds reset logging for alpha, unicore32 and xtensa.

Acked-by: Michael Walle <> (for lm32)
Reviewed-by: Richard Henderson <>...

2b927571 07/09/2013 10:33 pm Andreas Färber

intc/openpic: Build openpic only once

Since current_cpu is CPUState it no longer depends on CPUPPCState.

Move ppce500_set_mpic_proxy() to a new hw/ppc/ppc_e500.h because
hw/ppc/ppc.h is too heavily using CPUPPCState and PowerPCCPU.

Signed-off-by: Andreas Färber <>

182735ef 07/09/2013 10:32 pm Andreas Färber

cpu: Make first_cpu and next_cpu CPUState

Move next_cpu from CPU_COMMON to CPUState.
Move first_cpu variable to qom/cpu.h.

gdbstub needs to use CPUState::env_ptr for now.
cpu_copy() no longer needs to save and restore cpu_next.

Acked-by: Paolo Bonzini <>...

80b7cd73 07/09/2013 10:20 pm Andreas Färber

kvm: Free current_cpu identifier

Since CPU loops are done as last step in kvm_{insert,remove}_breakpoint()
and kvm_remove_all_breakpoints(), we do not need to distinguish between
invoking CPU and iterated CPUs and can thereby free the identifier for
use as a global variable....

4917cf44 07/09/2013 10:20 pm Andreas Färber

cpu: Replace cpu_single_env with CPUState current_cpu

Move it to qom/cpu.h.

Signed-off-by: Andreas Färber <>

1d5791f4 07/09/2013 10:20 pm Andreas Färber

kvm: Change kvm_remove_all_breakpoints() argument to CPUState

Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

7f9d6e54 07/09/2013 09:38 pm Markus Armbruster

vl: New qemu_get_machine_opts()

To be used in the next few commits to fix or clean up queries of
"machine" options (-machine and its sugared forms).

Signed-off-by: Markus Armbruster <>
Message-id: ...

154bb106 07/09/2013 09:38 pm Stefan Weil

exec: Remove unused global variable phys_ram_fd

It seems to be unused since several years (commit
be995c27640a82c7056b6f53d02ec823570114e5 in 2006).

Signed-off-by: Stefan Weil <>
Reviewed-by: Andreas Färber <>
Message-id: ...

dc11549e 07/08/2013 04:00 pm Anthony Liguori

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci,misc enhancements

This includes some pci enhancements:

Better support for systems with multiple PCI root buses
FW cfg interface for more robust pci programming in BIOS
Minor fixes/cleanups for fw cfg and cross-version migration -...

c473d18d 07/07/2013 11:10 pm David Gibson

pci: Use helper to find device's root bus in pci_find_domain()

Currently pci_find_domain() performs two functions - it locates the PCI
root bus above the given bus, then looks up that root bus's domain number.
This patch adds a helper function to perform the first task, finding the...

568f0690 07/07/2013 11:10 pm David Gibson

pci: Replace pci_find_domain() with more general pci_root_bus_path()

pci_find_domain() is used in a number of places where we want an id for a
whole PCI domain (i.e. the subtree under a PCI root bus). The trouble is
that many platforms may support multiple independent host bridges with no...

85c6e4fa 07/07/2013 11:10 pm David Gibson

pci: Add root bus argument to pci_get_bus_devfn()

pci_get_bus_devfn() interprets a full PCI address string to give a PCIBus *
and device/function number within that bus. Currently it assumes it is
working on an address under the primary PCI root bus. This patch extends...

29b358f9 07/07/2013 11:10 pm David Gibson

pci: Add root bus parameter to pci_nic_init()

At present, pci_nic_init() and pci_nic_init_nofail() assume that they will
only create a NIC under the primary PCI root. As we add support for
multiple PCI roots, that may no longer be the case. This patch adds a root...

7588e2b0 07/07/2013 11:10 pm David Gibson

pci: Fold host_buses list into PCIHostState functionality

The host_buses list is an odd structure - a list of pointers to PCI root
buses existing in parallel to the normal qdev tree structure. This patch
removes it, instead putting the link pointers into the PCIHostState...

1ef7a2a2 07/07/2013 11:10 pm David Gibson

pci: Abolish pci_find_root_bus()

pci_find_root_bus() takes a domain parameter. Currently PCI root buses
with domain other than 0 can't be created, so this is more or less a long
winded way of retrieving the main PCI root bus. Numbered domains don't
actually properly cover the (non x86) possibilities for multiple PCI root...

5444e768 07/04/2013 06:42 pm Paolo Bonzini

add a header file for atomic operations

We're already using them in several places, but __sync builtins are just
too ugly to type, and do not provide seqcst load/store operations.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

c2fc83e8 07/04/2013 06:42 pm Paolo Bonzini

memory: move MemoryListener declaration earlier

Reviewed-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

89ae337a 07/04/2013 06:42 pm Paolo Bonzini

exec: move listener from AddressSpaceDispatch to AddressSpace

This will help having two copies of AddressSpaceDispatch during the
recreation of the radix tree (one being built, and one that is complete
and will be protected by RCU). We do not want to have to unregister and...

00752703 07/04/2013 06:42 pm Paolo Bonzini

exec: separate current radix tree from the one being built

This same treatment previously done to phys_node_map and phys_sections
is now applied to the dispatch field of AddressSpace. Topology updates
use as->next_dispatch while accesses use as->dispatch....

84af6d9f 07/04/2013 06:42 pm Paolo Bonzini

spapr_iommu: pass device to spapr_tce_new_table and use it to set owner

Signed-off-by: Paolo Bonzini <>

3cd2cf43 07/04/2013 06:42 pm Paolo Bonzini

pam: pass device to init_pam and use it to set owner

Signed-off-by: Paolo Bonzini <>

db10ca90 07/04/2013 06:42 pm Paolo Bonzini

piolist: add owner argument to initialization functions and pass devices

Signed-off-by: Paolo Bonzini <>

1b5ec234 07/04/2013 06:42 pm Paolo Bonzini

memory: return MemoryRegion from qemu_ram_addr_from_host

It will be needed in the next patch.

Reviewed-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

803c0816 07/04/2013 06:42 pm Paolo Bonzini

memory: add getter for owner

Whenever memory regions are accessed outside the BQL, they need to be
preserved against hot-unplug. MemoryRegions actually do not have their
own reference count; they piggyback on a QOM object, their "owner".
The owner is set at creation time, and there is a function to retrieve...

46637be2 07/04/2013 06:42 pm Paolo Bonzini

memory: add ref/unref

Reviewed-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

3ce10901 07/04/2013 06:42 pm Paolo Bonzini

memory: introduce memory_region_present

This new API will avoid having too many memory_region_ref/unref
in paths that currently use memory_region_find.

Signed-off-by: Paolo Bonzini <>

dfde4e6e 07/04/2013 06:42 pm Paolo Bonzini

memory: add ref/unref calls

Add ref/unref calls at the following places:

- places where memory regions are stashed by a listener and
used outside the BQL (including in Xen or KVM).

- memory_region_find callsites

- creation of aliases and containers (only the aliased/contained...

7443b437 07/04/2013 06:42 pm Paolo Bonzini

exec: move qemu_ram_addr_from_host_nofail to cputlb.c

After the next patch it would not be used elsewhere anyway. Also,
the _nofail and the standard versions of this function return different
things, which is confusing. Removing the function from the public headers...

b40acf99 07/04/2013 06:42 pm Jan Kiszka

ioport: Switch dispatching to memory core layer

The current ioport dispatcher is a complex beast, mostly due to the
need to deal with old portio interface users. But we can overcome it
without converting all portio users by embedding the required base
address of a MemoryRegionPortio access into that data structure. That...

0659097d 07/04/2013 06:42 pm Jan Kiszka

ioport: Remove unused old dispatching services

Remove unused ioport_register and isa_unassign_ioport along with
everything that only those services used.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

d67f679d 07/04/2013 06:42 pm Jan Kiszka

vmport: Disentangle read handler type from portio

In case the latter may vanish one day, make sure the vmport read handler
type will remain unaffected. This is also conceptually cleaner.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

5767e4e1 07/04/2013 06:42 pm Jan Kiszka

ioport: Move portio types to ioport.h

This decouples memory.h from ioport.h, concentrating all portio related
types in a single header.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

2c9b15ca 07/04/2013 06:42 pm Paolo Bonzini

memory: add owner argument to initialization functions

Signed-off-by: Paolo Bonzini <>

8ab9b418 07/04/2013 06:42 pm Jan Kiszka

Privatize register_ioport_read/write

No more users outside of ioport.c.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

b6f32962 07/04/2013 06:42 pm Jan Kiszka

isa: implement isa_is_ioport_assigned via memory_region_find

Open-code isa_is_ioport_assigned via a memory region lookup. As all IO
ports are now directly or indirectly registered via the memory API, this
becomes possible and will finally allow us to drop the ioport tables....

f487b677 07/04/2013 06:42 pm Paolo Bonzini

dma: keep a device alive while it has SGLists

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>

6ac363b5 07/04/2013 10:45 am David Gibson

pci: Move pci_read_devaddr to pci-hotplug-old.c

pci_read_devaddr() is only used by the legacy functions for the old PCI
hotplug interface in pci-hotplug-old.c. So we move the function there,
and make it static.

Signed-off-by: David Gibson <>...