aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/kvm.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-09-30 14:21:56 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-09-30 14:21:56 +0100
commit95e9d74fe4281f7ad79a5a7511400541729aa44a (patch)
tree1fc2502eea4b4a9add852b4d41b784a65ef9cd6b /target/s390x/kvm.c
parent786d36ad416c6c199b18b78cc31eddfb784fe15d (diff)
parentc5b9ce518c0551d0198bcddadc82e03de9ac8de9 (diff)
downloadqemu-95e9d74fe4281f7ad79a5a7511400541729aa44a.zip
qemu-95e9d74fe4281f7ad79a5a7511400541729aa44a.tar.gz
qemu-95e9d74fe4281f7ad79a5a7511400541729aa44a.tar.bz2
Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20190930' into staging
- do not abuse memory_region_allocate_system_memory and split the memory according to KVM memslots in KVM code instead (Paolo, Igor) - change splitting to split at 4TB (Christian) - do not claim s390 (31bit) support in configure (Thomas) - sclp error checking (Janosch, Claudio) - new s390 pci maintainer (Matt, Collin) - fix s390 pci (again) (Matt) # gpg: Signature made Mon 30 Sep 2019 12:52:51 BST # gpg: using RSA key 117BBC80B5A61C7C # gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>" [full] # Primary key fingerprint: F922 9381 A334 08F9 DBAB FBCA 117B BC80 B5A6 1C7C * remotes/borntraeger/tags/s390x-20190930: s390/kvm: split kvm mem slots at 4TB s390: do not call memory_region_allocate_system_memory() multiple times kvm: split too big memory section on several memslots kvm: clear dirty bitmaps from all overlapping memslots kvm: extract kvm_log_clear_one_slot configure: Remove s390 (31-bit mode) from the list of supported CPUs s390x: sclp: Report insufficient SCCB length s390x: sclp: fix error handling for oversize control blocks s390x: sclp: boundary check s390x: sclp: refactor invalid command check s390: PCI: fix IOMMU region init MAINTAINERS: Update S390 PCI Maintainer Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/s390x/kvm.c')
-rw-r--r--target/s390x/kvm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 97a662a..c24c869 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -28,6 +28,7 @@
#include "cpu.h"
#include "internal.h"
#include "kvm_s390x.h"
+#include "sysemu/kvm_int.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
@@ -122,6 +123,14 @@
*/
#define VCPU_IRQ_BUF_SIZE(max_cpus) (sizeof(struct kvm_s390_irq) * \
(max_cpus + NR_LOCAL_IRQS))
+/*
+ * KVM does only support memory slots up to KVM_MEM_MAX_NR_PAGES pages
+ * as the dirty bitmap must be managed by bitops that take an int as
+ * position indicator. This would end at an unaligned address
+ * (0x7fffff00000). As future variants might provide larger pages
+ * and to make all addresses properly aligned, let us split at 4TB.
+ */
+#define KVM_SLOT_MAX_BYTES (4UL * TiB)
static CPUWatchpoint hw_watchpoint;
/*
@@ -355,6 +364,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
*/
/* kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0); */
+ kvm_set_max_memslot_size(KVM_SLOT_MAX_BYTES);
return 0;
}