All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Automatically making a PCI device assignable in the config file
@ 2013-07-05 11:01 George Dunlap
  2013-07-05 13:39 ` Andrew Cooper
  2013-07-10 13:53 ` Ian Jackson
  0 siblings, 2 replies; 30+ messages in thread
From: George Dunlap @ 2013-07-05 11:01 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

I've been doing some work to try to make driver domains easier to set
up and use.  At the moment, in order to pass a device through to a
guest, you first need to assign it to pciback.  This involves doing
one of three things:
* Running xl pci-assignable-add for the device
* Specifying the device to be grabbed on the dom0 Linux command-line
* Doing some hackery in /etc/modules.d

None of these are very satisfying.  What I think would be better is if
there was a way to specify in the guest config file, "If device X is
not assignable, try to make it assignable".  That way you can have a
driver domain grab the appropriate device just by running "xl create
domnet"; and once we have the xendomains script up and running with
xl, you can simply configure your domnet appropriately, and then put
it in /etc/xen/auto, to be started automatically on boot.

My initial idea was to add a parameter to the pci argument in the
config file; for example:

pci = ['08:04.1,permissive=1,seize=1']

The 'seize=1' would indicate that if bdf 08:04.1 is not already
assignable, that xl should try to make is assignable.

The problem here is that this would need to be parsed by
xlu_pci_parse_bdf(), which only takes an argumen tof type
libxl_device_pci.

Now it seems to me that the right place to do this "seizing" is in xl,
not inside libxl -- the functions for doing assignment exist already,
and are simple and straightforward.  But doing it in xl, but as a
parameter of the "pci" setting, means changing xlu_pci_parse_bdf() to
pass something else back, which begins to get awkward.

So it seems to me we have a couple of options:
1. Create a new argument, "pci_seize" or something like that, which
would be processed separately from pci
2. Change xlu_pci_parse_bdf to take a pointer to an extra struct, for
arguments directed at xl rather than libxl
3. Add "seize" to libxl_device_pci, but have it only used by xl
4. Add "seize" to libxl_device_pci, and have libxl do the seizing.

Any preference -- or any other ideas?

 -George

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2013-07-12 16:08 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-05 11:01 RFC: Automatically making a PCI device assignable in the config file George Dunlap
2013-07-05 13:39 ` Andrew Cooper
2013-07-05 13:45   ` George Dunlap
2013-07-05 13:48     ` Andrew Cooper
2013-07-05 13:52       ` George Dunlap
2013-07-08 19:23         ` Konrad Rzeszutek Wilk
2013-07-09 12:52           ` George Dunlap
2013-07-09 14:25             ` Konrad Rzeszutek Wilk
2013-07-09 16:38               ` George Dunlap
2013-07-10 13:45                 ` Stefano Stabellini
2013-07-10 13:49               ` Stefano Stabellini
2013-07-10 13:55     ` Ian Jackson
2013-07-10 14:45       ` George Dunlap
2013-07-10 15:12         ` Gordan Bobic
2013-07-10 15:29           ` George Dunlap
2013-07-10 15:37             ` Gordan Bobic
2013-07-10 13:53 ` Ian Jackson
2013-07-10 14:48   ` George Dunlap
2013-07-11 11:35     ` David Vrabel
2013-07-12  9:36       ` George Dunlap
2013-07-12  9:55         ` David Vrabel
2013-07-12 10:32           ` George Dunlap
2013-07-12 13:10         ` Ian Jackson
2013-07-12 13:48           ` Konrad Rzeszutek Wilk
2013-07-12 14:43             ` Ian Jackson
2013-07-12 15:01               ` Konrad Rzeszutek Wilk
2013-07-12 15:09                 ` George Dunlap
2013-07-12 16:02                   ` Konrad Rzeszutek Wilk
2013-07-12 16:08                     ` George Dunlap
2013-07-12 14:44             ` Sander Eikelenboom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.