Skip to content
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4865,7 +4865,6 @@ dependencies = [
"chipset_device",
"device_emulators",
"disk_backend",
"event-listener",
"futures",
"futures-concurrency",
"guestmem",
Expand Down
1 change: 0 additions & 1 deletion vm/devices/storage/nvme_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ inspect.workspace = true
mesh.workspace = true
pal_async.workspace = true
async-trait.workspace = true
event-listener.workspace = true
futures.workspace = true
futures-concurrency.workspace = true
parking_lot.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions vm/devices/storage/nvme_test/src/pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ impl NvmeFaultController {
if addr >= 0x1000 {
// Doorbell write.
let base = addr - 0x1000;
let index = base >> DOORBELL_STRIDE_BITS;
if (index << DOORBELL_STRIDE_BITS) != base {
let db_id = base >> DOORBELL_STRIDE_BITS;
if (db_id << DOORBELL_STRIDE_BITS) != base {
return IoResult::Err(InvalidRegister);
}
let Ok(data) = data.try_into() else {
return IoResult::Err(IoError::InvalidAccessSize);
};
let data = u32::from_ne_bytes(data);
self.workers.doorbell(index, data);
let value = u32::from_ne_bytes(data);
self.workers.doorbell(db_id, value);
return IoResult::Ok;
}

Expand Down
Loading
Loading