From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Physical address mapping to user space in dom0 problem Date: Sun, 18 Mar 2007 21:14:05 +0000 Message-ID: References: <63c711180703181311o44c8a906vae38f8157743af9b@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0994151444==" Return-path: In-Reply-To: <63c711180703181311o44c8a906vae38f8157743af9b@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Haw-Yuan Yang , Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --===============0994151444== Content-type: multipart/alternative; boundary="B_3257097245_6668734" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3257097245_6668734 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit On 18/3/07 20:11, "Haw-Yuan Yang" 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 --B_3257097245_6668734 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable Re: [Xen-devel] Physical address mapping to user space in dom0 probl= em


On 18/3/07 20:11, "Haw-Yuan Yang" <hawyuan@gmail.com> 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-allo= c-consistent)   

Well, perhaps you can simplify your own mmap() handler since you perhaps kn= ow that it will only be used to mmap() your pci_alloc_consistent() memory bl= ock. Hence you may only need to handle the remap_pfn_range() case. But anywa= y, you have the idea now.

 -- Keir

--B_3257097245_6668734-- --===============0994151444== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0994151444==--