mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 00:43:24 +00:00
Remove the error of BlkFeatures::MQ
to support multi-processor startup
Co-authored-by: Chuandong Li <lichuand@pku.edu.cn>
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
8acfc8eb6a
commit
870d542f60
@ -113,7 +113,14 @@ impl DeviceInner {
|
|||||||
);
|
);
|
||||||
let num_queues = transport.num_queues();
|
let num_queues = transport.num_queues();
|
||||||
if num_queues != 1 {
|
if num_queues != 1 {
|
||||||
return Err(VirtioDeviceError::QueuesAmountDoNotMatch(num_queues, 1));
|
// FIXME: support Multi-Queue Block IO Queueing Mechanism
|
||||||
|
// (`BlkFeatures::MQ`) to accelerate multi-processor requests for
|
||||||
|
// block devices. When SMP is enabled on x86, the feature is on.
|
||||||
|
// We should also consider negotiating the feature in the future.
|
||||||
|
// return Err(VirtioDeviceError::QueuesAmountDoNotMatch(num_queues, 1));
|
||||||
|
log::warn!(
|
||||||
|
"Not supporting Multi-Queue Block IO Queueing Mechanism, only using the first queue"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
let queue = VirtQueue::new(0, Self::QUEUE_SIZE, transport.as_mut())
|
let queue = VirtQueue::new(0, Self::QUEUE_SIZE, transport.as_mut())
|
||||||
.expect("create virtqueue failed");
|
.expect("create virtqueue failed");
|
||||||
|
@ -25,6 +25,7 @@ bitflags! {
|
|||||||
const FLUSH = 1 << 9;
|
const FLUSH = 1 << 9;
|
||||||
const TOPOLOGY = 1 << 10;
|
const TOPOLOGY = 1 << 10;
|
||||||
const CONFIG_WCE = 1 << 11;
|
const CONFIG_WCE = 1 << 11;
|
||||||
|
const MQ = 1 << 12;
|
||||||
const DISCARD = 1 << 13;
|
const DISCARD = 1 << 13;
|
||||||
const WRITE_ZEROES = 1 << 14;
|
const WRITE_ZEROES = 1 << 14;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user