virtio-balloon: Provide an interface for free page reporting
authorAlexander Duyck <alexander.h.duyck@linux.intel.com>
Wed, 27 May 2020 04:14:07 +0000 (21:14 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Jun 2020 18:18:04 +0000 (14:18 -0400)
commit91b867191ddf73c64f51ca2ddb489b922ed4058e
tree76ee97d9fcf00bde8e5f8af94c1cabc56e0e4179
parent7483cbbaf8204de330b7362339a4a070b114b425
virtio-balloon: Provide an interface for free page reporting

Add support for free page reporting. The idea is to function very similar
to how the balloon works in that we basically end up madvising the page as
not being used. However we don't really need to bother with any deflate
type logic since the page will be faulted back into the guest when it is
read or written to.

This provides a new way of letting the guest proactively report free
pages to the hypervisor, so the hypervisor can reuse them. In contrast to
inflate/deflate that is triggered via the hypervisor explicitly.

Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Message-Id: <20200527041407.12700.73735.stgit@localhost.localdomain>
hw/virtio/virtio-balloon.c
include/hw/virtio/virtio-balloon.h