summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_private.h
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-07-23 21:12:21 +0000
committerbz <bz@FreeBSD.org>2009-07-23 21:12:21 +0000
commitd607f4c3e36cdfbb5b44004389ae0faeaf456f5b (patch)
treeb8a5e23e08212e3f59199c99ea9ba792ed035e7b /lib/libkvm/kvm_private.h
parentb3be1c6e3bd7d3b5cf946ddb04c1c5811644229b (diff)
downloadFreeBSD-src-d607f4c3e36cdfbb5b44004389ae0faeaf456f5b.zip
FreeBSD-src-d607f4c3e36cdfbb5b44004389ae0faeaf456f5b.tar.gz
Make libkvm work on live systems and crashdumps with and
without VIMAGE virtualization in the kernel. If we cannot resolve a symbol try to see if we can find it with prefix of the virtualized subsystem, currently only "vnet_entry" by identifying either the vnet of the current process for a live system or the vnet of proc0 (or of dumptid if compiled in a non-default way). The way this is done currently allows us to only touch libkvm but no single application. Once we are going to virtualize more subsystems we will have to review this decision for better scaling. Submitted by: rwatson (initial version of kvm_vnet.c, lots of ideas) Reviewed by: rwatson Approved by: re (kib)
Diffstat (limited to 'lib/libkvm/kvm_private.h')
-rw-r--r--lib/libkvm/kvm_private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libkvm/kvm_private.h b/lib/libkvm/kvm_private.h
index 88ff716..cc073db 100644
--- a/lib/libkvm/kvm_private.h
+++ b/lib/libkvm/kvm_private.h
@@ -62,6 +62,12 @@ struct __kvm {
*/
struct vmstate *vmst;
int rawdump; /* raw dump format */
+
+ int vnet_initialized; /* vnet fields set up */
+ uintptr_t vnet_start; /* start of kernel's vnet region */
+ uintptr_t vnet_stop; /* stop of kernel's vnet region */
+ uintptr_t vnet_current; /* vnet we're working with */
+ uintptr_t vnet_base; /* vnet base of current vnet */
};
/*
@@ -74,10 +80,14 @@ void _kvm_freevtop(kvm_t *);
int _kvm_initvtop(kvm_t *);
int _kvm_kvatop(kvm_t *, u_long, off_t *);
void *_kvm_malloc(kvm_t *kd, size_t);
+int _kvm_nlist(kvm_t *, struct nlist *, int);
void *_kvm_realloc(kvm_t *kd, void *, size_t);
void _kvm_syserr (kvm_t *kd, const char *program, const char *fmt, ...)
__printflike(3, 4);
int _kvm_uvatop(kvm_t *, const struct proc *, u_long, u_long *);
+int _kvm_vnet_selectpid(kvm_t *, pid_t);
+int _kvm_vnet_initialized(kvm_t *, int);
+uintptr_t _kvm_vnet_validaddr(kvm_t *, uintptr_t);
#if defined(__amd64__) || defined(__i386__) || defined(__arm__)
void _kvm_minidump_freevtop(kvm_t *);
OpenPOWER on IntegriCloud