summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-10-05 19:05:13 +0200
committerAvi Kivity <avi@redhat.com>2009-10-05 19:05:13 +0200
commit20547a10fa08bcca2d8af387013b9b95427f50df (patch)
tree684be6ca382c793b7bfbfab1082eac01ce896fe1 /kvm-all.c
parentFix old-style function definitions in kvm specific code (diff)
parentpiix_pci: kill PIIX3IrqState (diff)
downloadqemu-kvm-20547a10fa08bcca2d8af387013b9b95427f50df.tar.gz
qemu-kvm-20547a10fa08bcca2d8af387013b9b95427f50df.tar.bz2
qemu-kvm-20547a10fa08bcca2d8af387013b9b95427f50df.zip
Merge commit '7cd9eee0f6fd6953114068dd98d91fca1237880b' into upstream-merge
* commit '7cd9eee0f6fd6953114068dd98d91fca1237880b': piix_pci: kill PIIX3IrqState convert pci bridge to qdev support inplace allocation for pci bus, split irq init. switch ide bus to inplace allocation. switch usb bus to inplace allocation. switch scsi bus to inplace allocation. allow qdev busses allocations be inplace temporary fix for on_vcpu kvm: Fix guest single-stepping gdbstub: x86: Switch 64/32 bit registers dynamically Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index d45bd46ac..b2651df8d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -916,11 +916,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
#ifdef KVM_UPSTREAM
static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
{
+#ifdef CONFIG_IOTHREAD
if (env == cpu_single_env) {
func(data);
return;
}
abort();
+#else
+ func(data);
+#endif
}
#endif /* KVM_UPSTREAM */
@@ -952,7 +956,13 @@ struct kvm_set_guest_debug_data {
static void kvm_invoke_set_guest_debug(void *data)
{
struct kvm_set_guest_debug_data *dbg_data = data;
- dbg_data->err = kvm_vcpu_ioctl(dbg_data->env, KVM_SET_GUEST_DEBUG, &dbg_data->dbg);
+ CPUState *env = dbg_data->env;
+
+ if (env->kvm_state->regs_modified) {
+ kvm_arch_put_registers(env);
+ env->kvm_state->regs_modified = 0;
+ }
+ dbg_data->err = kvm_vcpu_ioctl(env, KVM_SET_GUEST_DEBUG, &dbg_data->dbg);
}
int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap)