Statistics
| Branch: | Revision:

root / cpu-common.h @ 2a2af967

History | View | Annotate | Download (4.1 kB)

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

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

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

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

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

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

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

07f35073 12/02/2011 12:50 pm Dong Xu Wang

fix spelling in main directory

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

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

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

332ae28d 07/29/2011 04:25 pm Paolo Bonzini

move WORDS_ALIGNED to qemu-common.h

This is not a CPU interface, and a configure test would not be too
precise. So just add it to qemu-common.h.

Signed-off-by: Paolo Bonzini <>
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 <>

21673cde 07/21/2011 12:22 am Blue Swirl

Avoid CPU endian memory accesses in devices

Don't compile virtio.c in hwlib, it depends on memory accesses
performed in CPU endianness.

Make loads and stores in CPU endianness unavailable to devices
and poison them to avoid further bugs.

Acked-by: Alexander Graf <>...

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

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

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

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

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

3bad9814 04/12/2011 10:51 pm Stefan Weil

cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write

A lot of calls don't operate on bytes but on words or on structured data.
So instead of a pointer to uint8_t, a void pointer is the better choice.

This allows removing many type casts....

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

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

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

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

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

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

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

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

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

37b76cfd 04/09/2010 07:55 pm Paolo Bonzini

move targphys.h and hw/poison.h inclusion to cpu-common.h

With more files from outside the hw/ directory being placed into
libhw, avoid the need to include hw/hw.h for the sake of targ_phys_addr_t.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Aurelien Jarno <>

477ba620 04/01/2010 10:51 pm Aurelien Jarno

tcg: initial ia64 support

A few words about design choices:
  • On IA64, instructions should be grouped by bundle, and dependencies
    between instructions declared. A first version of this code tried to
    schedule instructions automatically, but was very complex and too...
6842a08e 03/21/2010 09:47 pm Blue Swirl

Compile pci only once

Move coalesced_mmio declarations to a more accessible location.

Signed-off-by: Blue Swirl <>

b3755a91 03/12/2010 08:34 pm Paul Brook

Disable phsyical memory handling in userspace emulation.

Code to handle physical memory access is not meaningful in usrmode emulation,
so disable it.

Signed-off-by: Paul Brook <>

f6f3fbca 02/10/2010 12:56 am Michael S. Tsirkin

qemu: memory notifiers

This adds notifiers for phys memory changes: a set of callbacks that
vhost can register and update kernel accordingly. Down the road, kvm
code can be switched to use these as well, instead of calling kvm code
directly from exec.c as is done now....

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

d60efc6b 08/25/2009 09:29 pm Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: Blue Swirl <>

4a1418e0 08/24/2009 04:02 pm Anthony Liguori

Unbreak large mem support by removing kqemu

kqemu introduces a number of restrictions on the i386 target. The worst is that
it prevents large memory from working in the default build.

Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...

1eed09cb 06/16/2009 11:18 pm Avi Kivity

Remove io_index argument from cpu_register_io_memory()

The parameter is always zero except when registering the three internal
io regions (ROM, unassigned, notdirty). Remove the parameter to reduce
the API's power, thus facilitating future change.

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

1ad2134f 05/19/2009 06:17 pm Paul Brook

Hardware convenience library

The only target dependency for most hardware is sizeof(target_phys_addr_t).
Build these files into a convenience library, and use that instead of
building for every target.

Remove and poison various target specific macros to avoid bogus target...