[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon |
Date: |
Wed, 5 Dec 2018 15:51:31 +0100 |
vfio-ap devices do not pin any pages in the host. Therefore, they
are belived to be compatible with memory ballooning.
Flag them as compatible, so both vfio-ap and a balloon can be
used simultaneously.
Signed-off-by: Cornelia Huck <address@hidden>
---
As briefly discussed on IRC. RFC as I do not have easy access to
hardware I can test this with.
---
hw/vfio/ap.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 65de952f44..3bf48eed28 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 are believed to 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-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon,
Cornelia Huck <=
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Christian Borntraeger, 2018/12/05
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, David Hildenbrand, 2018/12/05
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Cornelia Huck, 2018/12/05
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Christian Borntraeger, 2018/12/05
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, David Hildenbrand, 2018/12/06
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Halil Pasic, 2018/12/06
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Cornelia Huck, 2018/12/06
- Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Tony Krowiak, 2018/12/06
Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Tony Krowiak, 2018/12/06
Re: [qemu-s390x] [PATCH RFC] vfio-ap: flag as compatible with balloon, Christian Borntraeger, 2018/12/07