Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248086
b: refs/heads/master
c: 2aab2c5
h: refs/heads/master
v: v3
  • Loading branch information
Gleb Natapov authored and Avi Kivity committed May 22, 2011
1 parent c50809e commit ce1b893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0004c7c25757f103ddb3a9e4bcfd533aad41f9a0
refs/heads/master: 2aab2c5b2bac6510b3bd143ca83babee382f4302
14 changes: 6 additions & 8 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ce1b893

Please sign in to comment.