[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/HVMemul: use unambiguous register names
commit 6553218e46456b5b7fb1bed044fe5153b04314be Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Jan 3 09:43:29 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jan 3 09:43:29 2017 +0100 x86/HVMemul: use unambiguous register names This is in preparation of eliminating the mis-naming of 64-bit fields with 32-bit register names (eflags instead of rflags etc). Use the guaranteed 32-bit underscore prefixed names for now where appropriate. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/hvm/emulate.c | 16 ++++++++-------- xen/arch/x86/hvm/io.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index aa1b716..41bd4f5 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -442,7 +442,7 @@ static int hvmemul_linear_to_phys( } /* Reverse mode if this is a backwards multi-iteration string operation. */ - reverse = (hvmemul_ctxt->ctxt.regs->eflags & X86_EFLAGS_DF) && (*reps > 1); + reverse = (hvmemul_ctxt->ctxt.regs->_eflags & X86_EFLAGS_DF) && (*reps > 1); if ( reverse && ((PAGE_SIZE - offset) < bytes_per_rep) ) { @@ -539,7 +539,7 @@ static int hvmemul_virtual_to_linear( if ( IS_ERR(reg) ) return -PTR_ERR(reg); - if ( (hvmemul_ctxt->ctxt.regs->eflags & X86_EFLAGS_DF) && (*reps > 1) ) + if ( (hvmemul_ctxt->ctxt.regs->_eflags & X86_EFLAGS_DF) && (*reps > 1) ) { /* * x86_emulate() clips the repetition count to ensure we don't wrap @@ -1074,7 +1074,7 @@ static int hvmemul_rep_ins( return X86EMUL_UNHANDLEABLE; return hvmemul_do_pio_addr(src_port, reps, bytes_per_rep, IOREQ_READ, - !!(ctxt->regs->eflags & X86_EFLAGS_DF), gpa); + !!(ctxt->regs->_eflags & X86_EFLAGS_DF), gpa); } static int hvmemul_rep_outs_set_context( @@ -1143,7 +1143,7 @@ static int hvmemul_rep_outs( return X86EMUL_UNHANDLEABLE; return hvmemul_do_pio_addr(dst_port, reps, bytes_per_rep, IOREQ_WRITE, - !!(ctxt->regs->eflags & X86_EFLAGS_DF), gpa); + !!(ctxt->regs->_eflags & X86_EFLAGS_DF), gpa); } static int hvmemul_rep_movs( @@ -1162,7 +1162,7 @@ static int hvmemul_rep_movs( paddr_t sgpa, dgpa; uint32_t pfec = PFEC_page_present; p2m_type_t sp2mt, dp2mt; - int rc, df = !!(ctxt->regs->eflags & X86_EFLAGS_DF); + int rc, df = !!(ctxt->regs->_eflags & X86_EFLAGS_DF); char *buf; rc = hvmemul_virtual_to_linear( @@ -1316,7 +1316,7 @@ static int hvmemul_rep_stos( unsigned long addr, bytes; paddr_t gpa; p2m_type_t p2mt; - bool_t df = !!(ctxt->regs->eflags & X86_EFLAGS_DF); + bool_t df = !!(ctxt->regs->_eflags & X86_EFLAGS_DF); int rc = hvmemul_virtual_to_linear(seg, offset, bytes_per_rep, reps, hvm_access_write, hvmemul_ctxt, &addr); @@ -1768,7 +1768,7 @@ static int _hvm_emulate_one(struct hvm_emulate_ctxt *hvmemul_ctxt, if ( hvmemul_ctxt->ctxt.retire.hlt && !hvm_local_events_need_delivery(curr) ) { - hvm_hlt(regs->eflags); + hvm_hlt(regs->_eflags); } return X86EMUL_OKAY; @@ -1933,7 +1933,7 @@ void hvm_emulate_init_per_insn( if ( hvmemul_ctxt->seg_reg[x86_seg_ss].attr.fields.dpl == 3 ) pfec |= PFEC_user_mode; - hvmemul_ctxt->insn_buf_eip = hvmemul_ctxt->ctxt.regs->eip; + hvmemul_ctxt->insn_buf_eip = hvmemul_ctxt->ctxt.regs->rip; if ( !insn_bytes ) { hvmemul_ctxt->insn_buf_bytes = diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index faf8ed0..256408b 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -136,7 +136,7 @@ bool handle_pio(uint16_t port, unsigned int size, int dir) ASSERT((size - 1) < 4 && size != 3); if ( dir == IOREQ_WRITE ) - data = guest_cpu_user_regs()->eax; + data = guest_cpu_user_regs()->_eax; rc = hvmemul_do_pio_buffer(port, size, dir, &data); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |