]> git.proxmox.com Git - mirror_qemu.git/commitdiff
osdep: Move memalign-related functions to their own header
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 26 Feb 2022 18:07:23 +0000 (18:07 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 7 Mar 2022 13:16:49 +0000 (13:16 +0000)
Move the various memalign-related functions out of osdep.h and into
their own header, which we include only where they are used.
While we're doing this, add some brief documentation comments.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20220226180723.1706285-10-peter.maydell@linaro.org

53 files changed:
block/blkverify.c
block/block-copy.c
block/commit.c
block/crypto.c
block/dmg.c
block/export/fuse.c
block/file-posix.c
block/io.c
block/mirror.c
block/nvme.c
block/parallels-ext.c
block/parallels.c
block/qcow.c
block/qcow2-cache.c
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2-snapshot.c
block/qcow2.c
block/qed-l2-cache.c
block/qed-table.c
block/qed.c
block/quorum.c
block/raw-format.c
block/vdi.c
block/vhdx-log.c
block/vhdx.c
block/vmdk.c
block/vpc.c
block/win32-aio.c
hw/block/dataplane/xen-block.c
hw/block/fdc.c
hw/ide/core.c
hw/ppc/spapr.c
hw/ppc/spapr_softmmu.c
hw/scsi/scsi-disk.c
hw/tpm/tpm_ppi.c
include/qemu/memalign.h [new file with mode: 0644]
include/qemu/osdep.h
nbd/server.c
net/l2tpv3.c
plugins/loader.c
qemu-img.c
qemu-io-cmds.c
qom/object.c
softmmu/physmem.c
target/i386/hvf/hvf.c
target/i386/kvm/kvm.c
tcg/region.c
tests/bench/atomic_add-bench.c
tests/bench/qht-bench.c
util/atomic64.c
util/memalign.c
util/qht.c

index d1facf5ba90bb8be08a0b601cb20499705719c78..53ba1c91957282c311a87bc460326dc8db6b1857 100644 (file)
@@ -16,6 +16,7 @@
 #include "qemu/cutils.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
+#include "qemu/memalign.h"
 
 typedef struct {
     BdrvChild *test_file;
index ce116318b573e011f961055c902cec89c3ec9586..619e5580fafb939e5f3c309327ef214bd20e07f5 100644 (file)
@@ -22,6 +22,7 @@
 #include "qemu/coroutine.h"
 #include "block/aio_task.h"
 #include "qemu/error-report.h"
+#include "qemu/memalign.h"
 
 #define BLOCK_COPY_MAX_COPY_RANGE (16 * MiB)
 #define BLOCK_COPY_MAX_BUFFER (1 * MiB)
index c76899f640c9e8eabc9757a0eb8721b3a8ac758a..851d1c557a11360b9a182f4179821ee2d4f5cd1b 100644 (file)
@@ -20,6 +20,7 @@
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/ratelimit.h"
+#include "qemu/memalign.h"
 #include "sysemu/block-backend.h"
 
 enum {
index 9d5fecbef86b16f3001e5ee6999927a7b55d1d02..1ba82984efe0a31f80181015485471042e190615 100644 (file)
@@ -31,6 +31,7 @@
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 #include "crypto.h"
 
 typedef struct BlockCrypto BlockCrypto;
index 447901fbb875a97595dc65d58cddc30f60dbdc9c..c626587f9c50166fc7b0be66cb69bfb43699f40a 100644 (file)
@@ -27,6 +27,7 @@
 #include "qemu/bswap.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
+#include "qemu/memalign.h"
 #include "dmg.h"
 
 int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
index 5029e70f84319e83cf1e31f10c997bf54d3c945b..e80b24a86715e46384a72a50a595de995c8dae38 100644 (file)
@@ -19,6 +19,7 @@
 #define FUSE_USE_VERSION 31
 
 #include "qemu/osdep.h"
+#include "qemu/memalign.h"
 #include "block/aio.h"
 #include "block/block.h"
 #include "block/export.h"
index 1f1756e192a5a53383f743ef9a3d51d48095e9db..c000a61db29a6218228e0590bc9b82afb36f3ffc 100644 (file)
@@ -31,6 +31,7 @@
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/units.h"
+#include "qemu/memalign.h"
 #include "trace.h"
 #include "block/thread-pool.h"
 #include "qemu/iov.h"
index efc011ce6572642576fe644e582151ee55b06b19..8e621a49464f16d85b86c396dfc162200f698e08 100644 (file)
@@ -32,6 +32,7 @@
 #include "block/coroutines.h"
 #include "block/write-threshold.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
index ce6bc58d1f4e3aff44e3c796374683858bcb1fb5..d8ecb9efa29a8307454010a50e9a9dafc22513d1 100644 (file)
@@ -23,6 +23,7 @@
 #include "qapi/qmp/qerror.h"
 #include "qemu/ratelimit.h"
 #include "qemu/bitmap.h"
+#include "qemu/memalign.h"
 
 #define MAX_IN_FLIGHT 16
 #define MAX_IO_BYTES (1 << 20) /* 1 Mb */
index dd20de3865b39e43546b82d9eeef8e565a46b077..552029931d597b5176fb3ec29150bc6ff6f4d112 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/module.h"
 #include "qemu/cutils.h"
 #include "qemu/option.h"
+#include "qemu/memalign.h"
 #include "qemu/vfio-helpers.h"
 #include "block/block_int.h"
 #include "sysemu/replay.h"
index e0dd0975c6f8936228d9df06b33c2a7ced8347a3..cb22a427d72ad7db0a2ddfa7983bde8c07b2e7bc 100644 (file)
@@ -29,6 +29,7 @@
 #include "parallels.h"
 #include "crypto/hash.h"
 #include "qemu/uuid.h"
+#include "qemu/memalign.h"
 
 #define PARALLELS_FORMAT_EXTENSION_MAGIC 0xAB234CEF23DCEA87ULL
 
index e58c8284222888c107951f51ea62ac54f6d1eb30..cd23e02d06c1c54bf1d64f4371d5a9bb25f4352a 100644 (file)
@@ -41,6 +41,7 @@
 #include "qapi/qapi-visit-block-core.h"
 #include "qemu/bswap.h"
 #include "qemu/bitmap.h"
+#include "qemu/memalign.h"
 #include "migration/blocker.h"
 #include "parallels.h"
 
index c39940f33ebea70b48aa4f7cdc8ffe35084fb48f..4fba1b9e3647bf55b4457d78bffdda0512ead7ef 100644 (file)
@@ -32,6 +32,7 @@
 #include "qemu/option.h"
 #include "qemu/bswap.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 #include <zlib.h>
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
index 7444b9c4ab03734556a662f4659cd0f68c165c2d..8a0105911f7e8c05000da0056a485f1e232dae75 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/memalign.h"
 #include "qcow2.h"
 #include "trace.h"
 
index 21884a1ab9abfd461b4fed6eccf1834da1db2747..20a16ba6ee06a9ed90a2539151cf1d9d26a21c58 100644 (file)
@@ -28,6 +28,7 @@
 #include "qapi/error.h"
 #include "qcow2.h"
 #include "qemu/bswap.h"
+#include "qemu/memalign.h"
 #include "trace.h"
 
 int qcow2_shrink_l1_table(BlockDriverState *bs, uint64_t exact_size)
index 4614572252743ee17b73e301b374586580e36bb1..94033972bedc7ac904f89fd6b436c55b3619c1ad 100644 (file)
@@ -28,6 +28,7 @@
 #include "qemu/range.h"
 #include "qemu/bswap.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 #include "trace.h"
 
 static int64_t alloc_clusters_noref(BlockDriverState *bs, uint64_t size,
index 71ddb08c212d61269e7b2916707e6c2f0c7d95a7..075269a02374d59aabdc4dc53eaa3ac61db3363d 100644 (file)
@@ -29,6 +29,7 @@
 #include "qemu/bswap.h"
 #include "qemu/error-report.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 
 static void qcow2_free_single_snapshot(BlockDriverState *bs, int i)
 {
index c8115e1cba0f8ed09254f7889d38a338430a9ab5..b5c47931ef4ac64f696263558d3c0f348f1a1140 100644 (file)
@@ -38,6 +38,7 @@
 #include "qemu/option_int.h"
 #include "qemu/cutils.h"
 #include "qemu/bswap.h"
+#include "qemu/memalign.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qapi-visit-block-core.h"
 #include "crypto.h"
index b5483623989601efacc79d038e3c78fdb3d74bbf..caf2c024c2dc33d8deea248da311067ce97d4617 100644 (file)
@@ -51,6 +51,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/memalign.h"
 #include "trace.h"
 #include "qed.h"
 
index 405d446cbe70ea6087de48916f2e3efc713b1f2c..1cc844b1a5f8123f4a470442845779edd820ce90 100644 (file)
@@ -17,6 +17,7 @@
 #include "qemu/sockets.h" /* for EINPROGRESS on Windows */
 #include "qed.h"
 #include "qemu/bswap.h"
+#include "qemu/memalign.h"
 
 /* Called with table_lock held.  */
 static int coroutine_fn qed_read_table(BDRVQEDState *s, uint64_t offset,
index 558d3646c4b2b8e2db6de13e11034c167d106e85..f34d9a3ac1a02bf1e552d40ca4a2310ab4c52ed8 100644 (file)
@@ -20,6 +20,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
+#include "qemu/memalign.h"
 #include "trace.h"
 #include "qed.h"
 #include "sysemu/block-backend.h"
index c28dda7baac730bf28aaa6828b72c9073f95a294..f33f30d36b842b6e51eb7c59b9f2d040ef88bc2c 100644 (file)
@@ -17,6 +17,7 @@
 #include "qemu/cutils.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
+#include "qemu/memalign.h"
 #include "block/block_int.h"
 #include "block/coroutines.h"
 #include "block/qdict.h"
index bda757fd1954764c0b5e31127d4716b67302d8d1..69fd650eaf7796aa341e997d9d4ef83417790f19 100644 (file)
@@ -31,6 +31,7 @@
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
+#include "qemu/memalign.h"
 
 typedef struct BDRVRawState {
     uint64_t offset;
index bdc58d726ee13a18c7c93e6a1a6bcc35e1f92465..cca3a3a3567fe0e68797daabee36cd25b6865b27 100644 (file)
@@ -64,6 +64,7 @@
 #include "qemu/coroutine.h"
 #include "qemu/cutils.h"
 #include "qemu/uuid.h"
+#include "qemu/memalign.h"
 
 /* Code configuration options. */
 
index 7672161d95550a9a423094e17eafef95703b42c1..ff0d4e0da0571f2e1929ad29bdff2f4e39ef1bcc 100644 (file)
@@ -23,6 +23,7 @@
 #include "block/block_int.h"
 #include "qemu/error-report.h"
 #include "qemu/bswap.h"
+#include "qemu/memalign.h"
 #include "vhdx.h"
 
 
index 356ec4c455a42be6e5f68b62c712536e9f2f6310..410c6f9610177ea98ba22728ecb0e9b55fed5536 100644 (file)
@@ -25,6 +25,7 @@
 #include "qemu/crc32c.h"
 #include "qemu/bswap.h"
 #include "qemu/error-report.h"
+#include "qemu/memalign.h"
 #include "vhdx.h"
 #include "migration/blocker.h"
 #include "qemu/uuid.h"
index 0dfab6e94130246a2dbc8d0646513f90487fbb6d..37c0946066ee9ea1f904234eced1651018ab95d8 100644 (file)
@@ -33,6 +33,7 @@
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/bswap.h"
+#include "qemu/memalign.h"
 #include "migration/blocker.h"
 #include "qemu/cutils.h"
 #include <zlib.h>
index 297a26262ab1e58d6d42549decda77578319a73c..4d8f16e1990c6b470db329b55fc81386a4a4f1d6 100644 (file)
@@ -33,6 +33,7 @@
 #include "migration/blocker.h"
 #include "qemu/bswap.h"
 #include "qemu/uuid.h"
+#include "qemu/memalign.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qapi-visit-block-core.h"
index c57e10c9979220939b5dcefdbf7d574a74b3dcc8..aadc7b1bc3c053783874be3316f5ce94e06f77dc 100644 (file)
@@ -29,6 +29,7 @@
 #include "block/raw-aio.h"
 #include "qemu/event_notifier.h"
 #include "qemu/iov.h"
+#include "qemu/memalign.h"
 #include <windows.h>
 #include <winioctl.h>
 
index 860787580a3d5787c813cfa7020d7e87f63f1ab2..2785b9e8497197745a6c1e3d850db9df3aca3e12 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
+#include "qemu/memalign.h"
 #include "qapi/error.h"
 #include "hw/xen/xen_common.h"
 #include "hw/block/xen_blkif.h"
index 21d18ac2e360f936da10172a8fb39856677eb37e..347875a0cdae458aeac31a0aa7a223e12bdc0d17 100644 (file)
@@ -32,6 +32,7 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
+#include "qemu/memalign.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
 #include "hw/qdev-properties.h"
index 33463d9b8f2e652e8c6ec8bdae9b404233db8232..a7ac4de18ad90dc607fa98bdb02cd4d2e3ec5702 100644 (file)
@@ -30,6 +30,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/timer.h"
 #include "qemu/hw-version.h"
+#include "qemu/memalign.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/dma.h"
index 4cc204f90dfe05fdaf0b76d065c3bf25de6bb16d..953fc65fa8637212156bed282c197272aa8becd1 100644 (file)
@@ -27,6 +27,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/datadir.h"
+#include "qemu/memalign.h"
 #include "qapi/error.h"
 #include "qapi/qapi-events-machine.h"
 #include "qapi/qapi-events-qdev.h"
index 4ee03c83e48e22504141928ec9a4fef5df0a22e8..5170a33369e016a864e6ca90b7b5f0b3768f7360 100644 (file)
@@ -1,5 +1,6 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 #include "cpu.h"
 #include "helper_regs.h"
 #include "hw/ppc/spapr.h"
index 3666b8d94687ff97f481f6e49127ec0737b08371..072686ed58f9b2cfc897f12e1b491467425b6e08 100644 (file)
@@ -26,6 +26,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/hw-version.h"
+#include "qemu/memalign.h"
 #include "hw/scsi/scsi.h"
 #include "migration/qemu-file-types.h"
 #include "migration/vmstate.h"
index 6dbb9f41e40b360d16998c5710314be69c524ffc..c89ac53e65e66d3cbb49072e6e938d1e7e967df6 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "qemu/osdep.h"
-
+#include "qemu/memalign.h"
 #include "qapi/error.h"
 #include "sysemu/memory_mapping.h"
 #include "migration/vmstate.h"
diff --git a/include/qemu/memalign.h b/include/qemu/memalign.h
new file mode 100644 (file)
index 0000000..fa299f3
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Allocation and free functions for aligned memory
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_MEMALIGN_H
+#define QEMU_MEMALIGN_H
+
+/**
+ * qemu_try_memalign: Allocate aligned memory
+ * @alignment: required alignment, in bytes
+ * @size: size of allocation, in bytes
+ *
+ * Allocate memory on an aligned boundary (i.e. the returned
+ * address will be an exact multiple of @alignment).
+ * @alignment must be a power of 2, or the function will assert().
+ * On success, returns allocated memory; on failure, returns NULL.
+ *
+ * The memory allocated through this function must be freed via
+ * qemu_vfree() (and not via free()).
+ */
+void *qemu_try_memalign(size_t alignment, size_t size);
+/**
+ * qemu_memalign: Allocate aligned memory, without failing
+ * @alignment: required alignment, in bytes
+ * @size: size of allocation, in bytes
+ *
+ * Allocate memory in the same way as qemu_try_memalign(), but
+ * abort() with an error message if the memory allocation fails.
+ *
+ * The memory allocated through this function must be freed via
+ * qemu_vfree() (and not via free()).
+ */
+void *qemu_memalign(size_t alignment, size_t size);
+/**
+ * qemu_vfree: Free memory allocated through qemu_memalign
+ * @ptr: memory to free
+ *
+ * This function must be used to free memory allocated via qemu_memalign()
+ * or qemu_try_memalign(). (Using the wrong free function will cause
+ * subtle bugs on Windows hosts.)
+ */
+void qemu_vfree(void *ptr);
+/*
+ * It's an analog of GLIB's g_autoptr_cleanup_generic_gfree(), used to define
+ * g_autofree macro.
+ */
+static inline void qemu_cleanup_generic_vfree(void *p)
+{
+  void **pp = (void **)p;
+  qemu_vfree(*pp);
+}
+
+/*
+ * Analog of g_autofree, but qemu_vfree is called on cleanup instead of g_free.
+ */
+#define QEMU_AUTO_VFREE __attribute__((cleanup(qemu_cleanup_generic_vfree)))
+
+#endif
index 7bcce3bceb0f89f7f2cca3cf15630063ca8e68b7..bc3df26da3683d4b660838413932808fc9600ff9 100644 (file)
@@ -379,28 +379,10 @@ extern "C" {
 #endif
 
 int qemu_daemon(int nochdir, int noclose);
-void *qemu_try_memalign(size_t alignment, size_t size);
-void *qemu_memalign(size_t alignment, size_t size);
 void *qemu_anon_ram_alloc(size_t size, uint64_t *align, bool shared,
                           bool noreserve);
-void qemu_vfree(void *ptr);
 void qemu_anon_ram_free(void *ptr, size_t size);
 
-/*
- * It's an analog of GLIB's g_autoptr_cleanup_generic_gfree(), used to define
- * g_autofree macro.
- */
-static inline void qemu_cleanup_generic_vfree(void *p)
-{
-  void **pp = (void **)p;
-  qemu_vfree(*pp);
-}
-
-/*
- * Analog of g_autofree, but qemu_vfree is called on cleanup instead of g_free.
- */
-#define QEMU_AUTO_VFREE __attribute__((cleanup(qemu_cleanup_generic_vfree)))
-
 #ifdef _WIN32
 #define HAVE_CHARDEV_SERIAL 1
 #elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)    \
index 9fb2f264023eed03060200fceedc8420c6f07ee4..53e68cf027f55c8657d761d4f9182f08ce06d9a1 100644 (file)
@@ -25,6 +25,7 @@
 #include "trace.h"
 #include "nbd-internal.h"
 #include "qemu/units.h"
+#include "qemu/memalign.h"
 
 #define NBD_META_ID_BASE_ALLOCATION 0
 #define NBD_META_ID_ALLOCATION_DEPTH 1
index e4d4218db6984ce9aa940100582ca7971180336f..b8faa8796c8f8f35c4de597c61d14144753e90e2 100644 (file)
@@ -34,7 +34,7 @@
 #include "qemu/sockets.h"
 #include "qemu/iov.h"
 #include "qemu/main-loop.h"
-
+#include "qemu/memalign.h"
 
 /* The buffer size needs to be investigated for optimum numbers and
  * optimum means of paging in on different systems. This size is
index 4883b0a1cbcce037b71990ac861a6d3f9027faa0..88c30bde2d6aa4c18f86b2853129a8304598abdb 100644 (file)
@@ -27,6 +27,7 @@
 #include "qemu/cacheinfo.h"
 #include "qemu/xxhash.h"
 #include "qemu/plugin.h"
+#include "qemu/memalign.h"
 #include "hw/core/cpu.h"
 #include "exec/exec-all.h"
 #ifndef CONFIG_USER_ONLY
index 6fe2466032f95f43ada251f597641fae80a68bdf..5dffb3e616010cca465bbcacd4c33862dda4a8b6 100644 (file)
@@ -42,6 +42,7 @@
 #include "qemu/module.h"
 #include "qemu/sockets.h"
 #include "qemu/units.h"
+#include "qemu/memalign.h"
 #include "qom/object_interfaces.h"
 #include "sysemu/block-backend.h"
 #include "block/block_int.h"
index 46593d632d8f8a79640d1fd4b3a2148d5e56fa1e..633b46cdb250287fb6972cf9cfcaf0c0feb56e83 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/option.h"
 #include "qemu/timer.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 
 #define CMD_NOFILE_OK   0x01
 
index 9f7a33139d4f07c00fa2a4cd16c76f01a15f4362..4048a2fef1eb48d24f775ef88e7ce8cb32d71703 100644 (file)
@@ -16,6 +16,7 @@
 #include "qom/object.h"
 #include "qom/object_interfaces.h"
 #include "qemu/cutils.h"
+#include "qemu/memalign.h"
 #include "qapi/visitor.h"
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-output-visitor.h"
index a13289a594aec9268d3bf44444a876703e09facc..59dcf13faf4577b8fd6b20ee4c999a4c0dc6ace5 100644 (file)
@@ -42,6 +42,7 @@
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qemu/qemu-print.h"
+#include "qemu/memalign.h"
 #include "exec/memory.h"
 #include "exec/ioport.h"
 #include "sysemu/dma.h"
index 4ba6e82fab3b1339631f78c281eaa6fc0dc09158..fc12c02fb217bd940f357fae6a9c911bce214908 100644 (file)
@@ -49,6 +49,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/error-report.h"
+#include "qemu/memalign.h"
 
 #include "sysemu/hvf.h"
 #include "sysemu/hvf_int.h"
index 2c8feb4a6f7bb46305445ac54da9d4f2e87b8293..83d09883020325393834cfdc7912cdfc1788353a 100644 (file)
@@ -37,6 +37,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
+#include "qemu/memalign.h"
 #include "hw/i386/x86.h"
 #include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
index 72afb357389317fabdf3b553403387275ff27c80..97ca5291d52fea59c810eba752ad5e3b3bb48db1 100644 (file)
@@ -26,6 +26,7 @@
 #include "qemu/units.h"
 #include "qemu/madvise.h"
 #include "qemu/mprotect.h"
+#include "qemu/memalign.h"
 #include "qemu/cacheinfo.h"
 #include "qapi/error.h"
 #include "exec/exec-all.h"
index f05471ab45c649b200a065da4333b976d42637a3..8a6faad6ece34f2bf162bbd31d12be3b17a472a2 100644 (file)
@@ -2,6 +2,7 @@
 #include "qemu/thread.h"
 #include "qemu/host-utils.h"
 #include "qemu/processor.h"
+#include "qemu/memalign.h"
 
 struct thread_info {
     uint64_t r;
index 2e5b70ccd04345e1a63af9267a2aabb4d8b0ca2e..8afe161d106eddbbdfd045f94e9c71f053f05d00 100644 (file)
@@ -10,6 +10,7 @@
 #include "qemu/qht.h"
 #include "qemu/rcu.h"
 #include "qemu/xxhash.h"
+#include "qemu/memalign.h"
 
 struct thread_stats {
     size_t rd;
index 22983a970f1f82bad503feb17ef9d61f60b10b8a..c20d071d8e5f00214cfd4e918fdb92c24e34bd88 100644 (file)
@@ -8,6 +8,7 @@
 #include "qemu/atomic.h"
 #include "qemu/thread.h"
 #include "qemu/cacheinfo.h"
+#include "qemu/memalign.h"
 
 #ifdef CONFIG_ATOMIC64
 #error This file must only be compiled if !CONFIG_ATOMIC64
index 440b8fd9a76e042db3d571b0568fe639016fc6fb..c199ae70732f703c6dadbaa846d1e12c6ee0aa8d 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/host-utils.h"
+#include "qemu/memalign.h"
 #include "trace.h"
 
 void *qemu_try_memalign(size_t alignment, size_t size)
index 079605121b1452dac9937b0e6137d88eaf029946..065fc501f44c46dffac74134ee2ccf30c10e3517 100644 (file)
@@ -69,6 +69,7 @@
 #include "qemu/qht.h"
 #include "qemu/atomic.h"
 #include "qemu/rcu.h"
+#include "qemu/memalign.h"
 
 //#define QHT_DEBUG