Re: [PATCH 1/2] kvm: x86: Allow userspace to handle emulation errors

David Edmondson
2021-04-21T08:39:39Z

On Tuesday, 2021-04-20 at 18:34:48 UTC, Sean Christopherson wrote:

> On Fri, Apr 16, 2021, Aaron Lewis wrote:
>> + KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES;
>> + vcpu->run->emulation_failure.insn_size = insn_size;
>> + memcpy(vcpu->run->emulation_failure.insn_bytes,
>> + ctxt->fetch.data, sizeof(ctxt->fetch.data));
>
> Doesn't truly matter, but I think it's less confusing to copy over insn_size
> bytes.

And zero out the rest?

dme.
--
Woke up in my clothes again this morning, don't know exactly where I am.