[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/4] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use
On Thu, Jan 17, 2019 at 10:21:34AM +0100, Roger Pau Monné wrote: > OK. From an architectural PoV I think it would make more sense to copy > the list of pci devices to the stubdom config in libxl__spawn_stub_dm, > but I'm not that familiar with pci handling in libxl, so there might > be a reason why things are done like this currently. libxl would refuse to attach the same device to two domains and also will perform some operations twice (as for example device reset). As you can see even right now some things needs to be disabled for stubdomain or target domain, because of this. If device would be included in the config for both target domain and its stubdomain, the code would need some more exceptions, which I think would be even worse. Other thing is the current code attach PCI devices when device-model is already running (regardless of its version or using stubdomain). I guess qemu doesn't setup those devices otherwise (there is nothing on qemu command line about it and none of libxl part generate such options). I'm not really sure if that couldn't be done differently, but I'm kind of afraid changing to much in PCI passthrough related code... > The change LGTM, albeit I found the pci handling code quite hard to > follow. I'm also not sure whether certain parts of the code are > correct, for example the PCI INTx seems to be mapped to both the > stubdomain and the target domain, when it's only the target domain the > one that actually uses it. That's true. Generally, I think stubdomain needs only config space access for its own, other things should be done for the target domain. This include mapping interrupts of any kind. Stubdomain is given permission to them only to be able to map them to the target domain. This also may be the reason why PCI devices are not included in stubdomain's config, but only do_pci_add() is called. It may be that in the past some more parts of the device setup was skipped this way. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |