xemu/target-ppc
Benjamin Herrenschmidt 4656e1f012 ppc64: Rudimentary Support for extra page sizes on server CPUs
More recent Power server chips (i.e. based on the 64 bit hash MMU)
support more than just the traditional 4k and 16M page sizes.  This
can get quite complicated, because which page sizes are supported,
which combinations are supported within an MMU segment and how these
page sizes are encoded both in the SLB entry and the hash PTE can vary
depending on the CPU model (they are not specified by the
architecture).  In addition the firmware or hypervisor may not permit
use of certain page sizes, for various reasons.  Whether various page
sizes are supported on KVM, for example, depends on whether the PR or
HV variant of KVM is in use, and on the page size of the memory
backing the guest's RAM.

This patch adds information to the CPUState and cpu defs to describe
the supported page sizes and encodings.  Since TCG does not yet
support any extended page sizes, we just set this to NULL in the
static CPU definitions, expanding this to the default 4k and 16M page
sizes when we initialize the cpu state.  When using KVM, however, we
instead determine available page sizes using the new
KVM_PPC_GET_SMMU_INFO call.  For old kernels without that call, we use
some defaults, with some guesswork which should do the right thing for
existing HV and PR implementations.  The fallback might not be correct
for future versions, but that's ok, because they'll have
KVM_PPC_GET_SMMU_INFO.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-06-24 01:04:44 +02:00
..
cpu-qom.h target-ppc: QOM'ify CPU 2012-04-15 17:10:30 +02:00
cpu.h ppc64: Rudimentary Support for extra page sizes on server CPUs 2012-06-24 01:04:44 +02:00
excp_helper.c ppc: Move load and store helpers, switch to AREG0 free mode 2012-06-24 01:04:43 +02:00
fpu_helper.c ppc: Add missing break 2012-06-24 01:04:43 +02:00
helper_regs.h Replace always_inline with inline 2009-08-16 09:06:54 +00:00
helper.c ppc: Move misc helpers from helper.c to misc_helper.c 2012-06-24 01:04:43 +02:00
helper.h ppc: Move load and store helpers, switch to AREG0 free mode 2012-06-24 01:04:43 +02:00
int_helper.c ppc: Make hbrev table const 2012-06-24 01:04:43 +02:00
kvm_ppc.c Replace Qemu by QEMU in comments 2012-04-07 14:00:45 +00:00
kvm_ppc.h ppc64: Rudimentary Support for extra page sizes on server CPUs 2012-06-24 01:04:44 +02:00
kvm.c ppc64: Rudimentary Support for extra page sizes on server CPUs 2012-06-24 01:04:44 +02:00
machine.c target-ppc/machine.c: Drop unnecessary ifdefs 2012-04-15 18:23:47 +02:00
Makefile.objs ppc: Move load and store helpers, switch to AREG0 free mode 2012-06-24 01:04:43 +02:00
mem_helper.c ppc: Move load and store helpers, switch to AREG0 free mode 2012-06-24 01:04:43 +02:00
mfrom_table_gen.c fix spelling in target sub directory 2011-12-02 10:50:57 +00:00
mfrom_table.c find -type f | xargs sed -i 's/[\t ]$//g' # on most files 2007-09-16 21:08:06 +00:00
misc_helper.c ppc: Move misc helpers from helper.c to misc_helper.c 2012-06-24 01:04:43 +02:00
mmu_helper.c ppc64: Rudimentary Support for extra page sizes on server CPUs 2012-06-24 01:04:44 +02:00
STATUS Fix typos in comments (chek -> check) 2011-05-22 22:31:45 +01:00
timebase_helper.c ppc: Avoid AREG0 for timebase helpers 2012-06-24 01:04:43 +02:00
translate_init.c ppc64: Rudimentary Support for extra page sizes on server CPUs 2012-06-24 01:04:44 +02:00
translate.c ppc: Move load and store helpers, switch to AREG0 free mode 2012-06-24 01:04:43 +02:00