From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Jaggi Subject: Re: PCI Passthrough ARM Design : Draft1 Date: Mon, 15 Jun 2015 22:42:32 -0700 Message-ID: <557FB748.3050704@caviumnetworks.com> References: <557549D7.5090407@caviumnetworks.com> <1433940302.30003.75.camel@citrix.com> <55788E1C.6080307@citrix.com> <5579FFC6.9070509@caviumnetworks.com> <1434097967.30003.181.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434097967.30003.181.camel@citrix.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: Vijay Kilari , Prasun Kapoor , "Kumar, Vijaya" , "xen-devel@lists.xen.org" , Julien Grall , Stefano Stabellini , "Kulkarni, Ganapatrao" , =?windows-1252?Q?Roger_Pau_Monn=E9?= List-Id: xen-devel@lists.xenproject.org On Friday 12 June 2015 01:32 AM, Ian Campbell wrote: > 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. There is a domctl on x86 DOMCTL_iomem_permission which looks doing the same thing as the map_mmio hypercall which I am proposing. I am not sure if it does a 1:1. Do you have more info on it? > Ian. > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel