[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] SPARC64: immediate segfault on startup with git masterv
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] SPARC64: immediate segfault on startup with git mastervery |
Date: |
Sun, 18 Mar 2012 09:51:43 +0000 |
On Sun, Mar 18, 2012 at 09:44, Avi Kivity <address@hidden> wrote:
> On 03/18/2012 04:01 AM, Mark Cave-Ayland wrote:
>> 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 <address@hidden>
>> 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.
>>
>> Signed-off-by: Avi Kivity <address@hidden>
>>
>>
>> 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.
diff --git a/exec.c b/exec.c
index 8fd50a1..ad455be 100644
--- a/exec.c
+++ b/exec.c
@@ -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;
> If it fails, can you upload bios and disk images somewhere?
>
> --
> error compiling committee.c: too many arguments to function
>
Re: [Qemu-devel] SPARC64: immediate segfault on startup with git mastervery, Blue Swirl, 2012/03/18