qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1762707] Re: VFIO device gets DMA failures when virtio


From: Alex Williamson
Subject: [Qemu-devel] [Bug 1762707] Re: VFIO device gets DMA failures when virtio-balloon leak from highmem to lowmem
Date: Tue, 10 Apr 2018 14:22:20 -0000

Ballooning is currently incompatible with device assignment.  When the
balloon is inflated (memory removed from the VM), the pages are zapped
from the process without actually removing them from the vfio DMA
mapping.  The pages are still pinned from the previous mapping, making
the balloon inflation ineffective (pages are not available for re-use).
When the balloon is deflated, new (different) pages are faulted in for
the previously zapped pages, but these are again not DMA mapped for the
IOMMU, so now the physical memory backing a given address in the VM are
different for processor and assigned device access and DMA will fail.
In order to support this, QEMU would need to do more than simply zap
pages from the process address space, they'd need to be unmapped from
the IOMMU, but we can only do that using the original mapping size.
Effectively, memory hotplug is a better solution when device assignment
is involved.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1762707

Title:
  VFIO device gets DMA failures when virtio-balloon leak from highmem to
  lowmem

Status in QEMU:
  New

Bug description:
  Is there any known conflict between VFIO passthrough device and
  virtio-balloon?

  The VM has:
  1. 4GB system memory
  2. one VFIO passthrough device which supports high address memory DMA and 
uses GFP_HIGHUSER pages.
  3. Memory balloon device with 4GB target.

  When setting the memory balloon target to 1GB and 4GB in loop during
  runtime (I used the command "virsh qemu-monitor-command debian --hmp
  --cmd balloon 1024"), the VFIO device DMA randomly gets failure.

  More clues:
  1. configure 2GB system memory (no highmem) VM, no issue with similar 
operations
  2. setting the memory balloon to higher like 8GB, no issue with similar 
operations

  I'm also trying to narrow down this issue. It's appreciated for that
  you guys may share some thoughts.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1762707/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]