Skip to contentSkip to conversation

Can't set break points with Linux guest in PAE mode

DISCUSSION Randy Thelen 3 participants 5 messages Oct 4, 2006 – Oct 5, 2006

lore
Share & tools
lore
#0 lore raw

Folks --

One more time with the PAE request, this time I've brought up the Linux kernel w/ a very recent version of Xen. (Just yesterday I pulled and updated my hg tree.) I still can't set breakpoints within the guest domain:

# gdb vmlinux
GNU gdb 6.4-debian
<...>
(gdb) target remote roti.lab.netapp.com:9999
Remote debugging using roti.lab.netapp.com:9999
[New thread 0]
[Switching to thread 0]
0xc0100000 in startup_32 ()
(gdb) b *0xc0100000
Breakpoint 1 at 0xc0100000
(gdb) s
Single stepping until exit from function startup_32,
which has no line number information.
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0xc0100000: Input/output error.

(gdb)

My RS232 Xen console looks like:

xenbr0: port 3(vif7.0) entering learning state
xenbr0: topology change detected, propagating
xenbr0: port 3(vif7.0) entering forwarding state
xenbr0: port 3(vif7.0) entering disabled state
device vif7.0 left promiscuous mode
xenbr0: port 3(vif7.0) entering disabled state
device vif8.0 entered promiscuous mode
(XEN) DOM0: (file=mm.c, line=1688) Bad type (saw 28000001 != exp e0000000) for mfn 96efe (pfn 573) (XEN) DOM0: (file=mm.c, line=606) Error getting mfn 96efe (pfn 573) from L1 entry 0000000096efe027 for dom8 (XEN) DOM0: (file=mm.c, line=1266) Bad get_page_from_l1e(): pl1e = fefa6a30, nl1e = 96efe027, ol1e = 0, gl1mfn = d8538 (XEN) DOM0: (file=mm.c, line=2283) Could not modify L1 entry: va == fefa6a30, l1e == 96efe027, mfn == d8538

(I've added the two MEM_LOG() calls at line 1266 and 2283.)

Any ideas where I should begin looking? Or is PAE support languishing?

-- Randy

#1 lore raw
Quoted 45 lines · Randy Thelen

Folks --

One more time with the PAE request, this time I've brought up the Linux kernel w/ a very recent version of Xen. (Just yesterday I pulled and updated my hg tree.) I still can't set breakpoints within the guest domain:

# gdb vmlinux
GNU gdb 6.4-debian
<...>
(gdb) target remote roti.lab.netapp.com:9999
Remote debugging using roti.lab.netapp.com:9999
[New thread 0]
[Switching to thread 0]
0xc0100000 in startup_32 ()
(gdb) b *0xc0100000
Breakpoint 1 at 0xc0100000
(gdb) s
Single stepping until exit from function startup_32,
which has no line number information.
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0xc0100000: Input/output error.

(gdb)

My RS232 Xen console looks like:

xenbr0: port 3(vif7.0) entering learning state
xenbr0: topology change detected, propagating
xenbr0: port 3(vif7.0) entering forwarding state
xenbr0: port 3(vif7.0) entering disabled state
device vif7.0 left promiscuous mode
xenbr0: port 3(vif7.0) entering disabled state
device vif8.0 entered promiscuous mode
(XEN) DOM0: (file=mm.c, line=1688) Bad type (saw 28000001 != exp e0000000) for mfn 96efe (pfn 573)
(XEN) DOM0: (file=mm.c, line=606) Error getting mfn 96efe (pfn 573) from L1 entry 0000000096efe027 for dom8
(XEN) DOM0: (file=mm.c, line=1266) Bad get_page_from_l1e(): pl1e = fefa6a30, nl1e = 96efe027, ol1e = 0, gl1mfn = d8538 (XEN) DOM0: (file=mm.c, line=2283) Could not modify L1 entry: va == fefa6a30, l1e == 96efe027, mfn == d8538

Quoted 3 lines

(I've added the two MEM_LOG() calls at line 1266 and 2283.)

Any ideas where I should begin looking? Or is PAE support languishing?

gdb + PAE may not get much testing, but PAE kernels themselves certainly are mainstream. Fedora Core 5 recently started providing PAE kernels in addition to non-POAE ones, and Fedora Core 6 / RHEL5 will only support PAE on i386, so there's plenty of use there. Prety sure SLES also uses PAE kernels.

Regards,
Dan.

Signature · 4 lines
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 
#2 lore raw
In reply to Randy Thelen
Quoted 9 lines · Randy Thelen

(XEN) DOM0: (file=mm.c, line=1688) Bad type (saw 28000001 != exp e0000000) for mfn 96efe (pfn 573)
(XEN) DOM0: (file=mm.c, line=606) Error getting mfn 96efe (pfn 573) from L1 entry 0000000096efe027 for dom8
(XEN) DOM0: (file=mm.c, line=1266) Bad get_page_from_l1e(): pl1e = fefa6a30, nl1e = 96efe027, ol1e = 0, gl1mfn = d8538 (XEN) DOM0: (file=mm.c, line=2283) Could not modify L1 entry: va == fefa6a30, l1e == 96efe027, mfn == d8538

Quoted 3 lines

(I've added the two MEM_LOG() calls at line 1266 and 2283.)

Any ideas where I should begin looking? Or is PAE support languishing?

Xen thinks you are trying to map a guest pagetable page, and is not allowing you write access. This is probably because the virt_to_phys translation code that gdbserver is using is broken for PAE. My guess would be that it returns the physical address of the PTE that maps the virtual address, rather than the physical address that is mapped at the virtual address.

-- Keir

#3 lore raw
Quoted 6 lines

Xen thinks you are trying to map a guest pagetable page, and is not allowing you write access. This is probably because the virt_to_phys translation code that gdbserver is using is broken for PAE. My guess would be that it returns the physical address of the PTE that maps the virtual address, rather than the physical address that is mapped at the virtual address.

Ah, the lookup function is mapping the PTE page with write permissions. That won't work. I'll check in a fix.

-- Keir

#4 lore raw
Quoted 2 lines · Keir Fraser

Ah, the lookup function is mapping the PTE page with write permissions. That won't work. I'll check in a fix.

You da man:

(gdb) b *0xc010002c
Breakpoint 1 at 0xc010002c
(gdb) c
Continuing.

Breakpoint 1, 0xc010002c in startup_32 ()
(gdb)

Thanks, Keir!

-- Randy