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] Physical address mapping to user space in dom0 problem

To: Haw-Yuan Yang <hawyuan@xxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Physical address mapping to user space in dom0 problem
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Sun, 18 Mar 2007 21:14:05 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 18 Mar 2007 14:12:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <63c711180703181311o44c8a906vae38f8157743af9b@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdpolvampSO6tWVEduf4gAWy6hiGQ==
Thread-topic: [Xen-devel] Physical address mapping to user space in dom0 problem
User-agent: Microsoft-Entourage/11.3.3.061214



On 18/3/07 20:11, "Haw-Yuan Yang" <hawyuan@xxxxxxxxx> wrote:

Here is what I have in the mmap handler:
 
if  the physical address is MMIO
    io_remap_pfn_range(MMIO_address)
else
   remap_pfn_range(virt_to_phys(cpu-ptr-returned-by-pci-alloc-consistent)   

Well, perhaps you can simplify your own mmap() handler since you perhaps know that it will only be used to mmap() your pci_alloc_consistent() memory block. Hence you may only need to handle the remap_pfn_range() case. But anyway, you have the idea now.

 -- Keir

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel