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

Re: [PATCH v2 2/2] xen/arm: Restrict Kconfig configuration for LLC coloring


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 17 Feb 2025 14:19:01 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1lsiV2LI2N3Y6hg3T//mmq+jVKUNMXEBUG/GwQjHkuE=; b=h09f6O103yar1rSHIpiHNV2AEkqySFKHsZBOOIcKYjTpZZ8Wora3xpnUHxWz5fdyUF1rAbNe9ml3Z6Mgc5fGxCBU+UGWjCUQ+TGOWBgezKI8Nvgo4ma27Ydjbpbbcgoc7rqf6EjUMZ6RY3b6YiIop8ICgHZjb9//R5WMF/uU68pa2s4OEtnb5GE9zfcoaLdLHf2RBZHbNLZnpbtfQuEBGlSTCbhastPAlz0SJX/HQxP6yNabnkxGRTp0A9lKT7MhaiHjNcL5gPhgUfudo0dwDVLSOF8eg+Vc4fTAdUqT6M6CvJq35nfcjTNijMx8413BDGEJJLjOP/M9qCfWHVrd1A==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1lsiV2LI2N3Y6hg3T//mmq+jVKUNMXEBUG/GwQjHkuE=; b=EDfXjTCXX7EClnS54IKHi9QHuLYnZYcztl295BgCEoLUyMalM6tMAESYTmOESml55F306JFtaO/Zu/I0PhtsX9/1dLGGNM4Rku2/QWlhTF9JPrr/l+mH5e5j7eoTrasoGp9NnhwBTZt9b6e7UfpM6tKlOibvjalah0h/aorCneqdK7Qc/Xpx61dn1XWrAmPtKsVTOpZGotpi7hUHFKtDbPlRMT95jbhuk8WoNHeaBCTzNx291qDzwbKhx3+kX0xen2Yk8RaLpStY/N2hbBGHnyJWfpxOaXZ21DjqBH7NbY44LFy+gaWG73koheA93GVJEE9tgDfnMyJ2HfPMgJtzyw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=CzKr0AearA/YJ+pnxfT+xFc8Iuvzx7EEezs8JSVSFx6RWxvTj4flax6/wWMym3YkW5il6Thi8MdymaufJW132nYY+z5Y1fqsnMxL9m8uWGFDW9FMOfoOs2wPQaQmRyreq98t45BQin5Z2JqUsR/0jNgY2RmZ1Co9os5CqO2BRnKUazCT6tubQ7jgAgsQhCAB+4/UMI4YS0XsYebawM+sYB8OGEI4+twpKgOYP79pcnNW9gVWJm2ZZpSq1FheMldIOsyTty/xRo2LzHPzx+xAWgZvptgeNwVyuIqkoCDEajkYNNE2IsajVYYySR9BkXZ3SCJJG9LNBrMJnErTYTYLhw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qUmwY/z+cSdgz/Vfm+uTE62/Xa0oeeixvivDJ/TxJWcf0NIxdnB0k94/M0NPP1i187A95AJPanUgYgbH8HeoGIHMQsPPtk3GAIH467IM9H7g4sibRvhB7GwsA6icByYMRM6HdQlWCge50mN6Tur4bL2ZZedn9u3+5KosrP7RPy908FU9IZANDLGlRWW5b5nB5ad1JE9ZSY2YH7OLu2EDtlyKqcE8vu1KjIpq0KOSFAZXRkRvgd7EUX5cTLzVTo6MndCZGfXjWvARoy5818x5RvEA6XYd5YgeH+z4hKIBqpV63TeRrmLg9BUgAUtIA8DNC+pzH2D5w5qACAe6Q+azyA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 17 Feb 2025 14:19:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHbgSalEDkpkAC1V0u42lojYRhvpLNLdAKAgAAFoQCAAAHkAIAAD84A
  • Thread-topic: [PATCH v2 2/2] xen/arm: Restrict Kconfig configuration for LLC coloring

>>>> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
>>>> index c1f2d1b89d43..91fa579e73e5 100644
>>>> --- a/xen/arch/arm/setup.c
>>>> +++ b/xen/arch/arm/setup.c
>>>> @@ -328,6 +328,7 @@ void asmlinkage __init start_xen(unsigned long 
>>>> fdt_paddr)
>>>>                             (paddr_t)(uintptr_t)(_end - _start), false);
>>>>    BUG_ON(!xen_bootmodule);
>>>> 
>>>> +    /* This parses memory banks needed for LLC coloring */
>>> this comment is confusing. It reads as if boot_fdt_info was here only for 
>>> LLC
>>> coloring. Moreover, if you add such comment here, why not adding a comment 
>>> above
>>> boot_fdt_cmdline and cmdline_parse which are hard dependency for LLC 
>>> coloring
>>> code to read LLC cmdline options parsed by llc_coloring_init?
>> 
>> Yeah I get your point, do you think we should just go with the assert or 
>> maybe add a comment
>> on top of llc_coloring_init() to say it needs to be called after 
>> boot_fdt_info and boot_fdt_cmdline
>> in order to work? Also because the assert in get_xen_paddr (llc-coloring.c) 
>> won’t be compiled on
>> a setup not having cache coloring
> TBH I would not do anything. I assume such comment would target developers. 
> Then
> why are we special casing LLC coloring and not for example boot_fdt_cmdline 
> that
> also needs to be called after boot_fdt_info to parse legacy location for
> cmdline? There are dozens of examples in start_xen where we rely on a specific
> order and developer always needs to check if rearranging is possible. Adding a
> single comment for LLC would not improve the situation and would just result 
> in
> inconsistency leading to confusion. That's why I would only consider adding an
> ASSERT but in this case, there are more things than memory bank that LLC init
> relies on.

ok, yes of course there are a lot of things that rely on the right order of 
calls, however I felt
that an optional feature like LLC would benefit for the extra documentation. In 
other cases
rearranging calls could lead to Xen not booting, but in this case (as it 
happened to me) it
was not immediately clear.

Anyway if that’s your preference I will drop the comment, I would not add the 
assert in this
commit as it feels not the right place, but I can see that in get_xen_paddr if 
mem is empty
we would not touch paddr and have a panic later, so we would notice if 
something happen.

Cheers,
Luca


 


Rackspace

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