From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: PCI Passthrough ARM Design : Draft1 Date: Thu, 11 Jun 2015 07:25:05 -0400 Message-ID: <55797011.2050209@citrix.com> References: <557549D7.5090407@caviumnetworks.com> <1433940302.30003.75.camel@citrix.com> <55788E1C.6080307@citrix.com> <1434012974.30003.127.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: <1434012974.30003.127.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 , Manish Jaggi , Prasun Kapoor , "Kumar, Vijaya" , "xen-devel@lists.xen.org" , Stefano Stabellini , "Kulkarni, Ganapatrao" , =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= List-Id: xen-devel@lists.xenproject.org Hi Ian, On 11/06/2015 04:56, Ian Campbell wrote: > On Wed, 2015-06-10 at 15:21 -0400, 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. That's >>> XEN_DOMCTL_memory_mapping from the toolstack I think. >> >> XEN_DOMCTL_memory_mapping is done by QEMU for x86 HVM when the guest >> (i.e hvmloader?) is writing in the PCI BAR. > > What about for x86 PV? I think it is done by the toolstack there, I > don't know what pciback does with accesses to BAR registers. XEN_DOMCTL_memory_mapping is only used to map memory in stage-2 page table. This is only used for auto-translated guest. In the case of x86 PV, the page-table is managed by the guest. The only things to do is to give the MMIO permission to the guest in order to the let him use them. This is done at boot time in the toolstack. Regards, -- Julien Grall