From ac242df107dec314bd047d58f1654537120ee02e Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 24 Oct 2018 15:04:13 -0700 Subject: [PATCH] Revert "mptable: mark PCI interrupts as edge triggered" Legacy PCI interrupts should be level triggered, not edge triggered. The reverted change was done as part of a series of patches during debugging of virtio-pci differences from virtio-mmio, but this was not the actual root cause of the problems. BUG=None TEST=Boot crosvm on x86-64 and verify virtio devices still work This reverts commit 9357ceab6ac207498fc2cff4be70aa6975e9c79f. Change-Id: If1bf6e48d63fe352f0b914f5bdb2e346ab210369 Signed-off-by: Daniel Verkamp Reviewed-on: https://chromium-review.googlesource.com/1297840 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Dylan Reid Reviewed-by: Zach Reizner --- x86_64/src/mptable.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x86_64/src/mptable.rs b/x86_64/src/mptable.rs index 7587bb7a87..b7842b03e6 100644 --- a/x86_64/src/mptable.rs +++ b/x86_64/src/mptable.rs @@ -85,7 +85,6 @@ const CPU_STEPPING: u32 = 0x600; const CPU_FEATURE_APIC: u32 = 0x200; const CPU_FEATURE_FPU: u32 = 0x001; const MPTABLE_START: u64 = 0x400 * 639; // Last 1k of Linux's 640k base RAM. -const MP_IRQTRIG_EDGE: u16 = 4; fn compute_checksum(v: &T) -> u8 { // Safe because we are only reading the bytes within the size of the `T` reference `v`. @@ -251,7 +250,7 @@ pub fn setup_mptable( let mut mpc_intsrc = mpc_intsrc::default(); mpc_intsrc.type_ = MP_INTSRC as u8; mpc_intsrc.irqtype = mp_irq_source_types_mp_INT as u8; - mpc_intsrc.irqflag = MP_IRQTRIG_EDGE | MP_IRQDIR_DEFAULT as u16; + mpc_intsrc.irqflag = MP_IRQDIR_DEFAULT as u16; mpc_intsrc.srcbus = PCI_BUS_ID; mpc_intsrc.srcbusirq = (pci_irq.0 as u8 + 1) << 2 | pci_irq.1.to_mask() as u8; mpc_intsrc.dstapic = ioapicid;