diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-05 19:16:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-05 19:16:28 +0100 |
commit | 9f0355b590ac523d0c4e67c416c3f9cf7af3d574 (patch) | |
tree | 59be39e43a8014ec6031a0afe60dec29b6b3e032 /target-i386/gdbstub.c | |
parent | d4f005db9b90b3df6945c709867ab62d8b772a94 (diff) | |
parent | 79b6f2f651d64a122dd647c1456635d5a6a176ac (diff) | |
download | qemu-9f0355b590ac523d0c4e67c416c3f9cf7af3d574.zip qemu-9f0355b590ac523d0c4e67c416c3f9cf7af3d574.tar.gz qemu-9f0355b590ac523d0c4e67c416c3f9cf7af3d574.tar.bz2 |
Merge remote-tracking branch 'remotes/kvm/uq/master' into staging
* remotes/kvm/uq/master:
kvm: Fix eax for cpuid leaf 0x40000000
kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation
kvm: Enable -cpu option to hide KVM
kvm: Ensure negative return value on kvm_init() error handling path
target-i386: set CC_OP to CC_OP_EFLAGS in cpu_load_eflags
target-i386: get CPL from SS.DPL
target-i386: rework CPL checks during task switch, preparing for next patch
target-i386: fix segment flags for SMM and VM86 mode
target-i386: Fix vm86 mode regression introduced in fd460606fd6f.
kvm_stat: allow choosing between tracepoints and old stats
kvmclock: Ensure time in migration never goes backward
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-i386/gdbstub.c')
-rw-r--r-- | target-i386/gdbstub.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target-i386/gdbstub.c b/target-i386/gdbstub.c index d34e535..19fe9ad 100644 --- a/target-i386/gdbstub.c +++ b/target-i386/gdbstub.c @@ -127,9 +127,11 @@ static int x86_cpu_gdb_load_seg(X86CPU *cpu, int sreg, uint8_t *mem_buf) target_ulong base; if (!(env->cr[0] & CR0_PE_MASK) || (env->eflags & VM_MASK)) { + int dpl = (env->eflags & VM_MASK) ? 3 : 0; base = selector << 4; limit = 0xffff; - flags = 0; + flags = DESC_P_MASK | DESC_S_MASK | DESC_W_MASK | + DESC_A_MASK | (dpl << DESC_DPL_SHIFT); } else { if (!cpu_x86_get_descr_debug(env, selector, &base, &limit, &flags)) { |