diff options
author | Dylan Reid <dgreid@chromium.org> | 2017-11-06 14:06:24 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-12-18 17:54:57 -0800 |
commit | 295ccac1f3d6d9291ebc86df076920102cdbb63d (patch) | |
tree | 9267c0954ec8fc9e63a2706d976534ad00186b16 /devices/src/virtio/mod.rs | |
parent | 39aa26b1680471acf26981d3c65829ccd216e0a4 (diff) | |
download | crosvm-295ccac1f3d6d9291ebc86df076920102cdbb63d.tar crosvm-295ccac1f3d6d9291ebc86df076920102cdbb63d.tar.gz crosvm-295ccac1f3d6d9291ebc86df076920102cdbb63d.tar.bz2 crosvm-295ccac1f3d6d9291ebc86df076920102cdbb63d.tar.lz crosvm-295ccac1f3d6d9291ebc86df076920102cdbb63d.tar.xz crosvm-295ccac1f3d6d9291ebc86df076920102cdbb63d.tar.zst crosvm-295ccac1f3d6d9291ebc86df076920102cdbb63d.zip |
devices: Add balloon
The balloon device is used to take regions of unused memory from the guest and allow other host processes to use that memory. Change-Id: I06c821365a58672d605fc7555beaec599cae1b15 Signed-off-by: Dylan Reid <dgreid@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/759306 Reviewed-by: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'devices/src/virtio/mod.rs')
-rw-r--r-- | devices/src/virtio/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/devices/src/virtio/mod.rs b/devices/src/virtio/mod.rs index 7c1bf1c..f225142 100644 --- a/devices/src/virtio/mod.rs +++ b/devices/src/virtio/mod.rs @@ -4,6 +4,7 @@ //! Implements virtio devices, queues, and transport mechanisms. +mod balloon; mod queue; mod mmio; mod block; @@ -13,6 +14,7 @@ mod wl; pub mod vhost; +pub use self::balloon::*; pub use self::queue::*; pub use self::mmio::*; pub use self::block::*; @@ -30,10 +32,12 @@ const DEVICE_FAILED: u32 = 0x80; const TYPE_NET: u32 = 1; const TYPE_BLOCK: u32 = 2; const TYPE_RNG: u32 = 4; +const TYPE_BALLOON: u32 = 5; const TYPE_VSOCK: u32 = 19; const TYPE_WL: u32 = 30; const INTERRUPT_STATUS_USED_RING: u32 = 0x1; +const INTERRUPT_STATUS_CONFIG_CHANGED: u32 = 0x2; /// Offset from the base MMIO address of a virtio device used by the guest to notify the device of /// queue events. |