[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/vvmx: Drop sreg_to_index[]
commit f65c1290c0dc122df3ae88a5cf44da99554a6711 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Jan 3 11:55:54 2017 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Jan 5 12:22:55 2017 +0000 x86/vvmx: Drop sreg_to_index[] Since c/s 0888d36b "x86/emul: Correct the decoding of SReg3 operands", x86_seg_* have followed hardware encodings, meaning that this translation table is now an identiy transform. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx> --- xen/arch/x86/hvm/vmx/vvmx.c | 15 +++------------ xen/include/asm-x86/hvm/vmx/vvmx.h | 9 --------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index a5db7f3..cfc9a88 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -191,15 +191,6 @@ bool_t nvmx_ept_enabled(struct vcpu *v) return !!(nvmx->ept.enabled); } -static const enum x86_segment sreg_to_index[] = { - [VMX_SREG_ES] = x86_seg_es, - [VMX_SREG_CS] = x86_seg_cs, - [VMX_SREG_SS] = x86_seg_ss, - [VMX_SREG_DS] = x86_seg_ds, - [VMX_SREG_FS] = x86_seg_fs, - [VMX_SREG_GS] = x86_seg_gs, -}; - struct vmx_inst_decoded { #define VMX_INST_MEMREG_TYPE_MEMORY 0 #define VMX_INST_MEMREG_TYPE_REG 1 @@ -418,9 +409,9 @@ static int decode_vmx_inst(struct cpu_user_regs *regs, decode->type = VMX_INST_MEMREG_TYPE_MEMORY; - if ( info.fields.segment > VMX_SREG_GS ) + if ( info.fields.segment > x86_seg_gs ) goto gp_fault; - hvm_get_segment_register(v, sreg_to_index[info.fields.segment], &seg); + hvm_get_segment_register(v, info.fields.segment, &seg); seg_base = seg.base; base = info.fields.base_reg_invalid ? 0 : @@ -436,7 +427,7 @@ static int decode_vmx_inst(struct cpu_user_regs *regs, size = 1 << (info.fields.addr_size + 1); offset = base + index * scale + disp; - base = !mode_64bit || info.fields.segment >= VMX_SREG_FS ? + base = !mode_64bit || info.fields.segment >= x86_seg_fs ? seg_base + offset : offset; if ( offset + size - 1 < offset || (mode_64bit ? diff --git a/xen/include/asm-x86/hvm/vmx/vvmx.h b/xen/include/asm-x86/hvm/vmx/vvmx.h index af7702b..242e524 100644 --- a/xen/include/asm-x86/hvm/vmx/vvmx.h +++ b/xen/include/asm-x86/hvm/vmx/vvmx.h @@ -87,15 +87,6 @@ enum vmx_regs_enc { VMX_REG_R15, }; -enum vmx_sregs_enc { - VMX_SREG_ES, - VMX_SREG_CS, - VMX_SREG_SS, - VMX_SREG_DS, - VMX_SREG_FS, - VMX_SREG_GS, -}; - union vmx_inst_info { struct { unsigned int scaling :2; /* bit 0-1 */ -- 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 |