Lines Matching refs:vmst

84 	struct vmstate *vm = kd->vmst;
87 kd->vmst = NULL;
93 struct vmstate *vmst;
96 vmst = _kvm_malloc(kd, sizeof(*vmst));
97 if (vmst == NULL) {
101 kd->vmst = vmst;
102 if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) !=
103 sizeof(vmst->hdr)) {
107 if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, sizeof(vmst->hdr.magic)) != 0) {
111 vmst->hdr.version = le32toh(vmst->hdr.version);
112 if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) {
114 MINIDUMP_VERSION, vmst->hdr.version);
117 vmst->hdr.msgbufsize = le32toh(vmst->hdr.msgbufsize);
118 vmst->hdr.bitmapsize = le32toh(vmst->hdr.bitmapsize);
119 vmst->hdr.ptesize = le32toh(vmst->hdr.ptesize);
120 vmst->hdr.kernbase = le32toh(vmst->hdr.kernbase);
121 vmst->hdr.paemode = le32toh(vmst->hdr.paemode);
122 vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ?
123 le32toh(vmst->hdr.dumpavailsize) : 0;
126 dump_avail_off = I386_PAGE_SIZE + i386_round_page(vmst->hdr.msgbufsize);
129 off = dump_avail_off + i386_round_page(vmst->hdr.dumpavailsize);
131 sparse_off = off + i386_round_page(vmst->hdr.bitmapsize) +
132 i386_round_page(vmst->hdr.ptesize);
133 if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off,
134 vmst->hdr.bitmapsize, off, sparse_off, I386_PAGE_SIZE) == -1) {
137 off += i386_round_page(vmst->hdr.bitmapsize);
139 if (_kvm_pmap_init(kd, vmst->hdr.ptesize, off) == -1) {
142 off += i386_round_page(vmst->hdr.ptesize);
157 vm = kd->vmst;
202 vm = kd->vmst;
245 if (kd->vmst->hdr.paemode)
274 struct vmstate *vm = kd->vmst;
290 struct vmstate *vm = it->kd->vmst;