Hi Julien,
> On 1 Sep 2022, at 7:15 pm, Julien Grall <[email protected]> wrote:
>
> Hi Rahul,
>
> On 01/09/2022 10:13, Rahul Singh wrote:
>> Introduce a new "xen,enhanced" dom0less property value "no-xenstore" to
>> disable xenstore interface for dom0less guests.
>> Signed-off-by: Rahul Singh <[email protected]>
>> ---
>> Changes in v3:
>> - new patch in this version
>> ---
>> docs/misc/arm/device-tree/booting.txt | 4 ++++
>> xen/arch/arm/domain_build.c | 10 +++++++---
>> xen/arch/arm/include/asm/kernel.h | 3 +++
>> 3 files changed, 14 insertions(+), 3 deletions(-)
>> diff --git a/docs/misc/arm/device-tree/booting.txt
>> b/docs/misc/arm/device-tree/booting.txt
>> index edef98e6d1..87f57f8889 100644
>> --- a/docs/misc/arm/device-tree/booting.txt
>> +++ b/docs/misc/arm/device-tree/booting.txt
>> @@ -204,6 +204,10 @@ with the following properties:
>> - "disabled"
>> Xen PV interfaces are disabled.
>> + - no-xenstore
>> + Xen PV interfaces, including grant-table will be enabled for the VM but
>> + xenstore will be disabled for the VM.
>
> NIT: I would drop one of the "for the VM" as it seems to be redundant.
Ack.
>
>> +
>> 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.
>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>> index 4b24261825..8dd9984225 100644
>> --- a/xen/arch/arm/domain_build.c
>> +++ b/xen/arch/arm/domain_build.c
>> @@ -3336,10 +3336,14 @@ static int __init construct_domU(struct domain *d,
>> (rc == 0 && !strcmp(dom0less_enhanced, "enabled")) )
>> {
>> if ( hardware_domain )
>> - kinfo.dom0less_enhanced = true;
>> + kinfo.dom0less_xenstore = true;
>> else
>> - panic("Tried to use xen,enhanced without dom0\n");
>> + panic("Tried to use xen,enhanced without dom0 without
>> no-xenstore\n");
>
> This is a bit hard to parse. How about:
>
> "At the moment, Xenstore support requires dom0 to be present"
Ack.
>
>> }
>> + else if ( rc == 0 && !strcmp(dom0less_enhanced, "no-xenstore") )
>> + kinfo.dom0less_xenstore = false;
>> +
>> + kinfo.dom0less_enhanced = true;
>
> Wouldn't this now set dom0less_enhanced unconditionally?
Yes , I will fix this in next version.
Regards,
Rahul