Skip to contentSkip to conversation

device-assignment deadlock

DISCUSSION Alex Williamson 1 participant 1 message May 8, 2009 KVM

lore
Share & tools
lore
#0 lore raw

Hi Sheng,

I think I'm running into the following deadlock in the kvm kernel module when trying to use device assignment:

CPU A CPU B
kvm_vm_ioctl_deassign_dev_irq()
mutex_lock(&kvm->lock); worker_thread()
-> kvm_deassign_irq() -> kvm_assigned_dev_interrupt_work_handler()

    -> deassign_host_irq()              mutex_lock(&kvm->lock);
      -> cancel_work_sync() [blocked]

I wonder if we need finer granularity locking to avoid this. Suggestions? Thanks,

Alex