Statistics
| Branch: | Revision:

root / include / exec @ 7dca8043

# Date Author Comment
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....

052e87b0 06/20/2013 05:32 pm Paolo Bonzini

memory: make section size a 128-bit integer

So far, the size of all regions passed to listeners could fit in 64 bits,
because artificial regions (containers and aliases) are eliminated by
the memory core, leaving only device regions which have reasonable sizes...

30951157 06/20/2013 05:32 pm Avi Kivity

memory: iommu support

Add a new memory region type that translates addresses it is given,
then forwards them to a target address space. This is similar to
an alias, except that the mapping is more flexible than a linear
translation and trucation, and also less efficient since the...

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

1db8abb1 06/20/2013 05:32 pm Paolo Bonzini

memory: move private types to exec.c

Signed-off-by: Paolo Bonzini <>

90260c6c 06/20/2013 05:32 pm Jan Kiszka

exec: Resolve subpages in one step except for IOTLB fills

Except for the case of setting the IOTLB entry in TCG mode, we can avoid
the subpage dispatching handlers and do the resolution directly on
address_space_lookup_region. An IOTLB entry describes a full page, not...

5c8a00ce 06/20/2013 05:32 pm Paolo Bonzini

exec: return MemoryRegion from address_space_translate

Only address_space_translate_for_iotlb needs to return the section.
Every caller of address_space_translate now uses only section->mr,
return it directly.

Signed-off-by: Paolo Bonzini <>

99b9cc06 06/20/2013 05:32 pm Paolo Bonzini

Revert "memory: limit sections in the radix tree to the actual address space size"

This reverts commit 86a8623692b1b559a419a92eb8b6897c221bca74.

Signed-off-by: Paolo Bonzini <>

86a6a077 06/14/2013 03:51 pm Anthony Liguori

Merge remote-tracking branch 'pmaydell/tcg-aarch64.next' into staging

  1. By Claudio Fontana (9) and others
  2. Via Peter Maydell
    • pmaydell/tcg-aarch64.next:
      MAINTAINERS: add tcg/aarch64 maintainer
      configure: permit compilation on arm aarch64
      tcg/aarch64: implement user mode qemu ld/st...
4a136e0a 06/12/2013 06:20 pm Claudio Fontana

tcg/aarch64: implement new TCG target for aarch64

add preliminary support for TCG target aarch64.

Signed-off-by: Claudio Fontana <>
Reviewed-by: Richard Henderson <>
Reviewed-by: Peter Maydell <>...

e85ef538 06/05/2013 03:54 pm Richard Henderson

tcg: Use QEMU_BUILD_BUG_ON for CPU_TLB_ENTRY_BITS

Rather than a hand-coded version of the same thing.

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

fd8aaa76 05/29/2013 05:27 pm Paolo Bonzini

memory: add return value to address_space_rw/read/write

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

791af8c8 05/29/2013 05:27 pm Paolo Bonzini

memory: propagate errors on I/O dispatch

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

a649b916 05/29/2013 05:27 pm Paolo Bonzini

exec: just use io_mem_read/io_mem_write for 8-byte I/O accesses

The memory API is able to split it in two 4-byte accesses.

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

51644ab7 05/29/2013 05:27 pm Paolo Bonzini

memory: add address_space_access_valid

The old-style IOMMU lets you check whether an access is valid in a
given DMAContext. There is no equivalent for AddressSpace in the
memory API, implement it with a lookup of the dispatch tree.

Reviewed-by: Richard Henderson <>...

d2702032 05/29/2013 05:27 pm Paolo Bonzini

memory: export memory_region_access_valid to exec.c

We'll use it to implement address_space_access_valid.

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

d197063f 05/29/2013 05:26 pm Paolo Bonzini

memory: move unassigned_mem_ops to memory.c

reservation_ops is already doing the same thing.

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

149f54b5 05/29/2013 05:26 pm Paolo Bonzini

memory: add address_space_translate

Using phys_page_find to translate an AddressSpace to a MemoryRegionSection
is unwieldy. It requires to pass the page index rather than the address,
and later memory_region_section_addr has to be called. Replace
memory_region_section_addr with a function that does all of it: call...

0844e007 05/29/2013 05:26 pm Paolo Bonzini

exec: make io_mem_unassigned private

There is no reason to avoid a recompile before accessing unassigned
memory. In the end it will be treated as MMIO anyway.

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

2a8e7499 05/29/2013 05:26 pm Paolo Bonzini

exec: eliminate io_mem_ram

It is never used, the IOTLB always goes through io_mem_notdirty.

In fact in softmmu_template.h, if it were, QEMU would crash just
below the tests, as soon as io_mem_read/write dispatches to
error_mem_read/write.

Reviewed-by: Richard Henderson <>...

86a86236 05/24/2013 07:43 pm Avi Kivity

memory: limit sections in the radix tree to the actual address space size

The radix tree is statically sized to fit TARGET_PHYS_ADDR_SPACE_BITS.
If a larger memory region is registered, it will overflow.

Fix by limiting any section in the radix tree to the supported size....

1d671369 05/24/2013 07:42 pm Paolo Bonzini

memory: make memory_global_sync_dirty_bitmap take an AddressSpace

Since this is a MemoryListener operation, it only makes sense
on an AddressSpace granularity.

Suggested-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

5f9a5ea1 05/24/2013 07:42 pm Jan Kiszka

memory: Rename readable flag to romd_mode

"Readable" is a very unfortunate name for this flag because even a
rom_device region will always be readable from the guest POV. What
differs is the mapping, just like the comments had to explain already.
Also, readable could currently be understood as being a generic region...

73034e9e 05/24/2013 07:42 pm Paolo Bonzini

memory: allow memory_region_find() to run on non-root memory regions

memory_region_find() is similar to registering a MemoryListener and
checking for the MemoryRegionSections that come from a particular
region. There is no reason for this to be limited to a root memory...

8b0d6711 05/24/2013 07:42 pm Paolo Bonzini

exec: eliminate stq_phys_notdirty

It is not used anywhere.

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

ee983cb3 05/24/2013 07:42 pm Paolo Bonzini

exec: make qemu_get_ram_ptr private

It is a private interface between exec.c and memory.c.

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

4f39178b 05/24/2013 07:42 pm Paolo Bonzini

exec: eliminate qemu_put_ram_ptr

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

df5e0ef7 04/27/2013 03:16 am Richard Henderson

tcg-arm: Convert to CONFIG_QEMU_LDST_OPTIMIZATION

Move the slow path out of line, as the TODO's mention.
This allows the fast path to be unconditional, which can
speed up the fast path as well, depending on the core.

Signed-off-by: Richard Henderson <>

1ddd592f 04/18/2013 03:12 pm Paolo Bonzini

elfload: use abi_short/ushort instead of target_short/ushort

The alignment is a characteristic of the ABI, not the CPU.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Edgar E. Iglesias <>

f8fd4fc4 04/18/2013 03:12 pm Paolo Bonzini

elfload: use abi_int/uint instead of target_int/uint

The alignment is a characteristic of the ABI, not the CPU.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Edgar E. Iglesias <>

6cfd9b52 04/18/2013 03:12 pm Paolo Bonzini

elfload: only give abi_long/ulong the alignment specified by the target

Previously, this was done for target_long/ulong, and propagated to
abi_long/ulong via a typedef. But target_long/ulong should not
have any specific alignment, it is never used to access guest...

918fc54c 04/18/2013 03:12 pm Paolo Bonzini

elfload: use abi_llong/ullong instead of target_llong/ullong

The alignment is a characteristic of the ABI, not the CPU.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Edgar E. Iglesias <>

b421d9c6 04/15/2013 07:19 pm Paolo Bonzini

memory: move core typedefs to qemu/typedefs.h

Signed-off-by: Paolo Bonzini <>

c72dd2d0 04/15/2013 07:19 pm Paolo Bonzini

exec: remove useless declarations from memory-internal.h

Signed-off-by: Paolo Bonzini <>

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

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

d8ed887b 03/12/2013 11:35 am Andreas Färber

exec: Pass CPUState to cpu_reset_interrupt()

Move it to qom/cpu.c to avoid build failures depending on include order
of cpu-qom.h and exec/cpu-all.h.

Change opaques of various ..._irq_handler() functions to the
appropriate CPU type to facilitate using cpu_reset_interrupt()....

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

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

a4960ef3 03/09/2013 07:16 pm Richard Henderson

tcg: Don't make exitreq flag a local temporary

The value is not actually live across basic blocks, so there's no
need for the local property. This eliminates storing the temporary
to its home location at the branch.

Signed-off-by: Richard Henderson <>...

806f352d 03/03/2013 04:29 pm Peter Maydell

gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end

The gen_icount_start/end functions are now somewhat misnamed since they
are useful for generic "start/end of TB" code, used for more than just
icount. Rename them to gen_tb_start/end.

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

378df4b2 03/03/2013 04:28 pm Peter Maydell

Handle CPU interrupts by inline checking of a flag

Fix some of the nasty TCG race conditions and crashes by implementing
cpu_exit() as setting a flag which is checked at the start of each TB.
This avoids crashes if a thread or signal handler calls cpu_exit()...

0980011b 03/03/2013 04:28 pm Peter Maydell

tcg: Document tcg_qemu_tb_exec() and provide constants for low bit uses

Document tcg_qemu_tb_exec(). In particular, its return value is a
combination of a pointer to the next translation block and some
extra information in the low two bits. Provide some #defines for...

6ab7e546 02/23/2013 06:11 pm Peter Maydell

Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp()

The setjmp() function doesn't specify whether signal masks are saved and
restored; on Linux they are not, but on BSD (including MacOSX) they are.
We want to have consistent behaviour across platforms, so we should...

0315c31c 02/16/2013 03:51 pm Andreas Färber

cpu: Move running field to CPUState

Pass CPUState to cpu_exec_{start,end}() functions.

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

fcd7d003 02/16/2013 03:51 pm Andreas Färber

cpu: Move exit_request field to CPUState

Since it was located before breakpoints field, it needs to be reset.

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

d77953b9 02/16/2013 03:51 pm Andreas Färber

cpu: Move current_tb field to CPUState

Explictly NULL it on CPU reset since it was located before breakpoints.

Change vapic_report_tpr_access() argument to CPUState. This also
resolves the use of void* for cpu.h independence.
Change vAPIC patch_instruction() argument to X86CPU....

0d34282f 02/16/2013 03:50 pm Andreas Färber

cpu: Move host_tid field to CPUState

Change gdbstub's cpu_index() argument to CPUState now that CPUArchState
is no longer used.

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

5e5f07e0 02/16/2013 12:41 pm Evgeny Voevodin

TCG: Move translation block variables to new context inside tcg_ctx: tb_ctx

It's worth to clean-up translation blocks variables and move them
into one context as was suggested by Swirl.
Also if we use this context directly inside tcg_ctx, then it
speeds up code generation a bit....

b54c2873 01/19/2013 10:01 pm Stefan Weil

tci: Fix broken build (regression)

s390x-linux-user now also uses GETPC. Instead of adding it to the list of
targets which use GETPC, the macro is now defined unconditionally.

This avoids future build regressions like this one:

CC    s390x-linux-user/target-s390x/int_helper.o...
249fe3f3 01/19/2013 12:29 pm Andreas Färber

cpu-defs.h: Drop qemu_work_item prototype

Commit c64ca8140e9c21cd0d44c10fbe1247cb4ade8e6e (cpu: Move
queued_work_{first,last} to CPUState) moved the qemu_work_item fields
away. Clean up the now unused prototype.

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

38d8f5c8 01/15/2013 05:09 am Andreas Färber

exec: Return CPUState from qemu_get_cpu()

Move the declaration to qemu/cpu.h and add documentation.
The implementation still depends on CPUArchState for CPU iteration.

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

ce3960eb 01/15/2013 05:09 am Andreas Färber

cpu: Move nr_{cores,threads} fields to CPUState

To facilitate the field movements, pass MIPSCPU to malta_mips_config();
avoid that for mips_cpu_map_tc() since callers only access MIPS Thread
Contexts, inside TCG helpers.

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

1b1ed8dc 01/15/2013 05:09 am Andreas Färber

cpu: Move numa_node field to CPUState

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

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

501a7ce7 12/23/2012 01:40 am Andreas Färber

Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu

Adapt header include paths.

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

6c279db8 12/21/2012 12:09 am Juan Quintela

memory: introduce memory_region_test_and_clear_dirty

This function avoids having to do two calls, one to test the dirty bit, and
other to reset it.

Signed-off-by: Juan Quintela <>

a3161038 12/21/2012 12:08 am Paolo Bonzini

exec: change RAM list to a TAILQ

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Juan Quintela <>

f798b07f 12/21/2012 12:08 am Umesh Deshpande

add a version number to ram_list

This will be used to detect if last_block might have become invalid
across different calls to ram_save_live.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Umesh Deshpande <>
Signed-off-by: Juan Quintela <>...

b2a8658e 12/21/2012 12:08 am Umesh Deshpande

protect the ramlist with a separate mutex

Add the new mutex that protects shared state between ram_save_live
and the iothread. If the iothread mutex has to be taken together
with the ramlist mutex, the iothread shall always be outside.

Signed-off-by: Paolo Bonzini <>...

0d6d3c87 12/21/2012 12:08 am Paolo Bonzini

exec: change ramlist from MRU order to a 1-item cache

Most of the time, only 2 items will be active (from/to for a string operation,
or code/data). But TCG guests likely won't have gigabytes of memory, so
this actually goes down to 1 item.

Signed-off-by: Paolo Bonzini <>...

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>