From: "sanjay kumar" Subject: Re: : mapping xen pages into a domain Date: Sun, 26 Mar 2006 17:34:03 +0000 Message-ID: <2717599f0603260934m78f56f5du76808f48f33d3703@mail.gmail.com> References: <2717599f0603220750x67aaf511gc8e6515edfd6abac@mail.gmail.com> <2cfbfbff4efc043e8159db9f3320360c@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1376086465==" Return-path: In-Reply-To: <2cfbfbff4efc043e8159db9f3320360c@cl.cam.ac.uk> 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: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1376086465== Content-Type: multipart/alternative; boundary="----=_Part_12193_409617.1143394443966" ------=_Part_12193_409617.1143394443966 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Keir, I am kind of stuck here. Could you or someone please point me to an example code where guest (or dom0) kernel is mapping the page (allocated by Xen using share_xen_page_with_guest()) in its own memory. Thanks, Sanjay On 3/22/06, Keir Fraser wrote: > > > It's not an I/O page so your method won't work. You should use > share_xen_page_with_guest() in Xen, and then the guest can map that > page just like any other that it owns. > > -- Keir > > On 22 Mar 2006, at 15:50, sanjay kumar wrote: > > > 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 > >> 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/ > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > -- ---------------------- PhD Student, Georgia Tech http://www.cc.gatech.edu/~ksanjay/ ------=_Part_12193_409617.1143394443966 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Keir,
I am kind of stuck here. Could you or someone please point me to an example code where guest (or dom0) kernel is mapping the page (allocated by Xen using share_xen_page_with_guest()) in its own memory.
=
Thanks,
Sanjay

On 3/22/06, Keir Fraser <Keir.Fr= aser@cl.cam.ac.uk> wrote:

It's not an I/O page so your method won't work. You should use
share= _xen_page_with_guest() in Xen, and then the guest can map that
page just= like any other that it owns.

  -- Keir

On 22 Mar 2= 006, at 15:50, sanjay kumar wrote:

> 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 < sanjay.kushwaha@gmail.com> wrote:Hi Folks,
>>  I = want to allocate a page in xen and share it with a domain so that
>&g= t; I can use it for shared memory communication.
>>
>>&nb= sp; I have allocated a page in Xen using
>> base =3D _xmalloc(PAGE_SIZE, 0);
>>   base_= pa =3D virt_to_phys(base);
>>
>>  I pass this p= hysical 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 p= age in dom0 using the base_pa and
>> ioremap function
>><= br>>>   base =3D (unsigned long) ioremap(base_pa, PAGE_SIZE= );
>>
>>  but the call to ioremap fails. Could an= yone please tell me what I am
>> doing wrong? What is the correct = way to do this.
>>
>>  Thanks,
>> = ; Sanjay
>>
>>
>>
>> --
>> ----------------------
&= gt;> PhD Student, Georgia Tech
>> http://www.cc.gatech.edu/~ksanjay/
>
> >
> --
> ----------------------
> PhD Student, Georgia= Tech
> http://www.cc.= gatech.edu/~ksanjay/
> __________________________________________= _____
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
<= br>



--
----------------------<= br>PhD Student, Georgia Tech
http://www.cc.gatech.edu/~ksanjay/
------=_Part_12193_409617.1143394443966-- --===============1376086465== 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 --===============1376086465==--