* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 [not found] ` <lhtB1-q1-53@gated-at.bofh.it> @ 2013-06-28 16:11 ` Andreas Hartmann 2013-06-28 17:49 ` Alex Williamson 2013-06-28 18:25 ` Joerg Roedel 0 siblings, 2 replies; 13+ messages in thread From: Andreas Hartmann @ 2013-06-28 16:11 UTC (permalink / raw) To: Joerg Roedel, Alex Williamson; +Cc: LKML Hello Joerg, hello Alex, the subsequent patch and the patch "iommu/amd: Re-enable IOMMU event log interrupt after handling." 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 spread /var/log/messages with the following line (> 700 lines/second) right after loading vfio: AMD-Vi: Event logged [IO_PAGE_FAULT device=00:14.0 domain=0x0000 address=0x000000fdf9103300 flags=0x0600] lspci -vvvs 0:14.0 00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 42) Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap- 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Besides the enormous pollution I couldn't see any malfunction at all. At first, I didn't realised it at all (-> the SSD was fast enough to cover it silently). I saw it the first time I rebooted because X didn't start any more because the /var partition was completely full. I removed the two mentioned patches and all is working fine again as before. Any idea? Thanks, kind regards, Andreas Greg Kroah-Hartman wrote: > 3.9-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Joerg Roedel <joro@8bytes.org> > > commit d3263bc29706e42f74d8800807c2dedf320d77f1 upstream. > > Work around an IOMMU hardware bug where clearing the > EVT_INT or PPR_INT bit in the status register may race with > the hardware trying to set it again. When not handled the > bit might not be cleared and we lose all future event or ppr > interrupts. > > Reported-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> > Signed-off-by: Joerg Roedel <joro@8bytes.org> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > --- > drivers/iommu/amd_iommu.c | 34 ++++++++++++++++++++++++++-------- > 1 file changed, 26 insertions(+), 8 deletions(-) > > --- a/drivers/iommu/amd_iommu.c > +++ b/drivers/iommu/amd_iommu.c > @@ -700,14 +700,23 @@ retry: > > static void iommu_poll_events(struct amd_iommu *iommu) > { > - u32 head, tail; > + u32 head, tail, status; > unsigned long flags; > > - /* enable event interrupts again */ > - writel(MMIO_STATUS_EVT_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); > - > spin_lock_irqsave(&iommu->lock, flags); > > + /* enable event interrupts again */ > + do { > + /* > + * Workaround for Erratum ERBT1312 > + * Clearing the EVT_INT bit may race in the hardware, so read > + * it again and make sure it was really cleared > + */ > + status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); > + writel(MMIO_STATUS_EVT_INT_MASK, > + iommu->mmio_base + MMIO_STATUS_OFFSET); > + } while (status & MMIO_STATUS_EVT_INT_MASK); > + > head = readl(iommu->mmio_base + MMIO_EVT_HEAD_OFFSET); > tail = readl(iommu->mmio_base + MMIO_EVT_TAIL_OFFSET); > > @@ -744,16 +753,25 @@ static void iommu_handle_ppr_entry(struc > static void iommu_poll_ppr_log(struct amd_iommu *iommu) > { > unsigned long flags; > - u32 head, tail; > + u32 head, tail, status; > > if (iommu->ppr_log == NULL) > return; > > - /* enable ppr interrupts again */ > - writel(MMIO_STATUS_PPR_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); > - > spin_lock_irqsave(&iommu->lock, flags); > > + /* enable ppr interrupts again */ > + do { > + /* > + * Workaround for Erratum ERBT1312 > + * Clearing the PPR_INT bit may race in the hardware, so read > + * it again and make sure it was really cleared > + */ > + status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); > + writel(MMIO_STATUS_PPR_INT_MASK, > + iommu->mmio_base + MMIO_STATUS_OFFSET); > + } while (status & MMIO_STATUS_PPR_INT_MASK); > + > head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET); > tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET); > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 16:11 ` [ 102/127] iommu/amd: Workaround for ERBT1312 Andreas Hartmann @ 2013-06-28 17:49 ` Alex Williamson 2013-06-28 18:29 ` Joerg Roedel 2013-06-28 20:37 ` Andreas Hartmann 2013-06-28 18:25 ` Joerg Roedel 1 sibling, 2 replies; 13+ messages in thread From: Alex Williamson @ 2013-06-28 17:49 UTC (permalink / raw) To: Andreas Hartmann; +Cc: Joerg Roedel, LKML On Fri, 2013-06-28 at 18:11 +0200, Andreas Hartmann wrote: > Hello Joerg, hello Alex, > > the subsequent patch and the patch "iommu/amd: Re-enable IOMMU event log > interrupt after handling." 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 > spread /var/log/messages with the following line (> 700 lines/second) > right after loading vfio: > > AMD-Vi: Event logged [IO_PAGE_FAULT device=00:14.0 domain=0x0000 address=0x000000fdf9103300 flags=0x0600] That's interesting, I PXE boot my system from one NIC then use a different NIC for the iSCSI root. The PXE boot NIC now screams like this, _until_ I attach it to vfio, then it quiets down. > lspci -vvvs 0:14.0 > 00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 42) > Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ > Status: Cap- 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- > > > Besides the enormous pollution I couldn't see any malfunction at all. > At first, I didn't realised it at all (-> the SSD was fast enough to > cover it silently). I saw it the first time I rebooted because X didn't start any more because > the /var partition was completely full. > > I removed the two mentioned patches and all is working > fine again as before. > > Any idea? Not really without some digging. I wonder if it's a new event each time or if something is just not clearing a previous event. ISTR that a boot used to often, but not always, generate a couple faults between the IOMMU being enabled and the NIC driver being loaded. All the faults I see are to the same address, so my guess is that it's getting replayed. Thanks, Alex > Greg Kroah-Hartman wrote: > > 3.9-stable review patch. If anyone has any objections, please let me know. > > > > ------------------ > > > > From: Joerg Roedel <joro@8bytes.org> > > > > commit d3263bc29706e42f74d8800807c2dedf320d77f1 upstream. > > > > Work around an IOMMU hardware bug where clearing the > > EVT_INT or PPR_INT bit in the status register may race with > > the hardware trying to set it again. When not handled the > > bit might not be cleared and we lose all future event or ppr > > interrupts. > > > > Reported-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> > > Signed-off-by: Joerg Roedel <joro@8bytes.org> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > --- > > drivers/iommu/amd_iommu.c | 34 ++++++++++++++++++++++++++-------- > > 1 file changed, 26 insertions(+), 8 deletions(-) > > > > --- a/drivers/iommu/amd_iommu.c > > +++ b/drivers/iommu/amd_iommu.c > > @@ -700,14 +700,23 @@ retry: > > > > static void iommu_poll_events(struct amd_iommu *iommu) > > { > > - u32 head, tail; > > + u32 head, tail, status; > > unsigned long flags; > > > > - /* enable event interrupts again */ > > - writel(MMIO_STATUS_EVT_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); > > - > > spin_lock_irqsave(&iommu->lock, flags); > > > > + /* enable event interrupts again */ > > + do { > > + /* > > + * Workaround for Erratum ERBT1312 > > + * Clearing the EVT_INT bit may race in the hardware, so read > > + * it again and make sure it was really cleared > > + */ > > + status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); > > + writel(MMIO_STATUS_EVT_INT_MASK, > > + iommu->mmio_base + MMIO_STATUS_OFFSET); > > + } while (status & MMIO_STATUS_EVT_INT_MASK); > > + > > head = readl(iommu->mmio_base + MMIO_EVT_HEAD_OFFSET); > > tail = readl(iommu->mmio_base + MMIO_EVT_TAIL_OFFSET); > > > > @@ -744,16 +753,25 @@ static void iommu_handle_ppr_entry(struc > > static void iommu_poll_ppr_log(struct amd_iommu *iommu) > > { > > unsigned long flags; > > - u32 head, tail; > > + u32 head, tail, status; > > > > if (iommu->ppr_log == NULL) > > return; > > > > - /* enable ppr interrupts again */ > > - writel(MMIO_STATUS_PPR_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); > > - > > spin_lock_irqsave(&iommu->lock, flags); > > > > + /* enable ppr interrupts again */ > > + do { > > + /* > > + * Workaround for Erratum ERBT1312 > > + * Clearing the PPR_INT bit may race in the hardware, so read > > + * it again and make sure it was really cleared > > + */ > > + status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); > > + writel(MMIO_STATUS_PPR_INT_MASK, > > + iommu->mmio_base + MMIO_STATUS_OFFSET); > > + } while (status & MMIO_STATUS_PPR_INT_MASK); > > + > > head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET); > > tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET); > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 17:49 ` Alex Williamson @ 2013-06-28 18:29 ` Joerg Roedel 2013-06-28 18:43 ` Alex Williamson 2013-06-28 20:37 ` Andreas Hartmann 1 sibling, 1 reply; 13+ messages in thread From: Joerg Roedel @ 2013-06-28 18:29 UTC (permalink / raw) To: Alex Williamson; +Cc: Andreas Hartmann, LKML Hi Alex, On Fri, Jun 28, 2013 at 11:49:04AM -0600, Alex Williamson wrote: > That's interesting, I PXE boot my system from one NIC then use a > different NIC for the iSCSI root. The PXE boot NIC now screams like > this, _until_ I attach it to vfio, then it quiets down. Can you please send an example line of the reported fault? The addresses it faults on would be interesting. > > Any idea? > > Not really without some digging. I wonder if it's a new event each time > or if something is just not clearing a previous event. ISTR that a boot > used to often, but not always, generate a couple faults between the > IOMMU being enabled and the NIC driver being loaded. All the faults I > see are to the same address, so my guess is that it's getting replayed. Well, I think it is a problem uncovered by the patch that re-enables the event-log interrupt after it happened once. We need to find a strategy to cope with those problems. To my mind as a quick-fix comes rate-limiting for the printks. Or we use the suppress-pf bit in the DTE to suppress all page-faults after the first one. Joerg ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 18:29 ` Joerg Roedel @ 2013-06-28 18:43 ` Alex Williamson 0 siblings, 0 replies; 13+ messages in thread From: Alex Williamson @ 2013-06-28 18:43 UTC (permalink / raw) To: Joerg Roedel; +Cc: Andreas Hartmann, LKML On Fri, 2013-06-28 at 20:29 +0200, Joerg Roedel wrote: > Hi Alex, > > On Fri, Jun 28, 2013 at 11:49:04AM -0600, Alex Williamson wrote: > > That's interesting, I PXE boot my system from one NIC then use a > > different NIC for the iSCSI root. The PXE boot NIC now screams like > > this, _until_ I attach it to vfio, then it quiets down. > > Can you please send an example line of the reported fault? The addresses > it faults on would be interesting. [ 99.613489] AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x0000 address=0x000000000008f880 flags=0x0050] > > > Any idea? > > > > Not really without some digging. I wonder if it's a new event each time > > or if something is just not clearing a previous event. ISTR that a boot > > used to often, but not always, generate a couple faults between the > > IOMMU being enabled and the NIC driver being loaded. All the faults I > > see are to the same address, so my guess is that it's getting replayed. > > Well, I think it is a problem uncovered by the patch that re-enables the > event-log interrupt after it happened once. We need to find a strategy > to cope with those problems. > > To my mind as a quick-fix comes rate-limiting for the printks. Or we use > the suppress-pf bit in the DTE to suppress all page-faults after the > first one. > > > Joerg > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 17:49 ` Alex Williamson 2013-06-28 18:29 ` Joerg Roedel @ 2013-06-28 20:37 ` Andreas Hartmann 1 sibling, 0 replies; 13+ messages in thread From: Andreas Hartmann @ 2013-06-28 20:37 UTC (permalink / raw) To: Alex Williamson, Joerg Roedel; +Cc: LKML Alex Williamson wrote: > On Fri, 2013-06-28 at 18:11 +0200, Andreas Hartmann wrote: >> Hello Joerg, hello Alex, >> >> the subsequent patch and the patch "iommu/amd: Re-enable IOMMU event log >> interrupt after handling." 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 >> spread /var/log/messages with the following line (> 700 lines/second) >> right after loading vfio: >> >> AMD-Vi: Event logged [IO_PAGE_FAULT device=00:14.0 domain=0x0000 address=0x000000fdf9103300 flags=0x0600] > > That's interesting, I PXE boot my system from one NIC then use a > different NIC for the iSCSI root. The PXE boot NIC now screams like > this, _until_ I attach it to vfio, then it quiets down. Hmm, I just remembered an active workaround I implemented to "resolve" an error like this when starting my VM to passthrough my intel pci ethernet device since I applied a new kvm version: qemu-kvm: -device vfio-pci,host=06:06.0: vfio: failed to set iommu for container: Device or resource busy qemu-kvm: -device vfio-pci,host=06:06.0: vfio: failed to setup container for group 12 qemu-kvm: -device vfio-pci,host=06:06.0: vfio: failed to get group 12 qemu-kvm: -device vfio-pci,host=06:06.0: Device 'vfio-pci' could not be initialized The workaround was to bind the individual multifunction devices during boot one time to vfio and release them after 2 seconds again and rebind them to the original drivers as they where bound before (if it was bound to any). I did this with a script beginning like this: #!/bin/sh modprobe vfio-pci echo "1002 4385" > /sys/bus/pci/drivers/vfio-pci/new_id echo 0000:00:14.0 > /sys/bus/pci/devices/0000:00:14.0/driver/unbind echo 0000:00:14.0 > /sys/bus/pci/drivers/vfio-pci/bind ... sleep 2 echo 0000:00:14.0 > /sys/bus/pci/drivers/vfio-pci/unbind echo "1002 4385" > /sys/bus/pci/drivers/vfio-pci/remove_id ... The logs in messages: Jun 28 15:54:12 . kernel: [ 48.860147] VFIO - User Level meta-driver version: 0.3 Jun 28 15:54:12 . kernel: [ 48.875243] AMD-Vi: Event logged [IO_PAGE_FAULT device=00:14.0 domain=0x0000 address=0x000000fdf9103300 flags=0x0600] ... Therefore, the logoutput most probably started after device 14.0 was bound to vfio. If it would have started after removing vfio, I would have expected 2 seconds between the start messages of vfio and the first occurrence of the IO_PAGE_FAULT. Today, I'm using kvm 1.3.1 and it isn't necessary to use the complete workaround anymore. It is enough to bind / unbind the pci bridge as described above before starting the VM with the passed through pci ethernet device. Because I now don't touch the 14.0 device any more, the IO_PAGE_FAULT messages disappeared completely. @Joerg: Anyway, I'm going to test your provided patch tomorrow! BTW: what does it mean: IO_PAGE_FAULT - what do I have to expect if I see this message? Thanks, regards, Andreas ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 16:11 ` [ 102/127] iommu/amd: Workaround for ERBT1312 Andreas Hartmann 2013-06-28 17:49 ` Alex Williamson @ 2013-06-28 18:25 ` Joerg Roedel 2013-06-28 18:42 ` Andreas Hartmann 1 sibling, 1 reply; 13+ messages in thread From: Joerg Roedel @ 2013-06-28 18:25 UTC (permalink / raw) To: Andreas Hartmann; +Cc: Alex Williamson, LKML Hi Andreas, On Fri, Jun 28, 2013 at 06:11:36PM +0200, Andreas Hartmann wrote: > Hello Joerg, hello Alex, > > the subsequent patch and the patch "iommu/amd: Re-enable IOMMU event log > interrupt after handling." 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 > spread /var/log/messages with the following line (> 700 lines/second) > right after loading vfio: > > AMD-Vi: Event logged [IO_PAGE_FAULT device=00:14.0 domain=0x0000 address=0x000000fdf9103300 flags=0x0600] > > lspci -vvvs 0:14.0 > 00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 42) > Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ > Status: Cap- 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Most likely a BIOS issue that is uncovered by re-enabling the event-log interrupt patch. The device itself is only used by the BIOS and not by the Linux kernel > Besides the enormous pollution I couldn't see any malfunction at all. > At first, I didn't realised it at all (-> the SSD was fast enough to > cover it silently). I saw it the first time I rebooted because X didn't start any more because > the /var partition was completely full. > > I removed the two mentioned patches and all is working > fine again as before. Without these two patches, can you check dmesg after boot if there are other lines which report IO_PAGE_FAULTs? Joerg ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 18:25 ` Joerg Roedel @ 2013-06-28 18:42 ` Andreas Hartmann 2013-06-28 19:23 ` Joerg Roedel 0 siblings, 1 reply; 13+ messages in thread From: Andreas Hartmann @ 2013-06-28 18:42 UTC (permalink / raw) To: Joerg Roedel; +Cc: Alex Williamson, LKML Hello Joerg, Joerg Roedel wrote: > Hi Andreas, > > On Fri, Jun 28, 2013 at 06:11:36PM +0200, Andreas Hartmann wrote: >> Hello Joerg, hello Alex, >> >> the subsequent patch and the patch "iommu/amd: Re-enable IOMMU event log >> interrupt after handling." 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98 >> spread /var/log/messages with the following line (> 700 lines/second) >> right after loading vfio: >> >> AMD-Vi: Event logged [IO_PAGE_FAULT device=00:14.0 domain=0x0000 address=0x000000fdf9103300 flags=0x0600] >> >> lspci -vvvs 0:14.0 >> 00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 42) >> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ >> Status: Cap- 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- > > Most likely a BIOS issue that is uncovered by re-enabling the event-log > interrupt patch. The device itself is only used by the BIOS and not by > the Linux kernel Thanks for this info! Good to know. [...] >> I removed the two mentioned patches and all is working >> fine again as before. > > Without these two patches, can you check dmesg after boot if there are > other lines which report IO_PAGE_FAULTs? You're right, there is exactly one entry directly after loading of vfio. I can see this message, too, with linux 3.4.43. Regards, Andreas ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 18:42 ` Andreas Hartmann @ 2013-06-28 19:23 ` Joerg Roedel 2013-06-28 21:48 ` Alex Williamson 2013-06-29 5:54 ` Andreas Hartmann 0 siblings, 2 replies; 13+ messages in thread From: Joerg Roedel @ 2013-06-28 19:23 UTC (permalink / raw) To: Andreas Hartmann, Alex Williamson; +Cc: LKML Alex, Andreas, On Fri, Jun 28, 2013 at 08:42:05PM +0200, Andreas Hartmann wrote: > You're right, there is exactly one entry directly after loading of vfio. > I can see this message, too, with linux 3.4.43. Can you please test this patch? It should reduce the noise significantly, but a few of those error messages are still expected. diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index e3c2d74..74e1d1c 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -1431,6 +1431,7 @@ static void init_device_table_dma(void) for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) { set_dev_entry_bit(devid, DEV_ENTRY_VALID); set_dev_entry_bit(devid, DEV_ENTRY_TRANSLATION); + set_dev_entry_bit(devid, DEV_ENTRY_ONE_FAULT); } } diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h index 083f98c..4872b68 100644 --- a/drivers/iommu/amd_iommu_types.h +++ b/drivers/iommu/amd_iommu_types.h @@ -173,6 +173,7 @@ #define DEV_ENTRY_TRANSLATION 0x01 #define DEV_ENTRY_IR 0x3d #define DEV_ENTRY_IW 0x3e +#define DEV_ENTRY_ONE_FAULT 0x61 #define DEV_ENTRY_NO_PAGE_FAULT 0x62 #define DEV_ENTRY_EX 0x67 #define DEV_ENTRY_SYSMGT1 0x68 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 19:23 ` Joerg Roedel @ 2013-06-28 21:48 ` Alex Williamson 2013-06-29 5:54 ` Andreas Hartmann 1 sibling, 0 replies; 13+ messages in thread From: Alex Williamson @ 2013-06-28 21:48 UTC (permalink / raw) To: Joerg Roedel; +Cc: Andreas Hartmann, LKML On Fri, 2013-06-28 at 21:23 +0200, Joerg Roedel wrote: > Alex, Andreas, > > On Fri, Jun 28, 2013 at 08:42:05PM +0200, Andreas Hartmann wrote: > > You're right, there is exactly one entry directly after loading of vfio. > > I can see this message, too, with linux 3.4.43. > > Can you please test this patch? It should reduce the noise > significantly, but a few of those error messages are still expected. Seems to work for me. I generated a few errors, but each one seems unique and is more like what I would expect if the PXE ROM left the NIC running: [ 2.574155] AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x001b address=0x00000000000946b0 flags=0x0020] [ 2.574157] AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x001b address=0x000000000008f8d0 flags=0x0020] [ 4.992074] AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x001b address=0x000000000008f880 flags=0x0000] I booted the system four times and twice got just three log messages, like above, and twice got no faults. Thanks, Alex > diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c > index e3c2d74..74e1d1c 100644 > --- a/drivers/iommu/amd_iommu_init.c > +++ b/drivers/iommu/amd_iommu_init.c > @@ -1431,6 +1431,7 @@ static void init_device_table_dma(void) > for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) { > set_dev_entry_bit(devid, DEV_ENTRY_VALID); > set_dev_entry_bit(devid, DEV_ENTRY_TRANSLATION); > + set_dev_entry_bit(devid, DEV_ENTRY_ONE_FAULT); > } > } > > diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h > index 083f98c..4872b68 100644 > --- a/drivers/iommu/amd_iommu_types.h > +++ b/drivers/iommu/amd_iommu_types.h > @@ -173,6 +173,7 @@ > #define DEV_ENTRY_TRANSLATION 0x01 > #define DEV_ENTRY_IR 0x3d > #define DEV_ENTRY_IW 0x3e > +#define DEV_ENTRY_ONE_FAULT 0x61 > #define DEV_ENTRY_NO_PAGE_FAULT 0x62 > #define DEV_ENTRY_EX 0x67 > #define DEV_ENTRY_SYSMGT1 0x68 > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-28 19:23 ` Joerg Roedel 2013-06-28 21:48 ` Alex Williamson @ 2013-06-29 5:54 ` Andreas Hartmann 2013-06-29 8:04 ` Joerg Roedel 1 sibling, 1 reply; 13+ messages in thread From: Andreas Hartmann @ 2013-06-29 5:54 UTC (permalink / raw) To: Joerg Roedel, Alex Williamson; +Cc: LKML Joerg Roedel wrote: > Alex, Andreas, > > On Fri, Jun 28, 2013 at 08:42:05PM +0200, Andreas Hartmann wrote: >> You're right, there is exactly one entry directly after loading of vfio. >> I can see this message, too, with linux 3.4.43. > > Can you please test this patch? It should reduce the noise > significantly, but a few of those error messages are still expected. Sorry, but it doesn't work for me at all :-(. Behaviour is unchanged. It is exactly as described in the other mail: at the moment of binding vfio to 14.0, the fire begins. echo "1002 4385" > /sys/bus/pci/drivers/vfio-pci/new_id echo 0000:00:14.0 > /sys/bus/pci/devices/0000:00:14.0/driver/unbind echo 0000:00:14.0 > /sys/bus/pci/drivers/vfio-pci/bind Regards, Andreas ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-29 5:54 ` Andreas Hartmann @ 2013-06-29 8:04 ` Joerg Roedel 2013-06-29 9:06 ` Andreas Hartmann 0 siblings, 1 reply; 13+ messages in thread From: Joerg Roedel @ 2013-06-29 8:04 UTC (permalink / raw) To: Andreas Hartmann; +Cc: Alex Williamson, LKML On Sat, Jun 29, 2013 at 07:54:20AM +0200, Andreas Hartmann wrote: > Sorry, but it doesn't work for me at all :-(. Behaviour is unchanged. It > is exactly as described in the other mail: at the moment of binding vfio > to 14.0, the fire begins. Hmm, VFIO attaches the device to a new domain. That clears the bit, how about this patch: diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 1a5285b..cdf346f 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2111,6 +2111,8 @@ static void set_dte_entry(u16 devid, struct protection_domain *domain, bool ats) tmp = DTE_GCR3_VAL_C(gcr3) << DTE_GCR3_SHIFT_C; flags |= tmp; + + flags |= DTE_FLAG_SE; } flags &= ~(0xffffUL); diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index e3c2d74..74e1d1c 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -1431,6 +1431,7 @@ static void init_device_table_dma(void) for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) { set_dev_entry_bit(devid, DEV_ENTRY_VALID); set_dev_entry_bit(devid, DEV_ENTRY_TRANSLATION); + set_dev_entry_bit(devid, DEV_ENTRY_ONE_FAULT); } } diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h index 083f98c..2104ca4 100644 --- a/drivers/iommu/amd_iommu_types.h +++ b/drivers/iommu/amd_iommu_types.h @@ -173,6 +173,7 @@ #define DEV_ENTRY_TRANSLATION 0x01 #define DEV_ENTRY_IR 0x3d #define DEV_ENTRY_IW 0x3e +#define DEV_ENTRY_ONE_FAULT 0x61 #define DEV_ENTRY_NO_PAGE_FAULT 0x62 #define DEV_ENTRY_EX 0x67 #define DEV_ENTRY_SYSMGT1 0x68 @@ -282,6 +283,7 @@ #define IOMMU_PTE_IW (1ULL << 62) #define DTE_FLAG_IOTLB (0x01UL << 32) +#define DTE_FLAG_SE (0x01UL << 33) #define DTE_FLAG_GV (0x01ULL << 55) #define DTE_GLX_SHIFT (56) #define DTE_GLX_MASK (3) ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-29 8:04 ` Joerg Roedel @ 2013-06-29 9:06 ` Andreas Hartmann 0 siblings, 0 replies; 13+ messages in thread From: Andreas Hartmann @ 2013-06-29 9:06 UTC (permalink / raw) To: Joerg Roedel; +Cc: Alex Williamson, LKML Joerg Roedel schrieb: > On Sat, Jun 29, 2013 at 07:54:20AM +0200, Andreas Hartmann wrote: >> Sorry, but it doesn't work for me at all :-(. Behaviour is unchanged. It >> is exactly as described in the other mail: at the moment of binding vfio >> to 14.0, the fire begins. > > Hmm, VFIO attaches the device to a new domain. That clears the bit, how > about this patch: Didn't help, too :-( Regards, Andreas ^ permalink raw reply [flat|nested] 13+ messages in thread
* [ 000/127] 3.9.5-stable review
@ 2013-06-05 21:32 Greg Kroah-Hartman
2013-06-05 21:34 ` [ 102/127] iommu/amd: Workaround for ERBT1312 Greg Kroah-Hartman
0 siblings, 1 reply; 13+ messages in thread
From: Greg Kroah-Hartman @ 2013-06-05 21:32 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, stable
This is the start of the stable review cycle for the 3.9.5 release.
There are 127 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Fri Jun 7 21:30:02 UTC 2013.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.5-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 3.9.5-rc1
Wei Liu <wei.liu2@citrix.com>
xen-netback: better names for thresholds
Johannes Berg <johannes.berg@intel.com>
mac80211_hwsim: remove P2P_DEVICE support
Johannes Berg <johannes.berg@intel.com>
iwlwifi: mvm: remove P2P_DEVICE support
Wei Liu <wei.liu2@citrix.com>
xen-netfront: reduce gso_max_size to account for max TCP header
Wei Liu <wei.liu2@citrix.com>
xen-netback: avoid allocating variable size array on stack
Wei Liu <wei.liu2@citrix.com>
xen-netback: remove redundent parameter in netbk_count_requests
Wei Liu <wei.liu2@citrix.com>
xen-netback: don't disconnect frontend when seeing oversize packet
Wei Liu <wei.liu2@citrix.com>
xen-netback: coalesce slots in TX path and fix regressions
Timo Teräs <timo.teras@iki.f>
leds: leds-gpio: reserve gpio before using it
Nicholas Bellinger <nab@linux-iscsi.org>
target/file: Fix off-by-one READ_CAPACITY bug for !S_ISBLK export
Nicholas Bellinger <nab@linux-iscsi.org>
target: Re-instate sess_wait_list for target_wait_for_sess_cmds
Miklos Szeredi <mszeredi@suse.cz>
fuse: fix readdirplus Oops in fuse_dentry_revalidate
Daniel Mack <zonque@gmail.com>
ASoC: davinci: fix sample rotation
Or Gerlitz <ogerlitz@mellanox.com>
IB/iser: Return error to upper layers on EAGAIN registration failures
Jonas Peterson <jonas.peterson@gmail.com>
net: can: kvaser_usb: fix reception on "USBcan Pro" and "USBcan R" type hardware.
Nithin Sujir <nsujir@broadcom.com>
tg3: Add read dma workaround for 5720
Gabor Juhos <juhosg@openwrt.org>
ath9k: use correct OTP register offsets for AR9550
Johannes Berg <johannes.berg@intel.com>
cfg80211: check wdev->netdev in connection work
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: mvm: tell firmware to let multicast frames in
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: dvm: fix zero LQ CMD sending avoidance
Johannes Berg <johannes.berg@intel.com>
mac80211: close AP_VLAN interfaces before unregistering all
Stanislaw Gruszka <sgruszka@redhat.com>
mac80211: fix direct probe auth
Ben Skeggs <bskeggs@redhat.com>
drm/nvc0/ce: disable ce1 on a number of chipsets
Bastian Triller <bastian.triller@gmail.com>
ACPI / video: Add "Asus UL30A" to ACPI video detect blacklist
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI / PM: Allow device power states to be used for CONFIG_PM unset
Joerg Roedel <joro@8bytes.org>
iommu/amd: Workaround for ERBT1312
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
iommu/amd: Re-enable IOMMU event log interrupt after handling.
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: mvm: fix aggregation drain flow
Wei Liu <wei.liu2@citrix.com>
xen-netback: remove skb in xen_netbk_alloc_page
Dave Kleikamp <dave.kleikamp@oracle.com>
jfs: fix a couple races
Jeff Mahoney <jeffm@jeffreymahoney.com>
reiserfs: fix spurious multiple-fill in reiserfs_readdir_dentry
Jeff Mahoney <jeffm@suse.com>
reiserfs: fix problems with chowning setuid file w/ xattrs
Jeff Mahoney <jeffm@suse.com>
reiserfs: fix deadlock with nfs racing on create/lookup
Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
powerpc/pseries: Always enable CONFIG_HOTPLUG_CPU on PSERIES SMP
Kishon Vijay Abraham I <kishon@ti.com>
regulator: palmas: Fix "enable_reg" to point to the correct reg for SMPS10
Paolo Bonzini <pbonzini@redhat.com>
KVM: fix sil/dil/bpl/spl in the mod/rm fields
Paolo Bonzini <pbonzini@redhat.com>
KVM: Emulate multibyte NOP
Trond Myklebust <Trond.Myklebust@netapp.com>
NFSv4: Fix a thinko in nfs4_try_open_cached
Nicholas Bellinger <nab@linux-iscsi.org>
ib_srpt: Call target_sess_cmd_list_set_waiting during shutdown_session
Kees Cook <keescook@chromium.org>
iscsi-target: fix heap buffer overflow on error
Michael Neuling <mikey@neuling.org>
powerpc/tm: Move TM abort cause codes to uapi
Michael Neuling <mikey@neuling.org>
powerpc/tm: Abort on emulation and alignment faults
Michael Neuling <mikey@neuling.org>
powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions
Michael Neuling <mikey@neuling.org>
powerpc/tm: Update cause codes documentation
Michael Neuling <mikey@neuling.org>
powerpc/tm: Make room for hypervisor in abort cause codes
Priyanka Jain <Priyanka.Jain@freescale.com>
powerpc/32bit:Store temporary result in r0 instead of r8
Tejun Heo <tj@kernel.org>
cgroup: fix a subtle bug in descendant pre-order walk
Li Zefan <lizefan@huawei.com>
cgroup: initialize xattr before calling d_instantiate()
Christian Borntraeger <borntraeger@de.ibm.com>
s390/pgtable: Fix check for pgste/storage key handling
Finn Thain <fthain@telegraphics.com.au>
m68k/mac: Fix unexpected interrupt with CONFIG_EARLY_PRINTK
Vincent Pelletier <plr.vincent@gmail.com>
libata: make ata_exec_internal_sg honor DMADIR
Chew, Chiau Ee <chiau.ee.chew@intel.com>
ata_piix: add PCI IDs for Intel BayTail
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
sata_rcar: fix interrupt handling
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
sata_rcar: clear STOP bit in bmdma_start() method
Jeff Layton <jlayton@redhat.com>
cifs: fix potential buffer overrun when composing a new options string
Horia Geanta <horia.geanta@freescale.com>
crypto: caam - fix inconsistent assoc dma mapping direction
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: fix card_posted check for newer asics
Alex Deucher <alexander.deucher@amd.com>
drm/radeon: fix typo in cu_per_sh on verde
Rodrigo Vivi <rodrigo.vivi@gmail.com>
drm/i915: Adding more reserved PCI IDs for Haswell.
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
ASoC: wm5110: Correct DSP4R Mixer control name
Nicolas Schichan <nschichan@freebox.fr>
ASoC: cs42l52: fix default value for MASTERA_VOL.
J. Bruce Fields <bfields@redhat.com>
svcrpc: fix failures to handle -1 uid's and gid's
Trond Myklebust <Trond.Myklebust@netapp.com>
SUNRPC: Prevent an rpc_task wakeup race
Sylwester Nawrocki <s.nawrocki@samsung.com>
ARM: SAMSUNG: Export MIPI CSIS/DSIM PHY control functions
Mark Rutland <mark.rutland@arm.com>
arm64: don't kill the kernel on a bad esr from el0
Dave Chinner <dchinner@redhat.com>
xfs: kill suid/sgid through the truncate path.
Rusty Russell <rusty@rustcorp.com.au>
module: don't unlink the module until we've removed all exposure.
Jan Beulich <JBeulich@suse.com>
x86, crc32-pclmul: Fix build with older binutils
Yinghai Lu <yinghai@kernel.org>
x86, range: fix missing merge during add range
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
x86-64, init: Fix a possible wraparound bug in switchover in head_64.S
Pekka Riikonen <priikone@iki.fi>
x86: Allow FPU to be used at interrupt time even with eagerfpu
wenxiong@linux.vnet.ibm.com <wenxiong@linux.vnet.ibm.com>
SCSI: ipr: Need to reset adapter after the 6th EEH error
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
mm/THP: use pmd_populate() to update the pmd with pgtable_t pointer
Cliff Wickman <cpw@sgi.com>
mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas
Brian Behlendorf <behlendorf1@llnl.gov>
drivers/block/brd.c: fix brd_lookup_page() race
Johannes Weiner <hannes@cmpxchg.org>
mm: memcg: remove incorrect VM_BUG_ON for swap cache pages in uncharge
Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
mm: mmu_notifier: re-fix freed page still mapped in secondary MMU
Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
nilfs2: fix issue of nilfs_set_page_dirty() for page at EOF boundary
Imre Deak <imre.deak@intel.com>
wait: fix false timeouts when using wait_event_timeout()
wang, biao <biao.wang@intel.com>
klist: del waiter from klist_remove_waiters before wakeup waitting process
Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
mm compaction: fix of improper cache flush in migration code
Alexandre Bounine <alexandre.bounine@idt.com>
rapidio/tsi721: fix bug in MSI interrupt handling
Christian Gmeiner <christian.gmeiner@gmail.com>
drivers/leds/leds-ot200.c: fix error caused by shifted mask
Martin Michlmayr <tbm@cyrius.com>
Kirkwood: Enable PCIe port 1 on QNAP TS-11x/TS-21x
Joseph Qi <joseph.qi@huawei.com>
ocfs2: goto out_unlock if ocfs2_get_clusters_nocache() failed in ocfs2_fiemap()
Sujith Manoharan <c_manoha@qca.qualcomm.com>
ath9k_hw: Enable manual peak calibration for AR9485
Sujith Manoharan <c_manoha@qca.qualcomm.com>
ath9k: Fix crash on module unload
Ben Hutchings <ben@decadent.org.uk>
perf: net_dropmonitor: Fix symbol-relative addresses
Ben Hutchings <ben@decadent.org.uk>
perf: net_dropmonitor: Fix trace parameter order
Michael Chan <mchan@broadcom.com>
tg3: Fix data corruption on 5725 with TSO
Nithin Sujir <nsujir@broadcom.com>
tg3: Skip powering down function 0 on certain serdes devices
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
fat: fix possible overflow for fat_clusters
Jiri Kosina <jkosina@suse.cz>
random: fix accounting race condition with lockless irq entropy_count update
Jarod Wilson <jarod@redhat.com>
drivers/char/random.c: fix priming of last_data
Vineet Gupta <vgupta@synopsys.com>
ARC: copy_(to|from)_user() to honor usermode-access permissions
Jeff Layton <jlayton@redhat.com>
cifs: only set ops for inodes in I_NEW state
K. Y. Srinivasan <kys@microsoft.com>
Drivers: hv: Fix a bug in get_vp_index()
Heiko Abraham <abrahamh@web.de>
Input: egalax_ts - ABS_MT_POSITION_Y not reported well
Alan Stern <stern@rowland.harvard.edu>
USB: UHCI: fix for suspend of virtual HP controller
Alan Stern <stern@rowland.harvard.edu>
USB: xHCI: override bogus bulk wMaxPacketSize values
Oliver Neukum <oliver@neukum.org>
USB: reset resume quirk needed by a hub
Schemmel Hans-Christoph <Hans-Christoph.Schemmel@gemalto.com>
USB: Blacklisted Cinterion's PLxx WWAN Interface
Wang YanQing <udknight@gmail.com>
TTY: Fix tty miss restart after we turn off flow-control
Dan Carpenter <dan.carpenter@oracle.com>
USB: cxacru: potential underflow in cxacru_cm_get_array()
Gomella, Andrew (NIH/NHLBI) [F] <andrew.gomella@nih.gov>
USB: ftdi_sio: Add support for Newport CONEX motor drivers
Dan Williams <dcbw@redhat.com>
USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card
Teppo Kotilainen <qubit303@gmail.com>
usb: option: Add Telewell TW-LTE 4G
David Rientjes <rientjes@google.com>
usb, chipidea: fix link error when USB_EHCI_HCD is a module
Hema Prathaban <hemaklnce@gmail.com>
staging: vt6656: use free_netdev instead of kfree
Malcolm Priestley <tvboxspy@gmail.com>
staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower.
Alexander Bondar <alexander.bondar@intel.com>
iwlwifi: mvm: Prevent setting assoc flag in MAC_CONTEXT_CMD
Ilan Peer <ilan.peer@intel.com>
iwlwifi: mvm: Always use SCAN_TYPE_FORCED
Johannes Berg <johannes.berg@intel.com>
mac80211: fix AP-mode frame matching
Johannes Berg <johannes.berg@intel.com>
mac80211: use just spin_lock() in ieee80211_get_tkip_p2k()
Johannes Berg <johannes.berg@intel.com>
cfg80211: fix sending WoWLAN TCP wakeup settings
Johannes Berg <johannes.berg@intel.com>
cfg80211: fix wiphy_register error path
Johannes Berg <johannes.berg@intel.com>
cfg80211: fix WoWLAN wakeup tracing
Boris BREZILLON <b.brezillon@overkiz.com>
ARM: at91/dt: fix macb pinctrl_macb_rmii_mii_alt definition
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
ARM: at91: rm9200 fix time support
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
ARM: at91/trivial: fix model name for SAM9X25-EK
Ard Biesheuvel <ard.biesheuvel@gmail.com>
ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling
Vaibhav Hiremath <hvaibhav@ti.com>
ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
jean-philippe francois <jp.francois@cynove.com>
ARM: OMAP: fix __init section mismatch for _enable_preprogram
Gregory CLEMENT <gregory.clement@free-electrons.com>
ARM: plat-orion: Fix num_resources and id for ge10 and ge11
Alan Stern <stern@rowland.harvard.edu>
USB: fix latency in uhci-hcd and ohci-hcd
Alan Stern <stern@rowland.harvard.edu>
USB: OHCI: fix logic for scheduling isochronous URBs
Hans-Christian Egtvedt <egtvedt@samfundet.no>
avr32: fix relocation check for signed 18-bit offset
-------------
Diffstat:
Documentation/powerpc/transactional_memory.txt | 27 +-
Makefile | 4 +-
arch/arc/include/asm/pgtable.h | 26 +-
arch/arc/include/asm/tlb.h | 2 +-
arch/arc/mm/tlbex.S | 6 +-
arch/arm/boot/dts/at91sam9260.dtsi | 2 +-
arch/arm/boot/dts/at91sam9x25ek.dts | 2 +-
arch/arm/crypto/sha1-armv4-large.S | 2 +-
arch/arm/mach-at91/at91rm9200_time.c | 7 +-
arch/arm/mach-kirkwood/ts219-setup.c | 2 +-
arch/arm/mach-omap2/cclock33xx_data.c | 26 +-
arch/arm/mach-omap2/omap_hwmod.c | 2 +-
arch/arm/plat-orion/common.c | 12 +-
arch/arm/plat-samsung/setup-mipiphy.c | 3 +
arch/arm64/kernel/traps.c | 12 +-
arch/avr32/kernel/module.c | 2 +-
arch/m68k/kernel/head.S | 29 +-
arch/powerpc/include/asm/processor.h | 13 +-
arch/powerpc/include/asm/reg.h | 11 -
arch/powerpc/include/asm/signal.h | 3 +
arch/powerpc/include/asm/tm.h | 2 +
arch/powerpc/include/uapi/asm/Kbuild | 1 +
arch/powerpc/include/uapi/asm/tm.h | 18 ++
arch/powerpc/kernel/entry_32.S | 2 +-
arch/powerpc/kernel/signal.c | 40 ++-
arch/powerpc/kernel/signal.h | 2 +-
arch/powerpc/kernel/signal_32.c | 10 +-
arch/powerpc/kernel/signal_64.c | 23 +-
arch/powerpc/kernel/traps.c | 29 ++
arch/powerpc/platforms/pseries/Kconfig | 2 +
arch/s390/include/asm/pgtable.h | 15 +-
arch/x86/crypto/crc32-pclmul_asm.S | 2 +-
arch/x86/include/asm/inst.h | 74 ++++-
arch/x86/kernel/head_64.S | 6 +-
arch/x86/kernel/i387.c | 14 +-
arch/x86/kvm/emulate.c | 9 +-
drivers/acpi/Makefile | 2 +-
drivers/acpi/device_pm.c | 126 ++++-----
drivers/acpi/video_detect.c | 8 +
drivers/ata/ata_piix.c | 15 ++
drivers/ata/libata-core.c | 6 +
drivers/ata/sata_rcar.c | 24 +-
drivers/block/brd.c | 4 +-
drivers/char/random.c | 54 ++--
drivers/crypto/caam/caamalg.c | 4 +-
drivers/gpu/drm/i915/i915_drv.c | 46 +++-
drivers/gpu/drm/nouveau/core/subdev/device/nvc0.c | 2 -
drivers/gpu/drm/radeon/radeon_device.c | 19 +-
drivers/gpu/drm/radeon/si.c | 2 +-
drivers/hv/channel_mgmt.c | 2 +-
drivers/infiniband/ulp/iser/iser_memory.c | 3 +-
drivers/infiniband/ulp/srpt/ib_srpt.c | 32 ++-
drivers/infiniband/ulp/srpt/ib_srpt.h | 1 +
drivers/input/touchscreen/egalax_ts.c | 2 +-
drivers/iommu/amd_iommu.c | 31 ++-
drivers/iommu/amd_iommu_types.h | 1 +
drivers/leds/leds-gpio.c | 9 +-
drivers/leds/leds-ot200.c | 14 +-
drivers/net/can/usb/kvaser_usb.c | 64 +++--
drivers/net/ethernet/broadcom/tg3.c | 70 ++++-
drivers/net/ethernet/broadcom/tg3.h | 5 +-
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 9 +-
drivers/net/wireless/ath/ath9k/ar9485_initvals.h | 2 +-
drivers/net/wireless/ath/ath9k/debug.c | 8 +
drivers/net/wireless/ath/ath9k/debug.h | 5 +
drivers/net/wireless/ath/ath9k/init.c | 10 +-
drivers/net/wireless/iwlwifi/dvm/sta.c | 2 +-
drivers/net/wireless/iwlwifi/mvm/fw-api.h | 27 ++
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 12 +-
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 31 ++-
drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 +
drivers/net/wireless/iwlwifi/mvm/ops.c | 1 +
drivers/net/wireless/iwlwifi/mvm/scan.c | 6 +
drivers/net/wireless/iwlwifi/mvm/sta.c | 13 +-
drivers/net/wireless/iwlwifi/mvm/sta.h | 2 -
drivers/net/wireless/iwlwifi/mvm/tx.c | 48 +++-
drivers/net/wireless/mac80211_hwsim.c | 4 +-
drivers/net/xen-netback/netback.c | 311 ++++++++++++++++++----
drivers/net/xen-netfront.c | 17 +-
drivers/rapidio/devices/tsi721.c | 12 +
drivers/regulator/palmas-regulator.c | 2 +-
drivers/scsi/ipr.c | 12 +-
drivers/staging/vt6656/hostap.c | 2 +-
drivers/staging/vt6656/iwctl.c | 6 +
drivers/target/iscsi/iscsi_target_parameters.c | 8 +-
drivers/target/iscsi/iscsi_target_parameters.h | 4 +-
drivers/target/target_core_file.c | 12 +-
drivers/target/target_core_transport.c | 18 +-
drivers/tty/n_tty.c | 8 +
drivers/usb/atm/cxacru.c | 3 +-
drivers/usb/chipidea/Kconfig | 2 +-
drivers/usb/core/quirks.c | 3 +
drivers/usb/host/ohci-hcd.c | 34 +--
drivers/usb/host/uhci-hub.c | 3 +-
drivers/usb/host/uhci-q.c | 2 +-
drivers/usb/host/xhci-mem.c | 17 +-
drivers/usb/serial/ftdi_sio.c | 2 +
drivers/usb/serial/ftdi_sio_ids.h | 2 +
drivers/usb/serial/option.c | 13 +-
fs/cifs/cifs_dfs_ref.c | 4 +-
fs/cifs/inode.c | 3 +-
fs/fat/inode.c | 15 +-
fs/fuse/dir.c | 12 +-
fs/fuse/inode.c | 7 +-
fs/jfs/inode.c | 2 +-
fs/jfs/jfs_logmgr.c | 3 +-
fs/nfs/nfs4proc.c | 2 +-
fs/nilfs2/inode.c | 27 +-
fs/ocfs2/extent_map.c | 2 +-
fs/reiserfs/dir.c | 2 +
fs/reiserfs/inode.c | 9 +-
fs/reiserfs/xattr.c | 14 +-
fs/reiserfs/xattr_acl.c | 3 +
fs/xfs/xfs_iops.c | 47 ++--
include/acpi/acpi_bus.h | 40 +--
include/linux/cgroup.h | 2 +-
include/linux/wait.h | 16 +-
include/target/target_core_base.h | 1 +
include/xen/interface/io/netif.h | 19 ++
kernel/cgroup.c | 18 +-
kernel/module.c | 13 +-
kernel/range.c | 8 +-
lib/klist.c | 2 +-
mm/huge_memory.c | 7 +-
mm/memcontrol.c | 14 +-
mm/migrate.c | 2 +-
mm/mmu_notifier.c | 79 +++---
mm/pagewalk.c | 70 ++---
net/mac80211/iface.c | 9 +
net/mac80211/mlme.c | 12 +-
net/mac80211/rx.c | 3 +
net/mac80211/tkip.c | 4 +-
net/sunrpc/sched.c | 8 +-
net/sunrpc/svcauth_unix.c | 12 +-
net/wireless/core.c | 16 +-
net/wireless/nl80211.c | 2 +
net/wireless/sme.c | 3 +
net/wireless/trace.h | 23 +-
sound/soc/codecs/cs42l52.c | 2 +-
sound/soc/codecs/wm5110.c | 2 +-
sound/soc/davinci/davinci-mcasp.c | 7 +-
tools/perf/scripts/python/net_dropmonitor.py | 8 +-
143 files changed, 1545 insertions(+), 673 deletions(-)
^ permalink raw reply [flat|nested] 13+ messages in thread* [ 102/127] iommu/amd: Workaround for ERBT1312 2013-06-05 21:32 [ 000/127] 3.9.5-stable review Greg Kroah-Hartman @ 2013-06-05 21:34 ` Greg Kroah-Hartman 0 siblings, 0 replies; 13+ messages in thread From: Greg Kroah-Hartman @ 2013-06-05 21:34 UTC (permalink / raw) To: linux-kernel Cc: Greg Kroah-Hartman, stable, Suravee Suthikulpanit, Joerg Roedel 3.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Joerg Roedel <joro@8bytes.org> commit d3263bc29706e42f74d8800807c2dedf320d77f1 upstream. Work around an IOMMU hardware bug where clearing the EVT_INT or PPR_INT bit in the status register may race with the hardware trying to set it again. When not handled the bit might not be cleared and we lose all future event or ppr interrupts. Reported-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Joerg Roedel <joro@8bytes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/iommu/amd_iommu.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -700,14 +700,23 @@ retry: static void iommu_poll_events(struct amd_iommu *iommu) { - u32 head, tail; + u32 head, tail, status; unsigned long flags; - /* enable event interrupts again */ - writel(MMIO_STATUS_EVT_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); - spin_lock_irqsave(&iommu->lock, flags); + /* enable event interrupts again */ + do { + /* + * Workaround for Erratum ERBT1312 + * Clearing the EVT_INT bit may race in the hardware, so read + * it again and make sure it was really cleared + */ + status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); + writel(MMIO_STATUS_EVT_INT_MASK, + iommu->mmio_base + MMIO_STATUS_OFFSET); + } while (status & MMIO_STATUS_EVT_INT_MASK); + head = readl(iommu->mmio_base + MMIO_EVT_HEAD_OFFSET); tail = readl(iommu->mmio_base + MMIO_EVT_TAIL_OFFSET); @@ -744,16 +753,25 @@ static void iommu_handle_ppr_entry(struc static void iommu_poll_ppr_log(struct amd_iommu *iommu) { unsigned long flags; - u32 head, tail; + u32 head, tail, status; if (iommu->ppr_log == NULL) return; - /* enable ppr interrupts again */ - writel(MMIO_STATUS_PPR_INT_MASK, iommu->mmio_base + MMIO_STATUS_OFFSET); - spin_lock_irqsave(&iommu->lock, flags); + /* enable ppr interrupts again */ + do { + /* + * Workaround for Erratum ERBT1312 + * Clearing the PPR_INT bit may race in the hardware, so read + * it again and make sure it was really cleared + */ + status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET); + writel(MMIO_STATUS_PPR_INT_MASK, + iommu->mmio_base + MMIO_STATUS_OFFSET); + } while (status & MMIO_STATUS_PPR_INT_MASK); + head = readl(iommu->mmio_base + MMIO_PPR_HEAD_OFFSET); tail = readl(iommu->mmio_base + MMIO_PPR_TAIL_OFFSET); ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-06-29 9:09 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <lhtAZ-q1-5@gated-at.bofh.it>
[not found] ` <lhtB1-q1-53@gated-at.bofh.it>
2013-06-28 16:11 ` [ 102/127] iommu/amd: Workaround for ERBT1312 Andreas Hartmann
2013-06-28 17:49 ` Alex Williamson
2013-06-28 18:29 ` Joerg Roedel
2013-06-28 18:43 ` Alex Williamson
2013-06-28 20:37 ` Andreas Hartmann
2013-06-28 18:25 ` Joerg Roedel
2013-06-28 18:42 ` Andreas Hartmann
2013-06-28 19:23 ` Joerg Roedel
2013-06-28 21:48 ` Alex Williamson
2013-06-29 5:54 ` Andreas Hartmann
2013-06-29 8:04 ` Joerg Roedel
2013-06-29 9:06 ` Andreas Hartmann
2013-06-05 21:32 [ 000/127] 3.9.5-stable review Greg Kroah-Hartman
2013-06-05 21:34 ` [ 102/127] iommu/amd: Workaround for ERBT1312 Greg Kroah-Hartman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox