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

Re: [PATCH v2 3/4] xen/virtual-region: Link the list build time


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 11 Apr 2024 08:34:00 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com 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=OOI0AzJ5Cm3uEZRcOUEXrT/C+7DL70klYEtygp89xRc=; b=dh8ONskdGVNm1kv3cFQKaZjxbkdVTZ9X6tPDztwyI9Ad39ng6rsYf2d6HC2MBYzfMKH6qPEfcFQxaTITK1iQCd/OUHN2K4azVwyz/cOsZtd+MXmGqZbrxgqtyOtCPIHnycRDehGGbvsssBBcz0oP0DPebwl+RjBkxQS+2BY8ypq/hUq3YdtT26DsCWh9eVg8lstWH6JKrUsTA5gYkQS4ww1H6Zz11RyP9iuOSg70fa3Kkh3f0Bz+Qa6xKsyPzCZPwO/0ri/v2nZDB727lmASiVq1EG09eNL5OiiVoM0UYjrFIeOHGb/VfcZ80vGMkgWztA+81gdD216kWreoMs5TBQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B7MgjRMPdV6jx6A5Ak458k+skxcv/N9+8Fd8Hk7/cK5y9rY0mVwjOEfmWj/O4vm4h1qJ8MiPIdb0K3UxiJ6IKzQRRM52oXeXfQGiO2Fr4qulSvxDSPIvBQlFSOAhb5YESzGa7xBEqhM/47/G3LoHkCa6p+d6L4qwlFHDD/nYclir/+IDx2DDok1uKOuqyrZ08un8q96PjI4aSyTlPrZmfZpCtpcf3/5hKlKEkZiAf/wUkXYIrvJjTLj0hnnY/eEb7s2yaTC+sqq0sgU7XxlmpIUc+dbTomZ7Y0P+q3SWZRGORogS0uvVjCxVa/FRkfkXx67yKkUwjB3NlGyTOUgGvw==
  • Cc: Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Delivery-date: Thu, 11 Apr 2024 06:34:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Andrew,

On 10/04/2024 20:42, Andrew Cooper wrote:
> 
> 
> Given 3 statically initialised objects, its easy to link the list at build
> time.  There's no need to do it during runtime at boot (and with IRQs-off,
> even).
> 
> As a consequence, register_virtual_region() can now move inside ifdef
> CONFIG_LIVEPATCH like unregister_virtual_region().
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

Maybe with ...
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> CC: Julien Grall <julien@xxxxxxx>
> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> CC: Michal Orzel <michal.orzel@xxxxxxx>
> CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> CC: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
> CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> CC: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> 
> v2:
>  * Collect the initialisers togoether too.
> ---
>  xen/common/virtual_region.c | 37 ++++++++++++++++++++++---------------
>  1 file changed, 22 insertions(+), 15 deletions(-)
> 
> diff --git a/xen/common/virtual_region.c b/xen/common/virtual_region.c
> index 7d8bdeb61282..db3e0dc9fe74 100644
> --- a/xen/common/virtual_region.c
> +++ b/xen/common/virtual_region.c
> @@ -15,8 +15,18 @@ extern const struct bug_frame
>      __start_bug_frames_2[], __stop_bug_frames_2[],
>      __start_bug_frames_3[], __stop_bug_frames_3[];
> 
> +/*
> + * For the built-in regions, the double linked list can be constructed at
> + * build time.  Forward-declare the elements and their initialisers.
> + */
> +static struct list_head virtual_region_list;
> +static struct virtual_region core, core_init;
... empty line here for better readability

> +#define LIST_ENTRY_HEAD() { .next = &core.list,           .prev = 
> &core_init.list }
> +#define LIST_ENTRY_CORE() { .next = &core_init.list,      .prev = 
> &virtual_region_list }
> +#define LIST_ENTRY_INIT() { .next = &virtual_region_list, .prev = &core.list 
> }

~Michal



 


Rackspace

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