[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 04/10] vpci: Refactor REGISTER_VPCI_INIT
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
- Date: Fri, 6 Jun 2025 06:29:46 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- 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=2ODpApV8++fZhni54UUkYqHUI2FmV1s3GyGW/3+zx1s=; b=pSsvbbrHDSJfw0NZ3XXep9TgkiePkhklQ5UB3dIwmVh2Yp9nqhS8+0TP4qCFnuW53MBBw0VSXrCvVzzE4ieH0oUvyB6egDI009HUPhJ9GWYRfxLEp6/eUMPSSZVGrMVFBNm3U5kjXTUlEHXGTXtzozyIgBzsLEVfSpVMpASFxewsO+OyqGBd43FbSNvxYjrF6j3PjSMwhLITKhSvov/r8zPZiPObyDivw4bJKTSbL90eeSildipoTZl9nYQeVkwMH6i69IkP/2PPw8xBZQCeX9wsFC4XTiok++kZLkL5lU14A6pL6Yyf4fbivOSehvr9Z7Koyoz8NZFZ4xg9M1jHBA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xIG+sD265Ce9bwS9m0y9/7Rl+DWEc9yuqeKJegAWpg3MCdNYnYLX/P4IxFkEzOVv1hURz0PQx1dX09DiRn23yR6tYAYM+smZLlzAMemqzKCPTSBMbv7NR+tMmMAr0YaxzkpSOixeI+DjyfbP2C2lzqjMNonnmNEhXzaRrDHi0NvIDCyaI7ZU3SPwfT/6fMcThUp4cr5POYgg/LzmPHOr8wITu+cfiHexO02GxqSN24wre92JI3rTX/g/9d23ImhVQxg+CuN0CCnj3VF9Mh2qHWF9slb6rruLYfwbMxOIHuxZeIICeTymL3mUi0c0KBaJDi7KeqzlZxk8w9Fy03L+gQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Orzel, Michal" <Michal.Orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
- Delivery-date: Fri, 06 Jun 2025 06:29:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbziMOHCuaHG697kCTYWoBETQpzrP0lKSAgAGsWwA=
- Thread-topic: [PATCH v5 04/10] vpci: Refactor REGISTER_VPCI_INIT
On 2025/6/5 20:50, Roger Pau Monné wrote:
> On Mon, May 26, 2025 at 05:45:53PM +0800, Jiqian Chen wrote:
>> + }; \
>> + static vpci_capability_t *const finit##_entry \
>> + __used_section(".data.vpci") = &finit##_t
>
> IMO this should better use .rodata instead of .data.
Is below change correct?
+ static const vpci_capability_t *const finit##_entry \
+ __used_section(".rodata") = &finit##_t
> Not that it matters much in practice, as we place it in .rodata anyway. Note
> however you will have to move the placement of the VPCI_ARRAY in the
> linker script ahead of *(.rodata.*), otherwise that section match will
> consume the vPCI data.
I am sorry, how to move it ahead of *(.rodata.*) ?
Is below change correct?
diff --git a/xen/include/xen/xen.lds.h b/xen/include/xen/xen.lds.h
index 793d0e11450c..3817642135aa 100644
--- a/xen/include/xen/xen.lds.h
+++ b/xen/include/xen/xen.lds.h
@@ -188,7 +188,7 @@
#define VPCI_ARRAY \
. = ALIGN(POINTER_ALIGN); \
__start_vpci_array = .; \
- *(SORT(.data.vpci.*)) \
+ *(.rodata) \
__end_vpci_array = .;
>
>> +
>> +#define REGISTER_VPCI_CAP(cap, finit, fclean) \
>> + REGISTER_PCI_CAPABILITY(cap, finit, fclean, false)
>> +#define REGISTER_VPCI_EXTCAP(cap, finit, fclean) \
>> + REGISTER_PCI_CAPABILITY(cap, finit, fclean, true)
>
> Since you are modifying those, can use 4 spaces as indentation?
> There's no need to have such padding.
>
> Thanks, Roger.
--
Best regards,
Jiqian Chen.
|