I''m trying to map some memory reserved with the mem= & memap = parameters (in guest) in a module in the guest. ioremap keeps failing with xend dmesg displaying this error : / mm.c:710:d2 Error getting mfn 20000 (pfn 2584e) from L1 entry 0000000020000263 for dom3275/ Anyone know why this is happening, or what I''m doing wrong ? -Anish -- As long as the music''s loud enough, we won''t hear the world falling apart. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 8/10/08 00:23, "Anish Bhatt" <anish@cc.gatech.edu> wrote:> I''m trying to map some memory reserved with the mem= & memap > parameters (in guest) in a module in the guest. ioremap keeps failing > with xend dmesg displaying this error : > / mm.c:710:d2 Error getting mfn 20000 (pfn 2584e) from L1 entry > 0000000020000263 for dom3275/ > > Anyone know why this is happening, or what I''m doing wrong ? > -Anishioremap() takes machine addresses when running on Xen; not pseudophysical addresses. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Is there an API for converting pseudophysical addresses to machine addresses or possibly sample code somewhere ? -Anish Keir Fraser wrote:> On 8/10/08 00:23, "Anish Bhatt" <anish@cc.gatech.edu> wrote: > > >> I''m trying to map some memory reserved with the mem= & memap >> parameters (in guest) in a module in the guest. ioremap keeps failing >> with xend dmesg displaying this error : >> / mm.c:710:d2 Error getting mfn 20000 (pfn 2584e) from L1 entry >> 0000000020000263 for dom3275/ >> >> Anyone know why this is happening, or what I''m doing wrong ? >> -Anish >> > > ioremap() takes machine addresses when running on Xen; not pseudophysical > addresses. > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >-- As long as the music''s loud enough, we won''t hear the world falling apart. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anish Bhatt wrote:> Is there an API for converting pseudophysical addresses to machine > addresses or possibly sample code somewhere ?What are you trying to achieve? ioremap is only valid to use on device memory anyway, so you shouldn''t be in a position to use it unless you''ve already got machine addresses in hand (and they''re going to be machine addresses with no existing pfn translation). J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
The driver for the network processor that I am using does an ioremap call to map memory previously reserved using the mem & memap kernel parameters. for eg. if I reserve memory using memmap=384M$512M, it is calling ioremap(384,512) (with appropriate conversion to bytes) and later using the returned address to setup its queues. -Anish Jeremy Fitzhardinge wrote:> Anish Bhatt wrote: >> Is there an API for converting pseudophysical addresses to machine >> addresses or possibly sample code somewhere ? > > What are you trying to achieve? ioremap is only valid to use on > device memory anyway, so you shouldn''t be in a position to use it > unless you''ve already got machine addresses in hand (and they''re going > to be machine addresses with no existing pfn translation). > > J-- As long as the music''s loud enough, we won''t hear the world falling apart. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Sounds like a ''bigphysarea'' kind of hack. That won''t work on Xen without modifying the driver. Quite a part from anything else the driver probably expects the memory range to be machine contiguous, and it almost certainly won''t be. -- Keir On 9/10/08 17:50, "Anish Bhatt" <anish@cc.gatech.edu> wrote:> The driver for the network processor that I am using does an ioremap > call to map memory previously reserved using the mem & memap kernel > parameters. for eg. if I reserve memory using memmap=384M$512M, it is > calling ioremap(384,512) (with appropriate conversion to bytes) and > later using the returned address to setup its queues. > -Anish > > Jeremy Fitzhardinge wrote: >> Anish Bhatt wrote: >>> Is there an API for converting pseudophysical addresses to machine >>> addresses or possibly sample code somewhere ? >> >> What are you trying to achieve? ioremap is only valid to use on >> device memory anyway, so you shouldn''t be in a position to use it >> unless you''ve already got machine addresses in hand (and they''re going >> to be machine addresses with no existing pfn translation). >> >> J >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel