linux-stable/virt/kvm/arm
Marc Zyngier ccb7c81994 KVM: arm64: Fix exclusive limit for IPA size
Commit 262b003d05 upstream.

When registering a memslot, we check the size and location of that
memslot against the IPA size to ensure that we can provide guest
access to the whole of the memory.

Unfortunately, this check rejects memslot that end-up at the exact
limit of the addressing capability for a given IPA size. For example,
it refuses the creation of a 2GB memslot at 0x8000000 with a 32bit
IPA space.

Fix it by relaxing the check to accept a memslot reaching the
limit of the IPA space.

Fixes: c3058d5da2 ("arm/arm64: KVM: Ensure memslots are within KVM_PHYS_SIZE")
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org # 4.4, 4.9, 4.14, 4.19
Reviewed-by: Andrew Jones <drjones@redhat.com>
Link: https://lore.kernel.org/r/20210311100016.3830038-3-maz@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-17 16:34:35 +01:00
..
hyp KVM: arm/arm64: Do not use kern_hyp_va() with kvm_vgic_global_state 2018-07-22 14:28:50 +02:00
vgic KVM: arm: vgic: Fix limit condition when writing to GICD_I[CS]ACTIVER 2020-05-20 08:16:58 +02:00
aarch32.c KVM: arm64: Make kvm_condition_valid32() accessible from EL2 2017-06-15 09:44:58 +01:00
arch_timer.c KVM: arm/arm64: Reduce verbosity of KVM init log 2018-03-21 12:06:43 +01:00
arm.c KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block 2019-08-25 10:50:18 +02:00
mmio.c KVM: arm64: Only sign-extend MMIO up to register width 2020-02-14 16:32:08 -05:00
mmu.c KVM: arm64: Fix exclusive limit for IPA size 2021-03-17 16:34:35 +01:00
perf.c KVM: arm/arm64: Move shared files to virt/kvm/arm 2017-05-04 13:57:26 +02:00
pmu.c KVM: arm/arm64: PMU: Fix overflow interrupt injection 2017-07-25 14:18:01 +01:00
psci.c arm64: KVM: Add ARCH_WORKAROUND_2 discovery through ARCH_FEATURES_FUNC_ID 2018-07-22 14:28:52 +02:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00