Re: [PATCH 5/6] KVM: SVM: pass a proper reason in kvm_emulate_instruction()

From: Aaron Lewis
Date: Tue Apr 13 2021 - 14:46:13 EST


>
> > Depending on what you're trying to do with the info, maybe there's a better
> > option. E.g. Aaron is working on a series that includes passing pass the code
> > stream (instruction bytes) to userspace on emulation failure, though I'm not
> > sure if he's planning on providing the VM-Exit reason.
>
> Having the instruction stream will be good.
>
> Aaron: do you have anything to share now? In what time frame do you
> think you might submit patches?

I should be able to have something out later this week. There is no
exit reason as Sean indicated, so if that's important it will have to
be reworked afterwards. For struct internal in kvm_run I use data[0]
for flags to indicate what's contained in the rest of it, I use
data[1] as the instruction size, and I use data[2,3] to store the
instruction bytes. Hope that helps.

>
> I'm happy to re-work this to make the exit reason available, if that's
> the appropriate direction.
>
> dme.
> --
> And you're standing here beside me, I love the passing of time.