Jacob Gorm Hansen
2005-Feb-05 02:47 UTC
[Xen-devel] ATI Radeon 9600SE and intel-agp, again
hi, I have now switched over to using the open ''R300'' ATI Radeon driver in my quest for accellerated 3D under Xen. I have the driver running with reasonable performance under normal Linux, but in Xen it still refuses to load due to the lack of intel-agp. intel-agp refuses to load because the call to MMU_SET_FOREIGNDOM (trying to give the I/O pages to dom_io) fails, because the pages are owned by dom0 instead of by dom_io. If I remove the ownership check in get_page() (in Xen) I can load the module, but dom0 will crash when X tries to map AGP memory. Again, this is _before_ any nonstandard drivers are loaded, just a plain Xenlinux on top of a plain Xen. intel-agp is the first module loaded. The good news: 1) There is an open Radeon 3D driver for which we have the source. 2) This driver and the ATI fglrx driver fail in exactly the same way, meaning there is still hope for getting the fglrx driver working as well. and the bad news: 1) intel-agp refuses to load with an ATI 9600SE (r350 chip, 8x AGP, 128meg DDR) card under Xen, though the same config works fine in plain Linux. I will try and understand how this stuff is supposed to work, I have an internet-connected debug-machine with serial console, if anyone with more Xen-AGP knowledge wishes to help debugging this. Jacob ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> intel-agp refuses to load because the call to > MMU_SET_FOREIGNDOM (trying > to give the I/O pages to dom_io) fails, because the pages are > owned by dom0 instead of by dom_io. If I remove the ownership check in> get_page() > (in Xen) I can load the module, but dom0 will crash when X > tries to map > AGP memory.Have you tried since the following checkin: 48 hours kaf24 1.1711 Fix ioremap() for local RAM pages Ian ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Jacob Gorm Hansen
2005-Feb-06 07:31 UTC
Re: [Xen-devel] ATI Radeon 9600SE and intel-agp, again
Ian Pratt wrote:>>intel-agp refuses to load because the call to >>MMU_SET_FOREIGNDOM (trying >>to give the I/O pages to dom_io) fails, because the pages are >>owned by dom0 instead of by dom_io. If I remove the ownership check in > > >>get_page() >>(in Xen) I can load the module, but dom0 will crash when X >>tries to map >>AGP memory. > > > Have you tried since the following checkin: > 48 hours kaf24 1.1711 Fix ioremap() for local RAM pagesYes, this is this is in the latest code from bkbits xeno-unstable. arch/xen/i386/ioremap.c tries to call direct_remap_area_pages like this (the printk is mine) printk("trying to remap addr %p phys %p size %d to DOM_IO\n",addr, phys_addr, size); if (direct_remap_area_pages(&init_mm, (unsigned long) addr, phys_addr, size, __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | flags), DOMID_IO)) { the printk says: "trying to remap addr d0900000 phys 3ff00000 size 262144 to DOM_IO" And the call fails in Xen who claims that dom0 and not dom_io owns these pages. Jacob ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Jacob Gorm Hansen
2005-Feb-06 07:59 UTC
Re: [Xen-devel] ATI Radeon 9600SE and intel-agp, again
Jacob Gorm Hansen wrote:> printk("trying to remap addr %p phys %p size %d to DOM_IO\n",addr, > phys_addr, size); > > if (direct_remap_area_pages(&init_mm, (unsigned long) addr, phys_addr, > size, __pgprot(_PAGE_PRESENT | _PAGE_RW | > _PAGE_DIRTY | _PAGE_ACCESSED > | flags), DOMID_IO)) { > > the printk says: > "trying to remap addr d0900000 phys 3ff00000 size 262144 to DOM_IO" > > And the call fails in Xen who claims that dom0 and not dom_io owns these > pages.I have tried replacing DOMID_IO with DOMID_LOCAL, and then the call goes through, but I have no idea if it makes any sense doing that. By the way, I just tried with an Nvidia graphics card in the machine, and the problem is the same, so it must be a problem with the chipset which is an Intel i875. The machine is a Dell Precision 380 workstation-class machine with a P4 3.2GHz and 1GB mem. Jacob ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> > if (direct_remap_area_pages(&init_mm, (unsigned long) > addr, phys_addr, > > size, __pgprot(_PAGE_PRESENT | _PAGE_RW | > > _PAGE_DIRTY | _PAGE_ACCESSED > > | flags), DOMID_IO)) {The previous patch was trivially broken - it calculated the domid to use then always passed in a constant (as above). It''s a shame Linux isn''t compiled -Werror Ian ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Jacob Gorm Hansen
2005-Feb-07 21:42 UTC
Re: [Xen-devel] ATI Radeon 9600SE and intel-agp, again
Ian Pratt wrote:>>> if (direct_remap_area_pages(&init_mm, (unsigned long) >> >>addr, phys_addr, >> >>> size, __pgprot(_PAGE_PRESENT | _PAGE_RW | >>> _PAGE_DIRTY | _PAGE_ACCESSED >>> | flags), DOMID_IO)) { > > > The previous patch was trivially broken - it calculated the domid to use > then always passed in a constant (as above).Thanks, I should have spotted that. This is equal to my own hacked version (using DOMID_LOCAL or remming out the owner check in Xen), so I can now load intel-agp without that bad taste in my mouth :-) Anyway, I now encounter the following crash in the r300-supplied drm-module: Oops: 0000 [#1] DEBUG_PAGEALLOC Modules linked in: radeon drm intel_agp agpgart CPU: 0 EIP: 0061:[<c0143546>] Not tainted VLI EFLAGS: 00013206 (2.6.10-xen0) EIP is at remap_pfn_range+0x176/0x220 eax: c0527000 ebx: 000e0000 ecx: 00000027 edx: 000e0000 esi: 003ee000 edi: c9b48fb8 ebp: 00400000 esp: c9917eac ds: 007b es: 007b ss: 0069 Process X (pid: 6673, threadinfo=c9916000 task=c9977b20) Stack: 00400000 af400000 000dfc12 003ee000 c994eaf4 c994fddc af8ef000 c994eaf4 00000000 c7a10804 c9c6a5b0 ce4c67f8 d087c2b6 c9c6a5b0 af7ee000 00030812 00101000 00000027 c9c6a5ac c9b4af6c c9c6a5b0 af7ee000 ffffffea c9b4af6c Call Trace: [<d087c2b6>] drm_mmap+0x1c6/0x2b9 [drm] [<c014624f>] do_mmap_pgoff+0x35f/0x730 [<c0110e76>] old_mmap+0xd6/0x110 [<c0109530>] syscall_call+0x7/0xb Code: e0 05 01 d0 8b 00 f6 c4 08 74 2a 8b 44 24 44 89 d9 c1 e1 0c 09 c1 f6 c1 01 74 18 a1 80 08 4f c0 89 ca c1 ea 0 c 81 e1 ff 0f 00 00 <8b> 04 90 c1 e0 0c 09 c1 89 0f 43 83 c7 04 81 c6 00 10 00 00 74 I have seen some mention of a drm-patch earlier, but it is no longer in the tree. What happened to that / is it likely that I need to apply something similar to the r300 drm module? thanks, Jacob ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> I have seen some mention of a drm-patch earlier, but it is no > longer in > the tree. What happened to that / is it likely that I need to apply > something similar to the r300 drm module?The previous drm patch was for an inline wbinvd instruction, which we now emulate in Xen. This is something different. You''ll have to figure out what the remap_page_range is trying to remap... Ian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Jacob Gorm Hansen
2005-Feb-07 22:45 UTC
Re: [Xen-devel] ATI Radeon 9600SE and intel-agp, again
Ian Pratt wrote:>>I have seen some mention of a drm-patch earlier, but it is no >>longer in >>the tree. What happened to that / is it likely that I need to apply >>something similar to the r300 drm module? > > > The previous drm patch was for an inline wbinvd instruction, which we > now emulate in Xen. > > This is something different. You''ll have to figure out what the > remap_page_range is trying to remap... >OK, changing one call to remap_pfn_range to io_remap_range in the r300 drm_vm.c now allows me to start X without crashing. Unfortunately, AGP/DRI is still not working, but I will try and investigate this a bit more. Jacob ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel