seg_desc
static struct seg_desc
struct seg_desc seg_desc;
seg_desc.base = (u_int)USD_GETBASE(usd);
seg_desc.limit = (u_int)(USD_GETLIMIT(usd) << 12) | 0xfff;
seg_desc.limit = (u_int)USD_GETLIMIT(usd);
seg_desc.access = usd->sd_type | usd->sd_dpl << 5 | usd->sd_p << 7;
seg_desc.access |= usd->sd_xx << 12;
seg_desc.access |= usd->sd_def32 << 14;
seg_desc.access |= usd->sd_gran << 15;
return (seg_desc);
int segment, struct seg_desc *seg_desc, int *faultptr)
seg_desc->base = 0;
seg_desc->limit = 0;
seg_desc->access = 0x10000; /* unusable */
*seg_desc = usd_to_seg_desc(&usd);
update_seg_desc(struct vcpu *vcpu, int reg, struct seg_desc *sd)
struct seg_desc seg_desc, seg_desc2;
error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_LDTR, &seg_desc,
update_seg_desc(vcpu, VM_REG_GUEST_LDTR, &seg_desc);
error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_CS, &seg_desc,
update_seg_desc(vcpu, VM_REG_GUEST_CS, &seg_desc);
error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_DS, &seg_desc,
update_seg_desc(vcpu, VM_REG_GUEST_DS, &seg_desc);
error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_ES, &seg_desc,
update_seg_desc(vcpu, VM_REG_GUEST_ES, &seg_desc);
error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_FS, &seg_desc,
update_seg_desc(vcpu, VM_REG_GUEST_FS, &seg_desc);
error = validate_seg_desc(vcpu, ts, VM_REG_GUEST_GS, &seg_desc,
update_seg_desc(vcpu, VM_REG_GUEST_GS, &seg_desc);
struct seg_desc *desc, uint64_t offset, int length, int addrsize,
struct seg_desc seg_desc;
error = vm_get_desc(vcpu, VM_REG_GUEST_SS, &seg_desc.base,
&seg_desc.limit, &seg_desc.access);
if (SEG_DESC_DEF32(seg_desc.access))
&seg_desc, esp, bytes, stacksize, PROT_WRITE, &gla)) {
struct seg_desc nt;
fru_segdesc_t seg_desc;
(void) memset(&seg_desc, 0, sizeof (seg_desc));
seg_desc.field.field_perm = 0x6;
seg_desc.field.operations_perm = 0x6;
seg_desc.field.engineering_perm = 0x6;
seg_desc.field.repair_perm = 0x6;
def.desc.raw_data = seg_desc.raw_data;
vm_get_seg_desc(struct vcpu *vcpu, int reg, struct seg_desc *seg_desc)
error = vm_get_desc(vcpu, reg, &seg_desc->base, &seg_desc->limit,
&seg_desc->access);
int vm_get_seg_desc(struct vcpu *vcpu, int reg, struct seg_desc *seg_desc);
svm_setdesc(void *arg, int vcpu, int reg, const struct seg_desc *desc)
svm_getdesc(void *arg, int vcpu, int reg, struct seg_desc *desc)
static int vmx_getdesc(void *arg, int vcpu, int reg, struct seg_desc *desc);
vmx_getdesc(void *arg, int vcpu, int seg, struct seg_desc *desc)
vmx_setdesc(void *arg, int vcpu, int seg, const struct seg_desc *desc)
struct seg_desc *ret_desc);
const struct seg_desc *desc);
struct seg_desc;
struct seg_desc *desc);
const struct seg_desc *desc);
vm_get_seg_desc(struct vm *vm, int vcpu, int reg, struct seg_desc *desc)
vm_set_seg_desc(struct vm *vm, int vcpu, int reg, const struct seg_desc *desc)
struct seg_desc desc;
struct seg_desc desc;
struct seg_desc desc;
struct seg_desc ss_desc;
struct seg_desc cs_desc;
struct seg_desc *desc, uint64_t offset, int length, int addrsize,
struct seg_desc desc;
struct seg_desc *desc, uint64_t offset, int length, int addrsize,
struct seg_desc desc;