| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
To be consistent with other function naming.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
- 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 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 Ipf.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
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>
|