Adds a cs_base() helper for consistency with other emulator functions Signed-off-by: Mohammed Gamal <m.gamal005@xxxxxxxxx> --- arch/x86/kvm/emulate.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e8bdddc..f40479a 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -642,6 +642,12 @@ static unsigned long seg_override_base(struct x86_emulate_ctxt *ctxt, return seg_base(ctxt, ops, c->seg_override); } +static unsigned long cs_base(struct x86_emulate_ctxt *ctxt, + struct x86_emulate_ops *ops) +{ + return seg_base(ctxt, ops, VCPU_SREG_CS); +} + static unsigned long es_base(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) { @@ -975,7 +981,7 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) c->eip = ctxt->eip; c->fetch.start = c->fetch.end = c->eip; - ctxt->cs_base = seg_base(ctxt, ops, VCPU_SREG_CS); + ctxt->cs_base = cs_base(ctxt, ops); switch (mode) { case X86EMUL_MODE_REAL: -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html