All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled
@ 2015-08-20 12:04 Jan Beulich
  2015-08-31 19:19 ` Boris Ostrovsky
  2015-08-31 19:19 ` Boris Ostrovsky
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2015-08-20 12:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Boris Ostrovsky, Alok Kataria, David Vrabel

While commit 4cca6ea04d31c claims to not have any functional effect on
Xen, this isn't the case: Before that change, kernels built without
CONFIG_XEN_PVHVM (a dependency which meanwhile became just CONFIG_XEN)
were able to run in x2APIC mode just fine. Restore that behavior.

This, however, still doesn't fix the case where CONFIG_HYPERVISOR_GUEST
is not enabled, but I suppose this may be regarded as intentional.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
The patch is RFC solely because the way the issue gets fixed doesn't
look very neat, but I couldn't figure out a better way.
---
 arch/x86/kernel/cpu/hypervisor.c |    4 ++++
 1 file changed, 4 insertions(+)

--- 4.2-rc7/arch/x86/kernel/cpu/hypervisor.c
+++ 4.2-rc7-x86-xen-x2apic-available/arch/x86/kernel/cpu/hypervisor.c
@@ -81,6 +81,10 @@ void __init init_hypervisor_platform(voi
 
 bool __init hypervisor_x2apic_available(void)
 {
+#ifndef CONFIG_XEN
+	if (xen_x2apic_para_available())
+		return true;
+#endif
 	return x86_hyper                   &&
 	       x86_hyper->x2apic_available &&
 	       x86_hyper->x2apic_available();

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

* Re: [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled
  2015-08-20 12:04 [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled Jan Beulich
@ 2015-08-31 19:19 ` Boris Ostrovsky
  2015-09-01  6:45   ` Jan Beulich
  2015-09-01  6:45   ` Jan Beulich
  2015-08-31 19:19 ` Boris Ostrovsky
  1 sibling, 2 replies; 5+ messages in thread
From: Boris Ostrovsky @ 2015-08-31 19:19 UTC (permalink / raw)
  To: Jan Beulich, xen-devel
  Cc: David Vrabel, Konrad Rzeszutek Wilk, Alok Kataria,
	H. Peter Anvin, Ingo Molnar, Thomas Gleixner,
	Linux Kernel Mailing List

On 08/20/2015 08:04 AM, Jan Beulich wrote:
> While commit 4cca6ea04d31c claims to not have any functional effect on
> Xen, this isn't the case: Before that change, kernels built without
> CONFIG_XEN_PVHVM (a dependency which meanwhile became just CONFIG_XEN)
> were able to run in x2APIC mode just fine. Restore that behavior.
>
> This, however, still doesn't fix the case where CONFIG_HYPERVISOR_GUEST
> is not enabled, but I suppose this may be regarded as intentional.
>
> Signed-off-by: Jan Beulich<jbeulich@suse.com>
> ---
> The patch is RFC solely because the way the issue gets fixed doesn't
> look very neat, but I couldn't figure out a better way.

(+ x86 maintainers)

Can we provide something like xen_stub.c (that will have its own 
x86_hyper ops, probably only x2apic_available and maybe detect) which is 
built when !CONFIG_XEN?

Otherwise I see little reason to keep x2apic_available op and we should 
revert the portion of 4cca6ea04d31c that introduced it.

-boris

> ---
>   arch/x86/kernel/cpu/hypervisor.c |    4 ++++
>   1 file changed, 4 insertions(+)
>
> --- 4.2-rc7/arch/x86/kernel/cpu/hypervisor.c
> +++ 4.2-rc7-x86-xen-x2apic-available/arch/x86/kernel/cpu/hypervisor.c
> @@ -81,6 +81,10 @@ void __init init_hypervisor_platform(voi
>   
>   bool __init hypervisor_x2apic_available(void)
>   {
> +#ifndef CONFIG_XEN
> +	if (xen_x2apic_para_available())
> +		return true;
> +#endif
>   	return x86_hyper                   &&
>   	       x86_hyper->x2apic_available &&
>   	       x86_hyper->x2apic_available();
>
>
>


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

* Re: [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled
  2015-08-20 12:04 [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled Jan Beulich
  2015-08-31 19:19 ` Boris Ostrovsky
@ 2015-08-31 19:19 ` Boris Ostrovsky
  1 sibling, 0 replies; 5+ messages in thread
From: Boris Ostrovsky @ 2015-08-31 19:19 UTC (permalink / raw)
  To: Jan Beulich, xen-devel
  Cc: Linux Kernel Mailing List, Ingo Molnar, David Vrabel,
	H. Peter Anvin, Alok Kataria, Thomas Gleixner

On 08/20/2015 08:04 AM, Jan Beulich wrote:
> While commit 4cca6ea04d31c claims to not have any functional effect on
> Xen, this isn't the case: Before that change, kernels built without
> CONFIG_XEN_PVHVM (a dependency which meanwhile became just CONFIG_XEN)
> were able to run in x2APIC mode just fine. Restore that behavior.
>
> This, however, still doesn't fix the case where CONFIG_HYPERVISOR_GUEST
> is not enabled, but I suppose this may be regarded as intentional.
>
> Signed-off-by: Jan Beulich<jbeulich@suse.com>
> ---
> The patch is RFC solely because the way the issue gets fixed doesn't
> look very neat, but I couldn't figure out a better way.

(+ x86 maintainers)

Can we provide something like xen_stub.c (that will have its own 
x86_hyper ops, probably only x2apic_available and maybe detect) which is 
built when !CONFIG_XEN?

Otherwise I see little reason to keep x2apic_available op and we should 
revert the portion of 4cca6ea04d31c that introduced it.

-boris

> ---
>   arch/x86/kernel/cpu/hypervisor.c |    4 ++++
>   1 file changed, 4 insertions(+)
>
> --- 4.2-rc7/arch/x86/kernel/cpu/hypervisor.c
> +++ 4.2-rc7-x86-xen-x2apic-available/arch/x86/kernel/cpu/hypervisor.c
> @@ -81,6 +81,10 @@ void __init init_hypervisor_platform(voi
>   
>   bool __init hypervisor_x2apic_available(void)
>   {
> +#ifndef CONFIG_XEN
> +	if (xen_x2apic_para_available())
> +		return true;
> +#endif
>   	return x86_hyper                   &&
>   	       x86_hyper->x2apic_available &&
>   	       x86_hyper->x2apic_available();
>
>
>

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

* Re: [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled
  2015-08-31 19:19 ` Boris Ostrovsky
@ 2015-09-01  6:45   ` Jan Beulich
  2015-09-01  6:45   ` Jan Beulich
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2015-09-01  6:45 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: David Vrabel, Thomas Gleixner, xen-devel, Konrad Rzeszutek Wilk,
	Ingo Molnar, Linux Kernel Mailing List, Alok Kataria,
	H. Peter Anvin

>>> On 31.08.15 at 21:19, <boris.ostrovsky@oracle.com> wrote:
> On 08/20/2015 08:04 AM, Jan Beulich wrote:
>> While commit 4cca6ea04d31c claims to not have any functional effect on
>> Xen, this isn't the case: Before that change, kernels built without
>> CONFIG_XEN_PVHVM (a dependency which meanwhile became just CONFIG_XEN)
>> were able to run in x2APIC mode just fine. Restore that behavior.
>>
>> This, however, still doesn't fix the case where CONFIG_HYPERVISOR_GUEST
>> is not enabled, but I suppose this may be regarded as intentional.
>>
>> Signed-off-by: Jan Beulich<jbeulich@suse.com>
>> ---
>> The patch is RFC solely because the way the issue gets fixed doesn't
>> look very neat, but I couldn't figure out a better way.
> 
> (+ x86 maintainers)
> 
> Can we provide something like xen_stub.c (that will have its own 
> x86_hyper ops, probably only x2apic_available and maybe detect) which is 
> built when !CONFIG_XEN?
> 
> Otherwise I see little reason to keep x2apic_available op and we should 
> revert the portion of 4cca6ea04d31c that introduced it.

Actually I've considered that last option too, but it seemed no neater
than the presented patch (yet imo better than introducing a stub file).

Jan


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

* Re: [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled
  2015-08-31 19:19 ` Boris Ostrovsky
  2015-09-01  6:45   ` Jan Beulich
@ 2015-09-01  6:45   ` Jan Beulich
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2015-09-01  6:45 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Linux Kernel Mailing List, Ingo Molnar, David Vrabel,
	H. Peter Anvin, xen-devel, Thomas Gleixner, Alok Kataria

>>> On 31.08.15 at 21:19, <boris.ostrovsky@oracle.com> wrote:
> On 08/20/2015 08:04 AM, Jan Beulich wrote:
>> While commit 4cca6ea04d31c claims to not have any functional effect on
>> Xen, this isn't the case: Before that change, kernels built without
>> CONFIG_XEN_PVHVM (a dependency which meanwhile became just CONFIG_XEN)
>> were able to run in x2APIC mode just fine. Restore that behavior.
>>
>> This, however, still doesn't fix the case where CONFIG_HYPERVISOR_GUEST
>> is not enabled, but I suppose this may be regarded as intentional.
>>
>> Signed-off-by: Jan Beulich<jbeulich@suse.com>
>> ---
>> The patch is RFC solely because the way the issue gets fixed doesn't
>> look very neat, but I couldn't figure out a better way.
> 
> (+ x86 maintainers)
> 
> Can we provide something like xen_stub.c (that will have its own 
> x86_hyper ops, probably only x2apic_available and maybe detect) which is 
> built when !CONFIG_XEN?
> 
> Otherwise I see little reason to keep x2apic_available op and we should 
> revert the portion of 4cca6ea04d31c that introduced it.

Actually I've considered that last option too, but it seemed no neater
than the presented patch (yet imo better than introducing a stub file).

Jan

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

end of thread, other threads:[~2015-09-01  6:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20 12:04 [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled Jan Beulich
2015-08-31 19:19 ` Boris Ostrovsky
2015-09-01  6:45   ` Jan Beulich
2015-09-01  6:45   ` Jan Beulich
2015-08-31 19:19 ` Boris Ostrovsky

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.