diff options
author | Zhuocheng Ding <zhuocheng.ding@intel.corp-partner.google.com> | 2019-12-02 15:49:52 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-10 05:08:08 +0000 |
commit | 0e8c11e3548e48fb5e59f8006dad0d76c549fb35 (patch) | |
tree | 9083cc8e0ca8626bb5e7230c8177c799549be8c9 /devices/src/ioapic.rs | |
parent | cc7070b284bb69bc5f7f13a1f7f48fa1946eee0b (diff) | |
download | crosvm-0e8c11e3548e48fb5e59f8006dad0d76c549fb35.tar crosvm-0e8c11e3548e48fb5e59f8006dad0d76c549fb35.tar.gz crosvm-0e8c11e3548e48fb5e59f8006dad0d76c549fb35.tar.bz2 crosvm-0e8c11e3548e48fb5e59f8006dad0d76c549fb35.tar.lz crosvm-0e8c11e3548e48fb5e59f8006dad0d76c549fb35.tar.xz crosvm-0e8c11e3548e48fb5e59f8006dad0d76c549fb35.tar.zst crosvm-0e8c11e3548e48fb5e59f8006dad0d76c549fb35.zip |
devices: IOAPIC: ignore interrupt polarity
Interrupt polarity is ignored by kvm since 3.15, and the irqfd interface does not support polarity. We should not consider polarity either. BUG=chromium:908689 TEST=Unit tests in file. Integration testing is blocked on rest of split-irqchip being implemented. Change-Id: Ibae23b81274f867bbf56009854611628dbb4c154 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1945793 Commit-Queue: Zhuocheng Ding <zhuocheng.ding@intel.corp-partner.google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'devices/src/ioapic.rs')
-rw-r--r-- | devices/src/ioapic.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/devices/src/ioapic.rs b/devices/src/ioapic.rs index 5f8270c..6f8e358 100644 --- a/devices/src/ioapic.rs +++ b/devices/src/ioapic.rs @@ -186,14 +186,9 @@ impl Ioapic { pub fn service_irq(&mut self, irq: usize, level: bool) -> bool { let entry = &mut self.redirect_table[irq]; - let line_status = if entry.get_polarity() == 1 { - !level - } else { - level - }; // De-assert the interrupt. - if !line_status { + if !level { self.current_interrupt_level_bitmap &= !(1 << irq); return true; } @@ -226,7 +221,7 @@ impl Ioapic { // TODO(mutexlox): Pulse (assert and deassert) interrupt let injected = true; - if entry.get_trigger_mode() == TriggerMode::Level && line_status && injected { + if entry.get_trigger_mode() == TriggerMode::Level && level && injected { entry.set_remote_irr(true); } else if irq == RTC_IRQ && injected { self.rtc_remote_irr = true; |