[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/4] xen/arm: optimize the size of struct vcpu
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Tue, 23 Dec 2025 12:37:49 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=Oyn1YZ1VNLO+xTLGb2WF3f3FsP0GMakfu375KSm8j/M=; b=riL9uF2QQRKeKhK7BvHPVK0nNJhVcUipjXLowv6OoxErJrOjPJVkBYipsLV8+nL7XYORzIT4ekIGTEeUkOC/d59FakUNSEoVs4hbkYw2GYcl7uG4yw0ONqU7Zim48LxL4b3zKMpRpmvpxu0NZFJsJ45lLMp04HILjiuPvZEfmC8J15CbPD9SwipH1f3eJB97/klmd0ToWmd/gIp5shHItd8pLw2JR1YuuMDuS8GrKO6kmkBKOVA1RRQx+M+AjfCZMB3mwb4tEpvPiVt/suz/eQByzWOwZMBU3AsZifyKDS0u/I9mJ9vr0XET7NGeFJhEHHYFXpSSCoLbpeEWIiWEpw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Zp/V5QMLjTNSwgnzkj9rNOaOVwYb9a0C/ZvP2NBTw9EYxrr2UeADRFbHvwvHPxUmya9yF4Tv5yssn7WQReKTTyEqxPAh9D9s2KrxB+3m3fnQjee1nPZRKW+HEmwcxFLWu6fti7wzqVeEhI4Yi634SWhiY+aHNelDkyxtHxZSSt/WbbdIobRwtsaxKESqI7owpwhN7p76txx26s+yzbr/qOHt/M9++SxY6lW3v0i6FL+ZLulxXzwu/4ZjCgK2GhAktwcM16gsnKyAF71Tvw3voskt7urJ4c5vovTM8UNdfBZryJe5gO/pHcEHoz3Ran/3SeD0KC3ZvF9RNmcjcKtQNQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 23 Dec 2025 12:37:57 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 22/12/2025 4:40 pm, Oleksii Kurochko wrote:
> When CONFIG_NEW_VGIC=y and CONFIG_ARM_64=y, the size of struct vcpu
> exceeds one page, which requires allocating two pages and led to the
> introduction of MAX_PAGES_PER_VCPU.
>
> To remove the need for MAX_PAGES_PER_VCPU in a follow-up patch, the vgic
> member of NEW_VGIC's struct vgic_vcpu member private_irq is changed to a
> pointer to struct vgic_irq.
> As a result, the size of struct vcpu for Arm64 is reduced to 2176 bytes,
> compared to 3840 bytes (without these changes and with CONFIG_ARM_64=y)
> and 4736 bytes (without these changes and with both CONFIG_ARM_64=y and
> CONFIG_NEW_VGIC=y).
>
> Since the private_irqs member is now a pointer, vcpu_vgic_init() and
> vcpu_vgic_free() are updated to allocate and free private_irqs instance.
>
> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Oh - even smaller than I was expecting.
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
|