On 12/02/2009 04:16 PM, Avi Kivity wrote:
Unfortunately, this does sort of put a damper on what's going on later
in the series. If the i8254 doesn't belong to the BSP (which it really
shouldn't), then I don't know which vcpu to raise the bit on. Maybe I
can do it in the kvm_irq_delivery_to_apic() function, or
kvm_apic_set_irq(). I'll take a look at that.
We shouldn't have that bit at all.
An alternative is to make the pic/ioapic work in irq context
(spin_lock_irq() and friends) and queue the interrupt directly from
the hrtimer instead of the vcpu. My worry is that we have quite a bit
of work to do in irq context if the interrupt is broadcast and if we
have many vcpus; maybe we can use a work_struct in that case.
er, you do that later on. In this case nothing blocks the removal of
the bit - if the timer causes an interrupt to be injected, then the
lapic/irq code will send an IPI to the vcpu to cause it to resample.
See __apic_accept_irq() in lapic.c calling kvm_vcpu_kick(), for example.
The only issue is the ordering of the patches, you can only remove
KVM_REQ_PENDING_TIMER after rearranging interrupt injection to happen
inline.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html