From a2262631df6cb0b625014963ef7e20961e62f886 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 3 Apr 2011 12:33:12 +0300 Subject: [PATCH] --- yaml --- r: 248035 b: refs/heads/master c: 52fd8b445f5e8572526e3f84c753079470152414 h: refs/heads/master i: 248033: 5bae52ffd1a5e307ea4b394985d82c9293c52d32 248031: 52a510580b6c307817c5f031af46ed1ea794f240 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/emulate.c | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 0050b985cf0e..f35619ccc448 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83b8795a29c53a5f9f202933818128aa54c3e8d2 +refs/heads/master: 52fd8b445f5e8572526e3f84c753079470152414 diff --git a/trunk/arch/x86/kvm/emulate.c b/trunk/arch/x86/kvm/emulate.c index a2d343c4c0c1..601a9bca4b72 100644 --- a/trunk/arch/x86/kvm/emulate.c +++ b/trunk/arch/x86/kvm/emulate.c @@ -489,21 +489,6 @@ static unsigned seg_override(struct x86_emulate_ctxt *ctxt, return c->seg_override; } -static int linearize(struct x86_emulate_ctxt *ctxt, - struct segmented_address addr, - unsigned size, bool write, - ulong *linear) -{ - struct decode_cache *c = &ctxt->decode; - ulong la; - - la = seg_base(ctxt, ctxt->ops, addr.seg) + addr.ea; - if (c->ad_bytes != 8) - la &= (u32)-1; - *linear = la; - return X86EMUL_CONTINUE; -} - static int emulate_exception(struct x86_emulate_ctxt *ctxt, int vec, u32 error, bool valid) { @@ -543,6 +528,21 @@ static int emulate_nm(struct x86_emulate_ctxt *ctxt) return emulate_exception(ctxt, NM_VECTOR, 0, false); } +static int linearize(struct x86_emulate_ctxt *ctxt, + struct segmented_address addr, + unsigned size, bool write, + ulong *linear) +{ + struct decode_cache *c = &ctxt->decode; + ulong la; + + la = seg_base(ctxt, ctxt->ops, addr.seg) + addr.ea; + if (c->ad_bytes != 8) + la &= (u32)-1; + *linear = la; + return X86EMUL_CONTINUE; +} + static int segmented_read_std(struct x86_emulate_ctxt *ctxt, struct segmented_address addr, void *data,