diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-05-14 10:13:34 -0500 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-05-19 12:17:11 -0500 |
commit | 35e5a5d5cb1096c5ac5df92913df30057978eff7 (patch) | |
tree | 1715fdf987c66b826fcf23f9f032833e468d20fd /target/i386/tcg/sysemu/misc_helper.c | |
parent | 4ea2449b5818a2bb73ea5ac259279e58e4e11a20 (diff) |
target/i386: Unify invlpg, invlpga
Use a single helper, flush_page, to do the work.
Use gen_svm_check_intercept.
Perform the zero-extension for invlpga inline.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210514151342.384376-43-richard.henderson@linaro.org>
Diffstat (limited to 'target/i386/tcg/sysemu/misc_helper.c')
-rw-r--r-- | target/i386/tcg/sysemu/misc_helper.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/target/i386/tcg/sysemu/misc_helper.c b/target/i386/tcg/sysemu/misc_helper.c index 803c39e2fb..0cef2f1a4c 100644 --- a/target/i386/tcg/sysemu/misc_helper.c +++ b/target/i386/tcg/sysemu/misc_helper.c @@ -439,12 +439,9 @@ void helper_rdmsr(CPUX86State *env) env->regs[R_EDX] = (uint32_t)(val >> 32); } -void helper_invlpg(CPUX86State *env, target_ulong addr) +void helper_flush_page(CPUX86State *env, target_ulong addr) { - X86CPU *cpu = env_archcpu(env); - - cpu_svm_check_intercept_param(env, SVM_EXIT_INVLPG, 0, GETPC()); - tlb_flush_page(CPU(cpu), addr); + tlb_flush_page(env_cpu(env), addr); } static void QEMU_NORETURN do_hlt(CPUX86State *env) |