Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

Paolo Bonzini
2013-11-28T08:55:55Z

Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto:
>> >Without synchronize_rcu you could have
>> >
>> > VCPU writes to routing table
>> > e = entry from IRQ routing table
>> > kvm_irq_routing_update(kvm, new);
>> > VCPU resumes execution
>> > kvm_set_msi_irq(e, &irq);
>> > kvm_irq_delivery_to_apic_fast();
>> >
>> >where the entry is stale but the VCPU has already resumed execution.
>> >
> If we use call_rcu()(Not consider the problem that Gleb pointed out temporarily) instead of synchronize_rcu(), should we still ensure this?

The problem is that we should ensure this, so using call_rcu is not
possible (even not considering the memory allocation problem).

Can you try using SRCU and synchronize_srcu?

Paolo