Lines Matching full:seg
64 struct vmcb_segment *seg; in vmcb_segptr() local
70 seg = &state->cs; in vmcb_segptr()
74 seg = &state->ds; in vmcb_segptr()
78 seg = &state->es; in vmcb_segptr()
82 seg = &state->fs; in vmcb_segptr()
86 seg = &state->gs; in vmcb_segptr()
90 seg = &state->ss; in vmcb_segptr()
94 seg = &state->gdt; in vmcb_segptr()
98 seg = &state->idt; in vmcb_segptr()
102 seg = &state->ldt; in vmcb_segptr()
106 seg = &state->tr; in vmcb_segptr()
110 seg = NULL; in vmcb_segptr()
114 return (seg); in vmcb_segptr()
166 struct vmcb_segment *seg; in vmcb_read() local
229 seg = vmcb_segptr(vmcb, ident); in vmcb_read()
230 KASSERT(seg != NULL, ("%s: unable to get segment %d from VMCB", in vmcb_read()
232 *retval = seg->selector; in vmcb_read()
237 seg = vmcb_segptr(vmcb, ident == VM_REG_GUEST_FS_BASE ? in vmcb_read()
239 KASSERT(seg != NULL, ("%s: unable to get segment %d from VMCB", in vmcb_read()
241 *retval = seg->base; in vmcb_read()
272 struct vmcb_segment *seg; in vmcb_write() local
345 seg = vmcb_segptr(vmcb, ident); in vmcb_write()
346 KASSERT(seg != NULL, ("%s: unable to get segment %d from VMCB", in vmcb_write()
348 seg->selector = val; in vmcb_write()
369 struct vmcb_segment *seg; in vmcb_seg() local
371 seg = vmcb_segptr(vmcb, ident); in vmcb_seg()
372 if (seg != NULL) { in vmcb_seg()
373 bcopy(seg, seg2, sizeof(struct vmcb_segment)); in vmcb_seg()
384 struct vmcb_segment *seg; in vmcb_setdesc() local
389 seg = vmcb_segptr(vmcb, reg); in vmcb_setdesc()
390 KASSERT(seg != NULL, ("%s: invalid segment descriptor %d", in vmcb_setdesc()
393 seg->base = desc->base; in vmcb_setdesc()
394 seg->limit = desc->limit; in vmcb_setdesc()
406 seg->attrib = attrib; in vmcb_setdesc()
410 "attrib (%#x)", reg, seg->base, seg->limit, seg->attrib); in vmcb_setdesc()
434 struct vmcb_segment *seg; in vmcb_getdesc() local
437 seg = vmcb_segptr(vmcb, reg); in vmcb_getdesc()
438 KASSERT(seg != NULL, ("%s: invalid segment descriptor %d", in vmcb_getdesc()
441 desc->base = seg->base; in vmcb_getdesc()
442 desc->limit = seg->limit; in vmcb_getdesc()
447 desc->access = ((seg->attrib & 0xF00) << 4) | in vmcb_getdesc()
448 (seg->attrib & 0xFF); in vmcb_getdesc()