From 56f997500aabbc1435a8cd2ea7c39d92c02755b0 Mon Sep 17 00:00:00 2001 From: Dmitry Poletaev Date: Wed, 18 Sep 2019 13:07:06 +0300 Subject: Fix wrong behavior of cpu_memory_rw_debug() function in SMM There is a problem, that you don't have access to the data using cpu_memory_rw_debug() function when in SMM. You can't remotely debug SMM mode program because of that for example. Likely attrs version of get_phys_page_debug should be used to get correct asidx at the end to handle access properly. Here the patch to fix it. Signed-off-by: Dmitry Poletaev Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'target/i386/cpu.h') diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 87f4afb..98f6ed5 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1551,7 +1551,8 @@ void x86_cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list, void x86_cpu_dump_state(CPUState *cs, FILE *f, int flags); -hwaddr x86_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); +hwaddr x86_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr, + MemTxAttrs *attrs); int x86_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); int x86_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); -- cgit v1.1