* [PATCH] xen/arm: pfn_to_mfn and mfn_to_pfn return the argument if nothing is in the p2m
@ 2013-11-11 12:50 Stefano Stabellini
2013-11-11 13:03 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Stabellini @ 2013-11-11 12:50 UTC (permalink / raw)
To: xen-devel; +Cc: linux-kernel, konrad.wilk, Ian.Campbell, stefano.stabellini
Some common Xen drivers, like balloon.c, call pfn_to_mfn and mfn_to_pfn
even for autotranslate guests, expecting the argument back.
The following commit broke these drivers by changing the behavior of
pfn_to_mfn and mfn_to_pfn:
commit 4a19138c6505e224d9f4cc2fe9ada9188d7100ea
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date: Thu Oct 17 16:22:27 2013 +0000
arm/xen,arm64/xen: introduce p2m
They now return INVALID_P2M_ENTRY if Linux doesn't actually know what is
the mfn backing a pfn or what is the pfn corresponding to an mfn.
Fix the regression by switching to the old behavior.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
arch/arm/include/asm/xen/page.h | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h
index 5d0e4c5..f891925 100644
--- a/arch/arm/include/asm/xen/page.h
+++ b/arch/arm/include/asm/xen/page.h
@@ -46,10 +46,7 @@ static inline unsigned long pfn_to_mfn(unsigned long pfn)
return mfn;
}
- if (xen_initial_domain())
- return pfn;
- else
- return INVALID_P2M_ENTRY;
+ return pfn;
}
static inline unsigned long mfn_to_pfn(unsigned long mfn)
@@ -62,10 +59,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
return pfn;
}
- if (xen_initial_domain())
- return mfn;
- else
- return INVALID_P2M_ENTRY;
+ return mfn;
}
#define mfn_to_local_pfn(mfn) mfn_to_pfn(mfn)
--
1.7.2.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] xen/arm: pfn_to_mfn and mfn_to_pfn return the argument if nothing is in the p2m
2013-11-11 12:50 [PATCH] xen/arm: pfn_to_mfn and mfn_to_pfn return the argument if nothing is in the p2m Stefano Stabellini
@ 2013-11-11 13:03 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2013-11-11 13:03 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: xen-devel, linux-kernel, konrad.wilk
On Mon, 2013-11-11 at 12:50 +0000, Stefano Stabellini wrote:
> Some common Xen drivers, like balloon.c, call pfn_to_mfn and mfn_to_pfn
> even for autotranslate guests, expecting the argument back.
> The following commit broke these drivers by changing the behavior of
> pfn_to_mfn and mfn_to_pfn:
>
> commit 4a19138c6505e224d9f4cc2fe9ada9188d7100ea
> Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Date: Thu Oct 17 16:22:27 2013 +0000
>
> arm/xen,arm64/xen: introduce p2m
>
> They now return INVALID_P2M_ENTRY if Linux doesn't actually know what is
> the mfn backing a pfn or what is the pfn corresponding to an mfn.
> Fix the regression by switching to the old behavior.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
I tripped over this on Friday and my local hack was identical, hence
also:
Tested-by: Ian Campbell <ian.campbell@citrix.com>
Ian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-11 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 12:50 [PATCH] xen/arm: pfn_to_mfn and mfn_to_pfn return the argument if nothing is in the p2m Stefano Stabellini
2013-11-11 13:03 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®