Re: [RFC PATCH 2/4] KVM: emulate: avoid repeated calls to do_insn_fetch_bytes

2014-05-07 Thread Paolo Bonzini
Il 07/05/2014 06:21, Bandan Das ha scritto: > + if (rc != X86EMUL_CONTINNUE) > + goto done; > + } > + >while (size--) { > - if (unlikely(ctxt->_eip == fc->end)) { > - rc = do_insn_fetch_bytes(ctxt); > - if (rc !=

Re: [RFC PATCH 2/4] KVM: emulate: avoid repeated calls to do_insn_fetch_bytes

2014-05-07 Thread Paolo Bonzini
Il 07/05/2014 06:21, Bandan Das ha scritto: + if (rc != X86EMUL_CONTINNUE) + goto done; + } + while (size--) { - if (unlikely(ctxt-_eip == fc-end)) { - rc = do_insn_fetch_bytes(ctxt); - if (rc != X86EMUL_CONTINUE)

Re: [RFC PATCH 2/4] KVM: emulate: avoid repeated calls to do_insn_fetch_bytes

2014-05-06 Thread Bandan Das
Paolo Bonzini writes: > do_insn_fetch_bytes will only be called once in a given insn_fetch and > insn_fetch_arr, because in fact it will only be called at most twice > for any instruction and the first call is explicit in x86_decode_insn. > This observation lets us hoist the call out of the

[RFC PATCH 2/4] KVM: emulate: avoid repeated calls to do_insn_fetch_bytes

2014-05-06 Thread Paolo Bonzini
do_insn_fetch_bytes will only be called once in a given insn_fetch and insn_fetch_arr, because in fact it will only be called at most twice for any instruction and the first call is explicit in x86_decode_insn. This observation lets us hoist the call out of the memory copying loop. It does not buy

Re: [RFC PATCH 2/4] KVM: emulate: avoid repeated calls to do_insn_fetch_bytes

2014-05-06 Thread Bandan Das
Paolo Bonzini pbonz...@redhat.com writes: do_insn_fetch_bytes will only be called once in a given insn_fetch and insn_fetch_arr, because in fact it will only be called at most twice for any instruction and the first call is explicit in x86_decode_insn. This observation lets us hoist the call

[RFC PATCH 2/4] KVM: emulate: avoid repeated calls to do_insn_fetch_bytes

2014-05-06 Thread Paolo Bonzini
do_insn_fetch_bytes will only be called once in a given insn_fetch and insn_fetch_arr, because in fact it will only be called at most twice for any instruction and the first call is explicit in x86_decode_insn. This observation lets us hoist the call out of the memory copying loop. It does not buy