[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 49/51] cpu: flush TB cache when loading VMState
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 49/51] cpu: flush TB cache when loading VMState |
Date: |
Tue, 16 Jan 2018 15:17:31 +0100 |
From: Pavel Dovgalyuk <address@hidden>
Flushing TB cache is required because TBs key in the cache may match
different code which existed in the previous state.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
Signed-off-by: Maria Klimushenkova <address@hidden>
Message-Id: <address@hidden>
[Add comment suggested by Peter Maydell. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
exec.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/exec.c b/exec.c
index 9f4f450..d28fc0c 100644
--- a/exec.c
+++ b/exec.c
@@ -623,6 +623,13 @@ static int cpu_common_post_load(void *opaque, int
version_id)
cpu->interrupt_request &= ~0x01;
tlb_flush(cpu);
+ /* loadvm has just updated the content of RAM, bypassing the
+ * usual mechanisms that ensure we flush TBs for writes to
+ * memory we've translated code from. So we must flush all TBs,
+ * which will now be stale.
+ */
+ tb_flush(cpu);
+
return 0;
}
--
1.8.3.1
- [Qemu-devel] [PULL 41/51] chardev: Clean up previous patch indentation, (continued)
- [Qemu-devel] [PULL 41/51] chardev: Clean up previous patch indentation, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 38/51] net: Drop unusual use of do { } while (0);, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 39/51] mips: Tweak location of ';' in macros, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 40/51] chardev: Use goto/label instead of do/break/while(0), Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 42/51] tests: Avoid 'do/while(false); ' in vhost-user-bridge, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 43/51] maint: Fix macros with broken 'do/while(0); ' usage, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 45/51] cpu_physical_memory_sync_dirty_bitmap: Another alignment fix, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 44/51] checkpatch: Enforce proper do/while (0) style, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 47/51] find_ram_offset: Align ram_addr_t allocation on long boundaries, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 51/51] scripts/analyse-locks-simpletrace.py: script to analyse lock times, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 49/51] cpu: flush TB cache when loading VMState,
Paolo Bonzini <=
- [Qemu-devel] [PULL 46/51] find_ram_offset: Add comments and tracing, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 50/51] util/qemu-thread-*: add qemu_lock, locked and unlock trace events, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 48/51] block/iscsi: fix initialization of iTask in iscsi_co_get_block_status, Paolo Bonzini, 2018/01/16
- Re: [Qemu-devel] [PULL v4 00/51] Misc patches for 2018-01-12, no-reply, 2018/01/16
- Re: [Qemu-devel] [PULL v4 00/51] Misc patches for 2018-01-12, Peter Maydell, 2018/01/16