Statistics
| Branch: | Revision:

root / exec.c @ 58cd9864

History | View | Annotate | Download (72.1 kB)

# Date Author Comment
fd8aaa76 05/29/2013 05:27 pm Paolo Bonzini

memory: add return value to address_space_rw/read/write

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

791af8c8 05/29/2013 05:27 pm Paolo Bonzini

memory: propagate errors on I/O dispatch

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

a649b916 05/29/2013 05:27 pm Paolo Bonzini

exec: just use io_mem_read/io_mem_write for 8-byte I/O accesses

The memory API is able to split it in two 4-byte accesses.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

968a5627 05/29/2013 05:27 pm Paolo Bonzini

memory: correctly handle endian-swapped 64-bit accesses

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

51644ab7 05/29/2013 05:27 pm Paolo Bonzini

memory: add address_space_access_valid

The old-style IOMMU lets you check whether an access is valid in a
given DMAContext. There is no equivalent for AddressSpace in the
memory API, implement it with a lookup of the dispatch tree.

Reviewed-by: Richard Henderson <>...

c353e4cc 05/29/2013 05:27 pm Paolo Bonzini

exec: implement .valid.accepts for subpages

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

82f2563f 05/29/2013 05:27 pm Paolo Bonzini

exec: introduce memory_access_size

This will be used by address_space_access_valid too.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

2bbfa05d 05/29/2013 05:27 pm Paolo Bonzini

exec: introduce memory_access_is_direct

After the previous patches, this is a common test for all read/write
functions.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

d17d45e9 05/29/2013 05:27 pm Paolo Bonzini

exec: expect mr->ops to be initialized for ROM

There is no need to use the special phys_section_rom section.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

d197063f 05/29/2013 05:26 pm Paolo Bonzini

memory: move unassigned_mem_ops to memory.c

reservation_ops is already doing the same thing.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

149f54b5 05/29/2013 05:26 pm Paolo Bonzini

memory: add address_space_translate

Using phys_page_find to translate an AddressSpace to a MemoryRegionSection
is unwieldy. It requires to pass the page index rather than the address,
and later memory_region_section_addr has to be called. Replace
memory_region_section_addr with a function that does all of it: call...

b018ddf6 05/29/2013 05:26 pm Paolo Bonzini

memory: dispatch unassigned accesses based on .valid.accepts

This provides the basics for detecting accesses to unassigned memory
as soon as they happen, and also for a simple implementation of
address_space_access_valid.

Reviewed-by: Richard Henderson <>...

bf8d5166 05/29/2013 05:26 pm Paolo Bonzini

exec: do not use error_mem_read

We will soon reach this case when doing (unaligned) accesses that
span partly past the end of memory. We do not want to crash in
that case.

unassigned_mem_ops and rom_mem_ops are now the same.

Reviewed-by: Richard Henderson <>...

0844e007 05/29/2013 05:26 pm Paolo Bonzini

exec: make io_mem_unassigned private

There is no reason to avoid a recompile before accessing unassigned
memory. In the end it will be treated as MMIO anyway.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

ae4e43e8 05/29/2013 05:26 pm Paolo Bonzini

exec: drop useless #if

This code is only compiled for softmmu targets.

Reviewed-by: Richard Henderson <>
Signed-off-by: Paolo Bonzini <>

2a8e7499 05/29/2013 05:26 pm Paolo Bonzini

exec: eliminate io_mem_ram

It is never used, the IOTLB always goes through io_mem_notdirty.

In fact in softmmu_template.h, if it were, QEMU would crash just
below the tests, as soon as io_mem_read/write dispatches to
error_mem_read/write.

Reviewed-by: Richard Henderson <>...

fd298934 05/24/2013 07:43 pm Paolo Bonzini

memory: clean up phys_page_find

Remove the goto.

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

86a86236 05/24/2013 07:43 pm Avi Kivity

memory: limit sections in the radix tree to the actual address space size

The radix tree is statically sized to fit TARGET_PHYS_ADDR_SPACE_BITS.
If a larger memory region is registered, it will overflow.

Fix by limiting any section in the radix tree to the supported size....

68f3f65b 05/24/2013 07:42 pm Paolo Bonzini

memory: assert that PhysPageEntry's ptr does not overflow

While sized to 15 bits in PhysPageEntry, the ptr field is ORed into the
iotlb entries together with a page-aligned pointer. The ptr field must
not overflow into this page-aligned value, assert that it is smaller than...

8b0d6711 05/24/2013 07:42 pm Paolo Bonzini

exec: eliminate stq_phys_notdirty

It is not used anywhere.

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

4f39178b 05/24/2013 07:42 pm Paolo Bonzini

exec: eliminate qemu_put_ram_ptr

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

bbcfd291 05/24/2013 07:42 pm Paolo Bonzini

exec: remove obsolete comment

See how we call memory_region_section_addr two lines below to
convert a physical address to a base address in the region.

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

6eebf958 05/14/2013 04:53 pm Paolo Bonzini

osdep, kvm: rename low-level RAM allocation functions

This is preparatory to the introduction of a separate freeing API.

Reported-by: Amos Kong <>
Signed-off-by: Paolo Bonzini <>
Reviewed-by: Amos Kong <>...

e7a09b92 05/14/2013 04:53 pm Paolo Bonzini

osdep: introduce qemu_anon_ram_free to free qemu_anon_ram_alloc-ed memory

We switched from qemu_memalign to mmap() but then we don't modify
qemu_vfree() to do a munmap() over free(). Which we cannot do
because qemu_vfree() frees memory allocated by qemu_{mem,block}align....

d6b9e0d6 05/01/2013 02:04 pm Michael S. Tsirkin

cpu: Add qemu_for_each_cpu()

Wrapper to avoid open-coded loops and to make CPUState iteration
independent of CPUArchState.

Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Igor Mammedov <>
Signed-off-by: Andreas Färber <>

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

49cd9ac6 03/26/2013 09:02 pm Stefan Hajnoczi

exec: assert that RAMBlock size is non-zero

find_ram_offset() does not handle size=0 gracefully. It hands out the
same RAMBlock offset multiple times, leading to obscure failures later
on.

Add an assert to warn early if something is incorrectly allocating a...

3d34a411 03/14/2013 09:50 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/qom-cpu' into staging

  1. By Andreas Färber (16) and Igor Mammedov (1)
  2. Via Andreas Färber
    • afaerber/qom-cpu:
      target-lm32: Update VMStateDescription to LM32CPU
      target-arm: Override do_interrupt for ARMv7-M profile...
8ca761f6 03/12/2013 08:42 pm Peter Feiner

exec: make -mem-path filenames deterministic

Adds ramblocks' names to their backing files when using -mem-path. Eases
introspection and debugging.

Signed-off-by: Peter Feiner <>
Message-id: ...

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

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

d8ed887b 03/12/2013 11:35 am Andreas Färber

exec: Pass CPUState to cpu_reset_interrupt()

Move it to qom/cpu.c to avoid build failures depending on include order
of cpu-qom.h and exec/cpu-all.h.

Change opaques of various ..._irq_handler() functions to the
appropriate CPU type to facilitate using cpu_reset_interrupt()....

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

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

b170fce3 03/12/2013 11:35 am Andreas Färber

cpu: Register VMStateDescription through CPUState

In comparison to DeviceClass::vmsd, CPU VMState is split in two,
"cpu_common" and "cpu", and uses cpu_index as instance_id instead of -1.
Therefore add a CPU-specific CPUClass::vmsd field.

Unlike the legacy CPUArchState registration, rather register CPUState....

d76fddae 03/12/2013 11:35 am Igor Mammedov

cpu: Fix qemu_get_cpu() to return NULL if CPU not found

Commit 55e5c2850 breaks CPU not found return value, and returns
CPU corresponding to the last non NULL env.
Fix it by returning CPU only if env is not NULL, otherwise CPU is
not found and function should return NULL....

378df4b2 03/03/2013 04:28 pm Peter Maydell

Handle CPU interrupts by inline checking of a flag

Fix some of the nasty TCG race conditions and crashes by implementing
cpu_exit() as setting a flag which is checked at the start of each TB.
This avoids crashes if a thread or signal handler calls cpu_exit()...

fcd7d003 02/16/2013 03:51 pm Andreas Färber

cpu: Move exit_request field to CPUState

Since it was located before breakpoints field, it needs to be reset.

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

907a5e32 02/16/2013 03:51 pm Andreas Färber

cputlb: Pass CPUState to cpu_unlink_tb()

CPUArchState is no longer needed.

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

e4ada482 01/19/2013 12:24 pm Stefan Weil

Replace non-portable asprintf by g_strdup_printf

g_strdup_printf already handles OOM errors, so some error handling in
QEMU code can be removed.

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

38d8f5c8 01/15/2013 05:09 am Andreas Färber

exec: Return CPUState from qemu_get_cpu()

Move the declaration to qemu/cpu.h and add documentation.
The implementation still depends on CPUArchState for CPU iteration.

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

1b1ed8dc 01/15/2013 05:09 am Andreas Färber

cpu: Move numa_node field to CPUState

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

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

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