mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-28 07:33:09 +00:00
vfio_user: Reject SET_IRQS with VFIO_IRQ_SET_DATA_BOOL
This is unsupported. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
aa502b3e41
commit
19e893fa53
@ -272,6 +272,8 @@ pub enum Error {
|
|||||||
SocketAccept(#[source] std::io::Error),
|
SocketAccept(#[source] std::io::Error),
|
||||||
#[error("Unsupported command: {0:?}")]
|
#[error("Unsupported command: {0:?}")]
|
||||||
UnsupportedCommand(Command),
|
UnsupportedCommand(Command),
|
||||||
|
#[error("Unsupported feature")]
|
||||||
|
UnsupportedFeature,
|
||||||
#[error("Error from backend: {0:?}")]
|
#[error("Error from backend: {0:?}")]
|
||||||
Backend(#[source] std::io::Error),
|
Backend(#[source] std::io::Error),
|
||||||
}
|
}
|
||||||
@ -1084,6 +1086,10 @@ impl Server {
|
|||||||
.read_exact(&mut cmd.as_mut_slice()[size_of::<Header>()..])
|
.read_exact(&mut cmd.as_mut_slice()[size_of::<Header>()..])
|
||||||
.map_err(Error::StreamRead)?;
|
.map_err(Error::StreamRead)?;
|
||||||
|
|
||||||
|
if cmd.flags & VFIO_IRQ_SET_DATA_BOOL > 0 {
|
||||||
|
return Err(Error::UnsupportedFeature);
|
||||||
|
}
|
||||||
|
|
||||||
backend
|
backend
|
||||||
.set_irqs(cmd.index, cmd.flags, cmd.start, cmd.count, fds)
|
.set_irqs(cmd.index, cmd.flags, cmd.start, cmd.count, fds)
|
||||||
.map_err(Error::Backend)?;
|
.map_err(Error::Backend)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user