All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Wei Wang <wei.wang2@amd.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] amd iommu: Dump flags of IO page faults
Date: Fri, 7 Sep 2012 16:51:22 -0400	[thread overview]
Message-ID: <20120907205120.GA25238@phenom.dumpdata.com> (raw)
In-Reply-To: <1144069450.20120907120133@eikelenboom.it>

On Fri, Sep 07, 2012 at 12:01:33PM +0200, Sander Eikelenboom wrote:
> 
> Friday, September 7, 2012, 10:54:40 AM, you wrote:
> 
> > On 09/07/2012 09:32 AM, Sander Eikelenboom wrote:
> >>
> >> Thursday, September 6, 2012, 5:03:05 PM, you wrote:
> >>
> >>> On 09/06/2012 03:50 PM, Sander Eikelenboom wrote:
> >>>>
> >>>> Thursday, September 6, 2012, 3:32:51 PM, you wrote:
> >>>>
> >>>>> On 09/06/2012 12:59 AM, Sander Eikelenboom wrote:
> >>>>>>
> >>>>>> Wednesday, September 5, 2012, 4:42:42 PM, you wrote:
> >>>>>>
> >>>>>>> Hi Jan,
> >>>>>>> Attached patch dumps io page fault flags. The flags show the reason of
> >>>>>>> the fault and tell us if this is an unmapped interrupt fault or a DMA fault.
> >>>>>>
> >>>>>>> Thanks,
> >>>>>>> Wei
> >>>>>>
> >>>>>>> signed-off-by: Wei Wang<wei.wang2@amd.com>
> >>>>>>
> >>>>>>
> >>>>>> I have applied the patch and the flags seem to differ between the faults:
> >>>>>>
> >>>>>> AMD-Vi: IO_PAGE_FAULT: domain = 0, device id = 0x0a06, fault address = 0xc2c2c2c0, flags = 0x000
> >>>>>> (XEN) [2012-09-05 20:54:16] AMD-Vi: IO_PAGE_FAULT: domain = 0, device id = 0x0a06, fault address = 0xc2c2c2c0, flags = 0x000
> >>>>>> (XEN) [2012-09-05 20:54:16] AMD-Vi: IO_PAGE_FAULT: domain = 14, device id = 0x0700, fault address = 0xa8d339e0, flags = 0x020
> >>>>>> (XEN) [2012-09-05 20:54:16] AMD-Vi: IO_PAGE_FAULT: domain = 14, device id = 0x0700, fault address = 0xa8d33a40, flags = 0x020
> >>>>
> >>>>> OK, so they are not interrupt requests. I guess further information from
> >>>>> your system would be helpful to debug this issue:
> >>>>> 1) xl info
> >>>>> 2) xl list
> >>>>> 3) lscpi -vvv (NOTE: not in dom0 but in your guest)
> >>>>> 4) cat /proc/iomem (in both dom0 and your hvm guest)
> >>>>
> >>>> dom14 is not a HVM guest,it's a PV guest.
> >>
> >>> Ah, I see. PV guest is quite different than hvm, it does use p2m tables
> >>> as io page tables. So no-sharept option does not work in this case. PV
> >>> guests always use separated io page tables. There might be some
> >>> incorrect mappings on the page tables. I will check this on my side.
> >>
> >> I have reverted the machine to xen-4.1.4-pre (changeset 23353) and kept everything else the same.
> >> I haven't seen any IO PAGE FAULTS after that.
> >>
> >> I did spot some differences in the output from lspci between xen 4.1 and 4.2, related to MSI enabled or not for the IOMMU device.
> >> Have attached the xl/xm dmesg and lspci from booting with both versions.
> >>
> >> lspci:
> >>
> >> 00:00.2 Generic system peripheral [0806]: ATI Technologies Inc RD990 I/O Memory Management Unit (IOMMU) [1002:5a23]
> >>          Subsystem: ATI Technologies Inc RD990 I/O Memory Management Unit (IOMMU) [1002:5a23]
> >>          Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> >>          Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast>TAbort-<TAbort-<MAbort->SERR-<PERR- INTx-
> >>          Latency: 0
> >>          Interrupt: pin A routed to IRQ 10
> >>          Capabilities: [40] Secure device<?>
> >> 4.1:    Capabilities: [54] MSI: Enable- Count=1/1 Maskable- 64bit+
> 
> > Eh... That is interesting. So which dom0 are you using?  There is a c/s 
> > in 4.2 to prevent recent dom0 to disable iommu interrupt (changeset 
> > 25492:61844569a432) Otherwise, iommu cannot send any events including IO 
> > PAGE faults. You could try to revert dom0 to an old version like 2.6 
> > pv_ops to see if you really have no io page faults on 4.1
> 
> Ok i will give that a try, only dom0 will have to be a 2.6 pv_ops i assume ?
> 

So the failure they are describing is due to:
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00668.html

Or you can use the patch that Jan posted
http://lists.xen.org/archives/html/xen-devel/2012-06/msg01196.html

and use the existing kernel.. But more interesting - is this device
(00:00.2) in the Xen-pciback.hide arguments (if not, then don't worry)?

  parent reply	other threads:[~2012-09-07 20:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 14:42 [PATCH] amd iommu: Dump flags of IO page faults Wei Wang
2012-09-05 22:59 ` Sander Eikelenboom
2012-09-06 13:32   ` Wei Wang
2012-09-06 13:50     ` Sander Eikelenboom
2012-09-06 15:03       ` Wei Wang
2012-09-06 15:08         ` Sander Eikelenboom
2012-09-07  7:32         ` Sander Eikelenboom
2012-09-07  8:54           ` Wei Wang
2012-09-07 10:01             ` Sander Eikelenboom
2012-09-07 11:29               ` Jan Beulich
2012-09-07 20:51               ` Konrad Rzeszutek Wilk [this message]
2012-09-24  8:38             ` Sander Eikelenboom
2012-09-24 12:24               ` Wei Wang
     [not found]             ` <74647167 <506050F0.7020703@amd.com>
     [not found]               ` <74647167<506050F0.7020703@amd.com>
2012-09-24 12:27                 ` Sander Eikelenboom
2012-09-24 21:08                 ` Sander Eikelenboom
2012-10-01 15:02                 ` Sander Eikelenboom
2012-09-07  9:17           ` [PATCH] amd iommu: Dump flags of IO page faults (off topic - pci devices) Andrew Cooper
2012-09-07  9:53           ` [PATCH] amd iommu: Dump flags of IO page faults Jan Beulich
2012-09-07 10:00             ` Sander Eikelenboom
2012-09-07 10:06               ` Jan Beulich
2012-09-07 10:15                 ` Sander Eikelenboom
2012-09-07 11:17                   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120907205120.GA25238@phenom.dumpdata.com \
    --to=konrad@kernel.org \
    --cc=JBeulich@suse.com \
    --cc=linux@eikelenboom.it \
    --cc=wei.wang2@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.