Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-rm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-rm
  • Repository
Switch branch/tag
  • linux-rm
  • arch
  • powerpc
  • platforms
  • pseries
  • svm.c
Find file BlameHistoryPermalink
  • Will Deacon's avatar
    powerpc/svm: Don't issue ultracalls if !mem_encrypt_active() · a449ffaf
    Will Deacon authored Jul 30, 2021
    Commit ad6c0028 ("swiotlb: Free tbl memory in swiotlb_exit()")
    introduced a set_memory_encrypted() call to swiotlb_exit() so that the
    buffer pages are returned to an encrypted state prior to being freed.
    
    Sachin reports that this leads to the following crash on a Power server:
    
    [    0.010799] software IO TLB: tearing down default memory pool
    [    0.010805] ------------[ cut here ]------------
    [    0.010808] kernel BUG at arch/powerpc/kernel/interrupt.c:98!
    
    Nick spotted that this is because set_memory_encrypted() is issuing an
    ultracall which doesn't exist for the processor, and should therefore
    be gated by mem_encrypt_active() to mirror the x86 implementation.
    
    Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Claire Chang <tientzu@chromium.org>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Robin Murphy <robin.murphy@arm.com>
    Fixes: ad6c0028
    
     ("swiotlb: Free tbl memory in swiotlb_exit()")
    Suggested-by: default avatarNicholas Piggin <npiggin@gmail.com>
    Reported-by: default avatarSachin Sant <sachinp@linux.vnet.ibm.com>
    Tested-by: default avatarSachin Sant <sachinp@linux.vnet.ibm.com>
    Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
    Link: https://lore.kernel.org/r/1905CD70-7656-42AE-99E2-A31FC3812EAC@linux.vnet.ibm.com/
    
    
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad@kernel.org>
    a449ffaf