mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-09 22:07:25 +00:00
memory, exec: Expose all memory block related flags.
We need to use these flags in other files rather than just in exec.c, For example, RAM_SHARED should be used when create a ram block from file. We expose them the exec/memory.h Backports commit b0e5de93811077254a536c23b713b49e12efb742 from qemu
This commit is contained in:
parent
214dadf7e7
commit
6ead2c3d1f
15
qemu/exec.c
15
qemu/exec.c
|
@ -53,21 +53,6 @@
|
||||||
|
|
||||||
//#define DEBUG_SUBPAGE
|
//#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)
|
bool set_preferred_target_page_bits(struct uc_struct *uc, int bits)
|
||||||
{
|
{
|
||||||
/* The target page size is the lowest common denominator for all
|
/* The target page size is the lowest common denominator for all
|
||||||
|
|
|
@ -62,6 +62,26 @@ struct IOMMUTLBEntry {
|
||||||
IOMMUAccessFlags perm;
|
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
|
* Memory region callbacks
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue