WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pci dev config issue

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] pci dev config issue
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Mon, 7 Jan 2008 01:47:20 +0000
Cc: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Sun, 06 Jan 2008 17:47:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20071226004244.GS11693@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20071226004244.GS11693@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
> I saw the pci dev's config is different from vbd/vnif with following
> comments:
>
>  # Parsing the device SXP's. In most cases, the SXP looks
>  # like this:
>  #
>  # [device, [vif, [mac, xx:xx:xx:xx:xx:xx], [ip 1.3.4.5]]]
>  #
>  # However, for PCI devices it looks like this:
>  #
>  # [device, [pci, [dev, [domain, 0], [bus, 0], [slot, 1]]]]
>  #
>  # It seems the reasoning for this difference is because
>  # pciif.py needs all the PCI device configurations at
>  # the same time when creating the devices.
>
> So multiple pci devices sit in one single config entry with single uuid(see
> following configs), which make device handling difficult(consider if
> support hotplug).
>
> Can anybody explain why pciif.py needs all pci devs configured at one time?
> Is it still valid now? If not, can I remove this limitation?

The comment you have there describes how the configuration data is passed to 
pciif.py in Xend, which configures the PCI devices.  I can't think of a 
reason why the code couldn't be refactored to use a separate S-expression 
config entry for each PCI device.

However, I'm not sure that this corresponds to the output you quoted next:

> ================ multiple pci config ===================
>  pci = ""
>   8 = ""
>    0 = ""
>     domain = "ExampleDomain"
>     frontend = "/local/domain/8/device/pci/0"
>     uuid = "7f2dc1a1-d0de-ebf0-37fd-67ff0103c3c9"
>     dev-1 = "0000:03:00.00"
>     dev-0 = "0000:02:00.00"
>     state = "4"
>     online = "1"
>     frontend-id = "8"
>     num_devs = "2"
>     root-0 = "0000:00"
>     root_num = "1"

This is output from xenstore-ls, right?  The structures that are in XenStore 
are unrelated to the structures that are in the SXP configuration format.    
You don't have to change the SXP, you could directly change the xenstore 
layout to better fit your purposes.  This would break an established 
interface, however.

Couldn't you add hotplug support to the existing interface?  You'd need to add 
a xenstore capability node (there are examples of this in the net driver) for 
front and backends to advertise that they support hotplugging.  You'd then 
need to establish a protocol of a sequence of xenstore transactions to safely 
accomplish the hotplug operation.

Does that help answer your question?

Cheers,
Mark


-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] pci dev config issue, Mark Williamson <=