• Oded Gabbay's avatar
    habanalabs: prevent device PTE read/write during hard-reset · 7de03fc0
    Oded Gabbay authored
    [ Upstream commit 9f201aba ]
    
    During hard-reset, contexts are closed as part of the tear-down process.
    After a context is closed, the driver cleans up the page tables of that
    context in the device's DRAM. This action is both dangerous and
    unnecessary.
    
    It is unnecessary, because the device is going through a hard-reset, which
    means the device's DRAM contents are no longer valid and the device's MMU
    is being reset.
    
    It is dangerous, because if the hard-reset came as a result of a PCI
    freeze, this action may cause the entire host machine to hang.
    
    Therefore, prevent all device PTE updates when a hard-reset operation is
    pending.
    Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    7de03fc0
goya.c 142 KB