> > > > > > So is the conclusion that KVM should copy only insn_size bytes rather > > > than the full 15? > > > > Insn_size should almost always be 15. It will only be less when the > > emulator hits a page crossing before fetching 15 bytes and it can't > > fetch from the second page. > > Oh, or if the CS limit is reached. (cf. AMD's APM, volume 2, section > 15.8.4: Nested and intercepted #PF). To sum this up as I understand it. I'm _not_ going to clear 'run->internal.data' to zero. I'll leave it to userspace to clear vcpu->run. I'll copy over 'insn_size' bytes rather than 'sizeof(ctxt->fetch.data)' bytes to 'run->emulation_failure.insn_bytes', and if 'insn_size' < 15, I'll stamp the remaining bytes with 0x90. Let me know if I missed anything. > >