]> www.infradead.org Git - users/jedix/linux-maple.git/commit
irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor
authorSteven Price <steven.price@arm.com>
Wed, 2 Oct 2024 14:16:29 +0000 (15:16 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Oct 2024 16:00:40 +0000 (18:00 +0200)
commitb08e2f42e86b5848add254da45b56fc672e2bced
tree6781fa20e95cb3c366a41697e9208da23568d047
parent40d7af5375a4e27d8576d9d11954ac213d06f09e
irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor

Within a realm guest the ITS is emulated by the host. This means the
allocations must have been made available to the host by a call to
set_memory_decrypted(). Introduce an allocation function which performs
this extra call.

For the ITT use a custom genpool-based allocator that calls
set_memory_decrypted() for each page allocated, but then suballocates the
size needed for each ITT. Note that there is no mechanism implemented to
return pages from the genpool, but it is unlikely that the peak number of
devices will be much larger than the normal level - so this isn't expected
to be an issue.

Co-developed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Will Deacon <will@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/all/20241002141630.433502-2-steven.price@arm.com
drivers/irqchip/irq-gic-v3-its.c