qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	Tony Krowiak <akrowiak@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC] vfio-ap: flag as compatible with balloon
Date: Wed, 5 Dec 2018 17:45:08 +0100	[thread overview]
Message-ID: <20181205174508.3e2452af.cohuck@redhat.com> (raw)
In-Reply-To: <0d97dcf5-de40-3f18-64fc-7b2eb1799a84@redhat.com>

On Wed, 5 Dec 2018 17:38:22 +0100
David Hildenbrand <david@redhat.com> wrote:

> On 05.12.18 15:51, Cornelia Huck wrote:
> > 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;
> >   
> 
> What happens if this ever changes? Shouldn't we have an API to at least
> check what the vfio device can guarantee?
> 
> "are believed to operate" doesn't sound like guarantees to me :)

It's the same for ccw :)

While such an API definitely sounds like a good idea, it is probably
overkill to introduce it for this case (do we envision changing the way
vfio-ap operates in the future to make that statement non-true?)

  reply	other threads:[~2018-12-05 16:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20181205174508.3e2452af.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@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).