All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Mirela Simonovic <mirela.simonovic@aggios.com>
Cc: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Davorin Mista <dm@aggios.com>,
	Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 0/7] xen/arm: CPU hotplug fixes
Date: Thu, 12 Apr 2018 09:43:17 +0100	[thread overview]
Message-ID: <b70f2bc6-9fcd-880b-d891-236e0e92e0c4@arm.com> (raw)
In-Reply-To: <CAKPH-Ng+4QM+06msM1cxJpQ5uRvsRWc6Y1mhotPXRdF4nvh0aA@mail.gmail.com>



On 11/04/18 17:37, Mirela Simonovic wrote:
> Hi Julien,

Hi,

May I ask you to configure your mail client to use > for quoting and use 
plain text? Otherwise, this is going to be really difficult to follow 
the discussion after few round (see already below).

> On Wed, Apr 11, 2018 at 6:02 PM, Julien Grall <julien.grall@arm.com 
> <mailto:julien.grall@arm.com>> wrote:
> 
>     Hi,
> 
>     On 11/04/18 16:58, Mirela Simonovic wrote:
> 
>         On 04/11/2018 05:07 PM, Julien Grall wrote:
> 
>             On 11/04/18 14:19, Mirela Simonovic wrote:
> 
>         Migrating interrupts when turning off a CPU already works.
>         However, when a CPU is turned back on there is no interrupt
>         migration back to the hotplugged CPU - all interrupts will
>         remain routed to the CPU#0.
>         Patch 7/7 fixes this
> 
> 
>     What do you mean by all interrupts? Interrupts routed to guest will
>     always follow the vCPU. So are you sure they are going to be
>     migrated when that vCPU is paused/off?
> 
> 
> Just to make sure we're on the same page - this is about hotplugging 
> physical CPUs. Hotplugging vCPUs using virtual PSCI CPU_OFF interface is 
> already implemented and unrelated to this series.

Yes, we are on the same page :). I was just wondering what happen to 
interrupt routed to that pCPU.

> 
> Assuming that system has 2 pCPUs by 'all interrupts' I mean interrupts 
> that were targeted to the pCPU#0 and pCPU#1 prior to doing any hotplug.
> 
> For example, if a guest is pinned to pCPU#1 an interrupt of a device it 
> owns will be targeted to pCPU#1.
> When pCPU#1 is turned off that interrupt will be migrated to pCPU#0. 
> pCPU#0 finalizes the suspend and receives wake-up interrupts. However, 
> when CPU#1 is turned back on that interrupt will remain targeted to the 
> CPU#0, which I assumed is wrong.
> The scenario described here is also how I tested this.
> 
>     Can you give the path in Xen doing that?
> 
> 
> Sure, here is a backtrace (dumped on the CPU being turned off):
>      0  0x2603dc arch_move_irqs(): vgic.c, line 309
>      1  0x22ee58 sched_move_irqs()+20: schedule.c, line 303
>      2  0x2318e8 cpu_disable_scheduler()+1000: schedule.c, line 586
>      3  0x2318e8 cpu_disable_scheduler()+1000: schedule.c, line 586
>      4  0x25aff8 __cpu_disable()+96: smpboot.c, line 386
>      5  0x201608 take_cpu_down()+52: cpu.c, line 75
>      6  0x23426c stopmachine_action()+188: stop_machine.c, line 159
>      7  0x235858 do_tasklet_work()+176: tasklet.c, line 94
>      8  0x235c80 do_tasklet()+104: tasklet.c, line 126
>      9  0x24daec idle_loop()+144: domain.c, line 72
>     10  0x25b1f8 start_secondary()+404: smpboot.c, line 368


So this cover interrupt routed to a virtual CPU. However, this does not 
handle interrupts used by Xen. How do you handle them?

For instance SMMUs IRQ might be routed to other interrupt than CPU #0.

[...]

> 
>     If the former, it would be nice to get the code you used. If the
>     latter, then having a hack patch to test that code would be nice.
>     Ideally, you want to plug that in the SYSCTL interface for
>     out-of-box testing.
> 
> 
> Ok, I have never used that but I'll try to figure it out. I may come up 
> with additional questions.

You might want to have a look at the x86 version XEN_SYSCTL_cpu_hotplug 
in x86/systcl.c.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-04-12  8:43 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 13:19 [PATCH 0/7] xen/arm: CPU hotplug fixes Mirela Simonovic
2018-04-11 13:19 ` [PATCH 1/7] xen/arm: Added handling of the trapped access to OSLSR register Mirela Simonovic
2018-04-11 14:39   ` Julien Grall
2018-04-11 23:28     ` Stefano Stabellini
2018-04-11 13:19 ` [PATCH 2/7] xen/arm/vgic-v2: Ignore write to GICD_ISACTIVERn registers Mirela Simonovic
2018-04-11 14:43   ` Julien Grall
2018-04-11 23:31     ` Stefano Stabellini
2018-04-12 11:15       ` Mirela Simonovic
2018-04-11 13:19 ` [PATCH 3/7] xen/arm/psci: Implement CPU_OFF PSCI call (physical interface) Mirela Simonovic
2018-04-11 14:46   ` Julien Grall
2018-04-12 11:33     ` Mirela Simonovic
2018-04-12 13:31       ` Julien Grall
2018-04-16 10:02         ` Mirela Simonovic
2018-04-16 14:26           ` Julien Grall
2018-04-16 16:52             ` Mirela Simonovic
2018-04-16 17:02               ` Julien Grall
2018-04-11 13:19 ` [PATCH 4/7] xen/arm: When CPU dies, free percpu area immediatelly Mirela Simonovic
2018-04-11 14:53   ` Julien Grall
2018-04-11 23:46     ` Stefano Stabellini
2018-04-12  8:53       ` Julien Grall
2018-04-12 21:31         ` Stefano Stabellini
2018-04-16 13:14           ` Julien Grall
2018-04-16 13:41             ` Mirela Simonovic
2018-04-16 15:21               ` Julien Grall
2018-04-17 10:52                 ` Mirela Simonovic
2018-04-17 11:02                   ` Julien Grall
2018-04-18 22:52                     ` Stefano Stabellini
2018-04-19  9:32                       ` Julien Grall
2018-04-11 13:19 ` [PATCH 5/7] xen/arm: Remove __initdata and __init to enable CPU hotplug Mirela Simonovic
2018-04-12  0:07   ` Stefano Stabellini
2018-04-12  9:03     ` Julien Grall
2018-04-12 12:50       ` Mirela Simonovic
2018-04-12 12:56         ` Julien Grall
2018-04-12 13:55           ` Mirela Simonovic
2018-04-11 13:19 ` [PATCH 6/7] xen/arm: Setup virtual paging for secondary CPUs in non-boot scenario Mirela Simonovic
2018-04-11 15:11   ` Julien Grall
2018-04-17 12:54     ` Mirela Simonovic
2018-04-17 14:11       ` Julien Grall
2018-04-17 15:22         ` Mirela Simonovic
2018-04-18  9:48           ` Julien Grall
2018-04-18 10:34             ` Mirela Simonovic
2018-04-18 10:45         ` Mirela Simonovic
2018-04-18 10:58           ` Julien Grall
2018-04-18 22:56             ` Stefano Stabellini
2018-04-11 13:19 ` [PATCH 7/7] xen/arm: Restore IRQ affinity after hotplugging a CPU Mirela Simonovic
2018-04-11 14:55   ` Julien Grall
2018-04-12  0:20   ` Stefano Stabellini
2018-04-12  7:38     ` Mirela Simonovic
2018-04-12 16:49   ` Dario Faggioli
2018-04-13 10:11     ` Mirela Simonovic
2018-04-16 12:38       ` Dario Faggioli
2018-04-11 15:07 ` [PATCH 0/7] xen/arm: CPU hotplug fixes Julien Grall
2018-04-11 15:58   ` Mirela Simonovic
2018-04-11 16:02     ` Julien Grall
2018-04-11 16:37       ` Mirela Simonovic
2018-04-12  8:43         ` Julien Grall [this message]
2018-04-13 10:19           ` Mirela Simonovic
2018-04-16 11:33             ` Julien Grall
2018-04-16 14:06               ` Mirela Simonovic
2018-04-16 15:05                 ` Julien Grall
2018-04-11 15:13 ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b70f2bc6-9fcd-880b-d891-236e0e92e0c4@arm.com \
    --to=julien.grall@arm.com \
    --cc=dm@aggios.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=mirela.simonovic@aggios.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.