Json config and stubdomain
Hi,
Debugging stubdomain continuation...
When stubdomain is started, it has no json config created. This results in multiple problems:
- impossible to dynamically attach additional devices
- starting a domain with more than one PCI device fails
The second one is especially interesting because it look so much
inconsistent: libxl__device_pci_add_xenstore when called for the first device, it immediately calls libxl__create_pci_backend and do not touch json config at all. But when called for the next device, it loads json config, adds the device there and save it. So it looks like the first PCI device will never be saved into json config (when added dynamically).
In case of stubdomain, libxl__device_pci_add_xenstore is called during stubdomain startup, so defining two or more PCI devices means domain startup fail.
So, the question is, whether json config should be created and properly maintained for stubdomain, or not created at all (assuming all the configuration is already handled in the target domain json config)?
Signature · 5 lines
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?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · Marek Marczykowski-Górecki
Hi,
Debugging stubdomain continuation...
When stubdomain is started, it has no json config created. This results in multiple problems:
- impossible to dynamically attach additional devices
- starting a domain with more than one PCI device fails
Quoted 10 lines
The second one is especially interesting because it look so much
inconsistent:libxl__device_pci_add_xenstorewhen called for the first device, it immediately callslibxl__create_pci_backendand do not touch json config at all. But when called for the next device, it loads json config, adds the device there and save it. So it looks like the first PCI device will never be saved into json config (when added dynamically).
In case of stubdomain,libxl__device_pci_add_xenstoreis called during stubdomain startup, so defining two or more PCI devices means domain startup fail.
Please see libxl_internal.h, around line 2564. The same logic is used across all devices.
I think there could be bugs in pci device handling code. I didn't get to test that because my test box was not capable and the code for pci device was (and still is) rather irregular compared to other devices.
Quoted 4 lines
So, the question is, whether json config should be created and properly maintained for stubdomain, or not created at all (assuming all the configuration is already handled in the target domain json config)?
Stubdom configuration should be derived. It is considered internal details.
Wei.
Quoted 14 lines
Signature · 13 lines
-- 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? _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 7 lines · Wei Liu
Quoted 3 lines · Marek Marczykowski-Górecki
So, the question is, whether json config should be created and properly maintained for stubdomain, or not created at all (assuming all the configuration is already handled in the target domain json config)?
Stubdom configuration should be derived. It is considered internal details.
Ok, I'll adjust PCI handling accordingly.
Signature · 5 lines
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?
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel