[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240225090237.775573-1-r09922117@csie.ntu.edu.tw>
Date: Sun, 25 Feb 2024 17:02:36 +0800
From: Wei-Lin Chang <r09922117@...e.ntu.edu.tw>
To: maz@...nel.org,
oliver.upton@...ux.dev,
james.morse@....com,
suzuki.poulose@....com,
yuzenghui@...wei.com,
catalin.marinas@....com,
will@...nel.org
Cc: linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org,
sauravsc@...zon.com,
Wei-Lin Chang <r09922117@...e.ntu.edu.tw>
Subject: [PATCH 0/1] KVM: arm64: Affinity level 3 support
Hi everyone,
By supporting Aff3, we not only allow broader usage, but also get the
chance to fix the issue pointed out by Saurav [1]. The current code
returns 0s for GICR_TYPER[63:56], causing guests to fail when its VCPUs
tries to find a matching redistributor, when the VMM programs non-zero
values for VCPUs' MPIDR_EL1.Aff3.
For testing, both 64-bit (with ICH_VTR_EL2.A3V == 1) and 32-bit guests
are ran using QEMU, Aff3 usage is emulated by modifying reset_mpidr to
write non-zero test values to MPIDR_EL1.Aff3 when Aff3 is valid, and
populating the Aff3 field of kvm_sys_reg_set_user's user given value
if r->reg == MPIDR_EL1.
The 64-bit case is checked to have MPIDR_EL1.Aff3 populated and both
64-bit and 32-bit guests seem to work with interrupts being delivered
properly.
Note: I checked with Saurav to make sure he isn't planning on working on
this as well. Also thanks for the maintainers for giving directions for
improvements in [1].
[1]: https://lore.kernel.org/kvmarm/20240205184326.78814-1-sauravsc@amazon.com/
Wei-Lin Chang (1):
KVM: arm64: Affinity level 3 support
arch/arm64/kvm/sys_regs.c | 24 +++++++++++++++++++++---
arch/arm64/kvm/vgic/vgic-debug.c | 2 +-
arch/arm64/kvm/vgic/vgic-mmio-v3.c | 18 +++++++++++-------
include/kvm/arm_vgic.h | 7 ++++++-
4 files changed, 39 insertions(+), 12 deletions(-)
--
2.34.1
Powered by blists - more mailing lists