diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -125,9 +125,9 @@ 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); -void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); +void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len) __result_use_check; /* inverse operation to vm_map_gpa - extract guest address from host pointer */ -vm_paddr_t vm_rev_map_gpa(struct vmctx *ctx, void *addr); +vm_paddr_t vm_rev_map_gpa(struct vmctx *ctx, void *addr) __result_use_check; #ifdef __amd64__ int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); int vm_gla2gpa(struct vcpu *vcpu, struct vm_guest_paging *paging, diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -45,9 +45,9 @@ struct vmctx; struct vm_run; -void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len); +void __result_use_check *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len); #ifdef BHYVE_SNAPSHOT -uintptr_t paddr_host2guest(struct vmctx *ctx, void *addr); +uintptr_t __result_use_check paddr_host2guest(struct vmctx *ctx, void *addr); #endif struct vcpu;