aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2022-08-31 16:50:43 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2022-08-31 16:50:58 -0400
commit3a2a29ebbdf47138ffa3cb729afeaa5286948521 (patch)
tree96e588b6a15abf3a4ffc6dc0be39bfdf870cea63 /backends
parent93fac696d241dccb04ebb9d23da55fc1e9d8ee36 (diff)
parent90d994619383c2665cf4f4712872c43ad2728bec (diff)
downloadqemu-3a2a29ebbdf47138ffa3cb729afeaa5286948521.zip
qemu-3a2a29ebbdf47138ffa3cb729afeaa5286948521.tar.gz
qemu-3a2a29ebbdf47138ffa3cb729afeaa5286948521.tar.bz2
Merge tag 's390x-pull-request-2022-08-30' of https://gitlab.com/thuth/qemu into staging
* Compat machine types for QEMU 7.2 * Add feature bit for the "processor-activity-instrumentation extension" * Fix emulation of CLFIT and CLGIT instructions * Fix hugepages support on s390x with the memfd memory-backend # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmMOD0cRHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbWrUg//YyjsnuUoKhea7PmnL6WUOyD0jZoMtDK3 # IwRzneLfTPQneStqCc1gtoWMelhP68wa/t2ygfwB5hOrLKz8r0aIvnsfEgc8t++R # 58IwClD9Z2d26lCMzIlW3A4ACQfZVk96wtqPmfShMHKuZePrA/oM4l7R+EItP9nl # s1WYUZ0ia/qogJ2Wr+MvDGbURv37DqYJ2OuY8WCrIX9trQxUwcydZKMv1ca55mpn # GfZNBbTuqhLMf+r4NmxNzHnMayGtWOyaISStJBhGDlRJyKjDsy1ghAXDMa1WFRup # lj6mBoq0F19PCnjI9AUFVNvPhuj/1Ku+YkVwrImleSdBBmgaUx+LWwFXU+stnQv7 # 9bYosdTJ55BJ8YmRn1w00b+rIVg4SvJimQJc+BizWe7tdpc+E1AhBerUC4bwZxZw # NRiPwSraym2b9/mpv7/fzUGECEpP37IHHZtIa37OO3d48NuaHpFHhpcskbmfCIwP # K19Jqc5cyLf7/iEliOo+BVcMVDQSL4M4x7CePpO1Kd83RmDEoBQlQDL9ZcXYAefz # yY7OYwi2DfO893umDNuXwyN6b3HwOjDztFy2emgVRfwFIsm4jWnsByRsjVasaIvd # kmfCjZj0URBoUCfJiKtrpzgF+uup8n54uJxtbsWyf83xdMz/zpsDXAnm1eG6qZq3 # 7MD1+akz2Ak= # =lJy4 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 30 Aug 2022 09:23:19 EDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 's390x-pull-request-2022-08-30' of https://gitlab.com/thuth/qemu: util/mmap-alloc: Remove qemu_mempath_getpagesize() softmmu/physmem: Remove the ifdef __linux__ around the pagesize functions backends/hostmem: Fix support of memory-backend-memfd in qemu_maxrampagesize() target/s390x: Fix CLFIT and CLGIT immediate size s390x/cpumodel: add stfl197 processor-activity-instrumentation extension 1 hw: Add compat machines for 7.2 Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r--backends/hostmem.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/backends/hostmem.c b/backends/hostmem.c
index 624bb7e..4428e06 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -306,22 +306,12 @@ bool host_memory_backend_is_mapped(HostMemoryBackend *backend)
return backend->is_mapped;
}
-#ifdef __linux__
size_t host_memory_backend_pagesize(HostMemoryBackend *memdev)
{
- Object *obj = OBJECT(memdev);
- char *path = object_property_get_str(obj, "mem-path", NULL);
- size_t pagesize = qemu_mempath_getpagesize(path);
-
- g_free(path);
+ size_t pagesize = qemu_ram_pagesize(memdev->mr.ram_block);
+ g_assert(pagesize >= qemu_real_host_page_size());
return pagesize;
}
-#else
-size_t host_memory_backend_pagesize(HostMemoryBackend *memdev)
-{
- return qemu_real_host_page_size();
-}
-#endif
static void
host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)