mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
virtio-devices: handle IO event for SevSnp properly
For SevSnp guest IO events are handled by GHCB protocol. While we get the notification we have to notify via eventfd. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
ef4fbf086f
commit
3d5718bd87
@ -1179,7 +1179,14 @@ impl PciDevice for VirtioPciDevice {
|
|||||||
o if (NOTIFICATION_BAR_OFFSET..NOTIFICATION_BAR_OFFSET + NOTIFICATION_SIZE)
|
o if (NOTIFICATION_BAR_OFFSET..NOTIFICATION_BAR_OFFSET + NOTIFICATION_SIZE)
|
||||||
.contains(&o) =>
|
.contains(&o) =>
|
||||||
{
|
{
|
||||||
|
#[cfg(feature = "sev_snp")]
|
||||||
|
for (_event, _addr) in self.ioeventfds(_base) {
|
||||||
|
if _addr == _base + offset {
|
||||||
|
_event.write(1).unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
// Handled with ioeventfds.
|
// Handled with ioeventfds.
|
||||||
|
#[cfg(not(feature = "sev_snp"))]
|
||||||
error!("Unexpected write to notification BAR: offset = 0x{:x}", o);
|
error!("Unexpected write to notification BAR: offset = 0x{:x}", o);
|
||||||
}
|
}
|
||||||
o if (MSIX_TABLE_BAR_OFFSET..MSIX_TABLE_BAR_OFFSET + MSIX_TABLE_SIZE).contains(&o) => {
|
o if (MSIX_TABLE_BAR_OFFSET..MSIX_TABLE_BAR_OFFSET + MSIX_TABLE_SIZE).contains(&o) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user