Statistics
| Branch: | Revision:

root / exec.c @ 2cae4119

History | View | Annotate | Download (122.7 kB)

# Date Author Comment
ddb97f1d 08/16/2012 09:41 pm Jason Baron

memory: add -machine dump-guest-core=on|off

Add a new '[,dump-guest-core=on|off]' option to the '-machine' option. When
'dump-guest-core=off' is specified, guest memory is omitted from the core dump.
The default behavior continues to be to include guest memory when a core dump is...

5fda043f 08/11/2012 03:23 pm Igor Mitsyanko

exec.c: fix dirty bitmap reallocation

For each newly created RAM block, dirty bitmap is reallocated with g_realloc, which doesn't
make any promises on initial content of new extra data in returned buffer. In theory,
we initialize this new data with cpu_physical_memory_set_dirty_range() call. The...

adb2a9b5 08/03/2012 04:25 pm Tyler Hall

exec.c: Fix off-by-one error in register_subpage

subpage_register() expects "end" to be the last byte in the mapping.
Registering a non-page-aligned memory region that extends up to or
beyond a page boundary causes subpage_register() to silently fail
through the (end >= PAGE_SIZE) check....

69b67646 08/03/2012 04:25 pm Tyler Hall

exec.c: Use subpages for large unaligned mappings

Registering a multi-page memory region that is non-page-aligned results
in a subpage from the start to the page boundary, some number of full
pages, and possibly another subpage from the last page boundary to the...

c308efe6 08/03/2012 04:25 pm Peter Maydell

exec.c: Remove out of date comment

Remove an out of date comment: this comment used to be attached to
cpu_register_physical_memory_log(), before commit 0f0cb164 accidentally
inserted a couple of other functions between the comment and its function.
It is in any case obsolete since (a) the function arguments it refers...

09f06a6c 07/18/2012 10:44 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/uq/master' into staging

  • qemu-kvm/uq/master:
    virtio: move common irqfd handling out of virtio-pci
    virtio: move common ioeventfd handling out of virtio-pci
    event_notifier: add event_notifier_set_handler
    memory: pass EventNotifier, not eventfd...
753d5e14 07/12/2012 02:08 pm Paolo Bonzini

memory: pass EventNotifier, not eventfd

Under Win32, EventNotifiers will not have event_notifier_get_fd, so we
cannot call it in common code such as hw/virtio-pci.c. Pass a pointer to
the notifier, and only retrieve the file descriptor in kvm-specific code....

fdec9918 07/10/2012 07:27 pm Christian Borntraeger

s390: autodetect map private

By default qemu will use MAP_PRIVATE for guest pages. This will write
protect pages and thus break on s390 systems that dont support this feature.
Therefore qemu has a hack to always use MAP_SHARED for s390. But MAP_SHARED
has other problems (no dirty pages tracking, a lot more swap overhead etc.)...

1720aeee 06/29/2012 02:31 pm Juan Quintela

dirty bitmap: abstract its use

Always use accessors to read/set the dirty bitmap.

Signed-off-by: Juan Quintela <>

d24981d3 06/29/2012 02:27 pm Juan Quintela

Only TCG needs TLB handling

Refactor the code that is only needed for tcg to an static function.
Call that only when tcg is enabled. We can't refactor to a dummy
function in the kvm case, as qemu can be compiled at the same time
with tcg and kvm.

Signed-off-by: Juan Quintela <>

5726c27f 06/21/2012 09:45 pm Blue Swirl

qemu-log: move logging to qemu-log.c

Move logging functions from exec.c to qemu-log.c,
compile it only once.

Signed-off-by: Blue Swirl <>

09e5ab63 06/18/2012 04:14 pm Anthony Liguori

qdev: Use wrapper for qdev_get_path

This makes it easier to remove it from BusInfo.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
[AF: Drop now unnecessary NULL initialization in scsibus_get_dev_path()]...

3525c42f 06/11/2012 08:15 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    configure: report missing libraries for virtfs
    trace/simple.c: fix deprecated glib2 interface
    Clarify comments of tb_invalidate_phys_[page_]range
9d70c4b7 06/09/2012 01:49 pm Max Filippov

exec: fix TB invalidation after breakpoint insertion/deletion

tb_invalidate_phys_addr has to be called with the exact physical address of
the breakpoint we add/remove, not just the page's base address.
Otherwise we easily fail to flush the right TB.

This breakage was introduced by the commit f3705d5329 "memory: make...

8e0fdce3 06/08/2012 11:32 am Jan Kiszka

Clarify comments of tb_invalidate_phys_[page_]range

They could suggest that all TBs of the page containing the range would
be invalidated.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

76f35538 06/04/2012 07:49 pm Wen Congyang

Add API to check whether a physical address is I/O address

This API will be used in the following patch.

Signed-off-by: Wen Congyang <>
Signed-off-by: Luiz Capitulino <>

77a8f1a5 05/19/2012 06:49 pm Alexander Graf

linux-user: Fix stale tbs after mmap

If we execute linux-user code that does the following:

  • A = mmap()
  • execute code in A
  • munmap(A)
  • B = mmap(), but mmap returns the same address as A
  • execute code in B

we end up executing a stale cached tb that contains translated code...

fd062573 05/01/2012 01:45 pm Blue Swirl

memory: move functions is_romd and section_addr to memory API

Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

cc5bea60 05/01/2012 01:45 pm Blue Swirl

cputlb: prepare private memory API for public consumption

Fold is_ram_rom and is_ram_rom_romd() into callers.

Change is_romd() and section_addr() to take MemoryRegion
instead of MemoryRegionSection for consistency and
use memory_region_ prefix.

Reviewed-by: Richard Henderson <>...

0cac1b66 05/01/2012 01:45 pm Blue Swirl

cputlb: move TLB handling to a separate file

Move TLB handling and softmmu code load helpers to cputlb.c,
compile only for softmmu targets.

Signed-off-by: Blue Swirl <>

e5548617 05/01/2012 01:45 pm Blue Swirl

exec: prepare for splitting

Make s_cputlb_empty_entry 'const'.

Rename tlb_flush_jmp_cache() to tb_flush_jmp_cache().

Refactor code to add cpu_tlb_reset_dirty_all(),
memory_region_section_get_iotlb() and
memory_region_is_unassigned().

Remove unused cpu_tlb_update_dirty()....

8efe0ca8 04/15/2012 10:25 pm Stefan Weil

w64: Use uintptr_t in exec.c

Replace all type casts to 'long' or 'unsigned long' by 'intptr_t' or 'uintptr_t'.

For type casts which are only used to extract the lower bits of an address
or to modify those bits, signedness does not matter. There I always use 'uintptr_t'....

c6d50674 04/15/2012 10:25 pm Stefan Weil

w64: Fix data types in cpu-all.h, exec.c

w64 needs uintptr_t instead of unsigned long.
For other hosts, nothing changes.

Signed-off-by: Stefan Weil <>

6840981d 04/15/2012 10:25 pm Stefan Weil

w64: Use larger alignment for section with generated code

The MinGW-w64 compiler allows attribute((aligned (32)).

Signed-off-by: Stefan Weil <>

1e7855a5 04/14/2012 06:25 pm Max Filippov

exec: provide tb_invalidate_phys_addr function

Allow TB invalidation by its physical address, extract implementation
from the breakpoint_invalidate function.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

20503968 04/14/2012 05:23 pm Blue Swirl

Use uintptr_t for various op related functions

Use uintptr_t instead of void * or unsigned long in
several op related functions, env->mem_io_pc and
GETPC macro.

Reviewed-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

6375e09e 04/07/2012 02:27 pm Stefan Weil

w64: Fix data type of tb_next and other variables used for host addresses

QEMU host addresses must use uintptr_t to be portable for hosts with
an unusual size of long (w64).

tb_jmp_offset is an uint16_t value, therefore the local variable offset
in function tb_set_jmp_target was changed from unsigned long to uint16_t....

813da627 03/24/2012 03:07 pm Richard Henderson

tcg: Use the GDB JIT debugging interface.

This allows us to generate unwind info for the dynamicly generated
code in the code_gen_buffer. Only i386 is converted at this point.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

0a1b357f 03/19/2012 07:13 pm Anthony PERARD

exec: fix guest memory access for Xen

In cpu_physical_memory_rw, a change has been introduced and qemu_get_ram_ptr is
no longuer called with the ram addr we want to access, but only with the
section address. This patch fixes this. (All other call to qemu_get_ram_ptr are...

32b08980 03/19/2012 11:15 am Avi Kivity

memory: check for watchpoints when getting code ram_addr

The code to get the ram_addr from a (tlb entry, vaddr) pair
checks that the resulting memory is not MMIO, but neglects to
check whether the region is hidden by a watchpoint page.

Add the missing check....

7859cc6e 03/19/2012 11:15 am Avi Kivity

exec: fix write tlb entry misused as iotlb

A couple of code paths check the lower bits of CPUTLBEntry::addr_write
against io_mem_ram as a way of looking for a dirty RAM page. This works
by accident since the value is zero, which matches all clear bits for...

e141ab52 03/18/2012 02:21 pm Blue Swirl

softmmu templates: optionally pass CPUState to memory access functions

Optionally, make memory access helpers take a parameter for CPUState
instead of relying on global env.

On most targets, perform simple moves to reorder registers. On i386,
switch from regparm(3) calling convention to standard stack-based...

9349b4f9 03/14/2012 11:20 pm Andreas Färber

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

97161e17 03/08/2012 07:16 pm Avi Kivity

memory: get rid of cpu_register_io_memory()

The return value of cpu_register_io_memory() is no longer used anywhere, so
we can remove it and all associated data and code.

Signed-off-by: Avi Kivity <>

37ec01d4 03/08/2012 07:06 pm Avi Kivity

memory: dispatch directly via MemoryRegion

Instead of indirecting via io_mem_region, dispatch directly
through the MemoryRegion obtained from the iotlb or phys_page_find().

Signed-off-by: Avi Kivity <>

ce5d64c2 03/08/2012 06:54 pm Avi Kivity

exec: fix code tlb entry misused as iotlb in get_page_addr_code()

get_page_addr_code() reads a code tlb entry, but interprets it as an
iotlb entry. This works by accident since the low bits of a RAM code
tlb entry are clear, and match a RAM iotlb entry. This accident is...

aa102231 03/08/2012 05:06 pm Avi Kivity

memory: store section indices in iotlb instead of io indices

A step towards eliminating io indices.

Signed-off-by: Avi Kivity <>

f3705d53 03/08/2012 04:16 pm Avi Kivity

memory: make phys_page_find() return an unadjusted section

We'd like to store the section index in the iotlb, so we can't
adjust it before returning. Return an unadjusted section and
instead introduce section_addr(), which does the adjustment later.

Signed-off-by: Avi Kivity <>

a2d33521 03/05/2012 05:40 pm Avi Kivity

memory: fix I/O port aliases

Commit e58ac72b6a0 ("ioport: change portio_list not to use
memory_region_set_offset()") started using aliases of I/O memory
regions. Since the IORange used for the I/O was contained in the
target region, the alias information (specifically, the offset...

b3e54c68 03/03/2012 07:53 pm Blue Swirl

Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa

  • 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa:
    target-xtensa: add breakpoint tests
    target-xtensa: add DEBUG_SECTION to overlay tool
    target-xtensa: add DBREAK data breakpoints
    exec: let cpu_watchpoint_insert accept larger watchpoints...
a3918432 02/29/2012 01:44 pm Avi Kivity

memory: replace phys_page_find_alloc() with phys_page_set()

By giving the function the value we want to set, we make it
more flexible for the next patch.

Signed-off-by: Avi Kivity <>

f7bf5461 02/29/2012 01:44 pm Avi Kivity

memory: switch phys_page_set() to a recursive implementation

Setting multiple pages at once requires backtracking to previous
nodes; easiest to achieve via recursion.

Signed-off-by: Avi Kivity <>

2999097b 02/29/2012 01:44 pm Avi Kivity

memory: change phys_page_set() to set multiple pages

Signed-off-by: Avi Kivity <>

c19e8800 02/29/2012 01:44 pm Avi Kivity

memory: unify PhysPageEntry::node and ::leaf

They have the same type, unify them.

Signed-off-by: Avi Kivity <>

07f07b31 02/29/2012 01:44 pm Avi Kivity

memory: allow phys_map tree paths to terminate early

When storing large contiguous ranges in phys_map, all values tend to
be the same pointers to a single MemoryRegionSection. Collapse them
by marking nodes with level > 0 as leaves. This reduces tree memory...

717cb7b2 02/29/2012 01:44 pm Avi Kivity

memory: unify the two branches of cpu_register_physical_memory_log()

Identical except that the second branch knows its not modifying an existing
subpage.

Signed-off-by: Avi Kivity <>

117712c3 02/29/2012 01:44 pm Avi Kivity

memory: move tlb flush to MemoryListener commit callback

This way, if we have several changes in a single transaction, we flush just
once.

Signed-off-by: Avi Kivity <>

06ef3525 02/29/2012 01:44 pm Avi Kivity

memory: make phys_page_find() return a MemoryRegionSection

We no longer describe memory in terms of individual pages; use sections
throughout instead.

PhysPageDesc no longer used - remove.

Signed-off-by: Avi Kivity <>

31ab2b4a 02/29/2012 01:44 pm Avi Kivity

memory: give phys_page_find() its own tree search loop

We'll change phys_page_find_alloc() soon, but phys_page_find()
doesn't need to bear the consequences.

Signed-off-by: Avi Kivity <>

0f0cb164 02/29/2012 01:44 pm Avi Kivity

memory: simplify multipage/subpage registration

Instead of considering subpage on a per-page basis, split each section
into a subpage head, multipage body, and subpage tail, and register
each separately. This simplifies the registration functions.

Signed-off-by: Avi Kivity <>

54688b1e 02/29/2012 01:44 pm Avi Kivity

memory: change memory registration to rebuild the memory map on each change

Instead of incrementally building the memory map, rebuild it every time.
This allows later simplification, since the code need not consider overlaying
a previous mapping. It is also RCU friendly....

3eef53df 02/29/2012 01:44 pm Avi Kivity

memory: remove first level of l1_phys_map

L1 and the lower levels in l1_phys_map are equivalent, except that L1 has
a different size, and is always allocated. Simplify the code by removing
L1. This leaves us with a tree composed solely of L2 tables, but that...

4346ae3e 02/29/2012 01:44 pm Avi Kivity

memory: unify phys_map last level with intermediate levels

This lays the groundwork for storing leaf data in intermediate levels,
saving space.

Signed-off-by: Avi Kivity <>

5312bd8b 02/29/2012 01:44 pm Avi Kivity

memory: store MemoryRegionSection pointers in phys_map

Instead of storing PhysPageDesc, store pointers to MemoryRegionSections.
The various offsets (phys_offset & ~TARGET_PAGE_MASK,
PHYS_OFFSET & TARGET_PAGE_MASK, region_offset) can all be synthesized
from the information in a MemoryRegionSection. Adjust phys_page_find()...

d6f2ea22 02/29/2012 01:44 pm Avi Kivity

memory: compress phys_map node pointers to 16 bits

Use an expanding vector to store nodes. Allocation is baroque to g_renew()
potentially invalidating pointers; this will be addressed later.

Signed-off-by: Avi Kivity <>

8636b929 02/29/2012 01:44 pm Avi Kivity

memory: fix RAM subpages in newly initialized pages

If the first subpage installed in a page is RAM, then we install it as
a full page, instead of a subpage. Fix by not special casing RAM.

The issue dates to commit db7b5426a4b4242, which introduced subpages....

d7ec83e6 02/29/2012 01:44 pm Avi Kivity

memory: don't pass ->readable attribute to cpu_register_physical_memory_log

It can be derived from the MemoryRegion itself (which is why it is not
used there).

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

93632747 02/29/2012 01:44 pm Avi Kivity

memory: use a MemoryListener for core memory map updates too

This transforms memory.c into a library which can then be unit tested
easily, by feeding it inputs and listening to its outputs.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

7376e582 02/29/2012 01:44 pm Avi Kivity

memory: allow MemoryListeners to observe a specific address space

Ignore any regions not belonging to a specified address space.

Signed-off-by: Avi Kivity <>

4855d41a 02/29/2012 01:44 pm Avi Kivity

memory: split memory listener for the two address spaces

The memory and I/O address spaces do different things, so split them into
two memory listeners.

Signed-off-by: Avi Kivity <>

50c1e149 02/29/2012 01:44 pm Avi Kivity

memory: support stateless memory listeners

Current memory listeners are incremental; that is, they are expected to
maintain their own state, and receive callbacks for changes to that state.

This patch adds support for stateless listeners; these work by receiving...

488d6577 02/20/2012 06:07 pm Max Filippov

exec: fix check_watchpoint exiting cpu_loop

In case of BP_STOP_BEFORE_ACCESS watchpoint check_watchpoint intends to
signal EXCP_DEBUG exception on exit from cpu loop, but later overwrites
exception code by the cpu_resume_from_signal call.

Use cpu_loop_exit with BP_STOP_BEFORE_ACCESS watchpoints....

0dc23828 02/20/2012 06:07 pm Max Filippov

exec: let cpu_watchpoint_insert accept larger watchpoints

Make cpu_watchpoint_insert accept watchpoints of any power-of-two size
up to the target page size.

Signed-off-by: Max Filippov <>

67364150 02/20/2012 06:07 pm Max Filippov

exec: add missing breaks to the watch_mem_write

Signed-off-by: Max Filippov <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Meador Inge <>

771124e1 02/01/2012 10:45 pm Peter Maydell

exec.c: Clarify comment about tlb_flush() flush_global parameter

Clarify the comment about tlb_flush()'s flush_global parameter,
so it is clearer what it does and why it is OK that the implementation
currently ignores it.

Reviewed-by: Andreas F=C3=A4rber <>...

82afa586 01/21/2012 06:17 am Benjamin Herrenschmidt

virtio-pci: Fix endianness of virtio config

The virtio config area in PIO space is a bit special. The initial
header is little endian but the rest (device specific) is guest
native endian.

The PIO accessors for PCI on machines that don't have native IO ports...

5c84bd90 01/13/2012 12:36 pm Aurelien Jarno

tcg-arm: fix a typo in comments

ARM still doesn't support 16GB buffers in 32-bit modes, replace the
16GB by 16MB in the comment.

Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>
Signed-off-by: Stefan Hajnoczi <>

0e0df1e2 01/04/2012 01:34 pm Avi Kivity

Convert IO_MEM_{RAM,ROM,UNASSIGNED,NOTDIRTY} to MemoryRegions

Convert the fixed-address IO_MEM_RAM, IO_MEM_ROM, IO_MEM_UNASSIGNED,
and IO_MEM_NOTDIRTY io handlers to MemoryRegions. These aren't real
regions, since they are never added to the memory hierarchy, but they...

dd81124b 01/04/2012 01:34 pm Avi Kivity

Switch cpu_register_physical_memory_log() to use MemoryRegions

Still internally using ram_addr.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

70c68e44 01/04/2012 01:34 pm Avi Kivity

Convert the subpage wrapper to be a MemoryRegion

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

de712f94 01/04/2012 01:34 pm Avi Kivity

Convert IO_MEM_SUBPAGE_RAM to be a MemoryRegion

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

1ec9b909 01/04/2012 01:34 pm Avi Kivity

Convert io_mem_watch to be a MemoryRegion

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

a621f38d 01/04/2012 01:34 pm Avi Kivity

Direct dispatch through MemoryRegion

Now that all mmio goes through MemoryRegions, we can convert
io_mem_opaque to be a MemoryRegion pointer, and remove the thunks
that convert from old-style CPU{Read,Write}MemoryFunc to MemoryRegionOps.

Signed-off-by: Avi Kivity <>...

b3b00c78 01/04/2012 01:34 pm Avi Kivity

Remove IO_MEM_SUBPAGE

Replace with a MemoryRegion flag.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

75c578dc 01/04/2012 01:34 pm Avi Kivity

Drop IO_MEM_ROMD

Unlike ->readonly, ->readable is not inherited from aliase, so we can simply
query the memory region.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

11c7ef0c 01/04/2012 01:34 pm Avi Kivity

Remove IO_MEM_SHIFT

We no longer use any of the lower bits of a ram_addr, so we might as well
use them for the io table index. This increases the number of potential
I/O handlers by a factor of 8.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

8f77558f 01/04/2012 01:34 pm Avi Kivity

memory: obsolete cpu_physical_memory_[gs]et_dirty_tracking()

The getter is no longer used, so it is completely removed.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>

be675c97 01/04/2012 01:34 pm Avi Kivity

memory: move endianness compensation to memory core

Instead of doing device endianness compensation in cpu_register_io_memory(),
do it in the memory core.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

f1f6e3b8 01/04/2012 01:34 pm Avi Kivity

exec: make phys_page_find() return a temporary

Instead of returning a PhysPageDesc pointer, return a temporary.
This lets us move away from actually storing PhysPageDesc's, and
instead sythesising them when needed.

Signed-off-by: Avi Kivity <>...

acbbec5d 01/04/2012 01:34 pm Avi Kivity

memory: move mmio access to functions

Currently mmio access goes directly to the io_mem_{read,write} arrays.
In preparation for eliminating them, add indirection via a function.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

2774c6d0 01/04/2012 01:34 pm Avi Kivity

Fix wrong region_offset when overlaying a page with another

cpu_register_physical_memory_log() does not update region_offset
if a page was previously registered for the same address. This
could cause mmio accesses going to the wrong place, by using the
old region_offset....

1d393fa2 01/04/2012 01:34 pm Avi Kivity

Avoid range comparisons on io index types

The code sometimes uses range comparisons on io indexes (e.g.
index =< IO_MEM_ROM). Avoid these as they make moving to objects harder.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

d39e8222 01/04/2012 01:34 pm Avi Kivity

Uninline get_page_addr_code()

Its use of IO_MEM_ROM and friends will later cause #include loops; and it
is too large to merit inlining.

Signed-off-by: Avi Kivity <>
Reviewed-by: Richard Henderson <>

c5705a77 01/04/2012 01:34 pm Avi Kivity

vmstate, memory: decouple vmstate from memory API

Currently creating a memory region automatically registers it for
live migration. This differs from other state (which is enumerated
in a VMStateDescription structure) and ties the live migration code
into the memory core....

7c637366 01/04/2012 01:34 pm Avi Kivity

Store MemoryRegion in RAMBlock

As a step in moving live migration from RAMBlocks to MemoryRegions,
store the MemoryRegion in a RAMBlock.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>

586c6230 01/03/2012 07:19 pm Avi Kivity

Remove cpu_get_physical_page_desc()

No longer used.

Signed-off-by: Avi Kivity <>

dcd97e33 01/03/2012 07:19 pm Avi Kivity

memory: remove CPUPhysMemoryClient

No longer used.

Signed-off-by: Avi Kivity <>

7664e80c 12/20/2011 02:14 pm Avi Kivity

memory: add API for observing updates to the physical memory map

Add an API that allows a client to observe changes in the global
memory map:
- region added (possibly with logging enabled)
- region removed (possibly with logging enabled)
- logging started on a region...

67d95c15 12/19/2011 05:28 pm Avi Kivity

memory: move obsolete exec.c functions to a private header

This will help avoid accidental usage.

Signed-off-by: Avi Kivity <>

fce537d4 12/19/2011 05:23 pm Avi Kivity

memory, xen: pass MemoryRegion to xen_ram_alloc()

Currently xen_ram_alloc() relies on ram_addr, which is going away.
Give it something else to use as a cookie.

Signed-off-by: Avi Kivity <>

5ab97b7f 12/15/2011 06:22 pm Alex Rozenman

phys_page_find_alloc: Use correct initial region_offset.

This fixes a common bug with initial region_offset value.
Usually, the pages are re-assigned afterwards, so the bug
has a very small effect on regular QEMU use flows.

Signed-off-by: Alex Rozenman <>...

56384e8b 12/15/2011 05:27 pm Andreas Färber

exec.c: Fix subpage memory access to RAM MemoryRegion

Commit 95c318f5e1f88d7e5bcc6deac17330fd4806a2d3 (Fix segfault in mmio
subpage handling code.) prevented a segfault by making all subpage
registrations over an existing memory page perform an unassigned access....

222f23f5 12/14/2011 10:58 pm Dr. David Alan Gilbert

tcg/arm: remove fixed map code buffer restriction

On ARM, don't map the code buffer at a fixed location, and fix up the
call/goto tcg routines to let it do long jumps.

Mapping the code buffer at a fixed address could sometimes result in it being
mapped over the top of the heap with pretty random results....

daf767b1 12/10/2011 07:05 pm Stefan Weil

w32: Disable buffering for log file

W32 does not support line buffering, but it supports unbuffered output.

Unbuffered output is better for writing to qemu.log than fully buffered
output because it also shows the latest log messages when an application
crash occurs....

3e837b2c 11/01/2011 05:58 pm Alex Williamson

Error check find_ram_offset

Spotted via code review, we initialize offset to 0 to avoid a
compiler warning, but in the unlikely case that offset is
never set to something else, we should abort instead of return
a value that will almost certainly cause problems....

b3c4bbe5 11/01/2011 05:58 pm Paolo Bonzini

Make cpu_single_env thread-local

Make cpu_single_env thread-local. This fixes a regression
in handling of multi-threaded programs in linux-user mode
(bug 823902).

Signed-off-by: Paolo Bonzini <>
[Peter Maydell: rename tls_cpu_single_env to cpu_single_env]...

8f355d67 10/26/2011 03:38 pm 陳韋任

exec.c: Remove useless comment

As phys_ram_size had been removed since QEMU 0.12. Remove the useless
comment.

Signed-off-by: Chen Wen-Ren <>
Signed-off-by: Stefan Hajnoczi <>

946fb27c 10/21/2011 07:14 pm Paolo Bonzini

qemu-timer: move icount to cpus.c

None of this is needed by tools, and most of it can even be made static
inside cpus.c.

Signed-off-by: Paolo Bonzini <>

3917149d 10/01/2011 12:31 pm Blue Swirl

Move GETPC from dyngen-exec.h to exec-all.h

GETPC can be used even from outside of helper code. Move the macro to
a more accessible location. Avoid a compile warning from redefining it in exec.c.

Signed-off-by: Blue Swirl <>

8b3692d1 09/21/2011 12:50 pm Stefan Weil

Remove qemu_host_page_bits

It was introduced with commit 54936004fddc52c321cb3f9a9a51140e782bed5d
as host_page_bits but never used.

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