aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* remove unneded opaque.Glauber Costa2009-10-131-1/+1
| | | | | | | | | kvm_debug() and kvm_arch_halt() both take an opaque field for no reason, since it is totally unused. kvm_halt() itself is just a wrapper around kvm_arch_halt(), and is removed. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* Remove unused function.Gleb Natapov2009-09-181-4/+0
| | | | | | | kvm_arch_update_regs_for_sipi() is not used anymore. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* Remove useless wrappers around functionsGlauber Costa2009-08-041-1/+1
| | | | | | | | | Some more cleanup from the libkvm era. Functions that starts with kvm_qemu_yyy just to wrap a kvm_yyy. I'm removing it, and changing the name of one of them to match upstream. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* fold libkvm-all into standard qemu headerGlauber Costa2009-07-141-1/+0
| | | | | | | | | Sharing of structures containing each other between libkvm-all.h and qemu-kmv.h gets a bit messy in this series. So fold them together. libkvm-all.h has no place in the final schema of things anyway. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* Move x86 specific code from qemu-kvm.c to qemu-kvm-x86.cGleb Natapov2009-06-281-0/+4
| | | | | Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Drop unncessary setting of env->exception_indexGleb Natapov2009-06-151-2/+0
| | | | | | | env->exception_index is not used by kvm code. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* 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 <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* 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 <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Copy libkvm into the qemu directory structureAvi Kivity2009-05-211-1/+1
| | | | | | | This paves the way for moving functionality out of libkvm and into the native qemu/kvm integration code. Signed-off-by: Avi Kivity <avi@redhat.com>
* Fix warnings in ia64Zhang, Yang2009-03-081-1/+1
| | | | | | clean up the warning info in the ia64's code Signed-off-by: Yang Zhang <yang.zhang@intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* Switch to new guest debug interfaceJan Kiszka2008-12-171-0/+37
| | | | | | | | | | | | | | | | | | | | This patch switches both libkvm as well as the qemu pieces over to the new guest debug interface. It comes with full support for software-based breakpoints (via guest code modification), hardware-assisted breakpoints and watchpoints (x86-only so far). Breakpoint management is done inside qemu-kvm, transparently to gdbstub and also avoiding that the gdb frontend takes over. This allows for running debuggers inside the guest while guest debugging it active, because the host can cleanly tell apart host- and guest-originated breakpoint events. Yet improvable are x86 corner cases when using single-step ("forgotten" debug flags on the guest's stack). And, of course, the yet empty non-x86 helper functions have to be populated. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Switch to KVM_CAP_USER_NMIJan Kiszka2008-12-141-4/+0
| | | | | | | | Adopt to new KVM_CAP_USER_NMI interface for injecting NMIs from qemu user space. As this capability is only provided on archs actually requiring it, we can also drop a lot of empty arch stubs. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Fix non-x86 NMI hooksJan Kiszka2008-12-021-2/+1
| | | | | | | | | | My previous x86-only change to the NMI push hook broke PPC and IA64. This is a proper fix plus a cleanup of the #ifdef-based approach to solve the breakage. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Xiantao Zhang <xiantao.zhang@intel.com> Acked-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* kvm: libkvm: pass opague cpu state through libkvm instead of int vcpuJes Sorensen2008-11-181-2/+2
| | | | | | | | Change code to pass around opague pointer to CPUState through libkvm, avoiding conversion from CPUState to int vcpu and back in the callbacks into qemu. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Use new interface kvm_init_vcpu for vcpu's initilization.Xiantao Zhang2008-11-101-0/+6
| | | | | | Also define kvm_arch_do_ioperm for ia64 arch. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Fix build breakage on ia64Jes Sorensen2008-10-051-0/+5
| | | | | | | | | | - 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 <jes@sgi.com> Acked-by : Xiantao zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Reindent ia64 code to match qemu code styleJes Sorensen2008-09-271-4/+3
| | | | | | | Reindent a bunch of ia64 code to better match the QEMU coding style. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by : Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Add get/set_mpstate for ia64Xiantao Zhang2008-09-011-0/+37
| | | | | | Add get/set_mpstate for Ipf. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* Fix guest resettingJan Kiszka2008-05-181-0/+4
| | | | | | | | | | | | | | | Resetting guests used to be racy, deadlock-prone, or simply broken (for SMP). This patch fixes the issues, following Marcelo's suggestion to consolidate the reset activity in the I/O thread. All vcpus are cleanly stopped before the emulated hardware is reset, and kvm_arch_cpu_reset is introduced and invoked to ensure that non-boot cpus are put into the right state on x86. Note that other arch may need to look into this service as well to get SMP reset right. Moreover, a safety check is added to pause/resume_all_threads to ensure that they are only invoked in I/O thread context. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* Clean up KVM/QEMU interactionAnthony Liguori2008-01-301-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* Cleanup extern declerations for now removed vcpu_envJerone Young2008-01-301-2/+0
| | | | | | | This patch removes extern decleration for vcpu_env that was recently removed for PowerPC & IA64 in KVM. Signed-off-by: Jerone Young <jyoung5@us.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* Fix ia64 build on latest sourceZhang Xiantao2007-12-221-1/+1
| | | | | | | Due to last merge with qemu upstream, ia64 build is broken. This patch fix it. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* Add qemu-kvm-ia64 supportZhang Xiantao2007-12-111-0/+71
In this patch, one file qemu-kvm-ia64.c is created to hold ia64-specific qemu/kvm interfaces. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>