From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
Cornelia Huck <cohuck@redhat.com>,
qemu-stable@nongnu.org
Subject: [Qemu-devel] [PULL 5/6] vfio-ap: flag as compatible with balloon
Date: Wed, 12 Dec 2018 10:55:18 +0100 [thread overview]
Message-ID: <20181212095519.6390-6-cohuck@redhat.com> (raw)
In-Reply-To: <20181212095519.6390-1-cohuck@redhat.com>
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: qemu-stable@nongnu.org
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
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
next prev parent reply other threads:[~2018-12-12 9:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 9:55 [Qemu-devel] [PULL 0/6] s390x: first batch of 4.0 changes Cornelia Huck
2018-12-12 9:55 ` [Qemu-devel] [PULL 1/6] s390x/zpci: drop msix.available Cornelia Huck
2018-12-12 9:55 ` [Qemu-devel] [PULL 2/6] s390x: introduce 4.0 compat machine Cornelia Huck
2018-12-12 9:55 ` [Qemu-devel] [PULL 3/6] s390/MAINTAINERS: Add Halil as kvm and machine maintainer Cornelia Huck
2018-12-12 9:55 ` [Qemu-devel] [PULL 4/6] s390x/tod: Properly stop the KVM TOD while the guest is not running Cornelia Huck
2018-12-12 9:55 ` Cornelia Huck [this message]
2018-12-12 9:55 ` [Qemu-devel] [PULL 6/6] hw/s390x/virtio-ccw.c: Don't take address of fields in packed structs Cornelia Huck
2018-12-13 13:41 ` [Qemu-devel] [PULL 0/6] s390x: first batch of 4.0 changes Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181212095519.6390-6-cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).