diff --git a/qemu/exec.c b/qemu/exec.c index 987a2dc1..36231b40 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -53,21 +53,6 @@ //#define DEBUG_SUBPAGE -#if !defined(CONFIG_USER_ONLY) - -/* RAM is pre-allocated and passed into qemu_ram_alloc_from_ptr */ -#define RAM_PREALLOC (1 << 0) - -/* RAM is mmap-ed with MAP_SHARED */ -#define RAM_SHARED (1 << 1) - -/* Only a portion of RAM (used_length) is actually used, and migrated. - * This used_length size can change across reboots. - */ -#define RAM_RESIZEABLE (1 << 2) - -#endif - bool set_preferred_target_page_bits(struct uc_struct *uc, int bits) { /* The target page size is the lowest common denominator for all diff --git a/qemu/include/exec/memory.h b/qemu/include/exec/memory.h index d3eedbe2..d0f9548f 100644 --- a/qemu/include/exec/memory.h +++ b/qemu/include/exec/memory.h @@ -62,6 +62,26 @@ struct IOMMUTLBEntry { IOMMUAccessFlags perm; }; +/* RAM is pre-allocated and passed into qemu_ram_alloc_from_ptr */ +#define RAM_PREALLOC (1 << 0) + +/* RAM is mmap-ed with MAP_SHARED */ +#define RAM_SHARED (1 << 1) + +/* Only a portion of RAM (used_length) is actually used, and migrated. + * This used_length size can change across reboots. + */ +#define RAM_RESIZEABLE (1 << 2) + +/* UFFDIO_ZEROPAGE is available on this RAMBlock to atomically + * zero the page and wake waiting processes. + * (Set during postcopy) + */ +#define RAM_UF_ZEROPAGE (1 << 3) + +/* RAM can be migrated */ +#define RAM_MIGRATABLE (1 << 4) + /* * Memory region callbacks */