You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/features.rs
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -524,6 +524,55 @@ pub mod vsock {
524
524
implcrate::FeatureBitsforF{}
525
525
}
526
526
527
+
pubmod balloon {
528
+
usecrate::le128;
529
+
530
+
feature_bits!{
531
+
/// Traditional Memory Balloon Device Feature Bits
532
+
#[doc(alias = "VIRTIO_BALLOON_F")]
533
+
pubstructF: le128 {
534
+
/// Host has to be told before pages from the balloon are used.
535
+
#[doc(alias = "VIRTIO_BALLOON_F_MUST_TELL_HOST")]
536
+
constMUST_TELL_HOST = 1 << 0;
537
+
538
+
/// A virtqueue for reporting guest memory statistics is present.
539
+
#[doc(alias = "VIRTIO_BALLOON_F_STATS_VQ")]
540
+
constSTATS_VQ = 1 << 1;
541
+
542
+
/// Deflate balloon on guest out of memory condition.
543
+
///
544
+
/// <div class="warning">
545
+
///
546
+
/// The specification is a bit confusing on this feature, see [oasis-tcs/virtio-spec#228](https://github.com/oasis-tcs/virtio-spec/issues/228).
547
+
///
548
+
/// </div>
549
+
#[doc(alias = "VIRTIO_BALLOON_F_DEFLATE_ON_OOM")]
550
+
constDEFLATE_ON_OOM = 1 << 2;
551
+
552
+
/// The device has support for free page hinting.
553
+
/// A virtqueue for providing hints as to what memory is currently free is present.
554
+
/// Configuration field [`free_page_hint_cmd_id`](`crate::balloon::ConfigVolatileFieldAccess::free_page_hint_cmd_id`) is valid.
555
+
#[doc(alias = "VIRTIO_BALLOON_F_FREE_PAGE_HINT")]
556
+
constFREE_PAGE_HINT = 1 << 3;
557
+
558
+
/// A hint to the device, that the driver will immediately write
0 commit comments