All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mirela Simonovic <mirela.simonovic@aggios.com>
To: Julien Grall <julien.grall@arm.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 6/7] xen/arm: Setup virtual paging for secondary CPUs in non-boot scenario
Date: Wed, 18 Apr 2018 12:34:32 +0200	[thread overview]
Message-ID: <CAKPH-NhiT0-gEr09qNL5KpMhN3LP4qsuuty8MhQa0gjp7EdgiA@mail.gmail.com> (raw)
In-Reply-To: <066edebf-ef75-2689-ff7d-c968972db450@arm.com>

Hi Julien,

On Wed, Apr 18, 2018 at 11:48 AM, Julien Grall <julien.grall@arm.com> wrote:
>
>
> On 17/04/18 16:22, Mirela Simonovic wrote:
>>
>> Hi Julien,
>>
>> On Tue, Apr 17, 2018 at 4:11 PM, Julien Grall <julien.grall@arm.com>
>> wrote:
>>>
>>>
>>>
>>> On 17/04/18 13:54, Mirela Simonovic wrote:
>>>>
>>>>
>>>> Hi Julien,
>>>
>>>
>>>
>>> Hi,
>>>
>>>>
>>>> On Wed, Apr 11, 2018 at 5:11 PM, Julien Grall <julien.grall@arm.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> On 11/04/18 14:19, Mirela Simonovic wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> In existing code the paging for secondary CPUs is setup only in boot
>>>>>> flow.
>>>>>> The setup is triggered from start_xen function after all CPUs are
>>>>>> brought
>>>>>> online. In other words, the initialization of VTCR_EL2 register is
>>>>>> done
>>>>>> out of the cpu_up/start_secondary control flow. However, the cpu_up
>>>>>> flow
>>>>>> should be self-contained - it should fully initialize a secondary CPU,
>>>>>> because the cpu_up is used not only to bring a secondary CPU online on
>>>>>> boot, but also to hotplug a CPU during the system resume.
>>>>>> With this patch the setting of paging is triggered from
>>>>>> start_secondary
>>>>>> function if the current system state is not boot. This way, the paging
>>>>>> will be setup in non-boot scenarios, while the setup in boot scenario
>>>>>> remains unchanged.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I am afraid that this is not correct. You can't assume that value
>>>>> chosen
>>>>> for
>>>>> VTCR by Xen at boot will fit this new CPU. So you have to check it is
>>>>> fine
>>>>> or park the CPU if there are any issue.
>>>>>
>>>>
>>>> This is not a new CPU. This CPU already went through its boot sequence
>>>> and it reached the resume point because it does fit the value chosen
>>>> for VTCR by Xen.
>>>> If it wouldn't fit the chosen value for VTCR it would be parked so it
>>>> wouldn't participate in suspend/resume. Please let me know if I
>>>> misunderstood your comment.
>>>
>>>
>>>
>>> This is not a new CPU for your use case. However your commit message
>>> speak about "non-boot" CPU bring-up. So for me this is more than
>>> suspend/resume, it is about bringing-up CPU at any time.
>>>
>>
>> Use case you're trying to cover is hotplugging a CPU after the boot is
>> done in bit.LITTLE system, and that CPU wasn't initially brought
>> online (on boot). Right?
>
>
> That's right. It is how I understood your commit title.
>
>>
>>> As those CPUs can't participate to the decision (it is too late), you
>>> need to make sure the VTCR will fit on that CPU.
>>>
>>
>> Could you please point me to the location in sources where this is
>> done on boot? I mean checking compliance with chosen VTCR value and
>> parking CPU if it doesn't fit.
>
>
> At the moment all CPUs are brought up during Xen boot. So what we do is find
> the small PA range that will accommodate all the onlined CPUs (see
> setup_virt_paging).
>
> So there are no parking required at the moment. However, if you start
> bringing-up new CPUs after boot. Then you have to check they will be able to
> handle the values chosen at boot.
>
> As you pointed out, this might not be necessary for the suspend/resume case.
> So I am not asking you to implement that. However, please make sure the
> commit message clearly spell out that you bringing up secondary CPU after
> Xen has boot only covers the suspend/resume case.
>

I'll fix the commit title, thanks.

> 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-18 10:34 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 [this message]
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
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=CAKPH-NhiT0-gEr09qNL5KpMhN3LP4qsuuty8MhQa0gjp7EdgiA@mail.gmail.com \
    --to=mirela.simonovic@aggios.com \
    --cc=dm@aggios.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=julien.grall@arm.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.