movealloc
include/mem/movealloc.h View source View on GitHubImplements movealloc.
this feature allows us to take a given virtual pointer, and copy its pages over to pages in the correct domain, and change the page tables to point to these correct pages. this is a form of “mini page migration” that we use to move over initial allocations to the right node. this lives entirely separate from our real page migration
Structs
Section titled “Structs”movealloc_callback_node
Section titled “movealloc_callback_node” struct movealloc_callback_node (3 fields) source
movealloc_callback_chain
Section titled “movealloc_callback_chain”Type Aliases
Section titled “Type Aliases”movealloc_callback
Section titled “movealloc_callback”typedef void (*movealloc_callback)(void * a, void * b) source Functions
Section titled “Functions”movealloc_full
Section titled “movealloc_full”void movealloc_full(
domain_id_t domain,
void *ptr,
struct vmm_request rq
) source this will always panic upon alloc failure - only to be used in init code!
movealloc_exec_all
Section titled “movealloc_exec_all”void movealloc_exec_all(void) source Macros
Section titled “Macros”movealloc
Section titled “movealloc”#define movealloc(d, p, ...) source Expansion
#define movealloc(d, p, ...) \
movealloc_full((d), (p), vmm_request_with_defaults(__VA_ARGS__)) movealloc_callback_node_from_list_node
Section titled “movealloc_callback_node_from_list_node”#define movealloc_callback_node_from_list_node(ln) source Expansion
#define movealloc_callback_node_from_list_node(ln) \
(container_of(ln, struct movealloc_callback_node, list)) MOVEALLOC_REGISTER_CALL
Section titled “MOVEALLOC_REGISTER_CALL”#define MOVEALLOC_REGISTER_CALL(name, callback, param1, param2) source Expansion
#define MOVEALLOC_REGISTER_CALL(name, callback, param1, param2) \
static LINKER_SECTION_OBJECT(struct movealloc_callback_node, \
movealloc_callbacks) \
movealloc_##name = {callback, param1, param2, .list = {0}};