summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/helper2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/helper2.c b/target-i386/helper2.c
index 9abf7ffc7f..47c18fbaad 100644
--- a/target-i386/helper2.c
+++ b/target-i386/helper2.c
@@ -190,6 +190,10 @@ void cpu_x86_set_a20(CPUX86State *env, int a20_state)
{
a20_state = (a20_state != 0);
if (a20_state != a20_enabled) {
+ /* if the cpu is currently executing code, we must unlink it and
+ all the potentially executing TB */
+ cpu_interrupt(env, 0);
+
/* when a20 is changed, all the MMU mappings are invalid, so
we must flush everything */
page_unmap();