>> > I don't think a workqueue is even needed. You just need to use >> > call_rcu to free "old" after releasing kvm->irq_lock. >> > >> > What do you think? >> >> It should be rate limited somehow. Since it guest triggarable guest >> may cause host to allocate a lot of memory this way. > Why does "use call_rcu to free "old" after releasing kvm->irq_lock" may cause host to allocate a lot of memory? Do you mean that malicious guest's frequent irq-routing-table updating operations will result in too many delayed mem-free of old irq-routing-tables?
Thanks, Zhang Haoyu >True, though if I understand Zhanghaoyu's proposal a workqueue would be even >worse. > >Paolo