On 07/01/2026 17:28, 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, the vgic member of NEW_VGIC's
> struct vgic_cpu member private_irqs is changed to a pointer to struct
> vgic_irq.
> As a result, the size of struct vcpu for Arm64 is reduced to 2176 bytes
> in the case when CONFIG_ARM_64=y and CONFIG_NEW_VGIC=y, 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).
> Note that all numbers are based on defconfig with the mentioned options
> enabled or disabled as specified.
>
> 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.
>
> As struct vcpu now fits into one page, drop MAX_PAGES_PER_VCPU.
>
> Suggested-by: Andrew Cooper <[email protected]>
> Signed-off-by: Oleksii Kurochko <[email protected]>
> Reviewed-by: Andrew Cooper <[email protected]>
> ---
> Michal gave his:
> Acked-by: Michal Orzel <[email protected]>
> But wrote to MAX_PAGES_PER_VCPU in this patch, so probably he would
> like to look at how it was done.
Looks ok, you can retain the tag.
~MichaL