Statistics
| Branch: | Revision:

root / include / exec @ ce603d8e

# Date Author Comment
850bbe1b 02/01/2014 11:08 pm Peter Maydell

Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140128.0' into staging

vfio-pci updates include:
- Destroy MemoryRegions on device teardown
- Print warnings around PCI option ROM failures
- Skip bogus mappings from 64bit BAR sizing...

47c16ed5 01/17/2014 08:12 pm Alexey Kardashevskiy

kvm: initialize qemu_host_page_size

There is a HOST_PAGE_ALIGN macro which makes sense for KVM accelerator
but it uses qemu_host_page_size/qemu_host_page_mask which initialized
for TCG only.

This moves qemu_host_page_size/qemu_host_page_mask initialization from...

fb3ecb7e 01/15/2014 09:34 pm Stefan Weil

exec: Exclude non portable function for MinGW

cpu_physical_memory_set_dirty_lebitmap calls getpageaddr and ffsl which are
unavailable for MinGW. As the function is unused for MinGW, it can simply
be excluded from compilation.

Signed-off-by: Stefan Weil <>...

5ff7fb77 01/13/2014 03:04 pm Juan Quintela

memory: move bitmap synchronization to its own function

We want to have all the functions that handle directly the dirty
bitmap near. We will change it later.

Signed-off-by: Juan Quintela <>
Reviewed-by: Orit Wasserman <>

ae2810c4 01/13/2014 03:04 pm Juan Quintela

memory: syncronize kvm bitmap using bitmaps operations

If bitmaps are aligned properly, use bitmap operations. If they are
not, just use old bit at a time code.

Signed-off-by: Juan Quintela <>
Reviewed-by: Orit Wasserman <>

52159192 01/13/2014 03:04 pm Juan Quintela

memory: cpu_physical_memory_mask_dirty_range() always clears a single flag

Document it

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

5adca7ac 01/13/2014 03:04 pm Juan Quintela

memory: use bit 2 for migration

For historical reasons it was bit 3. Once there, create a constant to
know the number of clients.

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

7a5b558c 01/13/2014 03:04 pm Juan Quintela

memory: make sure that client is always inside range

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

e8a97caf 01/13/2014 03:04 pm Juan Quintela

memory: cpu_physical_memory_clear_dirty_flag() result is never used

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

1ab4c8ce 01/13/2014 03:04 pm Juan Quintela

memory: split dirty bitmap into three

After all the previous patches, spliting the bitmap gets direct.

Note: For some reason, I have to move DIRTY_MEMORY_* definitions to
the beginning of memory.h to make compilation work.

Signed-off-by: Juan Quintela <>...

86a49582 01/13/2014 03:04 pm Juan Quintela

memory: unfold cpu_physical_memory_clear_dirty_flag() in its only user

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

4f13bb80 01/13/2014 03:04 pm Juan Quintela

memory: unfold cpu_physical_memory_set_dirty() in its only user

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

c1427a3f 01/13/2014 03:04 pm Juan Quintela

memory: unfold cpu_physical_memory_set_dirty_flag()

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

9f2c43e4 01/13/2014 03:04 pm Juan Quintela

memory: make cpu_physical_memory_get_dirty() the main function

And make cpu_physical_memory_get_dirty_flag() to use it. It used to
be the other way around.

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

94833c89 01/13/2014 03:04 pm Juan Quintela

memory: cpu_physical_memory_get_dirty() is used as returning a bool

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

ace694cc 01/13/2014 03:04 pm Juan Quintela

memory: s/mask/clear/ cpu_physical_memory_mask_dirty_range

Now all functions use the same wording that bitops/bitmap operations

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

1bafff0c 01/13/2014 03:04 pm Juan Quintela

memory: use find_next_bit() to find dirty bits

This operation is way faster than doing it bit by bit.

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

5b9a3a5f 01/13/2014 03:04 pm Juan Quintela

memory: cpu_physical_memory_set_dirty_range() now uses bitmap operations

We were setting a range of bits, so use bitmap_set().

Note: xen has always been wrong, and should have used start instead
of addr from the beginning.

Signed-off-by: Juan Quintela <>...

a461e389 01/13/2014 03:04 pm Juan Quintela

memory: cpu_physical_memory_clear_dirty_range() now uses bitmap operations

We were clearing a range of bits, so use bitmap_clear().

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

a2cd8c85 01/13/2014 03:04 pm Juan Quintela

memory: s/dirty/clean/ in cpu_physical_memory_is_dirty()

All uses except one really want the other meaning.

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

a2f4d5be 01/13/2014 03:04 pm Juan Quintela

memory: make cpu_physical_memory_reset_dirty() take a length parameter

We have an end parameter in all the callers, and this make it coherent
with the rest of cpu_physical_memory_* functions, that also take a
length parameter.

Once here, move the start/end calculation to...

220c3ebd 01/13/2014 03:04 pm Juan Quintela

memory: split cpu_physical_memory_* functions to its own include

All the functions that use ram_addr_t should be here.

Signed-off-by: Juan Quintela <>
Reviewed-by: Orit Wasserman <>

e2da99d5 01/13/2014 03:04 pm Juan Quintela

memory: cpu_physical_memory_set_dirty_flags() result is never used

So return void.

Signed-off-by: Juan Quintela <>
Reviewed-by: Orit Wasserman <>
Reviewed-by: Eric Blake <>

a1390db4 01/13/2014 03:04 pm Juan Quintela

memory: create function to set a single dirty bit

Signed-off-by: Juan Quintela <>
Reviewed-by: Orit Wasserman <>
Reviewed-by: Eric Blake <>

7e5609a8 01/13/2014 03:04 pm Juan Quintela

exec: create function to get a single dirty bit

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

4f08cabe 01/13/2014 03:04 pm Juan Quintela

memory: make cpu_physical_memory_is_dirty return bool

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

36187e2c 01/13/2014 03:04 pm Juan Quintela

memory: all users of cpu_physical_memory_get_dirty used only one flag

So cpu_physical_memory_get_dirty_flags is not needed anymore

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

63995ceb 01/13/2014 03:04 pm Juan Quintela

memory: set single dirty flags when possible

Signed-off-by: Juan Quintela <>
Reviewed-by: Eric Blake <>
Reviewed-by: Orit Wasserman <>

75218e7f 01/13/2014 03:04 pm Juan Quintela

memory: cpu_physical_memory_set_dirty_range() always dirty all flags

So remove the flag argument and do it directly. After this change,
there is nothing else using cpu_physical_memory_set_dirty_flags() so
remove it.

Signed-off-by: Juan Quintela <>...

582b55a9 12/20/2013 02:58 am Alexander Graf

roms: Flush icache when writing roms to guest memory

We use the rom infrastructure to write firmware and/or initial kernel
blobs into guest address space. So we're basically emulating the cache
off phase on very early system bootup.

That phase is usually responsible for clearing the instruction cache for...

b0eb759f 10/31/2013 05:58 pm Anthony Liguori

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

pci, pc, acpi fixes, enhancements

This includes some pretty big changes:
- pci master abort support by Marcel
- pci IRQ API rework by Marcel
- acpi generation support by myself

Everything has gone through several revisions, latest versions have been on...

c76bc480 10/17/2013 06:24 pm Jan Kiszka

portio: Allow to mark portio lists as coalesced MMIO flushing

This will enable us to remove all remaining explicit calls of
qemu_flush_coalesced_mmio_buffer in IO handlers.

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

575ddeb4 10/14/2013 06:50 pm Stefan Weil

exec: Fix prototype of phys_mem_set_alloc and related functions

phys_mem_alloc and its assigned values qemu_anon_ram_alloc and
legacy_s390_alloc must have identical argument lists.

legacy_s390_alloc uses the size parameter to call mmap, so size_t is
good enough for all of them....

a1ff8ae0 10/14/2013 05:11 pm Marcel Apfelbaum

memory: Change MemoryRegion priorities from unsigned to signed

When memory regions overlap, priority can be used to specify
which of them takes priority. By making the priority values signed
rather than unsigned, we make it more convenient to implement
a situation where one "background" region should appear only...

ab1eb72b 10/11/2013 07:36 pm Anthony Liguori

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

  1. By Richard Henderson
  2. Via Richard Henderson
    • rth/tcg-pull:
      exec: Add both big- and little-endian memory helpers
      tcg: Add qemu_ld_st_i32/64
      tcg: Add TCGMemOp
      configure: Remove CONFIG_QEMU_LDST_OPTIMIZATION...
867b3201 10/10/2013 11:19 pm Richard Henderson

exec: Add both big- and little-endian memory helpers

Step three in the transition: helpers not tied to the target
"default" endianness. To be used when the guest uses a memory
operation with non-default endianness.

Signed-off-by: Richard Henderson <>

39c153b8 10/10/2013 11:16 pm Anthony Liguori

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

QOM CPUState refactorings / X86CPU

  • Fix for X86CPU model field of qemu32/qemu64 CPU models
  • Bug fix for longjmp on FreeBSD
  • Removal of unused function
  • Confinement of clone syscall infrastructure to linux-user...
100b5e01 10/10/2013 09:44 pm Richard Henderson

tcg: Put target helper data into an array.

One call inside of a loop to tcg_register_helper instead of hundreds
of sequential calls.

Presumably more icache and branch prediction friendly; resulting binary
size mostly unchanged on x86_64, as we're trading 32-bit rip-relative...

023261ef 10/10/2013 09:44 pm Richard Henderson

tcg-aarch64: Update to helper_ret_*_mmu routines

A minimal update to use the new helpers with the return address argument.

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

dbdbe0cd 10/10/2013 09:44 pm Richard Henderson

exec: Delete is_tcg_gen_code and GETRA_EXT

All implementations now boil down to GETRA.

Signed-off-by: Richard Henderson <>

51fb256a 10/07/2013 12:48 pm Andreas Färber

cpu: Drop cpu_model_str from CPU_COMMON

Since this is only read in cpu_copy() and linux-user has a global
cpu_model, drop the field from generic code.

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

d9f4dde4 10/01/2013 08:20 pm Richard Henderson

tcg-arm: Rearrange slow-path qemu_ld/st

Use the new helper_ret_*_mmu routines. Use a conditional call
to arrange for a tail-call from the store path, and to load the
return address for the helper for the load path.

Signed-off-by: Richard Henderson <>

619f90ba 09/25/2013 05:45 pm Paolo Bonzini

tcg-ppc: use new return-argument ld/st helpers

These use a 32-bit load-of-immediate to save a mflr+addi+mtlr sequence.
Tested with a Windows 98 guest (pretty much the most recent thing I
could run on my PPC machine) and kvm-unit-tests's sieve.flat. The
speed up for sieve.flat is as high as 10% for qemu-system-i386, 25%...

3435f395 09/12/2013 07:45 pm Markus Armbruster

exec: Reduce ifdeffery around -mem-path

Instead of spreading its ifdeffery everywhere, confine it to
qemu_ram_alloc_from_ptr(). Everywhere else, simply test block->fd,
which is non-negative exactly when block uses -mem-path.

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

91138037 09/12/2013 07:45 pm Markus Armbruster

exec: Simplify the guest physical memory allocation hook

Make it a generic hook rather than a KVM hook. Less code and
ifdeffery.

Since the only user of the hook is old S390 KVM, there's hope we can
get rid of it some day.

Acked-by: Christian Borntraeger <>...

4d017979 09/10/2013 09:09 pm Peter Maydell

abitypes.h: Remove incorrect ARM ABI_LLONG_ALIGNMENT

The ARM EABI specifies that 64 bit integers should be
8 aligned; remove our incorrect setting of 4 alignment.
This has no actual effect since it only set the alignment
for the 'abi_ullong' and 'abi_llong' types, which are used...

3bb28b72 09/05/2013 07:11 pm Jan Kiszka

memory: Provide separate handling of unassigned io ports accesses

Accesses to unassigned io ports shall return -1 on read and be ignored
on write. Ensure these properties via dedicated ops, decoupling us from
the memory core's handling of unassigned accesses....

c8f94df5 09/02/2013 07:08 pm Richard Henderson

tcg: Introduce zero and sign-extended versions of load helpers

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

8cfd0495 09/02/2013 07:08 pm Richard Henderson

tcg: Change tcg_gen_exit_tb argument to uintptr_t

And update all users.

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

0f842f8a 09/02/2013 07:08 pm Richard Henderson

exec: Reorganize the GETRA/GETPC macros

Always define GETRA; use __builtin_extract_return_addr, rather than
having a special case for s390. Split GETPC_ADJ out of GETPC; use 2
universally, rather than having a special case for arm.

Rename GETPC_LDST to GETRA_LDST to indicate that it does not...

701e3a5c 09/02/2013 07:08 pm Richard Henderson

exec: Rename USUFFIX to LSUFFIX

In a following patch, there will be confusion between multiple "unsigned"
suffixes; rename this one so as to imply "load".

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

e58eb534 09/02/2013 07:08 pm Richard Henderson

exec: Split softmmu_defs.h

The _cmmu helpers can be moved to exec-all.h. The helpers that are
used from TCG will shortly need access to tcg_target_long so move
their declarations into tcg.h.

This requires minor include adjustments to all TCG backends.
...

584950fd 08/29/2013 09:20 pm Richard Henderson

tcg-i386: Remove abort from GETPC_LDST

Indeed, remove it entirely and remove the is_tcg_gen_code check
from GETPC_EXT.

Fixes https://bugs.launchpad.net/qemu/+bug/1218098 wherein a call
to a "normal" helper function performed a sequence of tail calls
all the way into the memory helper functions, leading to a stack...

aac1fb05 08/26/2013 11:31 pm Richard Henderson

tcg: Tidy softmmu_template.h

Avoid a loop in the tlb_fill path; the fill will either succeed or
generate an exception.

Inline the slow_ld/st function; it was a complete copy of the main
helper except for the actual cross-page unaligned code, and the
compiler was inlining it anyway....

401c227b 08/26/2013 11:31 pm Richard Henderson

tcg-i386: Use new return-argument ld/st helpers

Discontinue the jump-around-jump-to-jump scheme, trading it for a single
immediate move instruction. The two extra jumps always consume 7 bytes,
whereas the immediate move is either 5 or 7 bytes depending on where the...

e25c3887 08/26/2013 11:31 pm Richard Henderson

tcg: Add mmu helpers that take a return address argument

Allow the code that tcg generates to be less obtuse, passing in
the return address directly instead of computing it in the helper.

Maintain the old entrance point unchanged as an alternate entry point....

0dd60ae2 07/27/2013 10:22 am Stefan Weil

exec: Remove env from list of poisoned names

The global variable env was removed some time ago, so this name may be
used without any restriction now.

Signed-off-by: Stefan Weil <>
Signed-off-by: Michael Tokarev <>

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

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

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

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

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

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

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

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

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

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

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

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: ...

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

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

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

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

64f6b346 06/28/2013 02:25 pm Andreas Färber

gdbstub: Set gdb_set_stop_cpu() argument to CPUState

Use CPUState::env_ptr for now.

Prepares for changing cpu_handle_guest_debug() argument to CPUState.

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

ce927ed9 06/28/2013 02:25 pm Andreas Färber

hwaddr: Make hwaddr type usable beyond softmmu

While not normally needed for *-user, it can safely be used there since
always based on uint64_t, to avoid ifdeffery.

To avoid accidental uses, move the guards from exec/hwaddr.h to its
inclusion sites. No need for them in include/hw/....

60a3e17a 06/28/2013 02:25 pm Andreas Färber

cpu: Change cpu_exit() argument to CPUState

It no longer depends on CPUArchState, so move it to qom/cpu.c.

Prepares for changing GDBState::c_cpu to CPUState.

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

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

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

bd2fa51f 06/27/2013 03:38 am Michael R. Hines

rdma: introduce qemu_ram_foreach_block()

This is used during RDMA initialization in order to
transmit a description of all the RAM blocks to the
peer for later dynamic chunk registration purposes.

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

7dca8043 06/20/2013 05:39 pm Alexey Kardashevskiy

memory: give name to every AddressSpace

The "info mtree" command in QEMU console prints only "memory" and "I/O"
address spaces while there are actually a lot more other AddressSpace
structs created by PCI and VIO devices. Those devices do not normally
have names and therefore not present in "info mtree" output....

06866575 06/20/2013 05:32 pm David Gibson

memory: Add iommu map/unmap notifiers

This patch adds a NotifierList to MemoryRegions which represent IOMMUs
allowing other parts of the code to register interest in mappings or
unmappings from the IOMMU. All IOMMU implementations will need to call
memory_region_notify_iommu() to inform those waiting on the notifier list,...