Skip to contentSkip to conversation

PCI code Xen 2 -> Xen 3

DISCUSSION David Carr 2 participants 4 messages Jun 1, 2006 – Jun 2, 2006

lore
Share & tools
lore

David Carr

author
#0 lore raw

I'm porting some code from 2 to 3 that did some PCI configuration in
the hypervisor. A lot of the Xen code that supported this seems to have moved. For example, in Xen 2 there was a header file (xen/include/xen/pci.h) that defined the pci_dev struct and several other things. Where is that sort of code located now?

What major Xen architectural changes should I be aware of? I've read the developer presentations on the Xen website and checked the Wiki. Is there other documentation?

Thanks,
David Carr

#1 lore raw
Quoted 5 lines · David Carr

I'm porting some code from 2 to 3 that did some PCI configuration in
the hypervisor. A lot of the Xen code that supported this seems to have moved. For example, in Xen 2 there was a header file (xen/include/xen/pci.h) that defined the pci_dev struct and several other things. Where is that sort of code located now?

Lots of platform initialisation and management has been moved to domain0. Xen itself no longer knows anything at all about PCI. Instead we use the domain0 guest OS's PCI subsystem unmodified.

Quoted 3 lines

What major Xen architectural changes should I be aware of? I've read the developer presentations on the Xen website and checked the Wiki. Is there other documentation?

You've just bumped into one of the biggest ones. :-)

-- Keir

author
#2 lore raw

Keir,

Thanks for your reply about the PCI changes in Xen 3. Since Xen no longer handles PCI devices, two questions come up for me.

Firstly, I assume that domain 0 now performs the PCI masking functions required to hide devices dedicated to a specific domain (other than domain 0). Is this the case?

Also, in Xen 2 the hypervisor had knowledge of which devices were assigned to what domain. Now there doesn't seem to be any notion of a "device" in Xen-3. How does the hypervisor assign/verify devices to non-dom-0 domains?

Thanks for your time,
David Carr

Quoted 29 lines · David Carr
Quoted 6 lines

I'm porting some code from 2 to 3 that did some PCI configuration in
the hypervisor. A lot of the Xen code that supported this seems to have moved. For example, in Xen 2 there was a header file (xen/include/xen/pci.h) that defined the pci_dev struct and several other things. Where is that sort of code located now?

Lots of platform initialisation and management has been moved to domain0. Xen itself no longer knows anything at all about PCI. Instead we use the domain0 guest OS's PCI subsystem unmodified.

Quoted 5 lines

What major Xen architectural changes should I be aware of? I've read the
developer presentations on the Xen website and checked the Wiki. Is there
other documentation?

You've just bumped into one of the biggest ones. :-)

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 3 lines · David Carr

Firstly, I assume that domain 0 now performs the PCI masking functions required to hide devices dedicated to a specific domain (other than domain 0). Is this the case?

Yes, see the pciback driver in our Linux tree.

Quoted 4 lines

Also, in Xen 2 the hypervisor had knowledge of which devices were assigned to what domain. Now there doesn't seem to be any notion of a "device" in Xen-3. How does the hypervisor assign/verify devices to non-dom-0 domains?

Again, it's all managed in the pciback driver running in domain0.

-- Keir