Lines Matching refs:regs

147         sel = ctxt->regs->ss;  in read_mem()
187 void pv_emulate_gate_op(struct cpu_user_regs *regs) in pv_emulate_gate_op() argument
191 struct gate_op_ctxt ctxt = { .ctxt.regs = regs, .insn_fetch = true }; in pv_emulate_gate_op()
198 if ( !read_gate_descriptor(regs->error_code, v, &sel, &off, &ar) || in pv_emulate_gate_op()
199 (((ar >> 13) & 3) < (regs->cs & 3)) || in pv_emulate_gate_op()
202 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
207 pv_inject_hw_exception(TRAP_no_segment, regs->error_code); in pv_emulate_gate_op()
217 if ( !pv_emul_read_descriptor(regs->cs, v, &ctxt.cs.base, &ctxt.cs.limit, in pv_emulate_gate_op()
223 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
236 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
282 (opnd_sel & ~3) != regs->error_code || in pv_emulate_gate_op()
285 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
293 ((ar >> 13) & 3) > (regs->cs & 3) : in pv_emulate_gate_op()
294 ((ar >> 13) & 3) != (regs->cs & 3)) ) in pv_emulate_gate_op()
327 if ( ((ar >> 13) & 3) < (regs->cs & 3) ) in pv_emulate_gate_op()
333 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
357 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
360 push(regs->ss); in pv_emulate_gate_op()
361 push(regs->rsp); in pv_emulate_gate_op()
366 if ( !pv_emul_read_descriptor(regs->ss, v, &base, in pv_emulate_gate_op()
368 ((ar >> 13) & 3) != (regs->cs & 3) || in pv_emulate_gate_op()
373 return pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
375 ((unsigned int)base + regs->esp + nparm * 4); in pv_emulate_gate_op()
378 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
398 sel |= (regs->cs & 3); in pv_emulate_gate_op()
399 esp = regs->rsp; in pv_emulate_gate_op()
400 ss = regs->ss; in pv_emulate_gate_op()
404 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
415 pv_inject_hw_exception(TRAP_gp_fault, regs->error_code); in pv_emulate_gate_op()
419 push(regs->cs); in pv_emulate_gate_op()
420 push(regs->rip + insn_len); in pv_emulate_gate_op()
422 regs->rsp = esp; in pv_emulate_gate_op()
423 regs->ss = ss; in pv_emulate_gate_op()
426 sel |= (regs->cs & 3); in pv_emulate_gate_op()
428 regs->cs = sel; in pv_emulate_gate_op()
429 pv_emul_instruction_done(regs, off); in pv_emulate_gate_op()