[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/4] xen/arm: optimize the size of struct vcpu
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Mon, 29 Dec 2025 12:08:34 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.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=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=tSTLIE8bHMgEiSHrlpMrwwNtA5SbWqRVudIAsXzGG/Y=; b=R99VSZMFc5baZAawQwnoqMaIlV4j5nTUIZoGZDR4M07OXdhqUL4UTXF5D5/5SJoaMu1XZhR9tLBh7qxvWEy3LLvlQIKAv/PI6iELrg6gdzYYEN6LwUIONxfNwERRorhwGZDeN67zjFHUIYxGDHfjzFnCkSxDTVQ9f88XS5mkJDuovzpyPw1X5HImol6jolAH/y67FE48J6dV3gYntnk1eLiplXau7u/ueE2NEOXKFQSd7x6SOD1BHpXt5/YEnQng6Iy44ra8MajKEc23FL+Tdt19o2PEfv/oIOZ8zV2zBVaU9699sC6bfYvXymndi3chP7NfD86aLnWVaVhrLHOarg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OqpJGpXr2LKuONK2CmzCNgcyep2h+nG5leVlScEt9m8K2UlP+uvOaFVo5YO3fMIRr2iwPa7jI7TvCy79qih5g039OH0Sks1JrOkRETY6QdD8d2X6LXBNV5lA6wmCSQ/6vls3C7sWd3NFAn5mx404JEEs5OGTRPN9NwpQ8aUy07GnV0GpswpW7hmsgM8Ik/a78tLjdVonYPcSnQnnPISIZMwKskE31hpOgbC00Tqx/15tMRTzNcW1/Q6guxI99wtpgx5jHY30jC4eif79OVqDt88sVGyzU/RgRbKDLrMHQfMQTn3u1HfT0X4y3pl1oD5nHLkna5jWAhBwrMfOfOsm2w==
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Delivery-date: Mon, 29 Dec 2025 11:08:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 23/12/2025 18:01, 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
s/vgic_vcpu/vgic_cpu/
s/private_irq/private_irqs/
> 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).
You only touch new vGIC, so there should be no size reduction without it but the
paragraph reads as if the change affected both old and new vGIC. Also I would
mention that probably you provided the numbers based on a defconfig target.
>
> 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>
> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Other than that:
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|