Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "vm-device"
version = "0.1.0"
authors = ["Samuel Ortiz <[email protected]>", "Liu Jiang <[email protected]>", "rust-vmm AWS maintainers <[email protected]>"]
authors = ["Samuel Ortiz <[email protected]>", "Liu Jiang <[email protected]>", "rust-vmm AWS maintainers <[email protected]>", "Simon Lucido <[email protected]>"]
description = "management for virtual devices and resources"
keywords = ["bus", "manager", "virtualization"]
edition = "2018"
repository = "https://github.com/rust-vmm/vm-device"
license = "Apache-2.0 OR BSD-3-Clause"

[dependencies]
vm-memory = { version = "0.10.0", features = ["backend-mmap"] }
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ address range, IRQ number, etc)
The virtual device model is built around four traits, `DevicePio` and
`MutDevicePio` for
[Programmed I/O](https://en.wikipedia.org/wiki/Programmed_input%E2%80%93output)
(PIO), and `DeviceMmio` and `MutDeviceMmio` for
(PIO), and `VirtioMmioDevice` and `MutVirtioMmioDevice` for
[Memory-mapped I/O](https://en.wikipedia.org/wiki/Memory-mapped_I/O)
(MMIO). The traits define the same methods for handling read and write
operations. The difference is that `DevicePio` and `DeviceMmio` only require
immutable self borrows, whereas `MutDevicePio` and `MutDeviceMmio` require
operations. The difference is that `DevicePio` and `VirtioMmioDevice` only require
immutable self borrows, whereas `MutDevicePio` and `MutVirtioMmioDevice` require
mutable borrows.

The device manager abstraction is implemented by the `IoManager` struct. It
Expand Down Expand Up @@ -56,9 +56,9 @@ with an `IoManager` instance within the specified address range on the bus.
Creating a new `IoManager` is easy by calling `IoManager::new()` without any
configuration. Internally the manager stores devices as trait objects wrapped
in `Arc`’s, therefore if the device implements `MutDevicePio` or
`MutDeviceMmio`, then it must be wrapped in a `Mutex`. The crate contains
`MutVirtioMmioDevice`, then it must be wrapped in a `Mutex`. The crate contains
automatic implementation of `DevicePio for Mutex<T> where T: MutDevicePio`
and `DeviceMmio for Mutex<T> where T: MutDeviceMmio` but only for the Mutex
and `VirtioMmioDevice for Mutex<T> where T: MutVirtioMmioDevice` but only for the Mutex
type in the standard library. For any other `Mutex` type from 3rd party crates
the blanket implementation must be done by the user.

Expand Down
178 changes: 0 additions & 178 deletions src/bus/address.rs

This file was deleted.

Loading