All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: peterx@redhat.com, cohuck@redhat.com, qemu-devel@nongnu.org,
	kvm@vger.kernel.org, david@redhat.com
Subject: Re: [PATCH v2 0/4] Balloon inhibit enhancements, vfio restriction
Date: Tue, 31 Jul 2018 15:29:17 +0300	[thread overview]
Message-ID: <20180731152716-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <153299204130.14411.11438396195753743913.stgit@gimli.home>

On Mon, Jul 30, 2018 at 05:13:26PM -0600, Alex Williamson wrote:
> v2:
>  - Use atomic ops for balloon inhibit counter (Peter)
>  - Allow endpoint driver opt-in for ballooning, vfio-ccw opt-in by
>    default, vfio-pci opt-in by device option, only allowed for mdev
>    devices, no support added for platform as there are no platform
>    mdev devices.
> 
> See patch 3/4 for detailed explanation why ballooning and device
> assignment typically don't mix.  If this eventually changes, flags
> on the iommu info struct or perhaps device info struct can inform
> us for automatic opt-in.  Thanks,
> 
> Alex

So this patch seems to block ballooning when vfio is added.
But what if balloon is added and inflated first?

I'd suggest making qemu_balloon_inhibit fail in that case,
and then vfio realize will fail as well.


> ---
> 
> Alex Williamson (4):
>       balloon: Allow nested inhibits
>       kvm: Use inhibit to prevent ballooning without synchronous mmu
>       vfio: Inhibit ballooning based on group attachment to a container
>       vfio/ccw/pci: Allow devices to opt-in for ballooning
> 
> 
>  accel/kvm/kvm-all.c           |    4 ++++
>  balloon.c                     |   13 ++++++++++---
>  hw/vfio/ccw.c                 |    9 +++++++++
>  hw/vfio/common.c              |   26 ++++++++++++++++++++++++++
>  hw/vfio/pci.c                 |   26 +++++++++++++++++++++++++-
>  hw/vfio/trace-events          |    1 +
>  hw/virtio/virtio-balloon.c    |    4 +---
>  include/hw/vfio/vfio-common.h |    2 ++
>  8 files changed, 78 insertions(+), 7 deletions(-)

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, peterx@redhat.com,
	cohuck@redhat.com, david@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 0/4] Balloon inhibit enhancements, vfio restriction
Date: Tue, 31 Jul 2018 15:29:17 +0300	[thread overview]
Message-ID: <20180731152716-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <153299204130.14411.11438396195753743913.stgit@gimli.home>

On Mon, Jul 30, 2018 at 05:13:26PM -0600, Alex Williamson wrote:
> v2:
>  - Use atomic ops for balloon inhibit counter (Peter)
>  - Allow endpoint driver opt-in for ballooning, vfio-ccw opt-in by
>    default, vfio-pci opt-in by device option, only allowed for mdev
>    devices, no support added for platform as there are no platform
>    mdev devices.
> 
> See patch 3/4 for detailed explanation why ballooning and device
> assignment typically don't mix.  If this eventually changes, flags
> on the iommu info struct or perhaps device info struct can inform
> us for automatic opt-in.  Thanks,
> 
> Alex

So this patch seems to block ballooning when vfio is added.
But what if balloon is added and inflated first?

I'd suggest making qemu_balloon_inhibit fail in that case,
and then vfio realize will fail as well.


> ---
> 
> Alex Williamson (4):
>       balloon: Allow nested inhibits
>       kvm: Use inhibit to prevent ballooning without synchronous mmu
>       vfio: Inhibit ballooning based on group attachment to a container
>       vfio/ccw/pci: Allow devices to opt-in for ballooning
> 
> 
>  accel/kvm/kvm-all.c           |    4 ++++
>  balloon.c                     |   13 ++++++++++---
>  hw/vfio/ccw.c                 |    9 +++++++++
>  hw/vfio/common.c              |   26 ++++++++++++++++++++++++++
>  hw/vfio/pci.c                 |   26 +++++++++++++++++++++++++-
>  hw/vfio/trace-events          |    1 +
>  hw/virtio/virtio-balloon.c    |    4 +---
>  include/hw/vfio/vfio-common.h |    2 ++
>  8 files changed, 78 insertions(+), 7 deletions(-)

  parent reply	other threads:[~2018-07-31 12:29 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 23:13 [PATCH v2 0/4] Balloon inhibit enhancements, vfio restriction Alex Williamson
2018-07-30 23:13 ` [Qemu-devel] " Alex Williamson
2018-07-30 23:13 ` [PATCH v2 1/4] balloon: Allow nested inhibits Alex Williamson
2018-07-30 23:13   ` [Qemu-devel] " Alex Williamson
2018-07-31  8:25   ` David Hildenbrand
2018-07-31  8:25     ` [Qemu-devel] " David Hildenbrand
2018-08-07 12:56   ` Peter Xu
2018-08-07 12:56     ` [Qemu-devel] " Peter Xu
2018-08-07 14:20   ` Cornelia Huck
2018-08-07 14:20     ` [Qemu-devel] " Cornelia Huck
2018-07-30 23:14 ` [PATCH v2 2/4] kvm: Use inhibit to prevent ballooning without synchronous mmu Alex Williamson
2018-07-30 23:14   ` [Qemu-devel] " Alex Williamson
2018-07-31  8:24   ` David Hildenbrand
2018-07-31  8:24     ` [Qemu-devel] " David Hildenbrand
2018-08-07 12:56   ` Peter Xu
2018-08-07 12:56     ` [Qemu-devel] " Peter Xu
2018-08-07 14:24   ` Cornelia Huck
2018-08-07 14:24     ` [Qemu-devel] " Cornelia Huck
2018-07-30 23:14 ` [PATCH v2 3/4] vfio: Inhibit ballooning based on group attachment to a container Alex Williamson
2018-07-30 23:14   ` [Qemu-devel] " Alex Williamson
2018-08-07 13:10   ` Peter Xu
2018-08-07 13:10     ` [Qemu-devel] " Peter Xu
2018-08-07 16:35     ` Alex Williamson
2018-08-07 16:35       ` [Qemu-devel] " Alex Williamson
2018-08-08  3:22       ` Peter Xu
2018-08-08  3:22         ` [Qemu-devel] " Peter Xu
2018-07-30 23:14 ` [PATCH v2 4/4] vfio/ccw/pci: Allow devices to opt-in for ballooning Alex Williamson
2018-07-30 23:14   ` [Qemu-devel] " Alex Williamson
2018-08-07 14:15   ` Cornelia Huck
2018-08-07 14:15     ` [Qemu-devel] " Cornelia Huck
2018-07-31 12:29 ` Michael S. Tsirkin [this message]
2018-07-31 12:29   ` [Qemu-devel] [PATCH v2 0/4] Balloon inhibit enhancements, vfio restriction Michael S. Tsirkin
2018-07-31 14:44   ` Alex Williamson
2018-07-31 14:44     ` [Qemu-devel] " Alex Williamson
2018-07-31 15:07     ` Dr. David Alan Gilbert
2018-07-31 15:07       ` [Qemu-devel] " Dr. David Alan Gilbert
2018-07-31 21:50       ` Alex Williamson
2018-07-31 21:50         ` [Qemu-devel] " Alex Williamson
2018-08-03 18:42         ` Michael S. Tsirkin
2018-08-03 18:42           ` [Qemu-devel] " Michael S. Tsirkin
2018-08-03 20:12           ` Alex Williamson
2018-08-03 20:12             ` [Qemu-devel] " Alex Williamson

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=20180731152716-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.