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/
Home Products Support Community News


[Xen-bugs] [Bug 812] New: Can't obtain dma address for granted page in d

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 812] New: Can't obtain dma address for granted page in dom0
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Tue, 7 Nov 2006 02:51:12 -0800
Delivery-date: Tue, 07 Nov 2006 02:51:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx

           Summary: Can't obtain dma address for granted page in dom0
           Product: Xen
           Version: unstable
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Hypervisor
        AssignedTo: xen-bugs@xxxxxxxxxxxxxxxxxxx
        ReportedBy: kmansley@xxxxxxxxxxxxxx

After granting a page (using xenbus_grant_ring()) allocated in domU and mapping
it into dom0 (using xenbus_map_ring_valloc()).  I expect to be able to get a
dma address (using something like pci_map_single()) for the page in dom0. 
However, the dma address returned is always the same value, regardless of the
actual page provided.  Related functionality such as find_vma(), follow_page(),
virt_to_mfn(), page_to_bus(), dma_map_page(), etc. doesn't seem to work either.
 They all tend to return either obviously wrong values (wildly out of range) or
just repeatedly return the same value for different arguments.  Performing a
walk of the page tables in dom0 finds a valid entry for that address, but the
struct page given for that entry is always the same for the valid addresses
I've tried.

The "struct vm_struct" returned by xenbus_map_ring_valloc() has a pages array
field, but this is blank when the function returns, so no struct page is
available from there.

Modifying xenbus_map_ring_valloc to use the GNTMAP_contains_pte flag, and
giving it a valid page table entry to use instead of a virtual address, results
in the same behaviour.  i.e. after the call, a walk of the page tables in dom0
gives the same struct page for all the different virtual addresses that have
been granted.

I wonder if the call to HYPERVISOR_grant_table_op updates the page tables in
the hypervisor, but doesn't properly update the page tables in dom0, and so the
information required isn't available there.

This is blocking our development of accelerated backend drivers as the only
simple workaround requires dom0 to trust domU to provide the bus address of the
grant, which is clearly not a good idea.

Configure bugmail: 
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Xen-bugs mailing list

<Prev in Thread] Current Thread [Next in Thread>