[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] How to resolve "Failed to mmap" error?

From: Alex Williamson
Subject: Re: [Qemu-discuss] How to resolve "Failed to mmap" error?
Date: Thu, 6 Oct 2016 10:46:02 -0600

On Wed, 5 Oct 2016 20:30:34 -0700
A223 A223 <address@hidden> wrote:

> On Wed, Oct 5, 2016 at 9:33 AM, Alex Williamson
> <address@hidden> wrote:
> > On Wed, 5 Oct 2016 02:13:21 -0700
> > A223 A223 <address@hidden> wrote:  
> >> How can I go about tracking down the root cause of this error?  
> >
> > This often means that the device resources are in use by another,
> > non-pci driver.  Look in /proc/iomem and /proc/ioport to see if any
> > drivers are claiming sub-regions on the device.  You can also turn on
> > tracing and look for the event vfio_region_mmap_fault, which might give
> > us more information (see docs/tracing.txt).  Also, please provide 'sudo
> > lspci -vvvs 5:00.0' so we can see the device resources.  Thanks,  
> The simpletrace output wouldn't parse for me using the python script
> (I'll paste the trace at the end of this email), so I used the ftrace
> backend instead (
> https://drive.google.com/open?id=0Bwjufq6oAZMfMVpUYTUxODR0NW8 ). It's
> quite large and I'm not sure what I'm looking for, so I didn't look at
> it very carefully.

That's not the right trace, that's like kvm trace or something.  Try:

# ./configure --enable-trace-backends=log

# echo vfio_region_mmap_fault > events.txt

Then add to your qemu commandline "-trace events=events.txt".  You
should get maybe a couple extra log lines per boot, not gobs of output.
> I did examine the output from the commands/files you mentioned
> (attached). The only thing I noticed is that 5:00.0 is sharing an IRQ
> with the onboard EHCI controller on the host, but I'm not sure if
> that's an issue. It's also quite possible I missed some other obvious
> problem. Please let me know if you have any insights.

I'm not spotting anything either.  Regarding your comment about the
upstream patch to do sub-page mappings, that's not relevant to your
device.  Page size is 4k and the BARs for your device are all at least
4k.  I do notice you have nvidia loaded on the host, I don't know why
it would be squatting on resources for your USB card, but I can't rule
it out.  Thanks,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]