From ce1b89352262796a2903958d1991d1e10d96755f Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Tue, 12 Apr 2011 12:36:25 +0300 Subject: [PATCH] --- yaml --- r: 248086 b: refs/heads/master c: 2aab2c5b2bac6510b3bd143ca83babee382f4302 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/x86.c | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 562c25560ee2..4fed907c12e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0004c7c25757f103ddb3a9e4bcfd533aad41f9a0 +refs/heads/master: 2aab2c5b2bac6510b3bd143ca83babee382f4302 diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index a9a307a75465..f5f2d3d44577 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -4459,6 +4459,12 @@ static void init_emulate_ctxt(struct kvm_vcpu *vcpu) struct decode_cache *c = &vcpu->arch.emulate_ctxt.decode; int cs_db, cs_l; + /* + * TODO: fix emulate.c to use guest_read/write_register + * instead of direct ->regs accesses, can save hundred cycles + * on Intel for instructions that don't read/change RSP, for + * for example. + */ cache_all_regs(vcpu); kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l); @@ -4562,14 +4568,6 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, kvm_clear_exception_queue(vcpu); - /* - * TODO: fix emulate.c to use guest_read/write_register - * instead of direct ->regs accesses, can save hundred cycles - * on Intel for instructions that don't read/change RSP, for - * for example. - */ - cache_all_regs(vcpu); - if (!(emulation_type & EMULTYPE_NO_DECODE)) { init_emulate_ctxt(vcpu); vcpu->arch.emulate_ctxt.interruptibility = 0;