diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-05-11 13:35:28 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-06-07 18:22:02 +0200 |
commit | c8bc83a4dd29a9a33f5be81686bfe6e2e628097b (patch) | |
tree | 788dbde2a17bc3a9f6cb871e10775124c7bdffb6 /target/i386/cpu.h | |
parent | 2cbe2de5454cf9af44b620b2b40d56361a12a45f (diff) | |
download | qemu-c8bc83a4dd29a9a33f5be81686bfe6e2e628097b.zip qemu-c8bc83a4dd29a9a33f5be81686bfe6e2e628097b.tar.gz qemu-c8bc83a4dd29a9a33f5be81686bfe6e2e628097b.tar.bz2 |
target/i386: enable A20 automatically in system management mode
Ignore env->a20_mask when running in system management mode.
Reported-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1494502528-12670-1-git-send-email-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/cpu.h')
-rw-r--r-- | target/i386/cpu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h index cfe825f..0facb35 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1625,6 +1625,15 @@ static inline MemTxAttrs cpu_get_mem_attrs(CPUX86State *env) return ((MemTxAttrs) { .secure = (env->hflags & HF_SMM_MASK) != 0 }); } +static inline int32_t x86_get_a20_mask(CPUX86State *env) +{ + if (env->hflags & HF_SMM_MASK) { + return -1; + } else { + return env->a20_mask; + } +} + /* fpu_helper.c */ void cpu_set_mxcsr(CPUX86State *env, uint32_t val); void cpu_set_fpuc(CPUX86State *env, uint16_t val); |