summary refs log tree commit diff stats
path: root/cpu-exec-common.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-05-17 15:18:02 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-09 15:55:02 +0100
commit75809229bbf28b371afce14921ff5be98ddc5faa (patch)
treec2bef3ace4ece1689bb554c3ab38ee2158e073c4 /cpu-exec-common.c
parent9bbbf6497a10c5066af415d2d187a18679ffb18c (diff)
downloadfocaccia-qemu-75809229bbf28b371afce14921ff5be98ddc5faa.tar.gz
focaccia-qemu-75809229bbf28b371afce14921ff5be98ddc5faa.zip
translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()
The user-mode-only function tb_invalidate_phys_page() is only
called from two places:
 * page_unprotect(), which passes in a non-zero pc, a puc pointer
   and the value 'true' for the locked argument
 * page_set_flags(), which passes in a zero pc, a NULL puc pointer
   and a 'false' locked argument

If the pc is non-zero then we may call cpu_resume_from_signal(),
which does a longjmp out of the calling code (and out of the
signal handler); this is to cover the case of a target CPU with
"precise self-modifying code" (currently only x86) executing
a store instruction which modifies code in the same TB as the
store itself. Rather than doing the longjump directly here,
return a flag to the caller which indicates whether the current
TB was modified, and move the longjump to page_unprotect.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Riku Voipio <riku.voipio@linaro.org>
Message-id: 1463494687-25947-2-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'cpu-exec-common.c')
0 files changed, 0 insertions, 0 deletions