Lines Matching refs:desc
75 void vmx_read_segment_descriptor(CPUState *cpu, struct vmx_segment *desc, X86Seg seg) in vmx_read_segment_descriptor() argument
77 desc->sel = rvmcs(cpu->accel->fd, vmx_segment_fields[seg].selector); in vmx_read_segment_descriptor()
78 desc->base = rvmcs(cpu->accel->fd, vmx_segment_fields[seg].base); in vmx_read_segment_descriptor()
79 desc->limit = rvmcs(cpu->accel->fd, vmx_segment_fields[seg].limit); in vmx_read_segment_descriptor()
80 desc->ar = rvmcs(cpu->accel->fd, vmx_segment_fields[seg].ar_bytes); in vmx_read_segment_descriptor()
83 void vmx_write_segment_descriptor(CPUState *cpu, struct vmx_segment *desc, X86Seg seg) in vmx_write_segment_descriptor() argument
87 wvmcs(cpu->accel->fd, sf->base, desc->base); in vmx_write_segment_descriptor()
88 wvmcs(cpu->accel->fd, sf->limit, desc->limit); in vmx_write_segment_descriptor()
89 wvmcs(cpu->accel->fd, sf->selector, desc->sel); in vmx_write_segment_descriptor()
90 wvmcs(cpu->accel->fd, sf->ar_bytes, desc->ar); in vmx_write_segment_descriptor()
94 struct x86_segment_descriptor *desc, in x86_segment_descriptor_to_vmx() argument
98 vmx_desc->base = x86_segment_base(desc); in x86_segment_descriptor_to_vmx()
99 vmx_desc->limit = x86_segment_limit(desc); in x86_segment_descriptor_to_vmx()
102 desc->g << 15 | in x86_segment_descriptor_to_vmx()
103 desc->db << 14 | in x86_segment_descriptor_to_vmx()
104 desc->l << 13 | in x86_segment_descriptor_to_vmx()
105 desc->avl << 12 | in x86_segment_descriptor_to_vmx()
106 desc->p << 7 | in x86_segment_descriptor_to_vmx()
107 desc->dpl << 5 | in x86_segment_descriptor_to_vmx()
108 desc->s << 4 | in x86_segment_descriptor_to_vmx()
109 desc->type; in x86_segment_descriptor_to_vmx()
113 struct x86_segment_descriptor *desc) in vmx_segment_to_x86_descriptor() argument
115 x86_set_segment_limit(desc, vmx_desc->limit); in vmx_segment_to_x86_descriptor()
116 x86_set_segment_base(desc, vmx_desc->base); in vmx_segment_to_x86_descriptor()
118 desc->type = vmx_desc->ar & 15; in vmx_segment_to_x86_descriptor()
119 desc->s = (vmx_desc->ar >> 4) & 1; in vmx_segment_to_x86_descriptor()
120 desc->dpl = (vmx_desc->ar >> 5) & 3; in vmx_segment_to_x86_descriptor()
121 desc->p = (vmx_desc->ar >> 7) & 1; in vmx_segment_to_x86_descriptor()
122 desc->avl = (vmx_desc->ar >> 12) & 1; in vmx_segment_to_x86_descriptor()
123 desc->l = (vmx_desc->ar >> 13) & 1; in vmx_segment_to_x86_descriptor()
124 desc->db = (vmx_desc->ar >> 14) & 1; in vmx_segment_to_x86_descriptor()
125 desc->g = (vmx_desc->ar >> 15) & 1; in vmx_segment_to_x86_descriptor()