From: "sanjay kumar" Subject: : mapping xen pages into a domain Date: Wed, 22 Mar 2006 10:50:19 -0500 Message-ID: <2717599f0603220750x67aaf511gc8e6515edfd6abac@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0760325877==" Return-path: 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: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0760325877== Content-Type: multipart/alternative; boundary="----=_Part_5250_30018896.1143042619254" ------=_Part_5250_30018896.1143042619254 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Folks, I posted this question a few days ago. Could someone please help me with this? Thanks, Sanjay On 3/16/06, sanjay kumar wrote: > > Hi Folks, > I want to allocate a page in xen and share it with a domain so that I can > use it for shared memory communication. > > I have allocated a page in Xen using > ** base =3D _xmalloc(PAGE_SIZE, 0); > base_pa =3D virt_to_phys(base); > > I pass this physical address of the page i.e. base_pa to dom0. I also > permit access to this page to dom0 using > > ret =3D iomem_permit_access(d, base_pa, 1); > > from dom0, I try to ioremap this page in dom0 using the base_pa and > ioremap function > > base =3D (unsigned long) ioremap(base_pa, PAGE_SIZE); > > but the call to ioremap fails. Could anyone please tell me what I am doin= g > wrong? What is the correct way to do this. > > Thanks, > Sanjay > > > > -- > ---------------------- > PhD Student, Georgia Tech > http://www.cc.gatech.edu/~ksanjay/ > -- ---------------------- PhD Student, Georgia Tech http://www.cc.gatech.edu/~ksanjay/ ------=_Part_5250_30018896.1143042619254 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Folks,
I posted this question a few days ago. Could someone please help me with th= is?

Thanks,
Sanjay

On 3/16/06, sanjay kumar <sanja= y.kushwaha@gmail.com> wrote:
Hi Folks,
I want to allocate a page in xen and share it with a domain so that I can u= se it for shared memory communication.

I have allocated a page in Xen using
    base =3D _xmalloc(PAGE_SIZE, 0);
    base_pa =3D virt_to_phys(base);

I pass this physical address of the page i.e. base_pa to dom0. I also permi= t access to this page  to dom0 using

    ret =3D iomem_permit_access(d, base_pa, 1);

from dom0, I try to ioremap this page in dom0 using the base_pa and ioremap= function

    base =3D  (unsigned long) ioremap(base_pa, PAGE_SIZ= E);

but the call to ioremap fails. Could anyone please tell me what I am doing = wrong? What is the correct way to do this.

Thanks,
Sanjay



--
----------------------
PhD Student, Georgia Tech
http://www.cc.gatech.edu/~ksanjay= /



--
----------= ------------
PhD Student, Georgia Tech
http://www.cc.gatech.edu/~ksanjay/
------=_Part_5250_30018896.1143042619254-- --===============0760325877== 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 --===============0760325877==--