Statistics
| Branch: | Revision:

root @ 19bf7c87

# Date Author Comment
19bf7c87 01/12/2012 06:03 pm Avi Kivity

Fix qapi code generation fix

The fixes to qapi code generation had multiple bugs:
- the Null class used to drop output was missing some methods
- in some scripts it was never instantiated, leading to a None return,
which is missing even more methods
- the --source and --header options were swapped...

9f6113c7 01/12/2012 02:54 pm Edgar E. Iglesias

microblaze: Break the tb at memory barriers

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

73a511de 01/12/2012 02:54 pm Lars Persson

etraxfs-dma: Model metadata and eop

- Send EOP flags to the out channels.
- Send data descriptor metadata to the out channels.

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

48b5e96f 01/12/2012 02:54 pm Edgar E. Iglesias

microblaze: Add support for the clz insn

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

5818dee5 01/12/2012 02:54 pm Edgar E. Iglesias

microblaze: Emulate the hw stackprotector

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

a4d1f142 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions

minpd, minps, minsd, minss and maxpd, maxps, maxsd, maxss SSE2
instructions have been broken when switching target-i386 to softfloat.
It's not possible to use comparison instructions on float types anymore...

adc71666 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix round{pd,ps,sd,ss} SSE2 instructions

roundps and roundss SSE2 instructions have been broken when switching
target-i386 to softfloat. They use float64_round_to_int to convert a
float32, and while the implicit conversion from float32 to float64 was...

170d5b4b 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix dpps and dppd SSE2 instructions

The helpers implemented dpps and dppd SSE instructions are not passing
the correct argument types to the softfloat functions. While they do
work anyway providing a correct behaviour, this patch fixes that....

2355c16e 01/11/2012 10:55 am Aurelien Jarno

target-i386: fix SSE rounding and flush to zero

SSE rounding and flush to zero control has never been implemented. However
given that softfloat-native was using a single state for FPU and SSE and
given that glibc is setting both FPU and SSE state in fesetround(), this...

9841aee1 01/10/2012 07:47 pm Stefan Weil

wm8750: Fix calculation of number of array elements

Coverity says that the division by sizeof(*s->rate) might be wrong.
I think that coverity is right.

Signed-off-by: Stefan Weil <>
Signed-off-by: Andrzej Zaborowski <>

c7c530cd 01/10/2012 07:40 pm Stefan Weil

elf: Improve symbol lookup (optimize, fix for bsd-user)

Coverity complained about local variable key which was only partially
initiated. Only key.st_value was set. As this was also the only part
of key which was used in function symfind, the code could be optimized...

563c2bf3 01/10/2012 07:40 pm Peter Maydell

hw/integratorcp: Simplify flash remap code

Use the new memory mutator API to simplify the flash remap code;
this allows us to drop the flash_mapped flag.

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

4753dea8 01/10/2012 07:39 pm Peter Maydell

hw/integratorcp: Fix sense of REMAP bit

Fix the sense of the REMAP bit: 0 should mean "map flash",
1 should mean "map RAM".

Signed-off-by: Peter Maydell <>
Signed-off-by: Andrzej Zaborowski <>

14763ec8 01/10/2012 07:24 pm Aurelien Jarno

Merge branch 's390-next' of git://repo.or.cz/qemu/agraf

  • 's390-next' of git://repo.or.cz/qemu/agraf:
    s390: fix cpu hotplug / cpu activity on interrupts
    s390x: add TR function for EXECUTE
    Expose drive_add on all architectures
    Add generic drive hotplugging...
665a04ae 01/10/2012 07:23 pm Alexander Graf

PPC: Fix linker scripts on ppc hosts

When compiling qemu statically with multilib on PPC, we hit the
same issue that commit 845f2c2812d9ed24b36c02a3d06ee83aeafe8b49
is fixing. Do the same here.

Signed-off-by: Alexander Graf <>
Signed-off-by: Aurelien Jarno <>

0cdb9554 01/10/2012 07:20 pm Aurelien Jarno

target-sh4: ignore ocbp and ocbwb instructions

ocbp and ocbwb controls the writeback of a cache line to memory. They
are supposed to do nothing in case of a cache miss. Given QEMU only
partially emulate caches, it is safe to ignore these instructions.

This fixes a kernel oops when trying to access an rtl8139 NIC with...

05b922dd 01/10/2012 06:52 pm Peter Maydell

tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer

On ARM, in Thumb mode r7 is used for the framepointer; this meant
that we would fail to compile in debug mode because we were using r7
for TCG_AREG0. Shift to r6 instead to avoid this clash....

520a02f8 01/10/2012 10:36 am Stefan Weil

cris-dis: Clean memory allocation

The old code used sizeof(const struct cris_opcode **) where it should
have used sizeof(const struct cris_opcode *). As both sizes give the
same value, the resulting binary was ok, but static code analyzers
like coverity and clang complained....

cd9244e4 01/09/2012 04:54 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/fix-vhost-after-memory-listener' into staging

  • qemu-kvm/fix-vhost-after-memory-listener:
    vhost: improve region filtering
    vhost: fix mem_sections memory corruption
    vhost: fix incorrect userspace address
c49450b9 01/09/2012 02:01 pm Avi Kivity

vhost: improve region filtering

vhost memory management doesn't care about non-memory (e.g. PIO) or non-RAM
regions. Adjust the filtering to reflect that, and move it earlier so it
applies to mem_sections too.

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

637f7a6a 01/09/2012 01:59 pm Avi Kivity

vhost: fix mem_sections memory corruption

A memset() used to delete an entry in an array did not take into account
the array element's size.

Signed-off-by: Avi Kivity <>
Acked-by: Michael S. Tsirkin <>

d743c382 01/09/2012 01:09 pm Avi Kivity

vhost: fix incorrect userspace address

MemoryListener::region_add() gives us a slice of a MemoryRegion, not a
region. Adjust the userspace address to reflect that.

Signed-off-by: Avi Kivity <>
Acked-by: Michael S. Tsirkin <>

1ddde087 01/08/2012 06:16 pm Avi Kivity

Fix vmstate_register_ram() for rom/device regions

rom/device regions have a ram_addr that is composed of both an I/O handler
(low bits) and RAM region (high bits); but qemu_ram_set_idstr() expects just
a RAM region. Mask the I/O handler to make it happy....

1470a0cd 01/08/2012 01:10 pm Andreas Färber

memory: Fix adjust_endianness()

Commit a621f38de85598a13d8d8524d1a94fc6a1818215 (Direct dispatch
through MemoryRegion) moved byte swaps to a central function.

Add a missing break, so that long-sized byte swaps don't abort.

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

2c3579ab 01/08/2012 01:10 pm Andreas Färber

memory: Fix memory_region_wrong_endianness()

Since commit be675c972088eba210e18dc125613e9f205a6bfb (memory: move
endianness compensation to memory core) it was checking for
TARGET_BIG_ENDIAN instead of TARGET_WORDS_BIGENDIAN, thereby not
swapping correctly for Big Endian targets....

6148b23d 01/08/2012 12:59 pm Avi Kivity

kvm: fix build error in ppc kvm due to memory_region_init_ram_ptr() change

Commit c5705a772 ("vmstate, memory: decouple vmstate from memory API") changed
the signature of memory_region_init_ram_ptr() but did not update a caller in
the ppc kvm module. Fix....

e7f92902 01/07/2012 11:19 pm Aurelien Jarno

Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

  • 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
    arm: add dummy A9-specific cp15 registers
    target-arm: Ignore attempts to set invalid modes in CPSR...
15f43ccd 01/07/2012 11:01 pm Aurelien Jarno

Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf

  • 'ppc-next' of git://repo.or.cz/qemu/agraf:
    PPC: Add description for the Freescale e500mc core.
    pseries: Check for duplicate addresses on the spapr-vio bus
    pseries: Populate "/chosen/linux,stdout-path" in the FDT...
c2780865 01/07/2012 10:29 pm Stefan Weil

sm501: Fix size of color_reg

color_reg is expected to hold 32 bit values, so it was too small.

This bug was reported by coverity:

hw/sm501.c:624:
result_independent_of_operands:
color_reg >> 16 is 0 regardless of the values of its operands.
This occurs as the bitwise first operand of '&'....

e9b40fd3 01/07/2012 07:16 pm Stefan Weil

malta: Fix regression (i8259 interrupts did not work)

Commit 5632ae46d5bda798e971dae48ebb318ac2c3686a passes the address
of i8259 to qemu_irq_proxy. i8259 is an auto variable with undefined
value outside of mips_malta_init.

This made the interrupt proxy unusable: either QEMU crashes, or...

f840fa99 01/07/2012 07:16 pm Stefan Weil

target-sh4: Fix operands for fipr, ftrv instructions

Coverity complained about right shifts of opcode (16, 18) which were
larger than the size of opcode (16 bit).

Using the correct shift values fixes this.

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

a2e4d53e 01/06/2012 08:51 pm Anthony Liguori

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

  • stefanha/trivial-patches:
    qemu-nbd: drop loop which can never loop
    Make python mandatory
    net/socket.c: Fix fd leak in net_socket_listen_init() error paths
    gdbstub: Fix fd leak in gdbserver_open() error path...
2afee49f 01/06/2012 08:50 pm Peter Maydell

virtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts

Fix a compile failure on 32 bit hosts (integer constant is too large
for 'unsigned long' type) by correcting a typo where the mask used
for filling in the second f_fsid word had too many 'F's in it....

dc10e8b3 01/06/2012 05:09 pm Stefan Hajnoczi

qemu-nbd: drop loop which can never loop

For some reason nbd_client_thread() has a do..while loop which can never
loop, the condition is bogus because we would take a goto instead. Drop
the loop.

Reported-by: Dr David Alan Gilbert <>...

7a3fc891 01/06/2012 05:07 pm Sebastian Herbszt

Make python mandatory

The QEMU build depends on Python so make it an explicit requirement.

Reviewed-by: Stefan Weil <>
Signed-off-by: Sebastian Herbszt <>
Signed-off-by: Stefan Hajnoczi <>

a2c80be9 01/06/2012 05:07 pm Stefan Weil

configure: CONFIG_QEMU_INTERP_PREFIX only for user mode

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

359bc95d 01/06/2012 05:07 pm Peter Maydell

configure: Fix test for supported host CPU type

The test for whether the host CPU is supported had several problems: * the attempt to fall back to TCI was done as a duplicate
test, very late (so "--cpu foo" would fail early but "--cpu unicore32"
would fail late, differently, and after configure had already...

bb16172c 01/06/2012 05:07 pm Peter Maydell

gdbstub: Fix fd leak in gdbserver_open() error path

Fix a leak of a file descriptor in error exit paths in
gdbserver_open().

Signed-off-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

a46667ea 01/06/2012 05:07 pm Peter Maydell

net/socket.c: Fix fd leak in net_socket_listen_init() error paths

Fix a leak of a file descriptor due to missing closesocket() calls
in error paths in net_socket_listen_init().

Signed-off-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

d70d6b31 01/06/2012 05:07 pm Alon Levy

qemu-options.hx: fix tls-channel help text

Remove the default compiled out tunnel channel, add the always available
cursor channel. Optimally the man page would depend on compiled in
options, but that's harder to do.

RHBZ: 688586

Acked-by: Gerd Hoffmann <>...

be62a2eb 01/06/2012 05:07 pm Markus Armbruster

Strip trailing '\n' from error_report()'s first argument (again)

Commit 6daf194d got rid of them, but Hans and Gerd added some more
lately. Tracked down with this Coccinelle semantic patch:

r
expression fmt;
position p;
@@
error_report(fmt, ...)@p...

6a84cb1f 01/06/2012 05:07 pm Markus Armbruster

scsi virtio-blk usb-msd: Clean up device init error messages

Replace

error_report("DEVICE-NAME: MESSAGE");

by just

error_report("MESSAGE");

in block device init functions.

DEVICE-NAME is bogus in some cases: it's "scsi-disk" for device
scsi-hd and scsi-cd, "virtio-blk-pci" for virtio-blk-s390, and...

f40b7d11 01/06/2012 04:15 pm Anthony Liguori

Merge remote-tracking branch 'amit/master' into staging

  • amit/master:
    virtio-console: Fix failure on unconnected pty
74b728e4 01/06/2012 04:14 pm Anthony Liguori

Merge remote-tracking branch 'aneesh/for-upstream' into staging

  • aneesh/for-upstream:
    hw/9pfs: Add support to use named socket for proxy FS
    hw/9pfs: man page for proxy helper
    hw/9pfs: Documentation changes related to proxy fs
    hw/9pfs: Proxy getversion...
40aceb98 01/06/2012 04:12 pm Anthony Liguori

Merge remote-tracking branch 'sstabellini/xen_mem_fix' into staging

  • sstabellini/xen_mem_fix:
    xen: Fix after recent change in dirty bitmap tracking.
f3e8275f 01/06/2012 04:11 pm Anthony Liguori

Merge remote-tracking branch 'kraxel/usb.33' into staging

  • kraxel/usb.33:
    usb-ohci: td.cbp incorrectly updated near page end
    usb-host: properly release port on unplug & exit
    usb-storage: cancel I/O on reset
    Fix parse of usb device description with multiple configurations
24a5bbe1 01/06/2012 01:36 pm Gerd Hoffmann

usb-storage: cancel I/O on reset

When resetting the usb-storage device we'll have to carefully cancel
and clear any requests which might be in flight, otherwise we'll confuse
the state machine.

Signed-off-by: Gerd Hoffmann <>

c75fead6 01/06/2012 01:36 pm Gerd Hoffmann

usb-host: properly release port on unplug & exit

Factor out port release into a separate function. Call release function
in exit notifier too. Add explicit call the USBDEVFS_RELEASE_PORT
ioctl, just closing the hub file handle seems not to be enougth. Make...

fd891c93 01/06/2012 01:36 pm Andriy Gapon

usb-ohci: td.cbp incorrectly updated near page end

The current code that updates the cbp value after a transfer looks like this:
td.cbp += ret;
if ((td.cbp & 0xfff) + ret > 0xfff) {
<handle page overflow>
because the 'ret' value is effectively added twice the check may fire too early...

1b9e01c1 01/05/2012 05:49 pm Peter Maydell

target-arm: Don't use cpu_single_env in bank_number()

Avoid using cpu_single_env in bank_number() -- if we were
called via the gdb stub reading or writing the CPSR then
it is NULL and we will segfault if we take the cpu_abort().

Signed-off-by: Peter Maydell <>

37064a8b 01/05/2012 05:49 pm Peter Maydell

target-arm: Ignore attempts to set invalid modes in CPSR

Ignore attempts to set the CPSR mode field to an invalid value.
This is UNPREDICTABLE, but we should not cpu_abort() for things
a malicious guest (or a confused user on the gdbstub interface)
can provoke....

7da362d0 01/05/2012 05:49 pm Mark Langsdorf

arm: add dummy A9-specific cp15 registers

Add dummy register support for the cp15, CRn=c15 registers.

config_base_register and power_control_register currently
default to 0, but may have improved support after the QOM
CPU patches are finished.

Signed-off-by: Mark Langsdorf <>...

b18620cf 01/05/2012 02:47 pm Anthony PERARD

xen: Fix after recent change in dirty bitmap tracking.

A recent patch set from Avi break the dirty bitmap support of Xen. But
this is because xen_sync_dirty_bitmap will return an error for an
unhandled memory range (a0000 - bffff). However this is not a fatal...

c47f3223 01/04/2012 06:06 pm Anthony Liguori

Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging

  • pmaydell/arm-devs.for-upstream:
    add L2x0/PL310 cache controller device
    arm: add dummy gic security registers
    arm: Set frequencies for arm_timer
    arm: add missing scu registers...
84a87cc4 01/04/2012 05:53 pm M. Mohan Kumar

hw/9pfs: Add support to use named socket for proxy FS

Add option to use named socket for communicating between proxy helper
and qemu proxy FS. Access to socket can be given by using command line
options -u and -g.

Signed-off-by: M. Mohan Kumar <>...

f67e3ffd 01/04/2012 05:53 pm M. Mohan Kumar

hw/9pfs: Documentation changes related to proxy fs

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

a2d8f1be 01/04/2012 05:53 pm M. Mohan Kumar

hw/9pfs: man page for proxy helper

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

d090e452 01/04/2012 04:50 pm M. Mohan Kumar

hw/9pfs: Proxy getversion

Add proxy getversion to get generation number

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

d52b09e4 01/04/2012 04:50 pm M. Mohan Kumar

hw/9pfs: xattr interfaces in proxy filesystem driver

Add xattr support for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

ea75fc4e 01/04/2012 04:49 pm M. Mohan Kumar

hw/9pfs: File ownership and others

Add file ownership interfaces like chmod/chown, utime update, rename,
remove and truncating files for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

b178adc3 01/04/2012 04:49 pm M. Mohan Kumar

hw/9pfs: Add stat/readlink/statfs for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

39f8c32c 01/04/2012 04:48 pm M. Mohan Kumar

hw/9pfs: Create other filesystem objects

Add interfaces to create filesystem objects like directory,
device nodes, symbolic links, links for proxy filesytem driver

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

daf0b9ac 01/04/2012 04:44 pm M. Mohan Kumar

hw/9pfs: Open and create files

Add interfaces to open and create files for proxy file system driver.

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

17bff52b 01/04/2012 04:44 pm M. Mohan Kumar

hw/9pfs: File system helper process for qemu 9p proxy FS

Provide root privilege access to QEMU 9p proxy filesystem using socket
communication.

Proxy helper is started by root user as:
~ # virtfs-proxy-helper -f|--fd <socket descriptor> -p|--path <path-to-share>...

4c793dda 01/04/2012 04:43 pm M. Mohan Kumar

hw/9pfs: Add new proxy filesystem driver

Add new proxy filesystem driver to add root privilege to qemu process.
It needs a helper process to be started by root user.

Following command line can be used to utilize proxy filesystem driver
-virtfs proxy,id=<id>,mount_tag=<tag>,socket_fd=<socket-fd>...

ddca7f86 01/04/2012 04:23 pm M. Mohan Kumar

hw/9pfs: Add validation to {un}marshal code

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

99519f0a 01/04/2012 04:21 pm Aneesh Kumar K.V

hw/9pfs: Move opt validation to FsDriver callback

This remove all conditional code from common code path and
make opt validation a FSDriver callback.

Signed-off-by: Aneesh Kumar K.V <>

10925bf0 01/04/2012 04:21 pm M. Mohan Kumar

hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

Move p9 marshaling/unmarshaling code to a separate file so that
proxy filesytem driver can use these calls. Also made marshaling
code generic to accept "struct iovec" instead of V9fsPDU.

Signed-off-by: M. Mohan Kumar <>...

b9f7bc40 01/04/2012 03:41 pm Juha Riihimäki

hw/omap1.c: Separate dpll_ctl from omap_mpu_state

Signed-off-by: Juha Riihimäki <>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <>
[Peter Maydell: More fixes and cleanups for upstream submission]...

e0236681 01/04/2012 03:41 pm Peter Maydell

hw/omap1.c: Drop unused includes

Drop includes of qemu-timer.h, qemu-char.h and pc.h as they are no
longer needed.

Signed-off-by: Peter Maydell <>

0ec6dc73 01/04/2012 03:41 pm Peter Maydell

hw/omap_gpmc: Fix region map/unmap when configuring prefetch engine

When configuring the prefetch engine (and also when resetting from
a state where the prefetch engine was enabled) be careful to adhere
to the "unmap/change config fields/map" ordering, to avoid trying...

78aca8a7 01/04/2012 03:41 pm Rob Herring

arm: add missing scu registers

Add power control register to a9mpcore

Signed-off-by: Rob Herring <>
Signed-off-by: Mark Langsdorf <>
Signed-off-by: Peter Maydell <>

104a26a2 01/04/2012 03:41 pm Mark Langsdorf

arm: Set frequencies for arm_timer

Use qdev properties to allow board modelers to set the frequencies
for the sp804 timer. Each of the sp804's timers can have an
individual frequency. The timers default to 1MHz.

Signed-off-by: Mark Langsdorf <>...

b79f2265 01/04/2012 03:41 pm Rob Herring

arm: add dummy gic security registers

Implement handling for the RAZ/WI gic security registers.

Signed-off-by: Rob Herring <>
Signed-off-by: Mark Langsdorf <>
Signed-off-by: Peter Maydell <>

b2123a48 01/04/2012 03:41 pm Rob Herring

add L2x0/PL310 cache controller device

This is just a dummy device for ARM L2 cache controllers, based on the
pl310. The cache type parameter can be defined by a property value
and has a meaningful default.

Signed-off-by: Rob Herring <>...

03759534 01/04/2012 03:41 pm Juha Riihimäki

hw/omap1.c: Separate PWT from omap_mpu_state

Signed-off-by: Juha Riihimäki <>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <>
[Peter Maydell: More fixes and cleanups for upstream submission]...

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

5a97065b 01/04/2012 01:34 pm Avi Kivity

xen: convert framebuffer dirty tracking to memory API

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

7638e0d2 01/04/2012 01:34 pm Avi Kivity

memory: obsolete more dirty memory related functions

No longer used outside memory.c and exec.c.

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

26a83ad0 01/04/2012 01:34 pm Avi Kivity

memory: remove MemoryRegion::backend_registered

backend_registered was used to lazify the process of registering an
mmio region, since the it is different for the I/O address space and
the memory address space. However, it also makes registration dependent...

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

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

71c510e2 01/04/2012 01:34 pm Avi Kivity

Switch ram_save to the memory API

Avoid using ram_addr_t, instead use (MemoryRegion *, offset) pairs.

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

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

Sort RAMBlocks by ID for migration, not by ram_addr

ram_addr is (a) unstable (b) going away. Sort by idstr instead.

Commit b2e0a138e initially introduced the sorting for the purpose
of improving debuggability. After this patch, the order is still
stable, but perhaps less usable by a human....

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

Remove support for version 3 ram_load

Version 3 ram_load depends on ram_addrs, which are not stable. Version 4
was introduced in 0.13 (and RHEL 6), so this means live migration from 0.12
and earlier to 1.1 or later will not work.

Reviewed-by: Anthony Liguori <>...

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

Convert ram_load() to the memory API

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