1. 07 7月, 2017 3 次提交
  2. 27 6月, 2017 2 次提交
  3. 23 6月, 2017 1 次提交
    • J
      KVM: arm/arm64: Signal SIGBUS when stage2 discovers hwpoison memory · 196f878a
      James Morse 提交于
      Once we enable ARCH_SUPPORTS_MEMORY_FAILURE on arm64, notifications for
      broken memory can call memory_failure() in mm/memory-failure.c to offline
      pages of memory, possibly signalling user space processes and notifying all
      the in-kernel users.
      
      memory_failure() has two modes, early and late. Early is used by
      machine-managers like Qemu to receive a notification when a memory error is
      notified to the host. These can then be relayed to the guest before the
      affected page is accessed. To enable this, the process must set
      PR_MCE_KILL_EARLY in PR_MCE_KILL_SET using the prctl() syscall.
      
      Once the early notification has been handled, nothing stops the
      machine-manager or guest from accessing the affected page. If the
      machine-manager does this the page will fail to be mapped and SIGBUS will
      be sent. This patch adds the equivalent path for when the guest accesses
      the page, sending SIGBUS to the machine-manager.
      
      These two signals can be distinguished by the machine-manager using their
      si_code: BUS_MCEERR_AO for 'action optional' early notifications, and
      BUS_MCEERR_AR for 'action required' synchronous/late notifications.
      
      Do as x86 does, and deliver the SIGBUS when we discover pfn ==
      KVM_PFN_ERR_HWPOISON. Use the hugepage size as si_addr_lsb if this vma was
      allocated as a hugepage. Transparent hugepages will be split by
      memory_failure() before we see them here.
      
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      196f878a
  4. 15 6月, 2017 27 次提交
  5. 08 6月, 2017 7 次提交