Statistics
| Branch: | Revision:

root / exec.c @ 26ca8c06

History | View | Annotate | Download (73.6 kB)

# Date Author Comment
5708fc66 01/12/2013 06:19 pm Paolo Bonzini

stubs: fully replace qemu-tool.c and qemu-user.c

Signed-off-by: Paolo Bonzini <>

8e4a424b 01/06/2013 08:30 pm Blue Swirl

Revert "virtio-pci: replace byte swap hack"

This reverts commit 9807caccd605d09a72495637959568d690e10175.

Signed-off-by: Blue Swirl <>

9807cacc 01/06/2013 10:24 am Blue Swirl

virtio-pci: replace byte swap hack

Remove byte swaps by declaring the config space
as native endian.

Signed-off-by: Blue Swirl <>

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

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

exec: sort the memory from biggest to smallest

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

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

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

077805fa 12/19/2012 09:29 am Paolo Bonzini

janitor: do not rely on indirect inclusions of or from qemu-char.h

Various header files rely on qemu-char.h including qemu-config.h or
main-loop.h, but they really do not need qemu-char.h at all (particularly
interesting is the case of the block layer!). Clean this up, and also...

5b6dd868 12/16/2012 10:28 am Blue Swirl

exec: move TB handling to translate-all.c

Signed-off-by: Blue Swirl <>

5a316526 12/16/2012 10:28 am Blue Swirl

exec: extract TB watchpoint check

Will be moved by the next patch.

Signed-off-by: Blue Swirl <>

44209fc4 12/16/2012 10:28 am Blue Swirl

exec: fix coding style

Fix coding style in areas to be moved by later patches.

Signed-off-by: Blue Swirl <>

0be4835b 12/08/2012 04:18 pm Richard Henderson

exec: Advise huge pages for the TCG code gen buffer

After allocating 32MB or more contiguous memory, huge pages
would seem to be ideal.

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

9e11908f 11/12/2012 05:44 pm Peter Maydell

dma: Define dma_context_memory and use in sysbus-ohci

Define a new global dma_context_memory which is a DMAContext corresponding
to the global address_space_memory AddressSpace. This can be used by
sysbus peripherals like sysbus-ohci which need to do DMA....

ef84755e 11/03/2012 02:55 pm Blue Swirl

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    pc: Drop redundant test for ROM memory region
    exec: make some functions static
    target-ppc: make some functions static
    ppc: add missing static...
fdbb84d1 11/03/2012 11:44 am Yeongkyoon Lee

tcg: Add extended GETPC mechanism for MMU helpers with ldst optimization

Add GETPC_EXT which is used by MMU helpers to selectively calculate the code
address of accessing guest memory when called from a qemu_ld/st optimized code
or a C function. Currently, it supports only i386 and x86-64 hosts....

8b9c99d9 11/01/2012 08:49 pm Blue Swirl

exec: make some functions static

Signed-off-by: Blue Swirl <>
Signed-off-by: Stefan Hajnoczi <>

9f09e18a 10/31/2012 05:12 am Andreas Färber

cpu: Move thread_id to CPUState

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

c08d7424 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_cpu_kick()

CPUArchState is no longer needed there.

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

60e82579 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_cpu_is_self()

Change return type to bool, move to include/qemu/cpu.h and
add documentation.

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>
[AF: Updated new caller qemu_in_vcpu_thread()]

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

ad0b5321 10/22/2012 09:26 pm Luiz Capitulino

Call MADV_HUGEPAGE for guest RAM allocations

This makes it possible for QEMU to use transparent huge pages (THP)
when transparent_hugepage/enabled=madvise. Otherwise THP is only
used when it's enabled system wide.

Signed-off-by: Luiz Capitulino <>...

f526f3c3 10/22/2012 09:26 pm Anthony Liguori

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

  • quintela/migration-next-20121017: (41 commits)
    cpus: create qemu_in_vcpu_thread()
    savevm: make qemu_file_put_notify() return errors
    savevm: un-export qemu_file_set_error()...
d3e2efc5 10/22/2012 09:26 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/memory/dma' into staging

  • qemu-kvm/memory/dma: (23 commits)
    pci: honor PCI_COMMAND_MASTER
    pci: give each device its own address space
    memory: add address_space_destroy()
    dma: make dma access its own address space...
ac1970fb 10/22/2012 03:50 pm Avi Kivity

memory: per-AddressSpace dispatch

Currently we use a global radix tree to dispatch memory access. This only
works with a single address space; to support multiple address spaces we
make the radix tree a member of AddressSpace (via an intermediate structure...

83f3c251 10/22/2012 03:50 pm Avi Kivity

memory: add address_space_destroy()

Since address spaces can be created dynamically by device hotplug, they
can also be destroyed dynamically.

Signed-off-by: Avi Kivity <>

2673a5da 10/22/2012 03:50 pm Avi Kivity

memory: move address_space_memory and address_space_io out of memory core

With this change, memory.c no longer knows anything about special address
spaces, so it is prepared for AddressSpace based DMA.

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

1d71148e 10/22/2012 03:50 pm Avi Kivity

memory: move tcg flush into a tcg memory listener

We plan to make the core listener listen to all address spaces; this
will cause many more flushes than necessary. Prepare for that by
moving the flush into a tcg-specific listener.

Later we can avoid registering the listener if tcg is disabled....

f6790af6 10/22/2012 03:50 pm Avi Kivity

memory: use AddressSpace for MemoryListener filtering

Using the AddressSpace type reduces confusion, as you can't accidentally
supply the MemoryRegion you're interested in.

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

95d2994a 10/22/2012 03:50 pm Avi Kivity

memory: manage coalesced mmio via a MemoryListener

Instead of calling a global function on coalesced mmio changes, which
routes the call to kvm if enabled, add coalesced mmio hooks to
MemoryListener and make kvm use that instead.

The motivation is support for multiple address spaces (which means we...

f1bc0bcc 10/20/2012 10:54 am Richard Henderson

exec: Split up and tidy code_gen_buffer

It now consists of:

A macro definition of MAX_CODE_GEN_BUFFER_SIZE with host-specific values,

A function size_code_gen_buffer that applies most of the reasoning for
choosing a buffer size,

Three variations of a function alloc_code_gen_buffer that contain all...

3d85a72f 10/20/2012 10:54 am Richard Henderson

exec: Don't make DEFAULT_CODE_GEN_BUFFER_SIZE too large

For ARM we cap the buffer size to 16MB. Do not allocate 32MB in that case.

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

405def18 10/20/2012 10:54 am Richard Henderson

exec: Do not use absolute address hints for code_gen_buffer with -fpie

The hard-coded addresses inside alloc_code_gen_buffer only make sense
if we're building an executable that will actually run at the address
we've put into the linker scripts.

When we're building with -fpie, the executable will run at some...

4438c8a9 10/20/2012 10:54 am Richard Henderson

exec: Allocate code_gen_prologue from code_gen_buffer

We had a hack for arm and sparc, allocating code_gen_prologue to a
special section. Which, honestly does no good under certain cases.
We've already got limits on code_gen_buffer_size to ensure that all...

74d590c8 10/20/2012 10:54 am Richard Henderson

exec: Make MIN_CODE_GEN_BUFFER_SIZE private to exec.c

It is used nowhere else, and the corresponding MAX_CODE_GEN_BUFFER_SIZE
also lives there.

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

652d7ec2 10/17/2012 07:34 pm Juan Quintela

ram: Export last_ram_offset()

Is the only way of knowing the RAM size.

Signed-off-by: Juan Quintela <>

Reviewed-by: Paolo Bonzini <>

9a2c913b 10/15/2012 12:43 pm Avi Kivity

memory: drop no-op MemoryListener callbacks

Removes quite a bit of useless code.

Signed-off-by: Avi Kivity <>

7762c2c1 10/15/2012 12:43 pm Avi Kivity

memory: rename 'exec-obsolete.h'

exec-obsolete.h used to hold pre-memory-API functions that were used from
device code prior to the transition to the memory API. Now that the
transition is complete, the name no longer describes the file. The
functions still need to be merged better into the memory core, but there's...

6fd2a026 10/05/2012 05:04 pm Peter Maydell

cpu_dump_state: move DUMP_FPU and DUMP_CCOP flags from x86-only to generic

Move the DUMP_FPU and DUMP_CCOP flags for cpu_dump_state() from being
x86-specific flags to being generic ones. This allows us to drop some
TARGET_I386 ifdefs in various places, and means that we can (potentially)...

e226939d 10/03/2012 04:49 pm Anthony PERARD

exec, memory: Call to xen_modified_memory.

This patch add some calls to xen_modified_memory to notify Xen about dirtybits
during migration.

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

51d7a9eb 10/03/2012 04:49 pm Anthony PERARD

exec: Introduce helper to set dirty flags.

This new helper/hook is used in the next patch to add an extra call in a single
place.

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

d5dd696f 09/21/2012 11:02 pm Richard Henderson

tcg-sparc: Don't MAP_FIXED on top of the program

The address we pick in sparc64.ld is also 0x60000000, so doing a fixed map
on top of that is guaranteed to blow up. Choosing 0x40000000 is exactly
right for the max of code_gen_buffer_size set below.

No need to ever use MAP_FIXED. While getting our desired address helps...

9b9c37c3 09/21/2012 11:02 pm Richard Henderson

tcg-sparc: Assume v9 cpu always, i.e. force v8plus in 32-bit mode.

Current code doesn't actually work in 32-bit mode at all. Since
no one really noticed, drop the complication of v7 and v8 cpus.
Eliminate the --sparc_cpu configure option and standardize macro...

0b57e287 09/17/2012 06:18 pm David Gibson

cpu_physical_memory_write_rom() needs to do TB invalidates

cpu_physical_memory_write_rom(), despite the name, can also be used to
write images into RAM - and will often be used that way if the machine
uses load_image_targphys() into RAM addresses.

However, cpu_physical_memory_write_rom(), unlike cpu_physical_memory_rw()...

8490fc78 09/17/2012 06:18 pm Luiz Capitulino

add -machine mem-merge=on|off option

It allows to disable memory merge support (KSM on Linux), which is
enabled by default otherwise.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

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

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