[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask


  • To: Henry Wang <xin.wang2@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 8 Mar 2024 09:34:06 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5hmyfLLKk0cdTvnFCYAQ7vqWbo640poNRGcfmE9g+r4=; b=Zr0BaCyYC31kKTk5kumbmaY2alCMxq/ICiKwhrRC4WNeggAimGVPDuHdg3Q0U578XKtVxeGKXWa+IUWCblhH/gMsmAfozOjoeWQYkHK0yH7KbscDiUsKoShUWP8vcpImNCdQn2mZea3MvfRmW2xVedEkjm0k8j6+w6Qx3I3dp+3twtybqWnkTLpgXl9v0xmKBWIb2uhH7cmopLcRdgxfQyfztVZUidTcF8BNOMK3ICprZwCS27Q8o93KlBbakuRuC6UBF1BLY9ZL3YEU9gUcU8bk0OlqFarF3ATXujOAd6VarEKcPdgFGAOSGm1dOT+OCMaZVXinA9jD3S/i0JLrdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uuss416UppmybuDGVMWsM9cCNsVXNnShImPsLUELW79Bl2sCiI45D9EKio35Y3pauc7L8f6i4ANrxBaNiQ5qH0yRZQeunf27d4DQfNbZ2TPVQjjUXfnfFuHP7ON7q2keBpKwHXx4QHlQHYLdQiFCzhJVD6omdzqXgRuO02xXGuk2uSk/JHi39Sx3dseV57WjGH/Hn0BluV67f2iQOVJ1AnOtDm+58i+6P4HsAvXsxkVrjxYRUvlTfZwQYbvzpbLuksGh0QlXlMlG2dYvsI1VMz8gOe6Ws/Imf/mzerTskm9EoJAzacneKpkThE4NFMeITKQdlMJSJe+4lmeGxLq19g==
  • Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 08 Mar 2024 08:34:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Henry,

On 08/03/2024 03:05, Henry Wang wrote:
> Hi everyone,
> 
> On 2/26/2024 6:43 PM, Michal Orzel wrote:
>>>>>   xen/arch/arm/smpboot.c | 6 +++++-
>>>>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>>>>
>>>>> +    /* PE not implemented using a multithreading type approach. */
>>>>> +    if ( system_cpuinfo.mpidr.mt == 0 )
>>>> Do we need this check? It mt was true, cpu_sibling_mask would be incorrect
>>>> anyway (it would still be 1).
>>> I added this check for playing safe, because I only want to do the correct 
>>> thing
>>> in this patch and avoid make things worse for MT case. With this patch, 
>>> non-MT
>>> case can be improved and the MT case is remain unchanged.
>>>
>>> But I agree with you, and I would be more than happy if I can run a MT 
>>> setup and
>>> finish the "else" part with this patch or follow-ups. Do you know maybe 
>>> qemu can
>>> allow me to emulate a MT setup so that I can fix it properly in v2? Thanks!
>> A65 is the only Arm CPU with SMT and I'm not aware of Qemu being able to 
>> emulate it.
>> AFAICT, in Xen on Arm we assume no SMT, hence my question about your check. 
>> With or without it,
>> some parts would still be incorrect (like cpu_sibling_mask), so what's the 
>> point in having a partial check.
>> I would keep your solution without the check. Others may have a different 
>> opinion though.
> 
> Since there isn't much discussion followed-up in this thread, I am 
> wondering do we have more inputs/opinions on this topic? If everyone 
> agrees, I've followed Michal's suggestion in v2 [1].
I clearly forgot to say in v2 that I'm ok with this change, so:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.