On 06/05/20 17:25, Sean Christopherson wrote: >> >> The patch is a bit ad hoc, I'd rather move the whole "if >> (kvm_request_pending(vcpu))" from vcpu_enter_guest to vcpu_run (via a >> new function). > It might make sense to go with an ad hoc patch to get the thing fixed, then > worry about cleaning up the pending request crud. It'd be nice to get rid > of the extra nested_ops->check_events() call in kvm_vcpu_running(), as well > as all of the various request checks in (or triggered by) vcpu_block(). Yes, I agree that there are unnecessary tests in kvm_vcpu_running() if requests are handled before vcpu_block and that would be a nice cleanup, but I'm asking about something less ambitious. Can you think of something that can go wrong if we just move all requests, except for KVM_REQ_EVENT, up from vcpu_enter_guest() to vcpu_run()? That might be more or less as ad hoc as Oliver's patch, but without the code duplication at least. Paolo > I was very tempted to dive into that mess when working on the nested events > stuff, but was afraid that I would be opening up pandora's box.