You need to sign in or sign up before continuing.
提交 1883e8fc 编写于 作者: C Cornelia Huck

vfio-ap: flag as compatible with balloon

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: NChristian Borntraeger <borntraeger@de.ibm.com>
Tested-by: NTony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: NHalil Pasic <pasic@linux.ibm.com>
Signed-off-by: NCornelia Huck <cohuck@redhat.com>
上级 9bc9d3d1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册