aboutsummaryrefslogtreecommitdiff
path: root/lib/libvmmapi/vmmapi.h
diff options
context:
space:
mode:
authorBojan Novković <bnovkov@FreeBSD.org>2024-09-08 15:57:55 +0000
committerBojan Novković <bnovkov@FreeBSD.org>2025-07-27 16:31:48 +0000
commit08c7dd2fbe4fb7ae5cd6943afef04bd4cb350c1f (patch)
tree8fa1ebb0d2da52f3534d66327f19d00aedf09405 /lib/libvmmapi/vmmapi.h
parenta4197ea477771d525c2970d0c42acab727e43f16 (diff)
Diffstat (limited to 'lib/libvmmapi/vmmapi.h')
-rw-r--r--lib/libvmmapi/vmmapi.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h
index 2072c0105e37..b637c45d1eff 100644
--- a/lib/libvmmapi/vmmapi.h
+++ b/lib/libvmmapi/vmmapi.h
@@ -64,6 +64,14 @@ enum vm_mmap_style {
#define VM_MEM_F_INCORE 0x01 /* include guest memory in core file */
#define VM_MEM_F_WIRED 0x02 /* guest memory is wired */
+/* Memory size and allocation policy for a single NUMA domain. */
+struct vm_mem_domain {
+ size_t size;
+ int ds_policy;
+ domainset_t *ds_mask;
+ size_t ds_size;
+};
+
__BEGIN_DECLS
/*
* Get the length and name of the memory segment identified by 'segid'.
@@ -115,7 +123,9 @@ struct vcpu *vm_vcpu_open(struct vmctx *ctx, int vcpuid);
void vm_vcpu_close(struct vcpu *vcpu);
int vcpu_id(struct vcpu *vcpu);
int vm_parse_memsize(const char *optarg, size_t *memsize);
-int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s);
+int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s);
+int vm_setup_memory_domains(struct vmctx *ctx, enum vm_mmap_style s,
+ struct vm_mem_domain *doms, int ndoms);
void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len);
/* inverse operation to vm_map_gpa - extract guest address from host pointer */
vm_paddr_t vm_rev_map_gpa(struct vmctx *ctx, void *addr);