From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: PCI Passthrough Design - Draft 3 Date: Wed, 12 Aug 2015 09:56:41 +0100 Message-ID: <1439369801.9747.314.camel@citrix.com> References: <55C0AFAC.9070706@caviumnetworks.com> <20150811203445.GE7765@l.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150811203445.GE7765@l.oracle.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: Konrad Rzeszutek Wilk , Manish Jaggi Cc: "Prasun.kapoor@cavium.com" , "Kumar, Vijaya" , Julien Grall , Stefano Stabellini , Xen Devel List-Id: xen-devel@lists.xenproject.org On Tue, 2015-08-11 at 16:34 -0400, Konrad Rzeszutek Wilk wrote: > > > 2.2 PHYSDEVOP_pci_host_bridge_add hypercall > > ---------------------------------------------- > > Xen code accesses PCI configuration space based on the sbdf received from > > the > > guest. The order in which the pci device tree node appear may not be the > > same > > order of device enumeration in dom0. Thus there needs to be a mechanism to > > bind > > the segment number assigned by dom0 to the pci host controller. The > > hypercall > > is introduced: > > Why can't we extend the existing hypercall to have the segment value? > > Oh wait, PHYSDEVOP_manage_pci_add_ext does it already! > > And have the hypercall (and Xen) be able to deal with introduction of PCI > devices that are out of sync? > > Maybe I am confused but aren't PCI host controllers also 'uploaded' to > Xen? The issue is that Dom0 and Xen need to agree on a common numbering space for the "PCI domain" AKA "segment", which is really just a software concept i.e. on ARM Linux just makes them up (on x86 I believe they come from some firmware table so Xen and Dom0 "agree" to both use that). Ian.