qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC] vfio-ap: flag as compatible with balloon
@ 2018-12-05 14:51 Cornelia Huck
  2018-12-05 16:05 ` Christian Borntraeger
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Cornelia Huck @ 2018-12-05 14:51 UTC (permalink / raw)
  To: Christian Borntraeger, Tony Krowiak, Halil Pasic, Pierre Morel
  Cc: Alex Williamson, David Hildenbrand, qemu-s390x, qemu-devel,
	Cornelia Huck

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 <cohuck@redhat.com>
---

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

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-12-07 15:06 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 14:51 [Qemu-devel] [PATCH RFC] vfio-ap: flag as compatible with balloon Cornelia Huck
2018-12-05 16:05 ` Christian Borntraeger
2018-12-05 16:38 ` David Hildenbrand
2018-12-05 16:45   ` Cornelia Huck
2018-12-05 17:25     ` Christian Borntraeger
2018-12-06  8:28       ` David Hildenbrand
2018-12-06 12:32         ` Halil Pasic
2018-12-06 12:48           ` Cornelia Huck
2018-12-06 20:51             ` Tony Krowiak
2018-12-06 23:01 ` Tony Krowiak
2018-12-07 12:17 ` Christian Borntraeger
2018-12-07 12:29   ` Cornelia Huck
2018-12-07 12:32     ` Christian Borntraeger
2018-12-07 12:38       ` Cornelia Huck
2018-12-07 12:52     ` Halil Pasic
2018-12-07 13:17       ` Cornelia Huck
2018-12-07 14:04         ` Halil Pasic
2018-12-07 15:00           ` Cornelia Huck
2018-12-07 15:05 ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).