hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/uapi/linux/virtio_balloon.h
....@@ -34,15 +34,31 @@
3434 #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
3535 #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
3636 #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */
37
+#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */
38
+#define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */
39
+#define VIRTIO_BALLOON_F_REPORTING 5 /* Page reporting virtqueue */
3740
3841 /* Size of a PFN in the balloon interface. */
3942 #define VIRTIO_BALLOON_PFN_SHIFT 12
4043
44
+#define VIRTIO_BALLOON_CMD_ID_STOP 0
45
+#define VIRTIO_BALLOON_CMD_ID_DONE 1
4146 struct virtio_balloon_config {
4247 /* Number of pages host wants Guest to give up. */
43
- __u32 num_pages;
48
+ __le32 num_pages;
4449 /* Number of pages we've actually got in balloon. */
45
- __u32 actual;
50
+ __le32 actual;
51
+ /*
52
+ * Free page hint command id, readonly by guest.
53
+ * Was previously named free_page_report_cmd_id so we
54
+ * need to carry that name for legacy support.
55
+ */
56
+ union {
57
+ __le32 free_page_hint_cmd_id;
58
+ __le32 free_page_report_cmd_id; /* deprecated */
59
+ };
60
+ /* Stores PAGE_POISON if page poisoning is in use */
61
+ __le32 poison_val;
4662 };
4763
4864 #define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */