qemu-e2k/target-ppc
David Gibson f36951c19f pseries: Fix incorrect calculation of RMA size in certain configurations
For the pseries machine, we need to advertise to the guest the size of its
RMA - that is the amount of memory it can access with the MMU off.  For HV
KVM, this is constrained by the hardware limitations on the virtual RMA of
one hash PTE per PTE group in the hash page table.  We already had code to
calculate this, but it was assuming the VRMA page size was the same as the
(host) backing page size for guest RAM.

In the case of a host kernel configured for 64k base page size, but running
on hardware (or firmware) which only allows 4k pages, the hose will do all
its allocations with a 64k page size, but still use 4k hardware pages for
actual mappings.  Usually that's transparent to things running under the
host, but in the case of the maximum VRMA size it's not.

This patch refines the RMA size calculation to instead use the largest
available hardware page size (as reported by the SMMU_INFO call) which is
less than or equal to the backing page size.  This now gives the correct
RMA size in all cases I've tested.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26 23:02:41 +02:00
..
cpu-models.c target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
cpu-models.h target-ppc: Move CPU aliases out of translate_init.c 2013-03-08 21:04:53 +01:00
cpu-qom.h target-ppc: Use QOM method dispatch for MMU fault handling 2013-03-22 15:28:53 +01:00
cpu.h PPC: Remove env->hreset_excp_prefix 2013-04-26 23:02:40 +02:00
excp_helper.c cpu: Replace do_interrupt() by CPUClass::do_interrupt method 2013-03-12 10:35:55 +01:00
fpu_helper.c PPC/GDB: handle read and write of fpscr 2013-03-22 15:28:46 +01:00
helper_regs.h cpu: Move halted and interrupt_request fields to CPUState 2013-03-12 10:35:55 +01:00
helper.h target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
int_helper.c target-ppc: Split out SO, OV, CA fields from XER 2013-02-23 17:25:30 +00:00
kvm_ppc.c
kvm_ppc.h Enable kvm emulated watchdog 2013-04-26 23:02:40 +02:00
kvm.c pseries: Fix incorrect calculation of RMA size in certain configurations 2013-04-26 23:02:41 +02:00
machine.c PPC: Remove env->hreset_excp_prefix 2013-04-26 23:02:40 +02:00
Makefile.objs target-ppc: Split user only code out of mmu_helper.c 2013-03-22 15:28:53 +01:00
mem_helper.c target-ppc: Move ppc tlb_fill implementation into mmu_helper.c 2013-03-22 15:28:53 +01:00
mfrom_table_gen.c
mfrom_table.c
misc_helper.c target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
mmu_helper.c target-ppc: Use QOM method dispatch for MMU fault handling 2013-03-22 15:28:53 +01:00
mmu-hash32.c mmu-hash*: Merge translate and fault handling functions 2013-03-22 15:28:53 +01:00
mmu-hash32.h mmu-hash32: Clean up BAT matching logic 2013-03-22 15:28:51 +01:00
mmu-hash64.c mmu-hash64: Implement Virtual Page Class Key Protection 2013-03-22 15:28:53 +01:00
mmu-hash64.h mmu-hash64: Implement Virtual Page Class Key Protection 2013-03-22 15:28:53 +01:00
STATUS
timebase_helper.c
translate_init.c PPC: Add breakpoint registers for 603 and e300 2013-04-26 23:02:40 +02:00
translate.c target-ppc: Fix narrow-mode add/sub carry output 2013-04-26 23:02:40 +02:00
user_only_helper.c target-ppc: Split user only code out of mmu_helper.c 2013-03-22 15:28:53 +01:00