.. | .. |
---|
34 | 34 | #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ |
---|
35 | 35 | #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */ |
---|
36 | 36 | #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 */ |
---|
37 | 40 | |
---|
38 | 41 | /* Size of a PFN in the balloon interface. */ |
---|
39 | 42 | #define VIRTIO_BALLOON_PFN_SHIFT 12 |
---|
40 | 43 | |
---|
| 44 | +#define VIRTIO_BALLOON_CMD_ID_STOP 0 |
---|
| 45 | +#define VIRTIO_BALLOON_CMD_ID_DONE 1 |
---|
41 | 46 | struct virtio_balloon_config { |
---|
42 | 47 | /* Number of pages host wants Guest to give up. */ |
---|
43 | | - __u32 num_pages; |
---|
| 48 | + __le32 num_pages; |
---|
44 | 49 | /* 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; |
---|
46 | 62 | }; |
---|
47 | 63 | |
---|
48 | 64 | #define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */ |
---|