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

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


  • To: Michal Orzel <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Mon, 26 Feb 2024 18:54:45 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.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=OTcY3MjSx4LU/IzmIoFgBTZJC2kZ2k0EUf/dwknBL7I=; b=YfpQYa5zZqQru/vswb/gHsFEgkLPrZzWurwsCuIjdNErJAZ7BANrh+8kMvwkQnwgElD8f/h6/+vwWD/3i0fOEc3Scc04rhGaHn1hWdnuo6j6Lpw+hq1uXKrON2hJhTID1so2YlsYZ3No5NdTJtE5/kGt81YAiFroMs9vWv+8oIQd5MQGRtBnxXRzTfieyIhIXGLbesI5ka6rtYDA4LJuXbFc5SiBgS6dEXitOdooAuwepL2fdX+7KWOLLy9c4EU5l+jFbpOnf1tC7Z1L8hwzX8C1J1PvSqVfftdJSzMHaOmYeUnTaVmwu87VI1+Ko7HxgVv8Yqx0s4IKeNAEql38zA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=faUl4LFR8YwFVwKmcrgDE5FPKpzzi4tKyqhMrdxyi7Fqw1XABY8m6kxshSub0v4rgGQqGohOqKqZWa1H/hjiI5GQDVgISytxiVyRXfKMRDvitXY07+MMZDSFBEK+rYNQJyteVyL5Wg4Hrm/6N3c6+bBRK1TKqktuFCjWvCum9O3ThFJ8P5TpuIWed8/RwMGvm33TParFYzJWUkz0GZ4V52AiC0Uii53XsV2nsY1izwAaG+YB6FLk210zcFjqE6qppsba2Pq9/s56pI0ZPsXqGbMwpswA7MAUVGe+FufxotMOhyIJ/ORfJ1pkFZKjNBZA+N6QX88FV5HfFma7tu9XxQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 26 Feb 2024 10:55:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Michal,

On 2/26/2024 6:43 PM, Michal Orzel wrote:
On 26/02/2024 10:54, Wang, Henry 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.

You made a point. So I think we can wait a bit more for others to share their thoughts and I will change accordingly after.

Just taking a note from the chat that we just had - maybe remove the if check and add an ASSERT() of the non-MT would also be a good idea (not sure if this change will break some existing HW setups though).

Kind regards,
Henry

~Michal




 


Rackspace

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