|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 12/15] x86/hyperlaunch: specify dom0 mode with device tree
On 26.12.2024 17:57, Daniel P. Smith wrote:
> Enable selecting the mode in which the domain will be built and ran. This
> includes:
>
> - whether it will be either a 32/64 bit domain
I can't spot anything like this in the code changes.
> --- a/xen/arch/x86/domain-builder/fdt.c
> +++ b/xen/arch/x86/domain-builder/fdt.c
> @@ -94,6 +94,25 @@ static int __init process_domain_node(
> bd->domid = (domid_t)val;
> printk(" domid: %d\n", bd->domid);
> }
> + else if ( strncmp(prop_name, "mode", name_len) == 0 )
> + {
> + if ( fdt_prop_as_u32(prop, &bd->mode) != 0 )
> + {
> + printk(" failed processing mode for domain %s\n", name);
> + return -EINVAL;
> + }
> +
> + printk(" mode: ");
> + if ( !(bd->mode & BUILD_MODE_PARAVIRT) )
> + {
> + if ( bd->mode & BUILD_MODE_ENABLE_DM )
> + printk("HVM\n");
> + else
> + printk("PVH\n");
> + }
> + else
> + printk("PV\n");
Shorter and less indentation as
if ( bd->mode & BUILD_MODE_PARAVIRT )
printk("PV\n");
else if ( bd->mode & BUILD_MODE_ENABLE_DM )
printk("HVM\n");
else
printk("PVH\n");
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -1016,7 +1016,8 @@ static struct domain *__init create_dom0(struct
> boot_info *bi)
> struct boot_domain *bd = &bi->domains[0];
> struct domain *d;
>
> - if ( opt_dom0_pvh )
> + if ( opt_dom0_pvh ||
> + (bi->hyperlaunch_enabled && !(bd->mode & BUILD_MODE_PARAVIRT)) )
And then dropping BUILD_MODE_ENABLE_DM on the floor?
Also shouldn't this be
if ( bi->hyperlaunch_enabled
? bd->mode & BUILD_MODE_PARAVIRT
: opt_dom0_pvh )
as it can't do any good to honor a conflicting command line option.
Command line doc then will want amending to clarify that the option
will be ignored in certain cases.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |