kernel_optimize_test/virt/kvm/arm
Suzuki K Poulose 0f62f0e95b kvm: arm64: Set a limit on the IPA size
So far we have restricted the IPA size of the VM to the default
value (40bits). Now that we can manage the IPA size per VM and
support dynamic stage2 page tables, we can allow VMs to have
larger IPA. This patch introduces a the maximum IPA size
supported on the host. This is decided by the following factors :

 1) Maximum PARange supported by the CPUs - This can be inferred
    from the system wide safe value.
 2) Maximum PA size supported by the host kernel (48 vs 52)
 3) Number of levels in the host page table (as we base our
    stage2 tables on the host table helpers).

Since the stage2 page table code is dependent on the stage1
page table, we always ensure that :

  Number of Levels at Stage1 >= Number of Levels at Stage2

So we limit the IPA to make sure that the above condition
is satisfied. This will affect the following combinations
of VA_BITS and IPA for different page sizes.

  Host configuration | Unsupported IPA ranges
  39bit VA, 4K       | [44, 48]
  36bit VA, 16K      | [41, 48]
  42bit VA, 64K      | [47, 52]

Supporting the above combinations need independent stage2
page table manipulation code, which would need substantial
changes. We could purse the solution independently and
switch the page table code once we have it ready.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-03 11:44:55 +01:00
..
hyp kvm/arm fixes for 4.16, take 2 2018-03-19 17:43:01 +00:00
vgic vgic: Add support for 52bit guest physical address 2018-10-01 13:50:32 +01:00
aarch32.c kvm/arm: use PSR_AA32 definitions 2018-07-05 17:24:15 +01:00
arch_timer.c KVM: arm/arm64: Fix lost IRQs from emulated physcial timer when blocked 2018-07-31 07:53:20 +01:00
arm.c kvm: arm64: Set a limit on the IPA size 2018-10-03 11:44:55 +01:00
mmio.c KVM: Fix stack-out-of-bounds read in write_mmio 2017-12-18 12:57:01 +01:00
mmu.c kvm: arm/arm64: Prepare for VM specific stage2 translations 2018-10-01 13:50:30 +01:00
perf.c
pmu.c KVM: arm64: Rewrite system register accessors to read/write functions 2018-03-19 10:53:16 +00:00
psci.c sched/swait: Rename to exclusive 2018-06-20 11:35:56 +02:00
trace.h KVM: Remove obsolete kvm_unmap_hva notifier backend 2018-09-07 15:06:02 +02:00