Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-124790

Viomem: Windows hybrid shutdown occasionally hangs during hot-unplugging memory

Linking RHIVOS CVEs to...Migration: Automation ...RHELPRIO AssignedTeam ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-10.1
    • virtio-win
    • None
    • Viomem: Windows hybrid shutdown occasionally hangs during hot-unplugging memory
    • Important
    • Bug
    • rhel-virt-windows
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • x86_64

      *Describe the bug*
      We have observed that when performing a memory hot-unplug operation using the viomem driver, if the system is subsequently shut down while the Windows "Fast Startup" (Hybrid Shutdown) feature is enabled, there is a probability that Windows will hang during the shutdown process.

      Our further root-cause analysis has identified a specific deadlock condition. The system consistently deadlocks when the following sequence occurs:
      1. The device receives a power event, specifically EvtDeviceD0ExitPreInterruptsDisabled.
      2. Within the context of this callback, our driver attempts to hot-remove memory by calling MmAllocateNodePagesForMdlEx with the MM_ALLOCATE_AND_HOT_REMOVE flag.

      *To Reproduce*
      Reproduction Steps:
      1. Introduce a 5-second delay in the driver code immediately before the call to MmAllocateNodePagesForMdlEx. This increases the probability that the EvtDeviceD0ExitPreInterruptsDisabled power event will be received before the memory hot-removal operation is executed.
      2. Trigger the memory hot-unplug by sending a QMP command to modify the virtio-mem device configuration.
      3. Immediately after issuing the QMP command, initiate a Windows Hybrid Shutdown.

      Expected Result: The system will consistently hang (deadlock) during the shutdown process with a high probability, requiring a hard reset.

      *Expected behavior*
      The system must successfully complete a Hybrid Shutdown without hanging, even when a memory hot-unplug operation via viomem is performed concurrently

      *VM:*

      • Windows version: Win11 24H2
      • Which driver has a problem: Viomem
      • Driver version or commit hash that was used to build the driver:30003ed7e5c226076bd512a3d14db6d4d0190e19

              mkedzier1 Marek Kedzierski
              yvugenfi@redhat.com Yan Vugenfirer
              Virt Windows SST Bugs Virt Windows SST Bugs
              Menghuan Li Menghuan Li
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: