aboutsummaryrefslogtreecommitdiff
path: root/util/mmap-alloc.c
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 /util/mmap-alloc.c
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 'util/mmap-alloc.c')
-rw-r--r--util/mmap-alloc.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
index 5b90cb6..5ed7d29 100644
--- a/util/mmap-alloc.c
+++ b/util/mmap-alloc.c
@@ -53,37 +53,6 @@ size_t qemu_fd_getpagesize(int fd)
return qemu_real_host_page_size();
}
-size_t qemu_mempath_getpagesize(const char *mem_path)
-{
-#ifdef CONFIG_LINUX
- struct statfs fs;
- int ret;
-
- if (mem_path) {
- do {
- ret = statfs(mem_path, &fs);
- } while (ret != 0 && errno == EINTR);
-
- if (ret != 0) {
- fprintf(stderr, "Couldn't statfs() memory path: %s\n",
- strerror(errno));
- exit(1);
- }
-
- if (fs.f_type == HUGETLBFS_MAGIC) {
- /* It's hugepage, return the huge page size */
- return fs.f_bsize;
- }
- }
-#ifdef __sparc__
- /* SPARC Linux needs greater alignment than the pagesize */
- return QEMU_VMALLOC_ALIGN;
-#endif
-#endif
-
- return qemu_real_host_page_size();
-}
-
#define OVERCOMMIT_MEMORY_PATH "/proc/sys/vm/overcommit_memory"
static bool map_noreserve_effective(int fd, uint32_t qemu_map_flags)
{