ARM: new VGIC: Allocate two pages for struct vcpu
authorAndre Przywara <andre.przywara@linaro.org>
Thu, 21 Dec 2017 12:41:28 +0000 (12:41 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 29 Mar 2018 17:37:25 +0000 (10:37 -0700)
commitb77d774d8274183c2252f5fbc9fa3b3b7022ba06
treef43ddadc5bef8147b63113350bcbdca587d1e343
parentbe326763e8844b8f2b4213c4f5036970e538054b
ARM: new VGIC: Allocate two pages for struct vcpu

At the moment we allocate exactly one page for struct vcpu on ARM, also
have a check in place to prevent it growing beyond 4KB.
As the struct includes the state of all 32 private (per-VCPU) interrupts,
we are at 3840 bytes on arm64 at the moment already. Growing the per-IRQ
VGIC structure even slightly makes the VCPU quickly exceed the 4K limit.
The new VGIC will need more space per virtual IRQ. I spent a few hours
trying to trim this down, but couldn't get it below 4KB, even with the
nasty hacks piling up to save some bytes here and there.
It turns out that beyond efficiency, maybe, there is no real technical
reason this struct has to fit in one page, so lifting the limit to two
pages seems like the most pragmatic solution.
Restrict the compilation error to compiling with the new VGIC and for
ARM64 only.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain.c