Re: [Xen-devel] [PATCH v4] xen/grant-table: Avoid m2p_override duringmapping

From: Zoltan Kiss
Date: Wed Jan 22 2014 - 14:04:10 EST

On 22/01/14 18:50, Stefano Stabellini wrote:
On Wed, 22 Jan 2014, Zoltan Kiss wrote:
On 22/01/14 16:39, Stefano Stabellini wrote:
On Tue, 21 Jan 2014, Zoltan Kiss wrote:
@@ -121,7 +125,7 @@ static inline unsigned long mfn_to_pfn(unsigned long
pfn = m2p_find_override_pfn(mfn, ~0);

- /*
+ /*

Spurious change?
It removes a stray space from the original code. Not necessary, but if it's
there, I think we can keep it.

Usually cosmetic changes are done in a separate patch, or at the very
least they are mentioned in the commit message.
Ok, I'll mention it.

diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 2ae8699..0060178 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -872,15 +872,13 @@ static unsigned long mfn_hash(unsigned long mfn)

/* Add an MFN override for a particular page */
int m2p_add_override(unsigned long mfn, struct page *page,
- struct gnttab_map_grant_ref *kmap_op)
+ struct gnttab_map_grant_ref *kmap_op, unsigned long pfn)

Do we really need to add another additional parameter to
I would just let m2p_add_override and m2p_remove_override call
page_to_pfn again. It is not that expensive.
Yes, because that page_to_pfn can return something different. That's why the
v2 patches failed.

I am really curious: how can page_to_pfn return something different?
I don't think is supposed to happen.
You call set_phys_to_machine before calling m2p* functions.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at