[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 16/36] vfio-ap: flag as compatible with balloon
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 16/36] vfio-ap: flag as compatible with balloon |
Date: |
Tue, 23 Jul 2019 12:00:44 -0500 |
From: Cornelia Huck <address@hidden>
vfio-ap devices do not pin any pages in the host. Therefore, they
are compatible with memory ballooning.
Flag them as compatible, so both vfio-ap and a balloon can be
used simultaneously.
Cc: address@hidden
Acked-by: Christian Borntraeger <address@hidden>
Tested-by: Tony Krowiak <address@hidden>
Reviewed-by: Halil Pasic <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
(cherry picked from commit 1883e8fc8005e9ef452890a075bae98e8c432968)
Signed-off-by: Michael Roth <address@hidden>
---
hw/vfio/ap.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 65de952f44..0a25f5e096 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -104,6 +104,14 @@ static void vfio_ap_realize(DeviceState *dev, Error **errp)
vapdev->vdev.name = g_strdup_printf("%s", mdevid);
vapdev->vdev.dev = dev;
+ /*
+ * vfio-ap devices operate in a way compatible with
+ * memory ballooning, as no pages are pinned in the host.
+ * This needs to be set before vfio_get_device() for vfio common to
+ * handle the balloon inhibitor.
+ */
+ vapdev->vdev.balloon_allowed = true;
+
ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err);
if (ret) {
goto out_get_dev_err;
--
2.17.1
- [Qemu-stable] [PATCH 00/36] Patch Round-up for stable 3.1.1, freeze on 2019-07-29, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 10/36] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 09/36] exec.c: Don't reallocate IOMMUNotifiers that are in use, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 13/36] hw/rdma: another clang compilation fix, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 11/36] tpm: Make sure the locality received from backend is valid, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 16/36] vfio-ap: flag as compatible with balloon,
Michael Roth <=
- [Qemu-stable] [PATCH 15/36] tpm_tis: fix loop that cancels any seizure by a lower locality, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 12/36] block: Fix invalidate_cache error path for parent activation, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 20/36] qga-win: include glib when building VSS DLL, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 17/36] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 18/36] i386: remove the 'INTEL_PT' CPUID bit from named CPU models, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 25/36] usb-mtp: use O_NOFOLLOW and O_CLOEXEC., Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 19/36] json: Fix % handling when not interpolating, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 27/36] qcow2: Avoid COW during metadata preallocation, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 24/36] qga: update docs with systemd suspend support info, Michael Roth, 2019/07/23
- [Qemu-stable] [PATCH 21/36] configure: improve usbfs check, Michael Roth, 2019/07/23