Sergej Schumilo 8a88edc2a1 auto-apply clang-format
- including vl.c & kvm-all.c
2022-10-16 23:51:13 +02:00

39 lines
1.3 KiB
C

#pragma once
#include "nyx/snapshot/helper.h"
#include "nyx/snapshot/memory/backend/nyx_fdl.h"
#include "nyx/snapshot/memory/block_list.h"
#include "nyx/snapshot/memory/shadow_memory.h"
#include <stdint.h>
#define MAX_REGIONS 8 /* don't */
typedef struct nyx_fdl_user_s {
struct {
uint64_t *stack;
uint8_t *bitmap;
uint64_t pos;
} entry[MAX_REGIONS];
uint8_t num;
bool enabled;
} nyx_fdl_user_t;
nyx_fdl_user_t *nyx_fdl_user_init(shadow_memory_t *shadow_memory_state);
void nyx_fdl_user_enable(nyx_fdl_user_t *self);
void nyx_fdl_user_set(nyx_fdl_user_t *self,
shadow_memory_t *shadow_memory_state,
nyx_fdl_t *nyx_fdl_state,
uint64_t addr,
uint64_t length);
uint32_t nyx_snapshot_user_fdl_restore(nyx_fdl_user_t *self,
shadow_memory_t *shadow_memory_state,
snapshot_page_blocklist_t *blocklist);
void nyx_snapshot_nyx_fdl_user_save_root_pages(nyx_fdl_user_t *self,
shadow_memory_t *shadow_memory_state,
snapshot_page_blocklist_t *blocklist);