summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-20 12:28:51 +0200
committerAvi Kivity <avi@redhat.com>2009-12-20 12:28:51 +0200
commit210cd710b3bd36ca3c10e68b976f22319438f5ce (patch)
tree1031d5445f5513a414a7fa570d7a2b7f964428ea /target-i386
parentMerge commit '686a3c3dc235df2492e754423799d1abe4f6d9e2' into stable-0.12-merge (diff)
parentMake sure to enable dirty tracking of VBE vram mapping (diff)
downloadqemu-kvm-210cd710b3bd36ca3c10e68b976f22319438f5ce.tar.gz
qemu-kvm-210cd710b3bd36ca3c10e68b976f22319438f5ce.tar.bz2
qemu-kvm-210cd710b3bd36ca3c10e68b976f22319438f5ce.zip
Merge commit '3c547d7bb7889182d5bcecbb3edea4c71774c6a3' into stable-0.12-merge
* commit '3c547d7bb7889182d5bcecbb3edea4c71774c6a3': (23 commits) Make sure to enable dirty tracking of VBE vram mapping vmware: setup PCI BAR 2 for FIFO as per vmware spec qdev: improve property error reporting. fix vga names in default_list usb-host: check mon before using it. usb-net: use qdev for -usbdevice Check rom_load_all() return value. defaults: update device_list[] defaults: split default_drive monitor: Catch printing to non-existent monitor monitor: Avoid readline functions in QMP monitor: do_balloon(): Check for errors monitor: Use 'device' in eject QDict: Fix size update qdev: Improve uni-north device names Avoid permanently disabled QEMU monitor when UNIX migration fails Fix loading of ELF multiboot kernels Revert "Rename DriveInfo.onerror to on_write_error" (fix mismerge) qemu-io: Fix memory leak Fix thinko in linuxboot.S ... Conflicts: hw/vga.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/cpu.h5
-rw-r--r--target-i386/kvm.c6
-rw-r--r--target-i386/machine.c1
3 files changed, 7 insertions, 5 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index eddb4bd69..0df6f1d6c 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -710,6 +710,7 @@ typedef struct CPUX86State {
/* For KVM */
uint32_t mp_state;
+ int32_t exception_injected;
int32_t interrupt_injected;
uint8_t soft_interrupt;
uint8_t nmi_injected;
@@ -852,12 +853,12 @@ static inline int hw_breakpoint_enabled(unsigned long dr7, int index)
static inline int hw_breakpoint_type(unsigned long dr7, int index)
{
- return (dr7 >> (DR7_TYPE_SHIFT + (index * 2))) & 3;
+ return (dr7 >> (DR7_TYPE_SHIFT + (index * 4))) & 3;
}
static inline int hw_breakpoint_len(unsigned long dr7, int index)
{
- int len = ((dr7 >> (DR7_LEN_SHIFT + (index * 2))) & 3);
+ int len = ((dr7 >> (DR7_LEN_SHIFT + (index * 4))) & 3);
return (len == 2) ? 8 : len + 1;
}
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index bb9012a3e..8584507ab 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -726,8 +726,8 @@ static int kvm_put_vcpu_events(CPUState *env)
return 0;
}
- events.exception.injected = (env->exception_index >= 0);
- events.exception.nr = env->exception_index;
+ events.exception.injected = (env->exception_injected >= 0);
+ events.exception.nr = env->exception_injected;
events.exception.has_error_code = env->has_error_code;
events.exception.error_code = env->error_code;
@@ -761,7 +761,7 @@ static int kvm_get_vcpu_events(CPUState *env)
if (ret < 0) {
return ret;
}
- env->exception_index =
+ env->exception_injected =
events.exception.injected ? events.exception.nr : -1;
env->has_error_code = events.exception.has_error_code;
env->error_code = events.exception.error_code;
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 804002e66..b9d51f414 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -460,6 +460,7 @@ static const VMStateDescription vmstate_cpu = {
VMSTATE_INT32_V(interrupt_injected, CPUState, 9),
VMSTATE_UINT32_V(mp_state, CPUState, 9),
VMSTATE_UINT64_V(tsc, CPUState, 9),
+ VMSTATE_INT32_V(exception_injected, CPUState, 11),
VMSTATE_UINT8_V(soft_interrupt, CPUState, 11),
VMSTATE_UINT8_V(nmi_injected, CPUState, 11),
VMSTATE_UINT8_V(nmi_pending, CPUState, 11),