Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1678451 > unrolled thread

[PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system

Started byDou Liyang <douly.fnst@cn.fujitsu.com>
First post2017-06-30 06:10 +0200
Last post2017-07-03 09:20 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-06-30 06:10 +0200
    Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv  system Thomas Gleixner <tglx@linutronix.de> - 2017-07-02 21:20 +0200
      Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv  system Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-07-03 06:00 +0200
        Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv  system Thomas Gleixner <tglx@linutronix.de> - 2017-07-03 09:00 +0200
          Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv  system Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-07-03 09:20 +0200

#1678451 — [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system

FromDou Liyang <douly.fnst@cn.fujitsu.com>
Date2017-06-30 06:10 +0200
Subject[PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system
Message-ID<tXVpM-np-21@gated-at.bofh.it>
xen_smp_ops overwrites smp_prepare_cpus to xen_pv_smp_prepare_cpus
which initializes interrupt itself.

Touching the intr_mode_init causes unexpected results on the system.

Bypass it in enlighten_pv system.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 arch/x86/xen/enlighten_pv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index f33eef4..d3362a3 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -1268,6 +1268,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	x86_platform.get_nmi_reason = xen_get_nmi_reason;
 
 	x86_init.resources.memory_setup = xen_memory_setup;
+	x86_init.irqs.intr_mode_init	= x86_init_noop;
 	x86_init.oem.arch_setup = xen_arch_setup;
 	x86_init.oem.banner = xen_banner;
 
-- 
2.5.5

[toc] | [next] | [standalone]


#1679552 — Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system

FromThomas Gleixner <tglx@linutronix.de>
Date2017-07-02 21:20 +0200
SubjectRe: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system
Message-ID<tYSzw-6sY-11@gated-at.bofh.it>
In reply to#1678451
On Fri, 30 Jun 2017, Dou Liyang wrote:

> xen_smp_ops overwrites smp_prepare_cpus to xen_pv_smp_prepare_cpus
> which initializes interrupt itself.
> 
> Touching the intr_mode_init causes unexpected results on the system.
> 
> Bypass it in enlighten_pv system.

So that's the wrong patch order then. You broke XEN at some point with your
changes. You need to prevent that breakage upfront not after the fact.

Thanks,

	tglx

[toc] | [prev] | [next] | [standalone]


#1679630 — Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system

FromDou Liyang <douly.fnst@cn.fujitsu.com>
Date2017-07-03 06:00 +0200
SubjectRe: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system
Message-ID<tZ0GJ-3R7-1@gated-at.bofh.it>
In reply to#1679552
Hi Thomas,

At 07/03/2017 03:18 AM, Thomas Gleixner wrote:
> On Fri, 30 Jun 2017, Dou Liyang wrote:
>
>> xen_smp_ops overwrites smp_prepare_cpus to xen_pv_smp_prepare_cpus
>> which initializes interrupt itself.
>>
>> Touching the intr_mode_init causes unexpected results on the system.
>>
>> Bypass it in enlighten_pv system.
>
> So that's the wrong patch order then. You broke XEN at some point with your
> changes. You need to prevent that breakage upfront not after the fact.

Yes, I have considered to prevent that breakage in the patchset.

Actually, Until the 11th patch, we put the intr_mode_init ahead of
time, which will break XEN.

Before the 11th patch, we just unify the code and do the preparation,
Kernel will do the intr_mode_init like before, which will have no
influence on XEN.

So we put the patch here before 11th patch.

Thanks,

	dou.

>
> Thanks,
>
> 	tglx
>
>
>

[toc] | [prev] | [next] | [standalone]


#1679681 — Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system

FromThomas Gleixner <tglx@linutronix.de>
Date2017-07-03 09:00 +0200
SubjectRe: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system
Message-ID<tZ3uW-5SC-9@gated-at.bofh.it>
In reply to#1679630
On Mon, 3 Jul 2017, Dou Liyang wrote:
> At 07/03/2017 03:18 AM, Thomas Gleixner wrote:
> > On Fri, 30 Jun 2017, Dou Liyang wrote:
> > 
> > > xen_smp_ops overwrites smp_prepare_cpus to xen_pv_smp_prepare_cpus
> > > which initializes interrupt itself.
> > > 
> > > Touching the intr_mode_init causes unexpected results on the system.
> > > 
> > > Bypass it in enlighten_pv system.
> > 
> > So that's the wrong patch order then. You broke XEN at some point with your
> > changes. You need to prevent that breakage upfront not after the fact.
> 
> Yes, I have considered to prevent that breakage in the patchset.
> 
> Actually, Until the 11th patch, we put the intr_mode_init ahead of
> time, which will break XEN.
> 
> Before the 11th patch, we just unify the code and do the preparation,
> Kernel will do the intr_mode_init like before, which will have no
> influence on XEN.
> 
> So we put the patch here before 11th patch.

Ok. That's good, but please explain it in the changelog. I had the
impression that this is fixing breakage you introduced earlier, but now
with your explanation it makes sense. So the patch order is correct.

Something like this wants to be in the changelog:

  XEN PV overrides smp_prepare_cpus(). xen_pv_smp_prepare_cpus()
  initializes interrupts in the XEN PV specific way and does not invoke
  native_smp_prepare_cpus(). As a consequence, x86_init.intr_mode_init() is
  not invoked either.

  The invocation of x86_init.intr_mode_init() will be moved from
  native_smp_prepare_cpus() in a follow up patch to solve <INSERT
  REASON/PROBLEM>.

  That move would cause the invocation of x86_init.intr_mode_init() for XEN
  PV platforms. To prevent that, override the default x86_init.intr_mode_init()
  callback with a noop().

Thanks,

	tglx

[toc] | [prev] | [next] | [standalone]


#1679689 — Re: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system

FromDou Liyang <douly.fnst@cn.fujitsu.com>
Date2017-07-03 09:20 +0200
SubjectRe: [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system
Message-ID<tZ3Oh-6fi-9@gated-at.bofh.it>
In reply to#1679681
Hi Thomas,

At 07/03/2017 02:56 PM, Thomas Gleixner wrote:
> On Mon, 3 Jul 2017, Dou Liyang wrote:
>> At 07/03/2017 03:18 AM, Thomas Gleixner wrote:
>>> On Fri, 30 Jun 2017, Dou Liyang wrote:
>>>
>>>> xen_smp_ops overwrites smp_prepare_cpus to xen_pv_smp_prepare_cpus
>>>> which initializes interrupt itself.
>>>>
>>>> Touching the intr_mode_init causes unexpected results on the system.
>>>>
>>>> Bypass it in enlighten_pv system.
>>>
>>> So that's the wrong patch order then. You broke XEN at some point with your
>>> changes. You need to prevent that breakage upfront not after the fact.
>>
>> Yes, I have considered to prevent that breakage in the patchset.
>>
>> Actually, Until the 11th patch, we put the intr_mode_init ahead of
>> time, which will break XEN.
>>
>> Before the 11th patch, we just unify the code and do the preparation,
>> Kernel will do the intr_mode_init like before, which will have no
>> influence on XEN.
>>
>> So we put the patch here before 11th patch.
>
> Ok. That's good, but please explain it in the changelog. I had the
> impression that this is fixing breakage you introduced earlier, but now
> with your explanation it makes sense. So the patch order is correct.
>
> Something like this wants to be in the changelog:
>
>   XEN PV overrides smp_prepare_cpus(). xen_pv_smp_prepare_cpus()
>   initializes interrupts in the XEN PV specific way and does not invoke
>   native_smp_prepare_cpus(). As a consequence, x86_init.intr_mode_init() is
>   not invoked either.
>
>   The invocation of x86_init.intr_mode_init() will be moved from
>   native_smp_prepare_cpus() in a follow up patch to solve <INSERT
>   REASON/PROBLEM>.
>
>   That move would cause the invocation of x86_init.intr_mode_init() for XEN
>   PV platforms. To prevent that, override the default x86_init.intr_mode_init()
>   callback with a noop().

Thank you very much for writing the changelog again.  This is really the 
true purpose which I couldn't explain clearly.

I am testing my V6 patchset, will send it out soon.

Thanks,

	dou.
>
> Thanks,
>
> 	tglx
>
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web