lkml.org 
[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Remapping pages mapped to userspace
    From
    Date
    On Iau, 2006-03-16 at 17:12 -0800, Roland Dreier wrote:
    > 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.

    Config space looks more problematic but memory maps of PCI space appear
    to be ok.

    Alan

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-03-17 02:25    [W:4.161 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site