public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: Make kvm_rebooting visible
@ 2013-08-05 22:12 Andi Kleen
  2013-08-05 22:35 ` David Daney
  2013-08-07 13:20 ` Paolo Bonzini
  0 siblings, 2 replies; 5+ messages in thread
From: Andi Kleen @ 2013-08-05 22:12 UTC (permalink / raw)
  To: gleb; +Cc: kvm, pbonzini, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

kvm_rebooting is referenced from assembler code, thus
needs to be visible.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 virt/kvm/kvm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 1580dd4..eff6abd 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -95,7 +95,7 @@ static void hardware_disable_all(void);
 
 static void kvm_io_bus_destroy(struct kvm_io_bus *bus);
 
-bool kvm_rebooting;
+__visible bool kvm_rebooting;
 EXPORT_SYMBOL_GPL(kvm_rebooting);
 
 static bool largepages_enabled = true;
-- 
1.8.3.1


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

* Re: [PATCH] kvm: Make kvm_rebooting visible
  2013-08-05 22:12 [PATCH] kvm: Make kvm_rebooting visible Andi Kleen
@ 2013-08-05 22:35 ` David Daney
  2013-08-05 22:57   ` Andi Kleen
  2013-08-07 13:20 ` Paolo Bonzini
  1 sibling, 1 reply; 5+ messages in thread
From: David Daney @ 2013-08-05 22:35 UTC (permalink / raw)
  To: Andi Kleen, Andi Kleen; +Cc: gleb, kvm, pbonzini, Linux Kernel Mailing List

On 08/05/2013 03:12 PM, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> kvm_rebooting is referenced from assembler code, thus
> needs to be visible.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>   virt/kvm/kvm_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 1580dd4..eff6abd 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -95,7 +95,7 @@ static void hardware_disable_all(void);
>
>   static void kvm_io_bus_destroy(struct kvm_io_bus *bus);
>
> -bool kvm_rebooting;
> +__visible bool kvm_rebooting;
>   EXPORT_SYMBOL_GPL(kvm_rebooting);

How many of these are there kernel wide?

Could you do something like this instead:

DEFINE_AND_EXPORT_GPL(bool, kvm_rebooting);

The definition of DEFINE_AND_EXPORT_GPL(_type, _name) is left as an 
exercise for the reader.

David Daney

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

* Re: [PATCH] kvm: Make kvm_rebooting visible
  2013-08-05 22:35 ` David Daney
@ 2013-08-05 22:57   ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2013-08-05 22:57 UTC (permalink / raw)
  To: David Daney
  Cc: Andi Kleen, Andi Kleen, gleb, kvm, pbonzini,
	Linux Kernel Mailing List

> >  static void kvm_io_bus_destroy(struct kvm_io_bus *bus);
> >
> >-bool kvm_rebooting;
> >+__visible bool kvm_rebooting;
> >  EXPORT_SYMBOL_GPL(kvm_rebooting);
> 
> How many of these are there kernel wide?

Not very many (at least on x86 allyes) <~10.
Also most users are not exported.

Probably not worth an own macro.

> 
> Could you do something like this instead:
> 
> DEFINE_AND_EXPORT_GPL(bool, kvm_rebooting);
> 
> The definition of DEFINE_AND_EXPORT_GPL(_type, _name) is left as an
> exercise for the reader.

I actually had EXPORT_SYMBOL make things always visible for a long time,
but it prevents optimizing away unused code in very small
non modular configurations. So I switched to separate annotations.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

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

* Re: [PATCH] kvm: Make kvm_rebooting visible
  2013-08-05 22:12 [PATCH] kvm: Make kvm_rebooting visible Andi Kleen
  2013-08-05 22:35 ` David Daney
@ 2013-08-07 13:20 ` Paolo Bonzini
  2013-08-07 14:47   ` Andi Kleen
  1 sibling, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2013-08-07 13:20 UTC (permalink / raw)
  To: Andi Kleen; +Cc: gleb, kvm, Andi Kleen

On 08/06/2013 12:12 AM, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> kvm_rebooting is referenced from assembler code, thus
> needs to be visible.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>   virt/kvm/kvm_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 1580dd4..eff6abd 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -95,7 +95,7 @@ static void hardware_disable_all(void);
>
>   static void kvm_io_bus_destroy(struct kvm_io_bus *bus);
>
> -bool kvm_rebooting;
> +__visible bool kvm_rebooting;
>   EXPORT_SYMBOL_GPL(kvm_rebooting);
>
>   static bool largepages_enabled = true;
>

Should this go into 3.11 too?  Or it never worked?

Paolo

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

* Re: [PATCH] kvm: Make kvm_rebooting visible
  2013-08-07 13:20 ` Paolo Bonzini
@ 2013-08-07 14:47   ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2013-08-07 14:47 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Andi Kleen, gleb, kvm, Andi Kleen

> 
> Should this go into 3.11 too?  Or it never worked?

It's ok to keep it for .12. It was broken since it was merged,
but normal builds don't trigger the problem.

-andi

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

end of thread, other threads:[~2013-08-07 14:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 22:12 [PATCH] kvm: Make kvm_rebooting visible Andi Kleen
2013-08-05 22:35 ` David Daney
2013-08-05 22:57   ` Andi Kleen
2013-08-07 13:20 ` Paolo Bonzini
2013-08-07 14:47   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox