aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-08 14:52:04 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-05 17:10:00 +0200
commitf794aa4a2fd772a3ec413c4e478cc23857cfee98 (patch)
tree35eb5468b986e68f1d35384a25ae16fc65a3f47e /target-i386/cpu.h
parentd7a0f71d9aac33e58d39fdbe4861d440af44fa8b (diff)
downloadqemu-f794aa4a2fd772a3ec413c4e478cc23857cfee98.zip
qemu-f794aa4a2fd772a3ec413c4e478cc23857cfee98.tar.gz
qemu-f794aa4a2fd772a3ec413c4e478cc23857cfee98.tar.bz2
target-i386: introduce cpu_get_mem_attrs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r--target-i386/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 26182bd..74e8819 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -1292,6 +1292,11 @@ static inline void cpu_load_efer(CPUX86State *env, uint64_t val)
}
}
+static inline MemTxAttrs cpu_get_mem_attrs(CPUX86State *env)
+{
+ return ((MemTxAttrs) { .secure = (env->hflags & HF_SMM_MASK) != 0 });
+}
+
/* fpu_helper.c */
void cpu_set_mxcsr(CPUX86State *env, uint32_t val);
void cpu_set_fpuc(CPUX86State *env, uint16_t val);