On Sun, Sep 17, 2017 at 06:32:10PM +0200, Andrew Jones wrote: > Oh, kvm_arch_vcpu_runnable(), how I love thee. Let me count the ways: I just sent patches for this, as patches speak louder than poetry, but the series makes a couple changes to the proposal: > > ======== > Proposal > ======== > > 1) Add a VCPU request to be used by KVM_IRQ_LINE to deassert the line. > The new VCPU request will be flagged with KVM_REQUEST_NO_WAKEUP, and > the IRQ_PENDING request will not be set on deasserts. This part was dropped. If we did this, then irq-line would behave more like an edge interrupt than a level, so we need to continue checking irq_lines in runnable() no matter what. > > 2) Make runnable() more obvious and future proof by adding an explicit > check for the 'waiting-for-interrupts' VCPU state. This can be done > with a new 'halted' boolean that gets set when emulating WFI. Rather than introduce yet another boolean, power_off was replaced with mp_state, allowing KVM_MP_STATE_HALTED to be used. > > 3) Just check the IRQ_PENDING VCPU request for runnable()'s > 'interrupts-pending' check. > > 4) Clean up all the 'power_off || pause' checks scattered throughout > virt/kvm/arm/arm.c by wrapping the condition in a function. > Thanks, drew _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm