On 07/01/21 21:19, Sean Christopherson wrote:
That said, the v1 change had some appeal to it.
Which v1 change are you referring to?
Moving the to-be-injected event from eventinj to vcpu->arch, and from
there to vmcb02 on the next vmentry's inject_pending_event.
In the VMX case (if properly implemented) it would allow removing the weird
nested_run_pending case from prepare_vmcs02_early. I think it's a valuable
invariant that there are no events in the VMCS after each KVM_RUN iteration,
and this special case is breaking the invariant.
Hmm, as weird as that code is, I think it's actually the most architecturally
correct behavior.
I was referring to the "then" branch therein. :)
Paolo