summaryrefslogtreecommitdiffstats
path: root/target-ia64
Commit message (Collapse)AuthorAgeFilesLines
* qemu-kvm: Clean up mpstate synchronizationJan Kiszka2010-03-011-0/+3
| | | | | | | | | | | | Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, properly synchronize with halted in the accessor functions. At this chance, drop the special reset of interrupt_request and halted in kvm_arch_cpu_reset. The former is done via memset in cpu_reset, the latter in apic_init_reset anyway. Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
* qemu-kvm: Rework VCPU state writeback APIJan Kiszka2010-03-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init in qemu_loadvm_state (writeback after vmload) - cpu_synchronize_all_post_init in main after machine init - cpu_synchronize_all_post_reset in qemu_system_reset (writeback after system reset) These writeback points + the existing one of VCPU exec after cpu_synchronize_state map on three levels of writeback: - KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run) - KVM_PUT_RESET_STATE (on synchronous system reset, all VCPUs stopped) - KVM_PUT_FULL_STATE (on init or vmload, all VCPUs stopped as well) This level is passed to the arch-specific VCPU state writing function that will decide which concrete substates need to be written. That way, no writer of load, save or reset functions that interact with in-kernel KVM states will ever have to worry about synchronization again. That also means that a lot of reasons for races, segfaults and deadlocks are eliminated. cpu_synchronize_state remains untouched, just as Anthony suggested. We continue to need it before reading or writing of VCPU states that are also tracked by in-kernel KVM subsystems. Consequently, this patch removes many cpu_synchronize_state calls that are now redundant, just like remaining explicit register syncs. It does not touch qemu-kvm's special hooks for mpstate, vcpu_events, or tsc loading. They will be cleaned up by individual patches. Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
* Clean up register access APIJan Kiszka2010-02-211-2/+2
| | | | | | | | | | | qemu-kvm's functions for accessing the VCPU registers are kvm_arch_load/save_regs. Use them directly instead of going through various wrappers. Specifically, we do not need on_vcpu wrapping as all users either already run in the related thread or call while the vm is stopped. This is now also validated during runtime via asserts. Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Rename kvm_(load|save)_mpstate to kvm_arch_(load|save)_mpstateGleb Natapov2009-06-151-2/+2
| | | | | | | To be consistent with other function naming. Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Fold libkvm-common.h into libkvm-all.hGlauber Costa2009-06-111-1/+1
| | | | | | | | | This file has no purpose in life in new scheme of things. Move its contents to libkvm-all.h. There are some name clashes in qemu-kvm.c. Those function names are then changed. Signed-off-by: Glauber Costa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* build-fix typo in target-ia64/libkvm.cJes Sorensen2009-06-081-1/+1
| | | | | | | Fix typo s/vcp/vcpu/ Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Flush icache after dma operations for ia64Jes Sorensen2009-06-072-10/+0
| | | | | | | | | | | ia64 system depends on that platform issues snoop cycle to flush icache for memory touched by DMA write operations, but virtual DMA operations is emulated by memcpy, so use explict instrustions to flush the related icache, otherwise, guest may use obsolete icache. Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Do not use cpu_index in interface between libkvm and qemuGleb Natapov2009-06-041-4/+4
| | | | | | | On vcpu creation cookie is returned which is used in future communication. Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Copy libkvm into the qemu directory structureAvi Kivity2009-05-212-0/+113
| | | | | | | This paves the way for moving functionality out of libkvm and into the native qemu/kvm integration code. Signed-off-by: Avi Kivity <[email protected]>
* Merge branch 'master' of git://git.sv.gnu.org/qemuAvi Kivity2009-05-211-5/+9
| | | | | | | | | | | | | * 'master' of git://git.sv.gnu.org/qemu: Convert machine registration to use module init functions Eliminate --disable-gfx-check and make VNC default when SDL not available Do not attempt to allocate sn_tab when there are no snapshots Cast pointer arguments of get/setsockopt, send to void * to keep GCC Conflicts: hw/boards.h Signed-off-by: Avi Kivity <[email protected]>
* Define cpu_has_work() for ia64Jes Sorensen2009-05-071-0/+5
| | | | | Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Remove the dependency for phys_ram_base for ipf.cJes Sorensen2009-05-042-33/+46
| | | | | | | | | | | Fix ia64 code to use copy_physical_memory_{read,write} in hob and nvram code, removing dependencies of qemu_get_ram_ptr() usage. This results in cleaned up APIs and removal of unnecessary global variables. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* ia64: Remove the dependency for phys_ram_base for ipf.cXiantao Zhang2009-04-282-14/+23
| | | | | | | | Upstream has dropped phys_ram_base, so ia64 also remove the dependency for that. Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Ia64 CPUStatebuild fixJes Sorensen2009-03-251-1/+3
| | | | | | Define CPUState as struct CPUIA64State to avoid compile errors on ia64. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Fix warnings in ia64Zhang, Yang2009-03-084-3/+9
| | | | | | clean up the warning info in the ia64's code Signed-off-by: Yang Zhang <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
* Save ia64 nvramYang2009-01-152-8/+126
| | | | | | Save nvram to a file given by a command line parameter. Signed-off-by: Yang Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Fix build breakage for ia64Xiantao Zhang2008-12-181-0/+5
| | | | Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Merge branch 'qemu-cvs'Avi Kivity2008-11-231-0/+8
| | | | | | | | | | | | | | | | | | Conflicts: qemu/block-raw-posix.c qemu/configure qemu/cpu-defs.h qemu/cpu-exec.c qemu/exec.c qemu/gdbstub.c qemu/loader.c qemu/osdep.c qemu/sysemu.h qemu/target-i386/helper.c qemu/target-ppc/cpu.h qemu/target-ppc/helper.c qemu/usb-linux.c Signed-off-by: Avi Kivity <[email protected]>
* Use new interface kvm_init_vcpu for vcpu's initilization.Xiantao Zhang2008-11-101-1/+1
| | | | | | Also define kvm_arch_do_ioperm for ia64 arch. Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Fix build breakage on ia64Jes Sorensen2008-10-054-5/+14
| | | | | | | | | | - Declare 'env' properly as on all other architectures, instead of having a local declaration in every object - Introduce kvm_arch_try_push_nmi() - Remove and cleanup fallout from having stdio.h included in cpu.h Signed-off-by: Jes Sorensen <[email protected]> Acked-by : Xiantao zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Reindent ia64 code to match qemu code stylekvm-76rc1Jes Sorensen2008-09-274-45/+30
| | | | | | | Reindent a bunch of ia64 code to better match the QEMU coding style. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by : Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Fix missing prototypes on ia64 and minor cleanupsJes Sorensen2008-09-073-10/+16
| | | | | | | | | | Add missing prototypes to the ia64 header files. Remove unused variables T0/T1/T2 declared in exec.h and fix a small formatting issue to match the formatting style of qemu. Add 'const' to cpu_ia64_init() to match the rest of qemu. Signed-off-by: Jes Sorensen <[email protected]> Acked-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Add get/set_mpstate for ia64Xiantao Zhang2008-09-012-1/+13
| | | | | | Add get/set_mpstate for Ipf. Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Fix ia64 build issue caused by last qemu mergeXiantao Zhang2008-07-132-5/+9
| | | | | | Fix ia64 build issue due to latest merge with upstream. Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Compile fixes for ia64Anthony Xu2008-06-253-3/+11
| | | | | | | Since merging with Qemu upstream, it can't be compiled for kvm-ia64 Signed-off-by: Anthony Xu <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Remove env->ready_for_interrupt_injectionGlauber Costa2008-06-122-3/+0
| | | | | | | | There's no need to polute the already poluted CPUState with "ready_for_interrupt_injection". We can compute it in the few times we use it, and be fine. Signed-off-by: Glauber Costa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Ia64 build fixXiantao Zhang2008-05-121-1/+0
| | | | | | | Remove unexisting header inclusion, and set correct phys_ram_size for ipf machine. Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Merge branch 'qemu-cvs'Avi Kivity2008-05-051-0/+20
| | | | | | | | | | | | | | | | | | Conflicts: qemu/Makefile qemu/Makefile.target qemu/configure qemu/cpu-all.h qemu/cpu-exec.c qemu/exec.c qemu/hw/boards.h qemu/hw/pc.c qemu/hw/vga.c qemu/monitor.c qemu/osdep.c qemu/pc-bios/bios.bin qemu/sysemu.h qemu/vl.c
* Ia64: include prototype for qemu_malloczJes Sorensen2008-04-221-0/+1
| | | | | | | Include qemu-common.h for the prototype for qemu_mallocz to avoid the being truncated to 32 bit. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Spin up vcpu threads before attempting to set lapic contentsAvi Kivity2008-04-161-0/+1
| | | Signed-off-by: Avi Kivity <[email protected]>
* IA64 also need to workaround tcg breakage on non-x86Xiantao Zhang2008-02-171-0/+44
| | | | Signed-off-by: Xiantao Zhang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Clean up KVM/QEMU interactionAnthony Liguori2008-01-302-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch attempts to clean up the interactions between KVM and QEMU. Sorry for such a big patch, but I don't think there's a better way to approach this such that it's still bisect friendly. I think this is most of what's needed to get basic KVM support into QEMU though. Right now, there's a mix of #ifdef USE_KVM, if (kvm_allowed), and various extern declarations. It's all pretty fugly and there's a lot of mistakes due to it. The following patch eliminates almost all uses of #ifdef USE_KVM by introducing a kvm_enabled() macro. If USE_KVM is set, this macro evaluates to kvm_allowed. If USE_KVM isn't set, the macro evaluates to 0. Since GCC eliminates if (0) blocks, this is just as good as using #ifdef. By making sure that we never call into libkvm directly from QEMU, we can also just not link qemu-kvm when USE_KVM isn't set instead of having the entire file wrapped in a USE_KVM. We also change the --enable-kvm configure option to --disable-kvm since KVM is enabled by default. I've tested this patch on x86 with 32-bit and 64-bit Linux guests and a 32-bit Windows guest. I've also tested with USE_KVM not set. Jerone has also verified that it doesn't PPC. My apologies if it breaks ia64 but I have no way of testing that. Signed-off-by: Anthony Liguori <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Ia64: Add check for guest firmware.Zhang Xiantao2008-01-032-6/+14
| | | | | | Add the existence check before reading the image. Signed-off-by: Zhang Xiantao <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Fix ia64 build on latest sourceZhang Xiantao2007-12-223-5/+8
| | | | | | | Due to last merge with qemu upstream, ia64 build is broken. This patch fix it. Signed-off-by: Zhang Xiantao <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Ia64: Add one empty entry in hobZhang Xiantao2007-12-201-0/+12
| | | | | | | | | In order to adapt the requirement of open guest firmware. Since open guest firmware use hard-code to check hob entries, so add one empty entry to workaround it. Signed-off-by: Zhang Xiantao <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Sync icache for more architecturesChristian Ehrhardt2007-12-181-5/+0
| | | | | | | | | | A ia64 patch introduced kvm_sync_icache within a ifdef __ia64__, but the concept of split caches is not bound to ia64. This patch replaces the the call to kvm_synch_icache by the flush_icache_range function that is already available in qemu for ia64 and ppc (noop for x86). The call now depends on USE_KVM. Signed-off-by: Christian Ehrhardt <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Add ia64 targetZhang Xiantao2007-12-115-0/+297
| | | | | | | This adds files for a dummy qemu ia64 target. This target is not usable for emulation; only virtualization. Signed-off-by: Zhang Xiantao <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
* Add firmware build logic support for ia64 platformZhang Xiantao2007-12-112-0/+625
Add two files for ia64 building firmware. target-ia64/firmware.c target-ia64/firmware.h Signed-off-by: Zhang Xiantao <[email protected]> Signed-off-by: Avi Kivity <[email protected]>