diff options
author | David Hildenbrand | 2019-04-17 13:31:42 +0200 |
---|---|---|
committer | Cornelia Huck | 2019-04-25 13:47:01 +0200 |
commit | 9138977b185266e750c9422e554b0c4e7860783f (patch) | |
tree | 07cea69dac5701ac9200490af6a885ff6646925e /target/s390x/cpu.h | |
parent | Merge remote-tracking branch 'remotes/lersek/tags/edk2-pull-2019-04-22' into ... (diff) | |
download | qemu-9138977b185266e750c9422e554b0c4e7860783f.tar.gz qemu-9138977b185266e750c9422e554b0c4e7860783f.tar.xz qemu-9138977b185266e750c9422e554b0c4e7860783f.zip |
s390x/kvm: Configure page size after memory has actually been initialized
Right now we configure the pagesize quite early, when initializing KVM.
This is long before system memory is actually allocated via
memory_region_allocate_system_memory(), and therefore memory backends
marked as mapped.
Instead, let's configure the maximum page size after initializing
memory in s390_memory_init(). cap_hpage_1m is still properly
configured before creating any CPUs, and therefore before configuring
the CPU model and eventually enabling CMMA.
This is not a fix but rather a preparation for the future, when initial
memory might reside on memory backends (not the case for s390x right now)
We will replace qemu_getrampagesize() soon by a function that will always
return the maximum page size (not the minimum page size, which only
works by pure luck so far, as there are no memory backends).
Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190417113143.5551-2-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/cpu.h')
-rw-r--r-- | target/s390x/cpu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index d8990c405a..7305cacc7b 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -734,6 +734,7 @@ static inline void s390_do_cpu_load_normal(CPUState *cs, run_on_cpu_data arg) /* cpu.c */ void s390_crypto_reset(void); int s390_set_memory_limit(uint64_t new_limit, uint64_t *hw_limit); +void s390_set_max_pagesize(uint64_t pagesize, Error **errp); void s390_cmma_reset(void); void s390_enable_css_support(S390CPU *cpu); int s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch_id, |