Re: [PATCH v4 0/6] Nonatomic interrupt injection

Avi Kivity
2010-09-19T10:09:36Z

On 09/19/2010 11:28 AM, Avi Kivity wrote:
> On 09/19/2010 11:25 AM, Avi Kivity wrote:
>>
>> Let's assume that this is so (I'll check).
>
> It's trivially so. If a completion causes an interrupt to be raised,
> the vcpu's apic code is executed in the iothread context.
>
>

However, that's a bug even with the optimization removed:

iothread vcpu
ioapic interrrupt
apic: set isr
mov $large_value, cr8
on_vcpu(inject)
inject interrupt even though cr8 inhibits it

Setting the isr and injecting the interrupt should be an atomic
operation (easily done be running the apic code on the vcpu thread).

--
error compiling committee.c: too many arguments to function