[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] xen: rename wrong named pfn related variables

On 16.06.21 12:43, Juergen Gross wrote:
On 16.06.21 11:56, Jan Beulich wrote:
On 16.06.2021 09:30, Juergen Gross wrote:
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -95,8 +95,8 @@ unsigned long *xen_p2m_addr __read_mostly;
  unsigned long xen_p2m_size __read_mostly;
-unsigned long xen_max_p2m_pfn __read_mostly;
+unsigned long xen_p2m_max_size __read_mostly;

Instead of renaming the exported variable (which will break consumers
anyway), how about dropping the apparently unneeded export at this

Why do you think it isn't needed? It is being referenced via the inline
function __pfn_to_mfn() in arch/x86/include/asm/xen/page.h. And
__pfn_to_mfn() is used via lots of other inline functions and macros.

Further it looks to me as if xen_p2m_size and this variable
were actually always kept in sync, so I'd like to put up the question
of dropping one of the two.

Hmm, should be possible, yes.

Looking into this it seems this is not possible.

xen_p2m_size always holds the number of p2m entries in the p2m table,
including invalid ones at the end. xen_p2m_pfn_limit however contains
the (rounded up) index after the last valid p2m entry.


Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.