• Alex Williamson's avatar
    KVM: lock slots_lock around device assignment · 21a1416a
    Alex Williamson authored
    As pointed out by Jason Baron, when assigning a device to a guest
    we first set the iommu domain pointer, which enables mapping
    and unmapping of memory slots to the iommu.  This leaves a window
    where this path is enabled, but we haven't synchronized the iommu
    mappings to the existing memory slots.  Thus a slot being removed
    at that point could send us down unexpected code paths removing
    non-existent pinnings and iommu mappings.  Take the slots_lock
    around creating the iommu domain and initial mappings as well as
    around iommu teardown to avoid this race.
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    21a1416a
Name
Last commit
Last update
..
Kconfig Loading commit data...
assigned-dev.c Loading commit data...
async_pf.c Loading commit data...
async_pf.h Loading commit data...
coalesced_mmio.c Loading commit data...
coalesced_mmio.h Loading commit data...
eventfd.c Loading commit data...
ioapic.c Loading commit data...
ioapic.h Loading commit data...
iodev.h Loading commit data...
iommu.c Loading commit data...
irq_comm.c Loading commit data...
kvm_main.c Loading commit data...