SPARC64: immediate segfault on startup with git mastervery
Hi Avi/Blue,
I've just updated to git master and found that SPARC64 is broken again; a git bisect shows the following commit causes this:
commit f3705d53296d78b14f5823472ae2add16a25a0a5
Author: Avi Kivity <[email protected]> Date: Thu Mar 8 16:16:34 2012 +0200
memory: make phys_page_find() return an unadjusted section
We'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce section_addr(), which does the adjustment later.
The symptom is that qemu-system-sparc64 segfaults immediately on startup (note this is with an OpenBIOS image built from SVN r1048). I've included a couple of backtraces below:
From commit f3705d53296d78b14f5823472ae2add16a25a0a5 (first bad commit above):
build@kentang:~/rel-qemu-git/bin$ gdb --args ./qemu-system-sparc64 -cdrom /home/build/src/qemu/sparcimage/milax032sparc.iso -bios /home/build/src/openbios/openbios-git/openbios-devel/obj-sparc64/openbios-builtin.elf.nostrip -nographic -boot d GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/build/rel-qemu-git/bin/qemu-system-sparc64...done. (gdb) run Starting program: /home/build/rel-qemu-git/bin/qemu-system-sparc64 -cdrom /home/build/src/qemu/sparcimage/milax032sparc.iso -bios /home/build/src/openbios/openbios-git/openbios-devel/obj-sparc64/openbios-builtin.elf.nostrip -nographic -boot d [Thread debugging using libthread_db enabled] [New Thread 0x7ffff4aab700 (LWP 17836)] [New Thread 0x7ffff42aa700 (LWP 17837)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff42aa700 (LWP 17837)]0x00000000005e2d3a in memory_region_access_valid (mr=0x0, addr=134217936, size=4, is_write=true) at /home/build/src/qemu/git/qemu/memory.c:838
838 if (mr->ops->valid.accepts
(gdb) bt
#0 0x00000000005e2d3a in memory_region_access_valid (mr=0x0, addr=134217936, size=4, is_write=true) at /home/build/src/qemu/git/qemu/memory.c:838
#1 0x00000000005e3039 in memory_region_dispatch_write (mr=0x0, addr=134217936, data=0, size=4) at /home/build/src/qemu/git/qemu/memory.c:916
#2 0x00000000005e5bdb in io_mem_write (io_index=210, addr=134217936, val=0, size=4) at /home/build/src/qemu/git/qemu/memory.c:1512
#3 0x00000000005f22fa in io_writeq (physaddr=134217936, val=0, addr=134217936, retaddr=0x40001750)
at /home/build/src/qemu/git/qemu/softmmu_template.h:226
#4 0x00000000005f241c in __stq_mmu (addr=134217936, val=0, mmu_idx=2) at /home/build/src/qemu/git/qemu/softmmu_template.h:255
#5 0x0000000040001751 in ?? ()
#6 0x00000000f42a9960 in ?? ()
#7 0x932e4434f5713900 in ?? ()
#8 0x00007ffff42a9980 in ?? ()
#9 0x00000000005fe62e in tcg_out_branch (s=Cannot access memory at address 0x7ffffd8) at /home/build/src/qemu/git/qemu/tcg/i386/tcg-target.c:948 Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Interestingly enough, git master (361dea401f529fc136aaeb49c82b2a5bb7faa316) now gives a different backtrace:
build@kentang:~/rel-qemu-git/bin$ gdb --args ./qemu-system-sparc64 -cdrom /home/build/src/qemu/sparcimage/milax032sparc.iso -bios /home/build/src/openbios/openbios-git/openbios-devel/obj-sparc64/openbios-builtin.elf.nostrip -nographic -boot d GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/build/rel-qemu-git/bin/qemu-system-sparc64...done. (gdb) run Starting program: /home/build/rel-qemu-git/bin/qemu-system-sparc64 -cdrom /home/build/src/qemu/sparcimage/milax032sparc.iso -bios /home/build/src/openbios/openbios-git/openbios-devel/obj-sparc64/openbios-builtin.elf.nostrip -nographic -boot d [Thread debugging using libthread_db enabled] [New Thread 0x7ffff4aab700 (LWP 32400)] [New Thread 0x7ffff42aa700 (LWP 32401)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff42aa700 (LWP 32401)]0x00000000005b7173 in get_page_addr_code (env1=0x11f0730, addr=2198754820128) at /home/build/src/qemu/git/qemu/exec.c:4602
4602 if (mr != &io_mem_ram && mr != &io_mem_rom
(gdb) bt
#0 0x00000000005b7173 in get_page_addr_code (env1=0x11f0730, addr=2198754820128) at /home/build/src/qemu/git/qemu/exec.c:4602 #1 0x00000000005a7f92 in tb_find_slow (env=0x11f0730, pc=2198754820128, cs_base=2198754820132, flags=1284)
at /home/build/src/qemu/git/qemu/cpu-exec.c:95 #2 0x00000000005a821e in tb_find_fast (env=0x11f0730) at /home/build/src/qemu/git/qemu/cpu-exec.c:151 #3 0x00000000005a865f in cpu_sparc_exec (env=0x11f0730) at /home/build/src/qemu/git/qemu/cpu-exec.c:532 #4 0x00000000005abe3b in tcg_cpu_exec (env=0x11f0730) at /home/build/src/qemu/git/qemu/cpus.c:1022 #5 0x00000000005abf48 in tcg_exec_all () at /home/build/src/qemu/git/qemu/cpus.c:1054 #6 0x00000000005ab552 in qemu_tcg_cpu_thread_fn (arg=0x11f0730) at /home/build/src/qemu/git/qemu/cpus.c:772 #7 0x00007ffff6e458ca in start_thread (arg=<value optimized out>) at pthread_create.c:300 #8 0x00007ffff6bac92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #9 0x0000000000000000 in ?? ()
(gdb)
Many thanks,
Mark.
Quoted 16 lines · Mark Cave-Ayland
Hi Avi/Blue,
I've just updated to git master and found that SPARC64 is broken again; a git bisect shows the following commit causes this:
commit
f3705d53296d78b14f5823472ae2add16a25a0a5Author: Avi Kivity <[email protected]> Date: Thu Mar 8 16:16:34 2012 +0200memory: make
phys_page_find()return an unadjusted sectionWe'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce
section_addr(), which does the adjustment later.
Quoted 7 lines
Signed-off-by Avi Kivity <[email protected]>The symptom is that qemu-system-sparc64 segfaults immediately on startup (note this is with an OpenBIOS image built from SVN r1048). I've included a couple of backtraces below:
Please try the attached patch.
If it fails, can you upload bios and disk images somewhere?
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 1 line
From
d1429f0bef16eb850a4ccc879cdc2212b41da40cMon Sep 17 00:00:00 2001
From: Avi Kivity <[email protected]>
Date: Sun, 18 Mar 2012 11:42:00 +0200
Subject: [PATCH] sparc64: trim low-order bits from TLB entry during MMU
translation
get_physical_address() returns a physical address with random low bits set, which confuses tlb_set_page(). Fix by masking the low-order bits.
--- target-sparc/mmu_helper.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
target-sparc/mmu_helper.c +2 -2
@@ -491,7 +491,7 @@ static int get_physical_address_data(CPUSPARCState *env, mmu_idx == MMU_USER_SECONDARY_IDX);if ((env->lsu &DMMU_E ) ==0 ) {/* DMMU disabled */ - *physical =ultrasparc_truncate_physical (address); + *physical =ultrasparc_truncate_physical (address) &TARGET_PAGE_MASK ; *prot =PAGE_READ |PAGE_WRITE ;return 0 ; }
@@ -610,7 +610,7 @@ static int get_physical_address_code(CPUSPARCState *env,if ((env->lsu &IMMU_E ) ==0 || (env->pstate &PS_RED ) !=0 ) {/* IMMU disabled */ - *physical =ultrasparc_truncate_physical (address); + *physical =ultrasparc_truncate_physical (address) &TARGET_PAGE_MASK ; *prot =PAGE_EXEC ;return 0 ; }
Signature · 1 line
1.7.9
Quoted 20 lines · Avi Kivity
Quoted 19 lines · Mark Cave-Ayland
Hi Avi/Blue,
I've just updated to git master and found that SPARC64 is broken again; a git bisect shows the following commit causes this:
commit
f3705d53296d78b14f5823472ae2add16a25a0a5
Author: Avi Kivity <[email protected]>
Date: Thu Mar 8 16:16:34 2012 +0200memory: make
phys_page_find()return an unadjusted sectionWe'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce
section_addr(), which does the adjustment later.Signed-off-by Avi Kivity <[email protected]>
Quoted 6 lines
Quoted 4 lines
The symptom is that qemu-system-sparc64 segfaults immediately on startup (note this is with an OpenBIOS image built from SVN r1048). I've included a couple of backtraces below:
Please try the attached patch.
I tried this approach instead, seems to work (except Sparc32, Sparc64 and PPC displays are still not refreshed correctly). The problem is that f3705d53296d78b14f5823472ae2add16a25a0a5 converted addr & mask + section.offset to section_addr(), but in some cases the offset within page was not wanted.
exec.c +0 -0
@@ -1474,8 +1474,8 @@ static void breakpoint_invalidate(CPUArchState
*env, target_ulong pc)
|| (section->mr->rom_device && section->mr->readable))) {
return;
}
- ram_addr = (memory_region_get_ram_addr(section->mr) & TARGET_PAGE_MASK)
- + section_addr(section, addr);
+ ram_addr = (memory_region_get_ram_addr(section->mr)
+ + section_addr(section, pc)) & TARGET_PAGE_MASK;
tb_invalidate_phys_page_range(ram_addr, ram_addr + 1, 0);
}
#endif
@@ -2205,14 +2205,14 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
}
if (is_ram_rom_romd(section)) {
addend = (unsigned long)memory_region_get_ram_ptr(section->mr)
- + section_addr(section, paddr);
+ + section_addr(section, paddr & TARGET_PAGE_MASK);
} else {
addend = 0;
}
if (is_ram_rom(section)) {
/* Normal RAM. */
- iotlb = (memory_region_get_ram_addr(section->mr) & TARGET_PAGE_MASK)
- + section_addr(section, paddr);
+ iotlb = (memory_region_get_ram_addr(section->mr)
+ + section_addr(section, paddr)) & TARGET_PAGE_MASK;
if (!section->readonly)
iotlb |= phys_section_notdirty;
else@@ -2225,7 +2225,7 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
We can't use the high bits of pd for this because IO_MEM_ROMD uses these as a ram address. */
iotlb = section - phys_sections;
- iotlb += section_addr(section, paddr);
+ iotlb += section_addr(section, paddr & TARGET_PAGE_MASK);
}
code_address = address;
@@ -2265,7 +2265,7 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
} else if (memory_region_is_ram(section->mr)
&& !cpu_physical_memory_is_dirty(
section->mr->ram_addr
- + section_addr(section, paddr))) {
+ + section_addr(section, paddr &
TARGET_PAGE_MASK))) {
te->addr_write = address | TLB_NOTDIRTY;
} else {
te->addr_write = address;Quoted 5 lines
If it fails, can you upload bios and disk images somewhere?
--
error compilingcommittee.c: too many arguments to function
Quoted 20 lines · Avi Kivity
Quoted 19 lines · Mark Cave-Ayland
Hi Avi/Blue,
I've just updated to git master and found that SPARC64 is broken again; a git bisect shows the following commit causes this:
commit
f3705d53296d78b14f5823472ae2add16a25a0a5
Author: Avi Kivity <[email protected]>
Date: Thu Mar 8 16:16:34 2012 +0200memory: make
phys_page_find()return an unadjusted sectionWe'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce
section_addr(), which does the adjustment later.Signed-off-by Avi Kivity <[email protected]>
Quoted 6 lines
Quoted 4 lines
The symptom is that qemu-system-sparc64 segfaults immediately on startup (note this is with an OpenBIOS image built from SVN r1048). I've included a couple of backtraces below:
Please try the attached patch.
That works too.
Quoted 5 lines
If it fails, can you upload bios and disk images somewhere?
--
error compilingcommittee.c: too many arguments to function
Quoted 19 lines · Avi Kivity
Quoted 19 lines
Hi Avi/Blue,
I've just updated to git master and found that SPARC64 is broken again; a git bisect shows the following commit causes this:
commit
f3705d53296d78b14f5823472ae2add16a25a0a5Author: Avi Kivity<[email protected]> Date: Thu Mar 8 16:16:34 2012 +0200memory: make
phys_page_find()return an unadjusted sectionWe'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce
section_addr(), which does the adjustment later.Signed-off-by Avi Kivity<[email protected]>
Quoted 8 lines
Quoted 4 lines
The symptom is that qemu-system-sparc64 segfaults immediately on startup (note this is with an OpenBIOS image built from SVN r1048). I've included a couple of backtraces below:
Please try the attached patch.
If it fails, can you upload bios and disk images somewhere?
Hi Avi/Blue,
I can confirm that both patches work for me and enable SPARC64 to boot - Blue, what is the VGA display issue that you mention? I didn't see any display corruption when testing on both SPARC64 and PPC.
Upon inspection I see that Blue's patch seems to be a more of a global fix, whereas Avi's seems restricted to SPARC. Does that make Blue's patch a "better" solution since it will resolve the same undiscovered issue in other targets that make the same assumption?
Many thanks,
Mark.
Quoted 21 lines · Blue Swirl
Quoted 20 lines · Avi Kivity
Quoted 19 lines · Mark Cave-Ayland
Hi Avi/Blue,
I've just updated to git master and found that SPARC64 is broken again; a git bisect shows the following commit causes this:
commit
f3705d53296d78b14f5823472ae2add16a25a0a5Author: Avi Kivity <[email protected]> Date: Thu Mar 8 16:16:34 2012 +0200memory: make
phys_page_find()return an unadjusted sectionWe'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce
section_addr(), which does the adjustment later.Signed-off-by Avi Kivity <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
The symptom is that qemu-system-sparc64 segfaults immediately on startup (note this is with an OpenBIOS image built from SVN r1048). I've included a couple of backtraces below:
Please try the attached patch.
I tried this approach instead, seems to work
IMO, my patch is better. tlb_set_page() should not deal with offsets within a page.
If you prefer your approach, I suggest masking the address up front in the beginning of tlb_set_page() instead.
Quoted 2 lines
(except Sparc32, Sparc64
and PPC displays are still not refreshed correctly).
Details about this please.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 27 lines · Avi Kivity
Quoted 26 lines · Blue Swirl
Quoted 25 lines · Avi Kivity
Quoted 23 lines · Mark Cave-Ayland
Hi Avi/Blue,
I've just updated to git master and found that SPARC64 is broken again; a git bisect shows the following commit causes this:
commit
f3705d53296d78b14f5823472ae2add16a25a0a5
Author: Avi Kivity <[email protected]>
Date: Thu Mar 8 16:16:34 2012 +0200memory: make
phys_page_find()return an unadjusted sectionWe'd like to store the section index in the iotlb, so we can't adjust it before returning. Return an unadjusted section and instead introduce
section_addr(), which does the adjustment later.Signed-off-by Avi Kivity <[email protected]>The symptom is that qemu-system-sparc64 segfaults immediately on startup (note this is with an OpenBIOS image built from SVN r1048). I've included a couple of backtraces below:
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Please try the attached patch.
I tried this approach instead, seems to work
IMO, my patch is better. tlb_set_page() should not deal with offsets within a page.
It looks like all targets except Sparc32/64 mask the addresses before passing to tlb_set_page(), so I agree.
Quoted 7 lines
If you prefer your approach, I suggest masking the address up front in the beginning of
tlb_set_page()instead.Quoted 2 lines
(except Sparc32, Sparc64
and PPC displays are still not refreshed correctly).Details about this please.
Screen is not updated correctly, there are lines from previous screenful. Pressing ctrl-alt-1 refreshes the display. Perhaps dirty tracking is broken? VGA in x86 works.
Quoted 4 lines
--
error compilingcommittee.c: too many arguments to function
Quoted 8 lines · Blue Swirl
Quoted 4 lines
Quoted 2 lines
(except Sparc32, Sparc64
and PPC displays are still not refreshed correctly).Details about this please.
Screen is not updated correctly, there are lines from previous screenful. Pressing ctrl-alt-1 refreshes the display. Perhaps dirty tracking is broken? VGA in x86 works.
Is that using SDL? Do you see the same issue with VNC too?
ATB,
Mark.
Quoted 9 lines · Mark Cave-Ayland
Quoted 7 lines · Blue Swirl
Quoted 5 lines
Quoted 2 lines
(except Sparc32, Sparc64
and PPC displays are still not refreshed correctly).Details about this please.
Quoted 6 lines
Quoted 3 lines
Screen is not updated correctly, there are lines from previous screenful. Pressing ctrl-alt-1 refreshes the display. Perhaps dirty tracking is broken? VGA in x86 works.
Is that using SDL? Do you see the same issue with VNC too?
Yes to both.
Quoted 5 lines
ATB,
Mark.
Quoted 6 lines · Blue Swirl
Quoted 3 lines
IMO, my patch is better.
tlb_set_page()should not deal with offsets within a page.It looks like all targets except Sparc32/64 mask the addresses before passing to
tlb_set_page(), so I agree.
Ok. Commit my patch then?
Quoted 11 lines
Quoted 7 lines
If you prefer your approach, I suggest masking the address up front in the beginning of
tlb_set_page()instead.Quoted 2 lines
(except Sparc32, Sparc64
and PPC displays are still not refreshed correctly).Details about this please.
Screen is not updated correctly, there are lines from previous screenful. Pressing ctrl-alt-1 refreshes the display. Perhaps dirty tracking is broken? VGA in x86 works.
Ok, I see it. Will investigate.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 9 lines · Avi Kivity
Quoted 6 lines · Blue Swirl
Quoted 3 lines
IMO, my patch is better. tlb_set_page() should not deal with offsets within a page.
It looks like all targets except Sparc32/64 mask the addresses before passing to
tlb_set_page(), so I agree.Ok. Commit my patch then?
I sent a different patch which masks incoming address earlier and removes unnecessary masking in other places.
Quoted 17 lines
Quoted 11 lines
Quoted 7 lines
If you prefer your approach, I suggest masking the address up front in the beginning of
tlb_set_page()instead.Quoted 2 lines
(except Sparc32, Sparc64
and PPC displays are still not refreshed correctly).Details about this please.
Screen is not updated correctly, there are lines from previous screenful. Pressing ctrl-alt-1 refreshes the display. Perhaps dirty tracking is broken? VGA in x86 works.
Ok, I see it. Will investigate.
--
error compilingcommittee.c: too many arguments to function
Quoted 6 lines · Blue Swirl
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Blue Swirl
Quoted 3 lines
IMO, my patch is better.
tlb_set_page()should not deal with offsets within a page.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
It looks like all targets except Sparc32/64 mask the addresses before passing to
tlb_set_page(), so I agree.Ok. Commit my patch then?
I sent a different patch which masks incoming address earlier and removes unnecessary masking in other places.
My patch missed the "boot mode" thing. Does your patch fix it?
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 10 lines · Avi Kivity
Quoted 9 lines · Blue Swirl
Quoted 8 lines · Avi Kivity
Quoted 6 lines · Blue Swirl
Quoted 3 lines
IMO, my patch is better. tlb_set_page() should not deal with offsets within a page.
It looks like all targets except Sparc32/64 mask the addresses before passing to
tlb_set_page(), so I agree.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Ok. Commit my patch then?
I sent a different patch which masks incoming address earlier and removes unnecessary masking in other places.
My patch missed the "boot mode" thing. Does your patch fix it?
Yes. I also fixed both Sparc32 (which didn't have problems) and Sparc64.
Quoted 4 lines
--
error compilingcommittee.c: too many arguments to function
Quoted 7 lines · Avi Kivity
Quoted 4 lines
Screen is not updated correctly, there are lines from previous screenful. Pressing ctrl-alt-1 refreshes the display. Perhaps dirty tracking is broken? VGA in x86 works.
Ok, I see it. Will investigate.
Turns out it's a latent bug in qemu exposed by the memory patches. I already had a fix in my tree (though of course I had no memory of this when debugging).
Please try the attached patch.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 1 line
From
bb363db2608dfc9b49b53994dc20d68169e66774Mon Sep 17 00:00:00 2001
From: Avi Kivity <[email protected]>
Date: Wed, 14 Mar 2012 16:19:39 +0200
Subject: [PATCH] exec: fix write tlb entry misused as iotlb
A couple of code paths check the lower bits of CPUTLBEntry::addr_write against io_mem_ram as a way of looking for a dirty RAM page. This works by accident since the value is zero, which matches all clear bits for TLB_INVALID, TLB_MMIO, and TLB_NOTDIRTY (indicating dirty RAM).
Make it work by design by checking for the proper bits.
--- exec.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
exec.c +8 -3
@@ -2031,14 +2031,19 @@ static void tlb_unprotect_code_phys(CPUArchState *env, ram_addr_t ram_addr,cpu_physical_memory_set_dirty_flags (ram_addr,CODE_DIRTY_FLAG ); } +static bool tlb_is_dirty_ram (CPUTLBEntry *tlbe) +{ +return (tlbe->addr_write & (TLB_INVALID_MASK |TLB_MMIO |TLB_NOTDIRTY )) ==0 ; +} +static inline void tlb_reset_dirty_range (CPUTLBEntry *tlb_entry,unsigned long start,unsigned long length) {unsigned long addr; -if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK ) == io_mem_ram.ram_addr) { +if (tlb_is_dirty_ram (tlb_entry)) { addr = (tlb_entry->addr_write &TARGET_PAGE_MASK ) + tlb_entry->addend;if ((addr - start) < length) { - tlb_entry->addr_write = (tlb_entry->addr_write &TARGET_PAGE_MASK ) |TLB_NOTDIRTY ; + tlb_entry->addr_write |=TLB_NOTDIRTY ; } } }
@@ -2091,7 +2096,7 @@ static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)ram_addr_t ram_addr;void *p; -if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK ) == io_mem_ram.ram_addr) { +if (tlb_is_dirty_ram (tlb_entry)) { p = (void *)(unsigned long )((tlb_entry->addr_write &TARGET_PAGE_MASK ) + tlb_entry->addend); ram_addr =qemu_ram_addr_from_host_nofail (p);
Signature · 1 line
1.7.9