From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: PCI Passthrough ARM Design : Draft1 Date: Fri, 12 Jun 2015 09:32:47 +0100 Message-ID: <1434097967.30003.181.camel@citrix.com> References: <557549D7.5090407@caviumnetworks.com> <1433940302.30003.75.camel@citrix.com> <55788E1C.6080307@citrix.com> <5579FFC6.9070509@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5579FFC6.9070509@caviumnetworks.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: Manish Jaggi Cc: Vijay Kilari , Prasun Kapoor , "Kumar, Vijaya" , "xen-devel@lists.xen.org" , Julien Grall , Stefano Stabellini , "Kulkarni, Ganapatrao" , Roger Pau =?ISO-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org On Thu, 2015-06-11 at 14:38 -0700, Manish Jaggi wrote: > > On Wednesday 10 June 2015 12:21 PM, Julien Grall wrote: > > Hi, > > > > On 10/06/2015 08:45, Ian Campbell wrote: > >>> 4. DomU access / assignment PCI device > >>> -------------------------------------- > >>> When a device is attached to a domU, provision has to be made such that > >>> it can > >>> access the MMIO space of the device and xen is able to identify the > >>> mapping > >>> between guest bdf and system bdf. Two hypercalls are introduced > >> > >> I don't think we want/need new hypercalls here, the same existing > >> hypercalls which are used on x86 should be suitable. > I think both the hypercalls are necessary > a) the mapping of guest bdf to actual sbdf is required as domU accesses > for GIC are trapped and not handled by pciback. > A device say 1:0:0.3 is assigned in domU at 0:0:0.3. This is the bestway > I could find that works. > > b) map_mmio call is issued just after the device is added on the pcu bus > (in case of domU) > The function register_xen_pci_notifier (drivers/xen/pci.c) is modified > such that notification is received in domU and dom0. In which please please add to the document a discussion of the current interfaces and why they are not suitable. > > Beware that the 1:1 mapping doesn't fit with the current guest memory > > layout which is pre-defined at Xen build time. So you would also have > > to make it dynamically or decide to use the same memory layout as the > > host. > If same layout as host used, would there be any issue? I'm not sure that a 1:1 mapping is any different to the host layout. But in any case, the host layout also doesn't match the guest layout, so it has the same issues. Ian.