WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xen and agpgart

> Hmmmm.... I think the problem is people using virt_to_phys() instead
> of virt_to_bus(). I would have expected the latter to be correct
> really. I'll take a look at uses of ioremap() and ioremap_nocache()
> throughout Linux. It may be there's a simple fix that will work for all
> uses... You could try manually changing the address passed in to
> virt_to_bus() and see if you get fiurther.

Ok.  I've gone through and tweaked a little to see if I could make some
more forward progress.  I've basically done s/virt_to_page/virt_to_bus/
and have gotten the system to initialize, when X starts though, I run into
another one of those pagetable tweaking oopses (below).  The code which
is executing here is pretty straightforward:

#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)

void *agp_generic_alloc_page(void)
{
        struct page * page;

        page = alloc_page(GFP_KERNEL);
        if (page == NULL)
                return NULL;

        map_page_into_agp(page);

        get_page(page);
        SetPageLocked(page);
        atomic_inc(&agp_bridge->current_memory_agp);
        return page_address(page);
}

With the code blowing up inside the change_page_attr().
Oops detail below.

                                -- Gerald

Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected an Intel 855PM Chipset.
agpgart: Maximum main memory to use for agp memory: 440M
agpgart: AGP aperture is 256M @ 0xd0000000
[drm] Initialized radeon 1.11.0 20020828 on minor 0: 
ioperm not fully supported - set iopl to 3
ioperm not fully supported - ignore resource release
ioperm not fully supported - ignore resource release
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
Unable to handle kernel paging request at virtual address c0102d64
 printing eip:
c0117ff8
*pde = ma 0308b067 pa 0048b067
*pte = ma 02c02061 pa 00002061
 [<c01181c2>] __change_page_attr+0x14e/0x21e

 [<c011830c>] change_page_attr+0x7a/0x8f

 [<e110f58e>] agp_generic_alloc_page+0x3c/0x65 [agpgart]

 [<e110e7e7>] agp_allocate_memory+0x72/0xd2 [agpgart]

 [<e1179a45>] radeon_agp_allocate_memory+0x22/0x2a [radeon]

 [<e11795e3>] radeon_agp_alloc+0xb9/0x1a2 [radeon]

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<e117dc49>] radeon_ioctl+0xc9/0x13f [radeon]

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<e117db80>] radeon_ioctl+0x0/0x13f [radeon]

 [<c016366f>] sys_ioctl+0xf7/0x24c

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<c010d2d3>] syscall_call+0x7/0xb

 [<c0106434>] inflate_dynamic+0x428/0x5f5

Oops: 0003 [#1]
PREEMPT 
Modules linked in: radeon intel_agp agpgart ds yenta_socket pcmcia_core 
ip_tables vfat fat ehci_hcd uhci_hcd
CPU:    0
EIP:    0061:[<c0117ff8>]    Not tainted
EFLAGS: 00013202   (2.6.8.1-xen0) 
EIP is at set_pmd_pte+0xe/0x8a
eax: c0102d64   ebx: 190000e3   ecx: d66c0000   edx: d66c0000
esi: c05e4b00   edi: 191c0063   ebp: c1109c80   esp: d3565eb0
ds: 0069   es: 0069   ss: 0069
Process X (pid: 2354, threadinfo=d3564000 task=df8091e0)
Stack: c0102d64 c05e4b00 c01181c2 c0102d64 d66c0000 190000e3 d66c0000 c13cb800 
       00000000 00000000 00000000 c011830c c13cb800 00000073 c13cb800 00000000 
       00000800 00000000 e110f58e c13cb800 00000001 00000073 e00f5500 e110e7e7 
Call Trace:
 [<c01181c2>] __change_page_attr+0x14e/0x21e

 [<c011830c>] change_page_attr+0x7a/0x8f

 [<e110f58e>] agp_generic_alloc_page+0x3c/0x65 [agpgart]

 [<e110e7e7>] agp_allocate_memory+0x72/0xd2 [agpgart]

 [<e1179a45>] radeon_agp_allocate_memory+0x22/0x2a [radeon]

 [<e11795e3>] radeon_agp_alloc+0xb9/0x1a2 [radeon]

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<e117dc49>] radeon_ioctl+0xc9/0x13f [radeon]

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<e117db80>] radeon_ioctl+0x0/0x13f [radeon]

 [<c016366f>] sys_ioctl+0xf7/0x24c

 [<c0106434>] inflate_dynamic+0x428/0x5f5

 [<c010d2d3>] syscall_call+0x7/0xb

 [<c0106434>] inflate_dynamic+0x428/0x5f5

Code: 89 18 a1 40 87 3f c0 0f b6 70 01 c6 40 01 01 b8 00 e0 ff ff 



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel