[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/6] vfio-ap: flag as compatible with balloon
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 5/6] vfio-ap: flag as compatible with balloon |
Date: |
Wed, 12 Dec 2018 10:55:18 +0100 |
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>
---
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.2
- [Qemu-devel] [PULL 0/6] s390x: first batch of 4.0 changes, Cornelia Huck, 2018/12/12
- [Qemu-devel] [PULL 1/6] s390x/zpci: drop msix.available, Cornelia Huck, 2018/12/12
- [Qemu-devel] [PULL 2/6] s390x: introduce 4.0 compat machine, Cornelia Huck, 2018/12/12
- [Qemu-devel] [PULL 3/6] s390/MAINTAINERS: Add Halil as kvm and machine maintainer, Cornelia Huck, 2018/12/12
- [Qemu-devel] [PULL 6/6] hw/s390x/virtio-ccw.c: Don't take address of fields in packed structs, Cornelia Huck, 2018/12/12
- [Qemu-devel] [PULL 5/6] vfio-ap: flag as compatible with balloon,
Cornelia Huck <=
- [Qemu-devel] [PULL 4/6] s390x/tod: Properly stop the KVM TOD while the guest is not running, Cornelia Huck, 2018/12/12
- Re: [Qemu-devel] [PULL 0/6] s390x: first batch of 4.0 changes, Peter Maydell, 2018/12/13