linux/arch
Christoffer Dall 38f791a4e4 arm64: KVM: Implement 48 VA support for KVM EL2 and Stage-2
This patch adds the necessary support for all host kernel PGSIZE and
VA_SPACE configuration options for both EL2 and the Stage-2 page tables.

However, for 40bit and 42bit PARange systems, the architecture mandates
that VTCR_EL2.SL0 is maximum 1, resulting in fewer levels of stage-2
pagge tables than levels of host kernel page tables.  At the same time,
systems with a PARange > 42bit, we limit the IPA range by always setting
VTCR_EL2.T0SZ to 24.

To solve the situation with different levels of page tables for Stage-2
translation than the host kernel page tables, we allocate a dummy PGD
with pointers to our actual inital level Stage-2 page table, in order
for us to reuse the kernel pgtable manipulation primitives.  Reproducing
all these in KVM does not look pretty and unnecessarily complicates the
32-bit side.

Systems with a PARange < 40bits are not yet supported.

 [ I have reworked this patch from its original form submitted by
   Jungseok to take the architecture constraints into consideration.
   There were too many changes from the original patch for me to
   preserve the authorship.  Thanks to Catalin Marinas for his help in
   figuring out a good solution to this challenge.  I have also fixed
   various bugs and missing error code handling from the original
   patch. - Christoffer ]

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jungseok Lee <jungseoklee85@gmail.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2014-10-14 05:48:19 -07:00
..
alpha
arc
arm arm64: KVM: Implement 48 VA support for KVM EL2 and Stage-2 2014-10-14 05:48:19 -07:00
arm64 arm64: KVM: Implement 48 VA support for KVM EL2 and Stage-2 2014-10-14 05:48:19 -07:00
avr32
blackfin
c6x
cris
frv
hexagon
ia64 KVM: remove garbage arg to *hardware_{en,dis}able 2014-08-29 16:35:55 +02:00
m32r
m68k
metag Metag architecture changes for v3.17 2014-08-13 18:18:09 -06:00
microblaze
mips KVM: remove garbage arg to *hardware_{en,dis}able 2014-08-29 16:35:55 +02:00
mn10300
openrisc
parisc
powerpc KVM: remove garbage arg to *hardware_{en,dis}able 2014-08-29 16:35:55 +02:00
s390 KVM: s390: register flic ops dynamically 2014-09-17 13:10:09 +02:00
score
sh Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-08-11 07:14:01 -07:00
sparc sparc: Hook up memfd_create system call. 2014-08-13 22:00:09 -07:00
tile
um
unicore32
x86 kvm: Make init_rmode_identity_map() return 0 on success. 2014-09-17 13:10:12 +02:00
xtensa
.gitignore
Kconfig