mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen: introduce xen,enhanced dom0less property
Introduce a new "xen,enhanced" dom0less property to enable/disable PV driver interfaces for dom0less guests. Currently only "enabled" and "disabled" are supported property values (and empty). Leave the option open to implement further possible values in the future (e.g. "xenstore" to enable only xenstore.) Dom0 presence is required for now to use "xen,enhanced" on a domU. The configurable option is for domUs only. For dom0 we always set the corresponding property in the Xen code to true (PV interfaces enabled.) This patch only parses the property. Next patches will make use of it. Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Acked-by: Julien Grall <jgrall@amazon.com> CC: Julien Grall <julien@xen.org> CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com> CC: Bertrand Marquis <bertrand.marquis@arm.com>
This commit is contained in:
1 parent
2a2447757b
commit
5eedfe7728
3 files changed
+33
No files matched your search
@@ -193,6 +193,24 @@ with the following properties:
|
||||
Optional. Handle to a xen,cpupool device tree node that identifies the
|
||||
cpupool where the guest will be started at boot.
|
||||
|
||||
- xen,enhanced
|
||||
|
||||
A string property. Possible property values are:
|
||||
|
||||
- "enabled" (or missing property value)
|
||||
Xen PV interfaces, including grant-table and xenstore, will be
|
||||
enabled for the VM.
|
||||
|
||||
- "disabled"
|
||||
Xen PV interfaces are disabled.
|
||||
|
||||
If the xen,enhanced property is present with no value, it defaults
|
||||
to "enabled". If the xen,enhanced property is not present, PV
|
||||
interfaces are disabled.
|
||||
|
||||
In the future other possible property values might be added to
|
||||
enable only selected interfaces.
|
||||
|
||||
Under the "xen,domain" compatible node, one or more sub-nodes are present
|
||||
for the DomU kernel and ramdisk.
|
||||
|
||||
|
||||
@@ -3157,6 +3157,7 @@ static int __init construct_domU(struct domain *d,
|
||||
const struct dt_device_node *node)
|
||||
{
|
||||
struct kernel_info kinfo = {};
|
||||
const char *dom0less_enhanced;
|
||||
int rc;
|
||||
u64 mem;
|
||||
|
||||
@@ -3172,6 +3173,17 @@ static int __init construct_domU(struct domain *d,
|
||||
|
||||
kinfo.vpl011 = dt_property_read_bool(node, "vpl011");
|
||||
|
||||
rc = dt_property_read_string(node, "xen,enhanced", &dom0less_enhanced);
|
||||
if ( rc == -EILSEQ ||
|
||||
rc == -ENODATA ||
|
||||
(rc == 0 && !strcmp(dom0less_enhanced, "enabled")) )
|
||||
{
|
||||
if ( hardware_domain )
|
||||
kinfo.dom0less_enhanced = true;
|
||||
else
|
||||
panic("Tried to use xen,enhanced without dom0\n");
|
||||
}
|
||||
|
||||
if ( vcpu_create(d, 0) == NULL )
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ struct kernel_info {
|
||||
/* Enable pl011 emulation */
|
||||
bool vpl011;
|
||||
|
||||
/* Enable PV drivers */
|
||||
bool dom0less_enhanced;
|
||||
|
||||
/* GIC phandle */
|
||||
uint32_t phandle_gic;
|
||||
|
||||
|
||||