Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 10:42:05AM -0600, Alex Williamson wrote: > On Mon, 30 Jul 2018 18:49:58 +0300 > "Michael S. Tsirkin" wrote: > > > On Mon, Jul 30, 2018 at 09:01:37AM -0600, Alex Williamson wrote: > > > > > but I don't think it can be done > > > > > atomically with respect to inflight DMA o

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Alex Williamson
On Mon, 30 Jul 2018 18:49:58 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jul 30, 2018 at 09:01:37AM -0600, Alex Williamson wrote: > > > > but I don't think it can be done > > > > atomically with respect to inflight DMA of a physical device where we > > > > cannot halt the device without interferi

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 09:01:37AM -0600, Alex Williamson wrote: > > > but I don't think it can be done > > > atomically with respect to inflight DMA of a physical device where we > > > cannot halt the device without interfering with its state. > > > > Guests never add pages to the balloon if th

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Alex Williamson
On Mon, 30 Jul 2018 17:51:28 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jul 30, 2018 at 08:39:39AM -0600, Alex Williamson wrote: > > This is more > > compatible with the IOMMU mappings, > > Precisely. These are at page granularity. (This/these being memory API mappings for context) SubRegio

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread David Hildenbrand
On 30.07.2018 16:58, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2018 at 04:46:25PM +0200, David Hildenbrand wrote: >> On 30.07.2018 15:59, Michael S. Tsirkin wrote: >>> On Mon, Jul 30, 2018 at 03:54:04PM +0200, David Hildenbrand wrote: On 30.07.2018 15:34, Michael S. Tsirkin wrote: > On T

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 04:46:25PM +0200, David Hildenbrand wrote: > On 30.07.2018 15:59, Michael S. Tsirkin wrote: > > On Mon, Jul 30, 2018 at 03:54:04PM +0200, David Hildenbrand wrote: > >> On 30.07.2018 15:34, Michael S. Tsirkin wrote: > >>> On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex William

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 08:39:39AM -0600, Alex Williamson wrote: > This is more > compatible with the IOMMU mappings, Precisely. These are at page granularity. > but I don't think it can be done > atomically with respect to inflight DMA of a physical device where we > cannot halt the device witho

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread David Hildenbrand
On 30.07.2018 15:59, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2018 at 03:54:04PM +0200, David Hildenbrand wrote: >> On 30.07.2018 15:34, Michael S. Tsirkin wrote: >>> On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: Directly assigned vfio devices have never been compatible w

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Alex Williamson
On Mon, 30 Jul 2018 16:34:09 +0300 "Michael S. Tsirkin" wrote: > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > Directly assigned vfio devices have never been compatible with > > ballooning. Zapping MADV_DONTNEED pages happens completely > > independent of vfio page pinning

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 03:54:04PM +0200, David Hildenbrand wrote: > On 30.07.2018 15:34, Michael S. Tsirkin wrote: > > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > >> Directly assigned vfio devices have never been compatible with > >> ballooning. Zapping MADV_DONTNEED pages

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread David Hildenbrand
On 30.07.2018 15:34, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: >> Directly assigned vfio devices have never been compatible with >> ballooning. Zapping MADV_DONTNEED pages happens completely >> independent of vfio page pinning and IOMMU mapping, l

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > Directly assigned vfio devices have never been compatible with > ballooning. Zapping MADV_DONTNEED pages happens completely > independent of vfio page pinning and IOMMU mapping, leaving us with > inconsistent GPA to HPA mapping bet

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-19 Thread Peter Xu
On Thu, Jul 19, 2018 at 09:01:46AM -0600, Alex Williamson wrote: > On Thu, 19 Jul 2018 13:40:51 +0800 > Peter Xu wrote: > > On Wed, Jul 18, 2018 at 10:31:33AM -0600, Alex Williamson wrote: > > > On Wed, 18 Jul 2018 14:48:03 +0800 > > > Peter Xu wrote: > > > > I'm wondering what if want to do that

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-19 Thread Alex Williamson
On Thu, 19 Jul 2018 12:49:23 +0800 Peter Xu wrote: > On Wed, Jul 18, 2018 at 11:36:40AM +0200, Cornelia Huck wrote: > > On Wed, 18 Jul 2018 14:48:03 +0800 > > Peter Xu wrote: > > > > > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > > > Directly assigned vfio devices ha

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-19 Thread Alex Williamson
On Thu, 19 Jul 2018 13:40:51 +0800 Peter Xu wrote: > On Wed, Jul 18, 2018 at 10:31:33AM -0600, Alex Williamson wrote: > > On Wed, 18 Jul 2018 14:48:03 +0800 > > Peter Xu wrote: > > > I'm wondering what if want to do that somehow some day... Whether > > > it'll work if we just let vfio-pci devices

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-19 Thread Peter Xu
On Thu, Jul 19, 2018 at 10:42:22AM +0200, Cornelia Huck wrote: > On Thu, 19 Jul 2018 12:49:23 +0800 > Peter Xu wrote: > > > On Wed, Jul 18, 2018 at 11:36:40AM +0200, Cornelia Huck wrote: > > > On Wed, 18 Jul 2018 14:48:03 +0800 > > > Peter Xu wrote: > > > > > I totally have no idea on whether p

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-19 Thread Cornelia Huck
On Thu, 19 Jul 2018 12:49:23 +0800 Peter Xu wrote: > On Wed, Jul 18, 2018 at 11:36:40AM +0200, Cornelia Huck wrote: > > On Wed, 18 Jul 2018 14:48:03 +0800 > > Peter Xu wrote: > > > I totally have no idea on whether people would like to use vfio-pci > > > and the balloon device at the same time.

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-18 Thread Peter Xu
On Wed, Jul 18, 2018 at 10:31:33AM -0600, Alex Williamson wrote: > On Wed, 18 Jul 2018 14:48:03 +0800 > Peter Xu wrote: > > > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > > Directly assigned vfio devices have never been compatible with > > > ballooning. Zapping MADV_DONTN

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-18 Thread Peter Xu
On Wed, Jul 18, 2018 at 11:36:40AM +0200, Cornelia Huck wrote: > On Wed, 18 Jul 2018 14:48:03 +0800 > Peter Xu wrote: > > > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > > Directly assigned vfio devices have never been compatible with > > > ballooning. Zapping MADV_DONTNEE

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-18 Thread Alex Williamson
On Wed, 18 Jul 2018 14:48:03 +0800 Peter Xu wrote: > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > Directly assigned vfio devices have never been compatible with > > ballooning. Zapping MADV_DONTNEED pages happens completely > > independent of vfio page pinning and IOMMU m

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-18 Thread Cornelia Huck
On Wed, 18 Jul 2018 14:48:03 +0800 Peter Xu wrote: > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > > Directly assigned vfio devices have never been compatible with > > ballooning. Zapping MADV_DONTNEED pages happens completely > > independent of vfio page pinning and IOMMU m

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-17 Thread Peter Xu
On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > Directly assigned vfio devices have never been compatible with > ballooning. Zapping MADV_DONTNEED pages happens completely > independent of vfio page pinning and IOMMU mapping, leaving us with > inconsistent GPA to HPA mapping bet

[Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-17 Thread Alex Williamson
Directly assigned vfio devices have never been compatible with ballooning. Zapping MADV_DONTNEED pages happens completely independent of vfio page pinning and IOMMU mapping, leaving us with inconsistent GPA to HPA mapping between vCPUs and assigned devices when the balloon deflates. Mediated devi