diff options
author | Claudio Fontana <cfontana@suse.de> | 2021-03-22 14:27:57 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-05-10 15:41:52 -0400 |
commit | 6308728907386a6419447e90ead3c6ee4f0fd2f2 (patch) | |
tree | a5bd0c6a9d92599f325d74ed42b28a887b39a973 /target/i386/helper.c | |
parent | 1852f0942c815d07f9a07d1006c17570862f517e (diff) |
i386: make cpu_load_efer sysemu-only
cpu_load_efer is now used only for sysemu code.
Therefore, move this function implementation to
sysemu-only section of helper.c
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210322132800.7470-22-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/helper.c')
-rw-r--r-- | target/i386/helper.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/target/i386/helper.c b/target/i386/helper.c index 8c180b5b2b..533b29cb91 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -574,6 +574,19 @@ void do_cpu_sipi(X86CPU *cpu) #endif #ifndef CONFIG_USER_ONLY + +void cpu_load_efer(CPUX86State *env, uint64_t val) +{ + env->efer = val; + env->hflags &= ~(HF_LMA_MASK | HF_SVME_MASK); + if (env->efer & MSR_EFER_LMA) { + env->hflags |= HF_LMA_MASK; + } + if (env->efer & MSR_EFER_SVME) { + env->hflags |= HF_SVME_MASK; + } +} + uint8_t x86_ldub_phys(CPUState *cs, hwaddr addr) { X86CPU *cpu = X86_CPU(cs); |