> > Oh yeah... but getting rid of the mapping so userspace gets a segfault > > might be a good idea too. However, leaving the old PCI mapping there > > seems rather risky to me: I think it's entirely possible that accesses > > to that area after the device is gone could trigger machine checks or > > worse. > > Not really. After all the hot remove can race an actual mmio cycle so > you can't close that window to nothing. In other words if it does make > the PCI bridge burp at you - well hotplug has to handle it. > > That means on the positive side that all you need to do is refcount > properly and destroy the PCI device when you have finished with it. If a > mapping continues to exist then fine, because the device is still > logically there. If the device is logically there then the resources > have not been unmapped. If the resources have not been unmapped they are > not free for allocation to another device. I'm not sure I'm following you. Is it OK for a driver to return from its pci_driver .remove method with userspace mappings to MMIO BARs still hanging around? I wouldn't think so. Non-privileged userspace processes can get direct access to (a safe subset of) PCI space for IB devices, and it seems unfriendly to force all of those processes to be killed before an IB device can be removed. The way I think about it is that one doesn't have to kill every process with a connected socket to remove an ethernet device, and I'd like the same to hold for IB devices. The analogy doesn't really hold at a technical level I know, but it still seems like the friendliest interface. Thanks, Roland - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Andrew Morton <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Andrew Morton <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Andrew Morton <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Hugh Dickins <[email protected]>
- Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- From: Roland Dreier <[email protected]>
- Re: Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- From: "Bryan O'Sullivan" <[email protected]>
- Re: Remapping pages mapped to userspace
- From: Roland Dreier <[email protected]>
- Re: Remapping pages mapped to userspace
- From: Alan Cox <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- Prev by Date: Re: [patch] mspec - special memory driver and do_no_pfn handler
- Next by Date: Re: nfs udp 1000/100baseT issue
- Previous by thread: Re: Remapping pages mapped to userspace
- Next by thread: Re: Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- Index(es):