[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask
- To: Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Henry Wang <xin.wang2@xxxxxxx>
- Date: Fri, 8 Mar 2024 10:05:01 +0800
- 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=aWht1MNQ3Gq4RBQho9LuB0HNOJ172OUQAVl2sl/yOVc=; b=nGdNrZHyXomfRpm5fsHomH6jSGhGQA+jF+9irg3CRNesLoeOeMxi8yrzDdZKXrA6iwBEMbR61ZrkN5Ai7uWWW30mHFE0FKHE1Qy906ma1FV6T7IhGK20+Hr86018pcTZWOxlwLIXi3p0hEkf4MvDvIg21eZo/pFoxuK9AuddUuUxUwrDsDehx4WFW2FPaD6VKcxLwsAEPcb8GIbZGsvgBOtbocXD0twOGYBjsmsfnwBjX/V5iMVfK04Ofdq/ntp5pjSLvlOrq3mHcKkZh7ncJxS9e/uOtA1/y6U1oY1jyq5yiITEoqe+5k60E8cjUfOA30ShfCI7cBuAKdNM5KHm6g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VCn96wmVrCWJZXeGCR04Cq7hyzKDIdgAuQnX0i43Qy8MChoCHLFhMYYiv1va2/nPGXRFBEfYqw6O5mH28K8oKMlhH9SKI3dhft4YziXaAvNsNByMKcDt8Bdvm3P2zWB0o/TZZ62alXjmbtTSxghayjpR1zIaOezTKtvPBTC9k4iKQSVv/YKfnxYZQyUT55XYnHk8ZusVbmkuKQHDY0MoSGFNSUZ5N9u8xRcmkiqDAAf1d1iRX+0p8gkU8Q6KF9gPWQgJoTdRO+mjV8UnO019rl+hVN8WrKd153H80c3Y4JhxtuLkqQSy41ehgEaV6VtmBwhpcaU3fDVRS+76UYdZEg==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Fri, 08 Mar 2024 02:05:16 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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].
[1]
https://lore.kernel.org/xen-devel/20240228015822.56108-1-xin.wang2@xxxxxxx/
Kind regards,
Henry
~Michal
|