* ioremap failing in linux guest
@ 2008-10-07 23:23 Anish Bhatt
2008-10-08 7:15 ` Keir Fraser
0 siblings, 1 reply; 6+ messages in thread
From: Anish Bhatt @ 2008-10-07 23:23 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioremap failing in linux guest
2008-10-07 23:23 ioremap failing in linux guest Anish Bhatt
@ 2008-10-08 7:15 ` Keir Fraser
2008-10-08 22:42 ` Anish Bhatt
0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2008-10-08 7:15 UTC (permalink / raw)
To: Anish Bhatt, xen-devel@lists.xensource.com
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioremap failing in linux guest
2008-10-08 7:15 ` Keir Fraser
@ 2008-10-08 22:42 ` Anish Bhatt
2008-10-08 22:52 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 6+ messages in thread
From: Anish Bhatt @ 2008-10-08 22:42 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel@lists.xensource.com
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioremap failing in linux guest
2008-10-08 22:42 ` Anish Bhatt
@ 2008-10-08 22:52 ` Jeremy Fitzhardinge
2008-10-09 16:50 ` Anish Bhatt
0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-08 22:52 UTC (permalink / raw)
To: Anish Bhatt; +Cc: xen-devel@lists.xensource.com, Keir Fraser
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioremap failing in linux guest
2008-10-08 22:52 ` Jeremy Fitzhardinge
@ 2008-10-09 16:50 ` Anish Bhatt
2008-10-09 17:02 ` Keir Fraser
0 siblings, 1 reply; 6+ messages in thread
From: Anish Bhatt @ 2008-10-09 16:50 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: xen-devel@lists.xensource.com
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ioremap failing in linux guest
2008-10-09 16:50 ` Anish Bhatt
@ 2008-10-09 17:02 ` Keir Fraser
0 siblings, 0 replies; 6+ messages in thread
From: Keir Fraser @ 2008-10-09 17:02 UTC (permalink / raw)
To: Anish Bhatt, Jeremy Fitzhardinge; +Cc: xen-devel@lists.xensource.com
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-09 17:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 23:23 ioremap failing in linux guest Anish Bhatt
2008-10-08 7:15 ` Keir Fraser
2008-10-08 22:42 ` Anish Bhatt
2008-10-08 22:52 ` Jeremy Fitzhardinge
2008-10-09 16:50 ` Anish Bhatt
2008-10-09 17:02 ` Keir Fraser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.