mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target/ppc: Split page size information into a separate allocation
env->sps contains page size encoding information as an embedded structure. Since this information is specific to 64-bit hash MMUs, split it out into a separately allocated structure, to reduce the basic env size for other cpus. Along the way we make a few other cleanups: * Rename to PPCHash64Options which is more in line with qemu name conventions, and reflects that we're going to merge some more hash64 mmu specific details in there in future. Also rename its substructures to match qemu conventions. * Move structure definitions to the mmu-hash64.[ch] files. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
a059471d25
commit
b07c59f7c8
7 changed files with 80 additions and 77 deletions
|
@ -442,7 +442,7 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)
|
|||
}
|
||||
|
||||
/* Convert to QEMU form */
|
||||
memset(&env->sps, 0, sizeof(env->sps));
|
||||
memset(cpu->hash64_opts->sps, 0, sizeof(*cpu->hash64_opts->sps));
|
||||
|
||||
/* If we have HV KVM, we need to forbid CI large pages if our
|
||||
* host page size is smaller than 64K.
|
||||
|
@ -456,7 +456,7 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)
|
|||
* the selected CPU has with the capabilities that KVM supports.
|
||||
*/
|
||||
for (ik = iq = 0; ik < KVM_PPC_PAGE_SIZES_MAX_SZ; ik++) {
|
||||
struct ppc_one_seg_page_size *qsps = &env->sps.sps[iq];
|
||||
PPCHash64SegmentPageSizes *qsps = &cpu->hash64_opts->sps[iq];
|
||||
struct kvm_ppc_one_seg_page_size *ksps = &smmu_info.sps[ik];
|
||||
|
||||
if (!kvm_valid_page_size(smmu_info.flags, max_cpu_page_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue