From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [Query] How does Xen X86 does pci enumeration Date: Tue, 22 Jul 2014 15:26:23 -0400 Message-ID: <20140722192623.GB2940@laptop.dumpdata.com> References: <20140715145159.GK3403@laptop.dumpdata.com> <20140716134907.GK19585@laptop.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xenbegn developer Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Jul 22, 2014 at 03:21:31PM +0530, Xenbegn developer wrote: > On Wed, Jul 16, 2014 at 7:19 PM, Konrad Rzeszutek Wilk < > konrad.wilk@oracle.com> wrote: > > > On Wed, Jul 16, 2014 at 05:25:07PM +0530, Xenbegn developer wrote: > > > On 7/15/14, Konrad Rzeszutek Wilk wrote: > > > > On Tue, Jul 15, 2014 at 11:54:34AM +0530, Xenbegn developer wrote: > > > >> Hi, > > > >> > > > >> Small beginner query. Where in Xen X86 code pci ep enumeration is > > done? > > > >> I believe it this should be the flow of events > > > >> a) from ACPI enumerate all the PCI controllers > > > >> b) On each Controller start enumerating the pci devices. > > > > > > > > No. You can also query the PCI via the configuration registers. > > > > > > > > Look in the 'pci.c' files. > > > >> > > > >> I started from _start_xen in arch/x86/setup.c but couldnt find the top > > > >> level function. > > > >> Can anyone please provide pointer. > > > >> > > > One supplement question, does Xen do PCI devices enumeration or Dom0 > > does it ? > > > > Both. > > > > What is the use case for dom0 and xen both to do pci devices enumeration. > What purpose it solves for xen ? To figure out which PCI interrupts should be assigned to the guest and also do the MSI and MSI-X writes to the BAR space of PCI devices - instead of the guest doing it.