Statistics
| Branch: | Revision:

root / exec.c @ 2542bfd5

History | View | Annotate | Download (140 kB)

# Date Author Comment
7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

85d59fef 08/12/2011 03:07 pm Paolo Bonzini

fix QLIST usage for RAM list

Spotted while reviewing the migration thread patches.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

309cb471 08/08/2011 06:15 pm Avi Kivity

Integrate I/O memory regions into qemu

get_system_io() returns the root I/O memory region.

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

9f4b09a4 08/07/2011 12:57 pm Tobias Nygren

Use mmap to allocate execute memory

Use mmap to allocate executable memory on NetBSD as well.

Signed-off-by: Christoph Egger <>
Signed-off-by: Blue Swirl <>

8417cebf 08/05/2011 06:57 pm Avi Kivity

memory: use signed arithmetic

When trying to map an alias of a ram region, where the alias starts at
address A and we map it into address B, and A > B, we had an arithmetic
underflow. Because we use unsigned arithmetic, the underflow converted
into a large number which failed addrrange_intersects() tests....

d5ab9713 08/05/2011 06:57 pm Jan Kiszka

Avoid allocating TCG resources in non-TCG mode

Do not allocate TCG-only resources like the translation buffer when
running over KVM or XEN. Saves a "few" bytes in the qemu address space
and is also conceptually cleaner.

Signed-off-by: Jan Kiszka <>...

3046c984 07/29/2011 05:42 pm Anthony Liguori

Merge remote-tracking branch 'agraf/xen-next' into staging

62152b8a 07/29/2011 04:25 pm Avi Kivity

exec.c: initialize memory map

Allocate the root memory region and initialize it.

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

f15fbc4b 07/26/2011 07:57 am Anthony PERARD

cpu-common: Have a ram_addr_t of uint64 with Xen.

In Xen case, memory can be bigger than the host memory. that mean a
32bits host (and QEMU) should be able to handle a RAM address of 64bits.

Signed-off-by: Anthony PERARD <>
Signed-off-by: Alexander Graf <>

8ca5692d 07/26/2011 07:43 am Anthony PERARD

exec.c: Use ram_addr_t in cpu_physical_memory_rw(...).

As the variable pd and addr1 inside the function cpu_physical_memory_rw
are mean to handle a RAM address, they should be of the ram_addr_t type
instead of unsigned long.

Signed-off-by: Anthony PERARD <>...

b14ef7c9 07/21/2011 12:28 am Blue Swirl

Fix unassigned memory access handling

cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory
access handling. Fix them by always passing CPUState to the handlers.

Reported-by: Hervé Poussineau <>
Signed-off-by: Blue Swirl <>

8ab934f9 07/17/2011 02:54 am Stefano Stabellini

qemu_ram_ptr_length: take ram_addr_t as arguments

qemu_ram_ptr_length should take ram_addr_t as argument rather than
target_phys_addr_t because is doing comparisons with RAMBlock addresses.

cpu_physical_memory_map should create a ram_addr_t address to pass to...

e41d7c69 07/17/2011 02:54 am Jan Kiszka

xen: Clean up map cache API naming

The map cache is a Xen thing, so its API should make this clear.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Alexander Graf <>

868bb33f 07/17/2011 02:54 am Jan Kiszka

xen: Fold CONFIG_XEN_MAPCACHE into CONFIG_XEN

Xen won't be enabled if there is no backend support available for the
host. And that also means the map cache will work. So drop the separate
config switch and move the required stubs over to xen-stub.c.

Signed-off-by: Jan Kiszka <>...

a884da8a 07/12/2011 11:29 pm Peter Maydell

exec.c: Fix calculation of code_gen_buffer_max_size

When calculating the point at which we should not try to put another
TB into the code gen buffer, we have to allow not just for OPC_MAX_SIZE
but OPC_BUF_SIZE. This is because the target translate.c will only...

1e78bcc1 07/12/2011 11:00 pm Alexander Graf

exec: add endian specific phys ld/st functions

Device code some times needs to access physical memory and does that
through the ld./st._phys functions. However, these are the exact same
functions that the CPU uses to access memory, which means they will
be endianness swapped depending on the target CPU....

bb820c03 06/27/2011 07:25 pm Anthony Liguori

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

2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

4429ab44 06/24/2011 05:34 pm Juan Quintela

exec: last_first_tb was only used in !ONLY_USER case

Once there, use a better variable name.

Signed-off-by: Juan Quintela <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

fdba9594 06/22/2011 03:11 pm Anthony Liguori

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

Conflicts:
hw/usb-uhci.c

6506e4f9 06/19/2011 05:40 am Stefano Stabellini

xen: remove xen_map_block and xen_unmap_block

Replace xen_map_block with qemu_map_cache with the appropriate locking
and size parameters.
Replace xen_unmap_block with qemu_invalidate_entry.

Signed-off-by: Stefano Stabellini <>...

38bee5dc 06/19/2011 05:40 am Stefano Stabellini

exec.c: refactor cpu_physical_memory_map

Introduce qemu_ram_ptr_length that takes an address and a size as
parameters rather than just an address.

Refactor cpu_physical_memory_map so that we call qemu_ram_ptr_length only
once rather than calling qemu_get_ram_ptr one time per page....

712c2b41 06/19/2011 05:40 am Stefano Stabellini

xen: mapcache performance improvements

Use qemu_invalidate_entry in cpu_physical_memory_unmap.

Do not lock mapcache entries in qemu_get_ram_ptr if the address falls in
the ramblock with offset == 0. We don't need to do that because the
callers of qemu_get_ram_ptr either try to map an entire block, other...

cd306087 06/19/2011 05:40 am Stefano Stabellini

xen: remove qemu_map_cache_unlock

There is no need for qemu_map_cache_unlock, just use
qemu_invalidate_entry instead.

Signed-off-by: Stefano Stabellini <>
Signed-off-by: Alexander Graf <>

befeac45 06/15/2011 06:27 pm Michael S. Tsirkin

Merge remote-tracking branch 'origin/master' into pci

Conflicts:
hw/virtio-pci.c

2173a75f 06/12/2011 10:33 am Alex Williamson

CPUPhysMemoryClient: batch addresses in catchup

When a phys memory client registers and we play catchup by walking
the page tables, we can make a huge improvement in the number of
times the set_memory callback is called by batching contiguous
pages together. With a 4G guest, this reduces the number of callbacks...

44829396 06/10/2011 11:21 pm Edgar E. Iglesias

Merge remote branch 'rth/axp-next' into alpha-merge

  • rth/axp-next: (26 commits)
    target-alpha: Implement TLB flush primitives.
    target-alpha: Use a fixed frequency for the RPCC in system mode.
    target-alpha: Trap for unassigned and unaligned addresses....
9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

1f2e98b6 06/03/2011 11:59 pm Alex Williamson

exec: Implement qemu_ram_free_from_ptr()

Required for regions mapped via qemu_ram_alloc_from_ptr(). VFIO
and ivshmem will make use of this to remove mappings when devices
are hot unplugged.

Signed-off-by: Alex Williamson <>
Signed-off-by: Aurelien Jarno <>

5b450407 05/31/2011 08:18 pm Richard Henderson

target-alpha: Trap for unassigned and unaligned addresses.

Signed-off-by: Richard Henderson <>

6eba5c82 05/23/2011 11:36 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://repo.or.cz/qemu/stefanha

  • 'trivial-patches' of git://repo.or.cz/qemu/stefanha:
    Fix typos in comments (chek -> check)
    hw/sd.c: Don't complain about SDIO commands CMD52/CMD53
    hw/realview.c: Remove duplicate #include line...
a57d23e4 05/23/2011 12:31 am Stefan Weil

Fix typos in comments (chek -> check)

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

ff83678a 05/20/2011 06:35 pm Christian Borntraeger

s390x: change mapping base to allow guests > 2GB

the current s390x qemu memory layout is

0x1000000: guest start
0x80000000: qemu binary

which limits the amount of available memory to <2GB.
This patch moves the guest pages to 32GB to not collide with the binary...

fb8b2735 05/20/2011 06:35 pm Alexander Graf

s390x: complain when allocating ram fails

While trying out the > 64GB guest RAM patch, I hit some virtual address
limitations of my host system, which resulted in mmap failing. Unfortunately,
qemu didn't tell me about this failure, but just used the NULL pointer...

432d268c 05/08/2011 11:10 am Jun Nakajima

xen: Introduce the Xen mapcache

On IA32 host or IA32 PAE host, at present, generally, we can't create
an HVM guest with more than 2G memory, because generally it's almost
impossible for Qemu to find a large enough and consecutive virtual
address space to map an HVM guest's whole physical address space....

050a0ddf 05/08/2011 11:10 am Anthony PERARD

Introduce qemu_put_ram_ptr

This function allows to unlock a ram_ptr give by qemu_get_ram_ptr. After
a call to qemu_put_ram_ptr, the pointer may be unmap from QEMU when
used with Xen.

Signed-off-by: Anthony PERARD <>
Acked-by: Alexander Graf <>...

5300f1a5 05/05/2011 04:39 pm Michael S. Tsirkin

Merge remote branch 'origin/master' into pci

Conflicts:
exec.c

8d4c78e7 05/05/2011 04:23 pm Alex Williamson

CPUPhysMemoryClient: Pass guest physical address not region offset

When we're trying to get a newly registered phys memory client updated
with the current page mappings, we end up passing the region offset
(a ram_addr_t) as the start address rather than the actual guest...

c2f42bf0 05/05/2011 04:21 pm Alex Williamson

CPUPhysMemoryClient: Fix typo in phys memory client registration

When we register a physical memory client, we try to walk the page
tables, calling the set_memory hook for every entry. Effectively
playing catchup for the client for everything already registered....

97ffbd8d 05/02/2011 03:38 pm Jan Kiszka

Break up user and system cpu_interrupt implementations

Both have only two lines in common, and we will convert the system
service into a callback which is of no use for user mode operation.

Signed-off-by: Jan Kiszka <>
CC: Riku Voipio <>...

ec6959d0 05/02/2011 03:38 pm Jan Kiszka

Redirect cpu_interrupt to callback handler

This allows to override the interrupt handling of QEMU in system mode.
KVM will make use of it to set a specialized handler.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

618ba8e6 04/20/2011 11:37 am Stefan Weil

Remove unused function parameter from cpu_restore_state

The previous patch removed the need for parameter puc.
Is is now unused, so remove it.

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

71d2b725 04/12/2011 10:51 pm Stefan Weil

exec: Remove a type cast which is no longer needed

All other type casts in calls of cpu_physical_memory_write are
used by hardware emulations and will be fixed by separate patches.

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>...

54f7b4a3 04/12/2011 10:51 pm Stefan Weil

Replace cpu_physical_memory_rw were possible

Using cpu_physical_memory_read, cpu_physical_memory_write and ldub_phys
improves readability and allows removing some type casts.

lduw_phys and ldl_phys were not used because both require aligned
addresses. Therefore it is not possible to simply replace existing...

3b8e6a2d 04/07/2011 11:53 am Edgar E. Iglesias

exec: Handle registrations of the entire address space

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

0fd542fb 04/06/2011 10:28 pm Michael S. Tsirkin

cpu: add set_memory flag to request dirty logging

Pass the flag to all cpu notifiers, doing
nothing at this point. Will be used by
follow-up patches.

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

dc7a09cf 03/16/2011 10:11 pm Jan Kiszka

Expose thread_id in info cpus

Based on patch by Glauber Costa:

To allow management applications like libvirt to apply CPU affinities to
the VCPU threads, expose their ID via info cpus. This patch provides the
pre-existing and used interface from qemu-kvm....

fd28aa13 03/15/2011 07:36 pm Jan Kiszka

s390: Detect invalid invocations of qemu_ram_free/remap

This both detects invalid invocations of qemu_ram_free and
qemu_ram_remap when mem_path is non-NULL and fixes a build error on
s390 ("'area' may be used uninitialized in this function").

Signed-off-by: Jan Kiszka <>...

cd19cfa2 03/15/2011 06:19 am Huang Ying

Add qemu_ram_remap

qemu_ram_remap() unmaps the specified RAM pages, then re-maps these
pages again. This is used by KVM HWPoison support to clear HWPoisoned
page tables across guest rebooting, so that a new page may be
allocated later to recover the memory error....

b7680cb6 03/13/2011 04:44 pm Jan Kiszka

Refactor thread retrieval and check

We have qemu_cpu_self and qemu_thread_self. The latter is retrieving the
current thread, the former is checking for equality (using CPUState). We
also have qemu_thread_equal which is only used like qemu_cpu_self.

This refactors the interfaces, creating qemu_cpu_is_self and...

7d82af38 03/11/2011 12:12 am Vincent Palatin

Fix performance regression in qemu_get_ram_ptr

When the commit f471a17e9d869df3c6573f7ec02c4725676d6f3a converted the
ram_blocks structure to QLIST, it also removed the conditional check before
switching the current block at the beginning of the list.

In the common use case where ram_blocks has a few blocks with only one...

e5896b12 02/14/2011 04:39 pm Anthony PERARD

Introduce log_start/log_stop in CPUPhysMemoryClient

In order to use log_start/log_stop with Xen as well in the vga code,
this two operations have been put in CPUPhysMemoryClient.

The two new functions cpu_physical_log_start,cpu_physical_log_stop are
used in hw/vga.c and replace the kvm_log_start/stop. With this, vga does...

d1a1eb74 02/10/2011 07:17 pm Tristan Gingold

Make tb_alloc static

This function is only used within exec.c, so no need to make it public.

Signed-off-by: Tristan Gingold <>
Signed-off-by: Aurelien Jarno <>

4cd31ad2 01/16/2011 10:32 am Blue Swirl

tcg/sparc64: fix segfault

With current OpenBSD, code_gen_buffer was mapped 8GB away from
text segment. Then any helpers were beyond the 2GB range of call
instruction genereated by TCG and so the calls would go nowhere,
leading to a segfault.

Fix by specifying an address for the code_gen_buffer,...

cbb608a5 12/21/2010 09:44 pm Brad

Use mmap() within code_gen_alloc() for OpenBSD.

Signed-off-by: Brad Smith <>
Signed-off-by: Blue Swirl <>

dd310534 12/11/2010 05:24 pm Alexander Graf

exec: introduce endianness swapped mmio

The way we're currently modeling mmio is too simplified. We assume that
every device has the same endianness as the target CPU. In reality,
most devices are little endian (all PCI and ISA ones I'm aware of). Some
are big endian (special system devices) and a very little fraction is...

2507c12a 12/11/2010 05:24 pm Alexander Graf

Add endianness as io mem parameter

As stated before, devices can be little, big or native endian. The
target endianness is not of their concern, so we need to push things
down a level.

This patch adds a parameter to cpu_register_io_memory that allows a
device to choose its endianness. For now, all devices simply choose...

db1923de 12/03/2010 07:50 pm Stefan Hajnoczi

exec: Remove debugging fprintf() that slipped into qemu_ram_alloc_from_ptr()

Remove the debugging fprintf() slipped in via the following commit:

commit b2e0a138e77245290428a7d599a929e2e1bfe510
Author: Michael S. Tsirkin &lt;&gt;
Date: Mon Nov 22 19:52:34 2010 +0200...
b2e0a138 12/02/2010 09:13 pm Michael S. Tsirkin

migration: stable ram block ordering

This makes ram block ordering under migration stable, ordered by offset.
This is especially useful for migration to exec, for debugging.

Signed-off-by: Michael S. Tsirkin <>
Tested-by: Jason Wang <>

055403b2 10/30/2010 11:01 am Stefan Weil

exec: Use fprintf_function for dump_exec_info (format checking)

fprintf_function uses format checking with GCC_FMT_ATTR.

It is declared in qemu-common.h and used in cpu-all.h
(which is included from cpu.h), so qemu-common.h must
be included earlier. Some redundant include statements...

e890261f 10/21/2010 12:15 am Marcelo Tosatti

Export qemu_ram_addr_from_host

To be used by next patches.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

7fd3f494 10/03/2010 09:41 am Stefan Weil

exec: Fix compilation error for debug code

is_softmmu was removed with commit
d4c430a80f000d722bb70287af4d4c184a8d7006,
so remove it now from debug code, too.

Fix also the format specifier for paddr
in the same line of code.

Cc: Blue Swirl <>...

e78815a5 09/25/2010 02:26 pm Andreas Färber

Introduce qemu_madvise()

vl.c has a Sun-specific hack to supply a prototype for madvise(),
but the call site has apparently moved to arch_init.c.

Haiku doesn't implement madvise() in favor of posix_madvise().
OpenBSD and Solaris 10 don't implement posix_madvise() but madvise()....

95c318f5 08/28/2010 11:47 am Gleb Natapov

Fix segfault in mmio subpage handling code.

It is possible that subpage mmio is registered over existing memory
page. When this happens "memory" will have real memory address and not
index into io_mem array so next access to the page will generate
segfault. It is uncommon to have some part of a page to be accessed as...

9742bf26 08/23/2010 12:19 am Yoshiaki Tamura

exec: replace tabs by spaces.

Signed-off-by: Yoshiaki Tamura <>
Signed-off-by: Anthony Liguori <>

6977dfe6 08/23/2010 12:19 am Yoshiaki Tamura

exec: remove code duplication in qemu_ram_alloc() and qemu_ram_alloc_from_ptr()

Since most of the code in qemu_ram_alloc() and
qemu_ram_alloc_from_ptr() are duplicated, let
qemu_ram_alloc_from_ptr() to switch by checking void *host, and change
qemu_ram_alloc() to a wrapper....

84b89d78 08/11/2010 12:25 am Cam Macdonell

Add qemu_ram_alloc_from_ptr function

Provide a function to add an allocated region of memory to the qemu RAM.

This patch is copied from Marcelo's qemu_ram_map() in qemu-kvm and given the
clearer name qemu_ram_alloc_from_ptr().

Signed-off-by: Cam Macdonell <>...

24ab68ac 07/22/2010 06:52 am Stefan Weil

Declare code_gen_ptr, code_gen_max_blocks 'static'

Both values are only used in exec.c, so there is no need
to make them globally available.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

09d7ae90 07/07/2010 10:37 pm Blue Swirl

Fix warning about uninitialized variable

With gcc 4.2.1-sjlj (mingw32-2) I get this warning:
/src/qemu/exec.c: In function 'qemu_ram_alloc':
/src/qemu/exec.c:2777: warning: 'offset' may be used uninitialized in this function

Fix by initializing the variable....

fb787f81 07/06/2010 06:36 pm Alex Williamson

ramblocks: No more being lazy about duplicate names

Now that we have a working qemu_ram_free() and the primary runtime
user of it has been updated, don't be lenient about duplicate id strings.
We also shouldn't need to create them ondemand at the target....

0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

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

1724f049 07/06/2010 06:36 pm Alex Williamson

qemu_ram_alloc: Add DeviceState and name parameters

These will be used to generate unique id strings for ramblocks. The name
field is required, the device pointer is optional as most callers don't
have a device. When there's no device or the device isn't a child of...

cc9e98cb 07/06/2010 06:36 pm Alex Williamson

ramblocks: Make use of DeviceState pointer and BusInfo.get_dev_path

With these two pieces in place, we can start naming ramblocks. When
the device is present and it lives on a bus that provides a device
path, we concatenate the path and the provided name. Otherwise we...

04b16653 07/06/2010 06:36 pm Alex Williamson

qemu_ram_free: Implement it

Now that we can support a ram_addr_t space with holes, we can implement
qemu_ram_free().

Signed-off-by: Alex Williamson <>
Signed-off-by: Anthony Liguori <>

d17b5288 07/06/2010 06:36 pm Alex Williamson

Remove uses of ram.last_offset (aka last_ram_offset)

We currently need this either to allocate the next ram_addr_t for a
new block, or for total memory to be migrated. Both of which we can
calculate without need of this to keep us in a contiguous address space....

bf298f83 06/30/2010 09:25 pm Jun Koi

A bit optimization for tlb_set_page()

This patch avoids handling write watchpoints on read-only memory access.
It also breaks the searching loop for watchpoint once the setup for
handling watchpoint later is done.

Signed-off-by: Jun Koi <>...

f471a17e 06/14/2010 07:12 pm Alex Williamson

ram_blocks: Convert to a QLIST

This makes the RAM block list easier to manipulate. Also incorporate
relevant variables into the RAMList struct.

Signed-off-by: Alex Williamson <>
Acked-by: Chris Wright <>
Signed-off-by: Anthony Liguori <>

eba0b893 06/11/2010 10:30 am Richard Henderson

tcg-s390: Allocate the code_gen_buffer near the main program.

This allows the use of direct calls to the helpers,
and a direct branch back to the epilogue.

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

239fda31 06/09/2010 05:10 pm Aurelien Jarno

tcg: get rid of copy_size in TCGOpDef

copy_size is a left-over from the dyngen era, remove it.

Signed-off-by: Aurelien Jarno <>

9002ec79 05/21/2010 07:41 pm Richard Henderson

tcg: Initialize the prologue after GUEST_BASE is fixed.

This will allow backends to make intelligent choices about how
to implement GUEST_BASE.

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

618a568d 05/11/2010 08:02 pm Marcelo Tosatti

Fix -mem-path with hugetlbfs

Fallback to qemu_vmalloc in case file_ram_alloc fails.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

3cab721d 05/07/2010 07:58 pm Richard Henderson

Fill in unassigned mem read/write callbacks.

Implement the "functions may be omitted with NULL pointer"
interface mentioned in the function block comment by transforming
NULL entries in the read/write arrays into calls to the
unassigned_mem family of functions....

733f0b02 05/06/2010 08:28 am Michael S. Tsirkin

qemu: address todo comment in exec.c

exec.c has a comment 'XXX: optimize' for lduw_phys/stw_phys,
so let's do it, along the lines of stl_phys.

The reason to address 16 bit accesses specifically is that virtio relies
on these accesses to be done atomically, using memset as we do now...

3e0650a9 05/06/2010 07:45 am Richard Henderson

Fix zero-length write(2).

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

2e9a5713 05/05/2010 06:32 pm Paul Brook

Remove PAGE_RESERVED

The usermode PAGE_RESERVED code is not required by the current mmap
implementation, and is already broken when guest_base != 0.
Unfortunately the bsd emulation still uses the old mmap implementation,
so we can't rip it out altogether....

f6405247 04/25/2010 03:59 pm Richard Henderson

Remove IO_MEM_SUBWIDTH.

Greatly simplify the subpage implementation by not supporting
multiple devices at the same address at different widths. We
don't need full copies of mem_read/mem_write/opaque for each
address, only a single index back into the main io_mem_* arrays....

24f7fb19 04/11/2010 11:15 pm Jun Koi

Cleanup dead code

This patch removes some dead code in exec.c

Signed-off-by: Jun Koi <>
Signed-off-by: Blue Swirl <>

fd436907 04/10/2010 06:20 pm Aurelien Jarno

Revert "Avoid page_set_flags() assert in qemu-user host page protection code"

This reverts commit 01c0bef1625d8e5d6d5c6abaf413214d667615ad.

(breaks build on 32-bit hosts)

01c0bef1 04/09/2010 11:01 pm Juergen Lock

Avoid page_set_flags() assert in qemu-user host page protection code

V2 that uses endaddr = end-of-guest-address-space if !h2g_valid(endaddr)
after I found out that indeed works; and also disables the FreeBSD 6.x
/compat/linux/proc/self/maps fallback because it can return partial lines...

f7c11b53 04/08/2010 12:11 pm Yoshiaki Tamura

Replace direct phys_ram_dirty access with wrapper functions.

Replaces direct phys_ram_dirty access with wrapper functions to prevent
direct access to the phys_ram_dirty bitmap.

Signed-off-by: Yoshiaki Tamura <>
Signed-off-by: OHMURA Kei <>...

355b1943 04/05/2010 02:28 am Paul Brook

Split TLB addend and target_phys_addr_t

Historically the qemu tlb "addend" field was used for both RAM and IO accesses,
so needed to be able to hold both host addresses (unsigned long) and guest
physical addresses (target_phys_addr_t). However since the introduction of...

45d679d6 04/01/2010 10:51 pm Aurelien Jarno

linux-user: fix page_unprotect when host page size > target page size

When the host page size is bigger that the target one, unprotecting a
page should:
- mark all the target pages corresponding to the host page as writable
- invalidate all tb corresponding to the host page (and not the target...

ebf50fb3 04/01/2010 10:51 pm Aurelien Jarno

tcg: align static_code_gen_buffer to CODE_GEN_ALIGN

On ia64, the default memory alignement is not enough for a code
alignement. To fix that, force static_code_gen_buffer alignment
to CODE_GEN_ALIGN.

Signed-off-by: Aurelien Jarno <>

f01576f1 03/30/2010 08:45 pm Juergen Lock

Get bsd-user host page protection code working on FreeBSD hosts

Use kinfo_getvmmap(3) on FeeBSD >= 7.x and /compat/linux/proc on older
FreeBSD. (kinfo_getvmmap is preferred since /compat/linux/proc is
usually only mounted on hosts also using the Linuxolator.)...

29e922b6 03/29/2010 10:24 pm Blue Swirl

Compile qemu-timer only once

Arrange various declarations so that also non-CPU code can access
them, adjust users.

Move CPU specific code to cpus.c.

Signed-off-by: Blue Swirl <>

91dbed4b 03/28/2010 07:47 pm Aurelien Jarno

exec: remove dead code

Signed-off-by: Aurelien Jarno <>

6adc0549 03/27/2010 04:26 pm Michael Tokarev

be more specific in -mem-path error messages

Signed-Off-By: Michael Tokarev <>
Signed-off-by: Aurelien Jarno <>

d4c430a8 03/17/2010 04:44 am Paul Brook

Large page TLB flush

QEMU uses a fixed page size for the CPU TLB. If the guest uses large
pages then we effectively split these into multiple smaller pages, and
populate the corresponding TLB entries on demand.

When the guest invalidates the TLB by virtual address we must invalidate...

7296abac 03/14/2010 04:58 pm Paul Brook

Fix pagetable code

The multi-level pagetable code fails to iterate ove all entries because
of the L2_BITS v.s. L2_SIZE thinko.

Signed-off-by: Paul Brook <>

338e9e6c 03/13/2010 11:48 am Blue Swirl

Fix more wrong usermode virtual address types

Fixes warning:
CC sparc-bsd-user/exec.o
/src/qemu/exec.c: In function `page_check_range':
/src/qemu/exec.c:2375: warning: comparison is always true due to limited range of data type

Signed-off-by: Blue Swirl <>