[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200211225125.30409.98370.stgit@localhost.localdomain>
Date: Tue, 11 Feb 2020 14:51:25 -0800
From: Alexander Duyck <alexander.duyck@...il.com>
To: virtio-dev@...ts.oasis-open.org, kvm@...r.kernel.org,
mst@...hat.com, david@...hat.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, akpm@...ux-foundation.org
Cc: yang.zhang.wz@...il.com, pagupta@...hat.com,
konrad.wilk@...cle.com, nitesh@...hat.com, riel@...riel.com,
willy@...radead.org, lcapitulino@...hat.com, dave.hansen@...el.com,
wei.w.wang@...el.com, aarcange@...hat.com, pbonzini@...hat.com,
dan.j.williams@...el.com, mhocko@...nel.org,
mgorman@...hsingularity.net, alexander.h.duyck@...ux.intel.com,
vbabka@...e.cz, osalvador@...e.de
Subject: [PATCH v17 QEMU 2/3] virtio-balloon: Add support for providing free
page reports to host
From: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
Add support for the page reporting feature provided by virtio-balloon.
Reporting differs from the regular balloon functionality in that is is
much less durable than a standard memory balloon. Instead of creating a
list of pages that cannot be accessed the pages are only inaccessible
while they are being indicated to the virtio interface. Once the
interface has acknowledged them they are placed back into their respective
free lists and are once again accessible by the guest system.
Unlike a standard balloon we don't inflate and deflate the pages. Instead
we perform the reporting, and once the reporting is completed it is
assumed that the page has been dropped from the guest and will be faulted
back in the next time the page is accessed.
This patch is a subset of the UAPI patch that was submitted for the Linux
kernel. The original patch can be found at:
https://lore.kernel.org/lkml/20200211224657.29318.68624.stgit@localhost.localdomain/
Signed-off-by: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
---
include/standard-headers/linux/virtio_balloon.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/standard-headers/linux/virtio_balloon.h b/include/standard-headers/linux/virtio_balloon.h
index 9375ca2a70de..1c5f6d6f2de6 100644
--- a/include/standard-headers/linux/virtio_balloon.h
+++ b/include/standard-headers/linux/virtio_balloon.h
@@ -36,6 +36,7 @@
#define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */
#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */
#define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */
+#define VIRTIO_BALLOON_F_REPORTING 5 /* Page reporting virtqueue */
/* Size of a PFN in the balloon interface. */
#define VIRTIO_BALLOON_PFN_SHIFT 12
Powered by blists - more mailing lists