Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ repository = "https://github.com/rust-vmm/vfio-user"
name = "gpio"

[dependencies]
bitflags = "1.3.2"
bitflags = "2.9.0"
libc = "0.2.139"
log = "0.4.17"
serde = { version = "1.0.151", features = ["rc"] }
serde_derive = "1.0.149"
serde_json = "1.0.93"
thiserror = "1.0.38"
vfio-bindings = { git = "https://github.com/rust-vmm/vfio", branch = "main", features = ["fam-wrappers"] }
thiserror = "2.0.12"
vfio-bindings = { version = "0.4.0", features = ["fam-wrappers"] }
vm-memory = { version = "0.16.0", features = ["backend-mmap", "backend-atomic"] }
vmm-sys-util = "0.12.1"
vmm-sys-util = "0.13.0"

[dev-dependencies]
argh = "0.1.9"
env_logger = "0.10.0"
env_logger = "0.11.8"
4 changes: 2 additions & 2 deletions examples/gpio/pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ pub enum Error {
BarInUse(PciBarIndex),
#[error("64bit bar {0} already used (requires two regs)")]
BarInUse64(PciBarIndex),
#[error("bar {0} invalid, max {}", NUM_BAR_REGS - 1)]
#[error("bar {bar_index} invalid, max {max}", bar_index = .0, max = NUM_BAR_REGS - 1)]
BarInvalid(PciBarIndex),
#[error("64bitbar {0} invalid, requires two regs, max {}", ROM_BAR_IDX - 1)]
#[error("64bitbar {bar_index} invalid, requires two regs, {max}", bar_index = .0, max = ROM_BAR_IDX - 1)]
BarInvalid64(PciBarIndex),
#[error("expansion rom bar must be a memory region")]
BarInvalidRomType,
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ fn default_migration_capabilities() -> MigrationCapabilities {
}

bitflags! {
#[derive(Debug)]
pub struct DmaMapFlags: u32 {
const READ_ONLY = 1 << 0;
const WRITE_ONLY = 1 << 1;
const READ_WRITE = Self::READ_ONLY.bits | Self::WRITE_ONLY.bits;
const READ_WRITE = Self::READ_ONLY.bits() | Self::WRITE_ONLY.bits();
}

#[derive(Debug)]
pub struct DmaUnmapFlags: u32 {
const GET_DIRTY_PAGE_INFO = 1 << 1;
const UNMAP_ALL = 1 << 2;
Expand Down Expand Up @@ -389,7 +391,7 @@ impl Client {
..Default::default()
},
argsz: (size_of::<DmaMap>() - size_of::<Header>()) as u32,
flags: DmaMapFlags::READ_WRITE.bits,
flags: DmaMapFlags::READ_WRITE.bits(),
offset,
address,
size,
Expand Down
Loading