From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Martin Subject: Re: Consuming PCI device in PV kernel Date: Fri, 25 Jul 2014 13:56:38 +0100 Message-ID: <357303711.20140725135638@gmail.com> References: <524794479.20140703121338@gmail.com> <20140703180957.GD13710@konrad-lan.dumpdata.com> <1376452421.20140707092147@gmail.com> <1083121389.20140707122233@gmail.com> <623751089.20140718153713@gmail.com> <20140718190942.GG15947@laptop.dumpdata.com> <538610044.20140721111330@gmail.com> <1405940004.25022.10.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1405940004.25022.10.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hello Ian, > IIRC from the guest PoV you just need to read the BAR values from the > CFG space and then use them without worrying about where they point, > i.e. by creating virtual address mappings of whatever MMIO address the > BAR gives you. I thought that I was mapping the BAR memory correctly, however when I fixed a bug in my software I started getting errors and I eventually tracked it down to mapping the MMIO memory. I have tried calling HYPERCALL_update_va_mapping and HYPERCALL_mmu_update and they both fail. HYPERCALL_update_va_mapping gives me the following in xl dmesg: (XEN) mm.c:1700:d292v0 Bad L1 flags 400000 Looking at the code I can't see where bit 22 is being set! Reading the qemu PCI mapping code, it seems to call xc_domctl. I have traced down through this into the xen source and it seems to do many things that I don't have access to via straight hypercalls. Google doesn't seem to help much on this one either. Any idea on how to proceed with this? -- Best regards, Simon mailto:furryfuttock@gmail.com