All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: export symbol dependencies of is_zero_pfn()
@ 2014-09-12 20:17 ` Ard Biesheuvel
  0 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2014-09-12 20:17 UTC (permalink / raw)
  To: kvm, pbonzini, christoffer.dall, linux-mm, linux-s390,
	linux-kernel, linux-mips, ralf, schwidefsky, heiko.carstens,
	akpm
  Cc: Ard Biesheuvel

In order to make the static inline function is_zero_pfn() callable by
modules, export its symbol dependencies 'zero_pfn' and (for s390 and
mips) 'zero_page_mask'.

We need this for KVM, as CONFIG_KVM is a tristate for all supported
architectures except ARM and arm64, and testing a pfn whether it refers
to the zero page is required to correctly distinguish the zero page
from other special RAM ranges that may also have the PG_reserved bit
set, but need to be treated as MMIO memory.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/mips/mm/init.c | 1 +
 arch/s390/mm/init.c | 1 +
 mm/memory.c         | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 571aab064936..f42e35e42790 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -53,6 +53,7 @@
  */
 unsigned long empty_zero_page, zero_page_mask;
 EXPORT_SYMBOL_GPL(empty_zero_page);
+EXPORT_SYMBOL(zero_page_mask);
 
 /*
  * Not static inline because used by IP27 special magic initialization code
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 0c1073ed1e84..c7235e01fd67 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
 
 unsigned long empty_zero_page, zero_page_mask;
 EXPORT_SYMBOL(empty_zero_page);
+EXPORT_SYMBOL(zero_page_mask);
 
 static void __init setup_zero_pages(void)
 {
diff --git a/mm/memory.c b/mm/memory.c
index adeac306610f..d17f1bcd2a91 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -118,6 +118,8 @@ __setup("norandmaps", disable_randmaps);
 unsigned long zero_pfn __read_mostly;
 unsigned long highest_memmap_pfn __read_mostly;
 
+EXPORT_SYMBOL(zero_pfn);
+
 /*
  * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init()
  */
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] mm: export symbol dependencies of is_zero_pfn()
@ 2014-09-12 20:17 ` Ard Biesheuvel
  0 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2014-09-12 20:17 UTC (permalink / raw)
  To: kvm, pbonzini, christoffer.dall, linux-mm, linux-s390,
	linux-kernel, linux-mips, ralf, schwidefsky, heiko.carstens,
	akpm
  Cc: Ard Biesheuvel

In order to make the static inline function is_zero_pfn() callable by
modules, export its symbol dependencies 'zero_pfn' and (for s390 and
mips) 'zero_page_mask'.

We need this for KVM, as CONFIG_KVM is a tristate for all supported
architectures except ARM and arm64, and testing a pfn whether it refers
to the zero page is required to correctly distinguish the zero page
from other special RAM ranges that may also have the PG_reserved bit
set, but need to be treated as MMIO memory.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/mips/mm/init.c | 1 +
 arch/s390/mm/init.c | 1 +
 mm/memory.c         | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 571aab064936..f42e35e42790 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -53,6 +53,7 @@
  */
 unsigned long empty_zero_page, zero_page_mask;
 EXPORT_SYMBOL_GPL(empty_zero_page);
+EXPORT_SYMBOL(zero_page_mask);
 
 /*
  * Not static inline because used by IP27 special magic initialization code
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 0c1073ed1e84..c7235e01fd67 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
 
 unsigned long empty_zero_page, zero_page_mask;
 EXPORT_SYMBOL(empty_zero_page);
+EXPORT_SYMBOL(zero_page_mask);
 
 static void __init setup_zero_pages(void)
 {
diff --git a/mm/memory.c b/mm/memory.c
index adeac306610f..d17f1bcd2a91 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -118,6 +118,8 @@ __setup("norandmaps", disable_randmaps);
 unsigned long zero_pfn __read_mostly;
 unsigned long highest_memmap_pfn __read_mostly;
 
+EXPORT_SYMBOL(zero_pfn);
+
 /*
  * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init()
  */
-- 
1.8.3.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: export symbol dependencies of is_zero_pfn()
  2014-09-12 20:17 ` Ard Biesheuvel
@ 2014-09-12 21:14   ` Andrew Morton
  -1 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2014-09-12 21:14 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: kvm, pbonzini, christoffer.dall, linux-mm, linux-s390,
	linux-kernel, linux-mips, ralf, schwidefsky, heiko.carstens

On Fri, 12 Sep 2014 22:17:23 +0200 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:

> In order to make the static inline function is_zero_pfn() callable by
> modules, export its symbol dependencies 'zero_pfn' and (for s390 and
> mips) 'zero_page_mask'.

So hexagon and score get the export if/when needed.

> We need this for KVM, as CONFIG_KVM is a tristate for all supported
> architectures except ARM and arm64, and testing a pfn whether it refers
> to the zero page is required to correctly distinguish the zero page
> from other special RAM ranges that may also have the PG_reserved bit
> set, but need to be treated as MMIO memory.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  arch/mips/mm/init.c | 1 +
>  arch/s390/mm/init.c | 1 +
>  mm/memory.c         | 2 ++

Looks OK to me.  Please include the patch in whichever tree is is that
needs it, and merge it up via that tree.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: export symbol dependencies of is_zero_pfn()
@ 2014-09-12 21:14   ` Andrew Morton
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2014-09-12 21:14 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: kvm, pbonzini, christoffer.dall, linux-mm, linux-s390,
	linux-kernel, linux-mips, ralf, schwidefsky, heiko.carstens

On Fri, 12 Sep 2014 22:17:23 +0200 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:

> In order to make the static inline function is_zero_pfn() callable by
> modules, export its symbol dependencies 'zero_pfn' and (for s390 and
> mips) 'zero_page_mask'.

So hexagon and score get the export if/when needed.

> We need this for KVM, as CONFIG_KVM is a tristate for all supported
> architectures except ARM and arm64, and testing a pfn whether it refers
> to the zero page is required to correctly distinguish the zero page
> from other special RAM ranges that may also have the PG_reserved bit
> set, but need to be treated as MMIO memory.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  arch/mips/mm/init.c | 1 +
>  arch/s390/mm/init.c | 1 +
>  mm/memory.c         | 2 ++

Looks OK to me.  Please include the patch in whichever tree is is that
needs it, and merge it up via that tree.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: export symbol dependencies of is_zero_pfn()
  2014-09-12 21:14   ` Andrew Morton
@ 2014-09-12 21:19     ` Ard Biesheuvel
  -1 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2014-09-12 21:19 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kvm, pbonzini, Christoffer Dall, linux-mm, linux-s390,
	linux-kernel, linux-mips, ralf, schwidefsky, heiko.carstens

On 12 September 2014 23:14, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 12 Sep 2014 22:17:23 +0200 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
>> In order to make the static inline function is_zero_pfn() callable by
>> modules, export its symbol dependencies 'zero_pfn' and (for s390 and
>> mips) 'zero_page_mask'.
>
> So hexagon and score get the export if/when needed.
>

Exactly.

>> We need this for KVM, as CONFIG_KVM is a tristate for all supported
>> architectures except ARM and arm64, and testing a pfn whether it refers
>> to the zero page is required to correctly distinguish the zero page
>> from other special RAM ranges that may also have the PG_reserved bit
>> set, but need to be treated as MMIO memory.
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  arch/mips/mm/init.c | 1 +
>>  arch/s390/mm/init.c | 1 +
>>  mm/memory.c         | 2 ++
>
> Looks OK to me.  Please include the patch in whichever tree is is that
> needs it, and merge it up via that tree.
>

Thanks.

@Paolo: could you please take this (with Andrew's ack), and put it
before the patch you took earlier today?

Thanks,
Ard.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: export symbol dependencies of is_zero_pfn()
@ 2014-09-12 21:19     ` Ard Biesheuvel
  0 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2014-09-12 21:19 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kvm, pbonzini, Christoffer Dall, linux-mm, linux-s390,
	linux-kernel, linux-mips, ralf, schwidefsky, heiko.carstens

On 12 September 2014 23:14, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 12 Sep 2014 22:17:23 +0200 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
>> In order to make the static inline function is_zero_pfn() callable by
>> modules, export its symbol dependencies 'zero_pfn' and (for s390 and
>> mips) 'zero_page_mask'.
>
> So hexagon and score get the export if/when needed.
>

Exactly.

>> We need this for KVM, as CONFIG_KVM is a tristate for all supported
>> architectures except ARM and arm64, and testing a pfn whether it refers
>> to the zero page is required to correctly distinguish the zero page
>> from other special RAM ranges that may also have the PG_reserved bit
>> set, but need to be treated as MMIO memory.
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  arch/mips/mm/init.c | 1 +
>>  arch/s390/mm/init.c | 1 +
>>  mm/memory.c         | 2 ++
>
> Looks OK to me.  Please include the patch in whichever tree is is that
> needs it, and merge it up via that tree.
>

Thanks.

@Paolo: could you please take this (with Andrew's ack), and put it
before the patch you took earlier today?

Thanks,
Ard.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: export symbol dependencies of is_zero_pfn()
  2014-09-12 21:19     ` Ard Biesheuvel
@ 2014-09-14 14:23       ` Paolo Bonzini
  -1 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2014-09-14 14:23 UTC (permalink / raw)
  To: Ard Biesheuvel, Andrew Morton
  Cc: kvm, Christoffer Dall, linux-mm, linux-s390, linux-kernel,
	linux-mips, ralf, schwidefsky, heiko.carstens

Il 12/09/2014 23:19, Ard Biesheuvel ha scritto:
> On 12 September 2014 23:14, Andrew Morton <akpm@linux-foundation.org> wrote:
>> On Fri, 12 Sep 2014 22:17:23 +0200 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>>> In order to make the static inline function is_zero_pfn() callable by
>>> modules, export its symbol dependencies 'zero_pfn' and (for s390 and
>>> mips) 'zero_page_mask'.
>>
>> So hexagon and score get the export if/when needed.
>>
> 
> Exactly.
> 
>>> We need this for KVM, as CONFIG_KVM is a tristate for all supported
>>> architectures except ARM and arm64, and testing a pfn whether it refers
>>> to the zero page is required to correctly distinguish the zero page
>>> from other special RAM ranges that may also have the PG_reserved bit
>>> set, but need to be treated as MMIO memory.
>>>
>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>> ---
>>>  arch/mips/mm/init.c | 1 +
>>>  arch/s390/mm/init.c | 1 +
>>>  mm/memory.c         | 2 ++
>>
>> Looks OK to me.  Please include the patch in whichever tree is is that
>> needs it, and merge it up via that tree.
>>
> 
> Thanks.
> 
> @Paolo: could you please take this (with Andrew's ack), and put it
> before the patch you took earlier today?

Yes, will do.

Paolo


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: export symbol dependencies of is_zero_pfn()
@ 2014-09-14 14:23       ` Paolo Bonzini
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2014-09-14 14:23 UTC (permalink / raw)
  To: Ard Biesheuvel, Andrew Morton
  Cc: kvm, Christoffer Dall, linux-mm, linux-s390, linux-kernel,
	linux-mips, ralf, schwidefsky, heiko.carstens

Il 12/09/2014 23:19, Ard Biesheuvel ha scritto:
> On 12 September 2014 23:14, Andrew Morton <akpm@linux-foundation.org> wrote:
>> On Fri, 12 Sep 2014 22:17:23 +0200 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>>> In order to make the static inline function is_zero_pfn() callable by
>>> modules, export its symbol dependencies 'zero_pfn' and (for s390 and
>>> mips) 'zero_page_mask'.
>>
>> So hexagon and score get the export if/when needed.
>>
> 
> Exactly.
> 
>>> We need this for KVM, as CONFIG_KVM is a tristate for all supported
>>> architectures except ARM and arm64, and testing a pfn whether it refers
>>> to the zero page is required to correctly distinguish the zero page
>>> from other special RAM ranges that may also have the PG_reserved bit
>>> set, but need to be treated as MMIO memory.
>>>
>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>> ---
>>>  arch/mips/mm/init.c | 1 +
>>>  arch/s390/mm/init.c | 1 +
>>>  mm/memory.c         | 2 ++
>>
>> Looks OK to me.  Please include the patch in whichever tree is is that
>> needs it, and merge it up via that tree.
>>
> 
> Thanks.
> 
> @Paolo: could you please take this (with Andrew's ack), and put it
> before the patch you took earlier today?

Yes, will do.

Paolo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-14 14:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 20:17 [PATCH] mm: export symbol dependencies of is_zero_pfn() Ard Biesheuvel
2014-09-12 20:17 ` Ard Biesheuvel
2014-09-12 21:14 ` Andrew Morton
2014-09-12 21:14   ` Andrew Morton
2014-09-12 21:19   ` Ard Biesheuvel
2014-09-12 21:19     ` Ard Biesheuvel
2014-09-14 14:23     ` Paolo Bonzini
2014-09-14 14:23       ` Paolo Bonzini

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.