Lines Matching refs:seg_desc
132 static struct seg_desc
135 struct seg_desc seg_desc; in usd_to_seg_desc() local
137 seg_desc.base = (u_int)USD_GETBASE(usd); in usd_to_seg_desc()
139 seg_desc.limit = (u_int)(USD_GETLIMIT(usd) << 12) | 0xfff; in usd_to_seg_desc()
141 seg_desc.limit = (u_int)USD_GETLIMIT(usd); in usd_to_seg_desc()
142 seg_desc.access = usd->sd_type | usd->sd_dpl << 5 | usd->sd_p << 7; in usd_to_seg_desc()
143 seg_desc.access |= usd->sd_xx << 12; in usd_to_seg_desc()
144 seg_desc.access |= usd->sd_def32 << 14; in usd_to_seg_desc()
145 seg_desc.access |= usd->sd_gran << 15; in usd_to_seg_desc()
147 return (seg_desc); in usd_to_seg_desc()
322 int segment, struct seg_desc *seg_desc, int *faultptr) in validate_seg_desc() argument
374 seg_desc->base = 0; in validate_seg_desc()
375 seg_desc->limit = 0; in validate_seg_desc()
376 seg_desc->access = 0x10000; /* unusable */ in validate_seg_desc()
442 *seg_desc = usd_to_seg_desc(&usd); in validate_seg_desc()
480 update_seg_desc(struct vcpu *vcpu, int reg, struct seg_desc *sd) in update_seg_desc()
495 struct seg_desc seg_desc, seg_desc2; in tss32_restore() local
575 error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_LDTR, &seg_desc, in tss32_restore()
579 update_seg_desc(vcpu, VM_REG_GUEST_LDTR, &seg_desc); in tss32_restore()
590 error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_CS, &seg_desc, in tss32_restore()
599 update_seg_desc(vcpu, VM_REG_GUEST_CS, &seg_desc); in tss32_restore()
603 error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_DS, &seg_desc, in tss32_restore()
607 update_seg_desc(vcpu, VM_REG_GUEST_DS, &seg_desc); in tss32_restore()
609 error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_ES, &seg_desc, in tss32_restore()
613 update_seg_desc(vcpu, VM_REG_GUEST_ES, &seg_desc); in tss32_restore()
615 error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_FS, &seg_desc, in tss32_restore()
619 update_seg_desc(vcpu, VM_REG_GUEST_FS, &seg_desc); in tss32_restore()
621 error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_GS, &seg_desc, in tss32_restore()
625 update_seg_desc(vcpu, VM_REG_GUEST_GS, &seg_desc); in tss32_restore()
673 struct seg_desc *desc, uint64_t offset, int length, int addrsize, in calculate_gla()
784 struct seg_desc seg_desc; in push_errcode() local
796 error = vm_get_desc(vcpu, VM_REG_GUEST_SS, &seg_desc.base, in push_errcode()
797 &seg_desc.limit, &seg_desc.access); in push_errcode()
815 if (SEG_DESC_DEF32(seg_desc.access)) in push_errcode()
824 &seg_desc, esp, bytes, stacksize, PROT_WRITE, &gla)) { in push_errcode()
862 struct seg_desc nt; in vmexit_task_switch()