mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
devices: virtio: pci: reset ISR status on read
The virtio PCI spec (4.1.4.5.1 Device Requirements: ISR status capability) says: "The device MUST reset ISR status to 0 on driver read." BUG=chromium:854766 TEST=None Change-Id: I92a1ddccfc8e44bed7f4a16e3cfd11b946629e22 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1260252 Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
cf2e00e982
commit
1232debf1d
1 changed files with 2 additions and 1 deletions
|
@ -349,7 +349,8 @@ impl PciDevice for VirtioPciDevice {
|
|||
}
|
||||
o if ISR_CONFIG_BAR_OFFSET <= o && o < ISR_CONFIG_BAR_OFFSET + ISR_CONFIG_SIZE => {
|
||||
if let Some(v) = data.get_mut(0) {
|
||||
*v = self.interrupt_status.load(Ordering::SeqCst) as u8;
|
||||
// Reading this register resets it to 0.
|
||||
*v = self.interrupt_status.swap(0, Ordering::SeqCst) as u8;
|
||||
}
|
||||
}
|
||||
o if DEVICE_CONFIG_BAR_OFFSET <= o
|
||||
|
|
Loading…
Reference in a new issue