History | View | Annotate | Download (25 kB)
softfloat-native: remove
Remove softfloat-native support, all targets are now using softfloatinstead.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
softfloat: always enable floatx80 and float128 support
Now that softfloat-native is gone, there is no real point on not alwaysenabling floatx80 and float128 support.
irq: Privatize CPU_INTERRUPT_NMI.
This interrupt name is used by i386, CRIS, and MicroBlaze.Copy the name into each target.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
irq: Introduce CPU_INTERRUPT_TGT_* defines.
These defines will be place-holders for cpu-specific functionality.Generic code will, at the end of the patch series, no longer have toconcern itself about how SMI, NMI, etc should be handled. Instead,generic code will know only that the interrupt is internal or external....
irq: Introduce and use CPU_INTERRUPT_SSTEP_MASK.
This mask contains all of the bits that should be ignored while singlestepping in the debugger. The mask contains 2 bits that are not currentlycleared, but are also never set. The bits are included in the mask for...
irq: Remove CPU_INTERRUPT_TIMER.
It is no longer used anywhere.
target-arm: Privatize CPU_INTERRUPT_FIQ.
This interrupt name was only used by the ARM port.
target-i386: Privatize some i386-specific interrupt names.
SMI, VIRQ, INIT, SIPI, and MCE are all only used by the i386 port.
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 <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
cpu-all.h: define CPU_LDoubleU
Add a CPU_LDoubleU type, matching the floatx80 definition and the longdouble type on x86 hosts.
Based on a patch from Laurent Vivier <laurent@vivier.eu>.
Cc: Laurent Vivier <laurent@vivier.eu>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
cpu-all.h: Remove unnecessary target-specific ifdef for CPU_QuadU
CPU_QuadU isn't used on all targets, but there's no harm in defining thetypedef anyway. It only needs to be guarded by CONFIG_SOFTFLOAT, becausesoftfloat-native doesn't have a float128 type. This avoids the need for...
s390x: enable CPU_QuadU
S390x uses the QuadU type, so let's enable it.
Signed-off-by: Ulrich Hecht <uli@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add qemu_ram_remap
qemu_ram_remap() unmaps the specified RAM pages, then re-maps thesepages again. This is used by KVM HWPoison support to clear HWPoisonedpage tables across guest rebooting, so that a new page may beallocated later to recover the memory error....
x86: Small cleanups of MCE helpers
Fix some code style issues, use proper headers, and align to cpu_x86naming scheme. No functional changes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>CC: Huang Ying <ying.huang@intel.com>CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>...
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 areused in hw/vga.c and replace the kvm_log_start/stop. With this, vga does...
x86: Optionally dump code bytes on cpu_dump_state
Introduce the cpu_dump_state flag CPU_DUMP_CODE and implement it forx86. This writes out the code bytes around the current instructionpointer. Make use of this feature in KVM to help debugging fatal vmexits....
Add "broadcast" option for mce command
When the following test case is injected with mce command, maybe user could notget the expected result. DATA command cpu bank status mcg_status addr misc (qemu) mce 1 1 0xbd00000000000000 0x05 0x1234 0x8c...
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 mustbe included earlier. Some redundant include statements...
target-xxx: Use fprintf_function (format checking)
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
Replace remaining gcc format attributes by macro GCC_FMT_ATTR (format checking)
Replace the remaining format attribute printf by macroGCC_FMT_ATTR which uses gnu_printf (if supported).
linux-user: fix build on hosts not using guest base
Commit 68a1c816868b3e35a1da698af412b29e61b1948a broke qemu on hosts notusing guest base. It uses reserved_va unconditionally in mmap.c. Toavoid to many #ifdef #endif blocks, define RESERVED_VA as either...
ramblocks: Make use of DeviceState pointer and BusInfo.get_dev_path
With these two pieces in place, we can start naming ramblocks. Whenthe device is present and it lives on a bus that provides a devicepath, we concatenate the path and the provided name. Otherwise we...
qemu_ram_free: Implement it
Now that we can support a ram_addr_t space with holes, we can implementqemu_ram_free().
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove uses of ram.last_offset (aka last_ram_offset)
We currently need this either to allocate the next ram_addr_t for anew block, or for total memory to be migrated. Both of which we cancalculate without need of this to keep us in a contiguous address space....
ram_blocks: Convert to a QLIST
This makes the RAM block list easier to manipulate. Also incorporaterelevant variables into the RAMList struct.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Acked-by: Chris Wright <chrisw@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Pre-allocate guest address space
Allow pre-allocation of the guest virtual address space in usermode emulation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
port qemu-kvm's on_vcpu code
run_on_cpu allows to execute work on a given CPUState context.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>
add cpu_is_stopped helper
Remove PAGE_RESERVED
The usermode PAGE_RESERVED code is not required by the current mmapimplementation, 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....
Fix --enable-profiler compilation.
There's a header file inclusion ordering problem between cpu-all.hand qemu-timer.h, such that cpu_get_real_ticks is not defined whenwe attempt to use it in profile_getclock.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
Introduce wrapper functions to access phys_ram_dirty.
Adds wrapper functions to prevent direct access to the phys_ram_dirty bitmap.
Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>Reviewed-by: Avi Kivity <avi@redhat.com>...
Compile qemu-timer only once
Arrange various declarations so that also non-CPU code can accessthem, adjust users.
Move CPU specific code to cpus.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Move cpu_exec_init_all() declaration to qemu-common.h
Let cpu_exec_init_all() be called from non-CPU code.
Compile pci only once
Move coalesced_mmio declarations to a more accessible location.
split out qemu-timer.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix usermode virtual address type
Usermode virtual addresses are abi_ulong, not target_ulong.
Disable phsyical memory handling in userspace emulation.
Code to handle physical memory access is not meaningful in usrmode emulation,so disable it.
Remove cpu_get_phys_page_debug from userspace emulation
cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it.
Implement multi-level page tables.
Define L1_MAP_ADDR_SPACE_BITS to be either the virtual address size(in user mode) or physical address size (in system mode), and usethat to size l1_map. This rewrites page_find_alloc, page_flush_tb,and walk_memory_regions....
Use TARGET_VIRT_ADDR_SPACE_BITS in h2g_valid.
Previously, only 32-bit guests had a proper check for thevalidity of the virtual address. Extend that check to 64-bitguests with a restricted virtual address space.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Add option to use file backed guest memory
Port qemu-kvm's -mem-path and -mem-prealloc options. These are usefulfor backing guest memory with huge pages via hugetlbfs.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>CC: john cooper <john.cooper@redhat.com>
Move ioport.h out of cpu-all.h
Only include ioport.h where it is actually needed.
kvm: Flush coalesced MMIO buffer periodly
The default action of coalesced MMIO is, cache the writing in buffer, until:1. The buffer is full.2. Or the exit to QEmu due to other reasons.
But this would result in a very late writing in some condition.1. The each time write to MMIO content is small....
cpu-all.h: fix cpu_get_real_ticks() #ifdef
Reported-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
cpu-all.h: fix cpu_get_real_ticks on mips host
Fix cpu_get_real_ticks:- check should be done on __mips and not __mips_isa_rev- linux kernels >= 2.6.25 are emulating the 2 needed rdhwr functions so it's safe to use rdhwr.
This is better than what's currently in but it doesn't mean it works nicely...
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. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Fix conditional compilation (MIPS host)
Compilation for MIPS host (not part of official QEMU)checks __mips_isa_rev which is not always defined.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is thatit prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Userspace guest address offsetting
Re-implement GUEST_BASE support.Offset guest ddress space by default if the guest binary containsregions below the host mmap_min_addr.Implement support for i386, x86-64 and arm hosts.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>...
Update to a hopefully more future proof FSF address
split out ioport related stuffs from vl.c into ioport.c.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QEMU: MCE: Add MCE simulation to qemu/tcg
- MCE features are initialized when VCPU is intialized according to CPUID.- A monitor command "mce" is added to inject a MCE.- A new interrupt mask: CPU_INTERRUPT_MCE is added to inject the MCE.
aliguori: fix build for linux-user...
Handle init/sipi in a main cpu exec loop. (v2)
This should fix compilation problem in case of CONFIG_USER_ONLY.
Currently INIT/SIPI is handled in the context of CPU that sends IPI.This patch changes this to handle them like all other events in a maincpu exec loop. When KVM will gain thread per vcpu capability it will...
provide cpu_index to env mapping
There are some people interested in, given a cpu number,pick its CPUState. KVM is an example, although not yet in tree.This patch provides a way of doing that.
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
linux-user: implemented ELF coredump support for ARM target
When target process is killed with signal (such signal thatshould dump core) a coredump file is created. This file issimilar than coredump generated by Linux (there are few exceptionsthough)....
kvm: Rework dirty bitmap synchronization
Extend kvm_physical_sync_dirty_bitmap() so that is can sync acrossmultiple slots. Useful for updating the whole dirty log duringmigration. Moreover, properly pass down errors the whole call chain.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
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 ofbuilding for every target.
Remove and poison various target specific macros to avoid bogus target...
Remove cpu_get_io_memory_{read,write}.
qemu: per-arch cpu_has_work (Marcelo Tosatti)
Blue Swirl: fix Sparc32 breakage
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7238 c046a42c-6fe2-441c-8c8c-71466251a162
kqemu: merge CONFIG_KQEMU and USE_KQEMU
Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g".
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162
Implement dynamic guest ram allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7088 c046a42c-6fe2-441c-8c8c-71466251a162
Remove code phys_ram_base uses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7085 c046a42c-6fe2-441c-8c8c-71466251a162
Cleanup SPARC/TCX framebuffer allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7059 c046a42c-6fe2-441c-8c8c-71466251a162
Use a dedicated function to request exit from execution loop
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6762 c046a42c-6fe2-441c-8c8c-71466251a162
qemu: add cpu_unregister_io_memory and make io mem table index dynamic (Marcelo Tosatti)
So drivers can clear their mem io table entries on exit back to unassignedstate.
Also make the io mem index allocation dynamic.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>...
Replace noreturn with QEMU_NORETURN
Thanks to Robert Riebisch for analysis [1]
[1] http://marc.info/?l=qemu-devel&m=123352293319271&w=2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6492 c046a42c-6fe2-441c-8c8c-71466251a162
Log reset events (Jan Kiszka)
Original idea&code by Kevin Wolf, split-up in two patches and added morearchs.
This patch introduces a flag to log CPU resets. Useful for tracingunexpected resets (such as those triggered by x86 triple faults).
Massage PPC version of cpu_get_real_ticks a little
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6435 c046a42c-6fe2-441c-8c8c-71466251a162
Add map client retry notification (Avi Kivity)
The target memory mapping API may fail if the bounce buffer resourcesare exhausted. Add a notification mechanism to allow clients to retrythe mapping operation when resources become available again.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Add target memory mapping API (Avi Kivity)
Devices accessing large amounts of memory (as with DMA) will wish to obtaina pointer to guest memory rather than access it indirectly viacpu_physical_memory_rw(). Add a new API to convert target addresses tohost pointers....
Add noreturn function attribute
Introduce noreturn attribute and attach it to cpu_loop_exit as well asinterrupt/exception helpers for i386. This avoids a bunch of gcc4warnings.
[ Note that this patch comes with a workaround to include qemu-common.heven in cases where is currently causes conflicts with dyngen-exec.h....
Remove all traces of powerpc
According to $GCC/gcc/config/rs6000/rs6000-c.c _ARCH_PPC is theubiquitous define which should be used to test whether gcc targetsPowerPC, on 64bit platforms _ARCH_PPC64 will be also defined.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6301 c046a42c-6fe2-441c-8c8c-71466251a162
Update FSF address in GPL/LGPL boilerplate
The attached patch updates the FSF address in the GPL/LGPL boilerplatein most GPL/LGPLed files, and also in COPYING.LIB.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Fix warnings introduced in r5948
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5976 c046a42c-6fe2-441c-8c8c-71466251a162
KVM: Coalesced MMIO support
MMIO exits are more expensive in KVM or Xen than in QEMU because theyinvolve, at least, privilege transitions. However, MMIO writeoperations can be effectively batched if those writes do not have sideeffects.
Good examples of this include VGA pixel operations when in a planar...
linux-user: Introduce h2g_valid
Introduce h2g_valid to check if a given host address can be convertedinto a valid guest address.
Based on a patch from Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
linux-user: Safety belt for h2g
h2g can only work on 64-bit hosts if the provided address is mappable tothe guest range. Neglecting this was already the source for severalbugs. Instrument the macro so that it will trigger earlier in thefuture (at least as long as we have this kind of mapping mechanism)....
Make memory load functions (ldxx_y(ptr)) take a const pointer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5948 c046a42c-6fe2-441c-8c8c-71466251a162
Change MMIO callbacks to use offsets, not absolute addresses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
vga optimization (Glauber Costa)
Hypervisors like KVM perform badly while doing mmio ona loop, because it'll generate an exit on each access.This is the case with VGA, which results in very badperformance.
In this patch, we map the linear frame buffer as RAM,...
Introduce BP_CPU as a breakpoint type (Jan Kiszka)
Add another breakpoint/watchpoint type to BP_GDB: BP_CPU. This type isintended for hardware-assisted break/watchpoint emulations like the x86architecture requires.
To keep the highest priority for BP_GDB breakpoints, this type is...
Introduce BP_WATCHPOINT_HIT flag (Jan Kiszka)
When one watchpoint is hit, others might have triggered as well. Tosupport users of the watchpoint API which need to detect such cases,the BP_WATCHPOINT_HIT flag is introduced and maintained.
Restore pc on watchpoint hits (Jan Kiszka)
In order to provide accurate information about the triggeringinstruction, this patch adds the required bits to restore the pc if theaccess happened inside a TB. With the BP_STOP_BEFORE_ACCESS flag, thewatchpoint user can control if the debug trap should be issued on or...
Refactor and enhance break/watchpoint API (Jan Kiszka)
This patch prepares the QEMU cpu_watchpoint/breakpoint API to allow thesucceeding enhancements this series comes with.
First of all, it overcomes MAX_BREAKPOINTS/MAX_WATCHPOINTS by switchingto dynamically allocated data structures that are kept in linked lists....
Add dirty tracking for live migration
This patch adds a dirty tracking bit for live migration. We use 0x08 becausekqemu uses 0x04.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5433 c046a42c-6fe2-441c-8c8c-71466251a162
Make CPULogItem tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5397 c046a42c-6fe2-441c-8c8c-71466251a162
Revert incorrect part of r4574 to avoid unaligned traps with i386 target
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5209 c046a42c-6fe2-441c-8c8c-71466251a162
Avoid compiler warning.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4844 c046a42c-6fe2-441c-8c8c-71466251a162
Add instruction counter.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4799 c046a42c-6fe2-441c-8c8c-71466251a162
Clean up MMIO TLB handling.The IO index is now stored in its own field, instead of being wedgedinto the vaddr field. This eliminates the ROMD and watchpoint hostpointer weirdness. The IO index space is expanded by 1 bit, andseveral additional bits are made available in the TLB vaddr field....
variable dynamic translation buffer size
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4600 c046a42c-6fe2-441c-8c8c-71466251a162
Implement byte swapping accesses
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4574 c046a42c-6fe2-441c-8c8c-71466251a162
TCG profiler clean up
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4538 c046a42c-6fe2-441c-8c8c-71466251a162
Add support for the 'k' (kill) and 'D' (detach) packets (Jason Wessel).
Implement the 'k' gdbserial packet which kills the qemu instance viathe debugger stub.
Implement the 'D' detach packet for the gdb stub such that you candisconnect gdb with the "detach" command. This required implementing...
removed unused code
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4434 c046a42c-6fe2-441c-8c8c-71466251a162
Fix compiler warnings in common files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4405 c046a42c-6fe2-441c-8c8c-71466251a162
Move #include "softfloat.h" to cpu-all.h
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4395 c046a42c-6fe2-441c-8c8c-71466251a162
Debugger single step without interrupts (Jason Wessel).
This patch allows the qemu backend debugger to single step aninstruction without running the hardware interrupts.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4391 c046a42c-6fe2-441c-8c8c-71466251a162