All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Rahul Singh <Rahul.Singh@arm.com>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Juergen Gross <jgross@suse.com>,
	"Volodymyr_Babchuk@epam.com" <Volodymyr_Babchuk@epam.com>,
	Luca Miccio <lucmiccio@gmail.com>,
	Stefano Stabellini <stefano.stabellini@xilinx.com>,
	"jbeulich@suse.com" <jbeulich@suse.com>
Subject: Re: [PATCH v6 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot
Date: Wed, 11 May 2022 14:11:46 +0100	[thread overview]
Message-ID: <573e94c4-7de0-e442-c9d8-559b55ae3144@xen.org> (raw)
In-Reply-To: <10151DF3-A3C9-49FB-8F2B-B36407E5CE82@arm.com>

Hi Rahul,

On 11/05/2022 11:53, Rahul Singh wrote:
>> On 11 May 2022, at 10:18 am, Bertrand Marquis <Bertrand.Marquis@arm.com> wrote:
>>
>> Hi Julien,
>>
>>> On 11 May 2022, at 10:10, Julien Grall <julien@xen.org> wrote:
>>>
>>> Hi Bertrand,
>>>
>>> On 11/05/2022 09:46, Bertrand Marquis wrote:
>>>>> On 11 May 2022, at 09:38, Julien Grall <julien@xen.org> wrote:
>>>>>
>>>>> Hi Bertrand,
>>>>>
>>>>> On 11/05/2022 08:46, Bertrand Marquis wrote:
>>>>>>> On 10 May 2022, at 17:35, Julien Grall <julien@xen.org> wrote:
>>>>>>>
>>>>>>> Hi Rahul,
>>>>>>>
>>>>>>> On 10/05/2022 17:30, Rahul Singh wrote:
>>>>>>>>> + rc = evtchn_alloc_unbound(&alloc);
>>>>>>>>> + if ( rc )
>>>>>>>>> + {
>>>>>>>>> + printk("Failed allocating event channel for domain\n");
>>>>>>>>> + return rc;
>>>>>>>>> + }
>>>>>>>>> +
>>>>>>>>> + d->arch.hvm.params[HVM_PARAM_STORE_EVTCHN] = alloc.port;
>>>>>>>>> +
>>>>>>>>> + return 0;
>>>>>>>>> +}
>>>>>>>>> +
>>>>>>>>> static int __init construct_domU(struct domain *d,
>>>>>>>>> const struct dt_device_node *node)
>>>>>>>>> {
>>>>>>>>> @@ -3214,6 +3243,14 @@ static int __init construct_domU(struct domain *d,
>>>>>>>>> if ( rc < 0 )
>>>>>>>>> return rc;
>>>>>>>>>
>>>>>>>>> + if ( kinfo.dom0less_enhanced )
>>>>>>>> I think we need to do something like this to fix the error.
>>>>>>>> if ( hardware_domain && kinfo.dom0less_enhanced )
>>>>>>>> {
>>>>>>>> }
>>>>>>>
>>>>>>> Is there any use case to use "dom0less_enhanced" without dom0 (or a domain servicing Xenstored)?
>>>>>>>
>>>>>> Just being curious here but would it even be possible to have non dom0 domain servicing xenstored ?
>>>>>
>>>>> You can build Xenstored against mini-os and configure the init script to launch xenstored as a domain.
>>>> So dom0 is not mandatory or should mini-os be started as Dom0 for this to work ?
>>>
>>> In order to allocate the event channel, you need to know the ID of the domain where Xenstored will run. Stefano's patch is relying on Xenstored to be run in Domain 0.
>>>
>>> This would need to be updated if we want to run it in a separate domain.
>>
>> Ok then Dom0 is mandatory at the moment, I am ok with that.
>>
>>>
>>>>>
>>>>>>> If not, then I would consider to forbid this case and return an error.
>>>>>> One way or an other we need to solve the crash but if it is forbidden we must prevent coming to this step earlier as it means the configuration is wrong.
>>>>>
>>>>> I think this should be checked when parsing the configuration.
>>>> If dom0 is mandatory yes, we should still make sure that this code cannot be reached so an ASSERT would be nice here at least in case someone tries to activate this code without dom0 (which might happen when we will push the serie for static event channels).
>>>
>>> I am fine with an ASSERT().
>>>
>>> Are you saying that dom0less_enhanced will be set to true for the static event channel series?
>>>
>>> If yes, then I think dom0less_enhanced will need to be an enum so we know what part of Xen is exposed.
>>
>> No it won’t, we just need some of the changes done but without setting dom0less_enhanced.
>> @Rahul: can you confirm.
>>
> 
> We need to set the "xen,enhanced” enabled for dom0less domU to enable
> the event-channel interface in dom0less guest. If we did not set this property we can’t
> use the event-channel interface in dom0less domUs guests.

Is this because the domU will not know which PPI will be used for 
notification?

The property "xen,enhanced" with an empty string (or with the value 
"enabled") is meant to indicate that PV drivers will be usable in the 
domain.

AFAIU, you are suggesting to change the meaning based on dom0 whether 
has been created. I don't particularly like that because a user may 
spent a while to understand why Xenstored doesn't work.

The current proposal for xen,enhanced allows us to define new values if 
we wanted to only enabled selected interfaces. AFAIU, in your case, you 
only want to expose the event channel interface, so I would create a new 
value to indicate that the event channel interface is exposed. Xen would 
then create only the part for the event channel (i.e. no extended 
regions, grant tables...).

Cheers,

-- 
Julien Grall


  reply	other threads:[~2022-05-11 13:12 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  0:16 [PATCH v6 0/7] dom0less PV drivers Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 1/7] xen/dt: of_property_read_string return -ENODATA when !length Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 2/7] xen/arm: implement domU extended regions Stefano Stabellini
2022-05-05  9:48   ` Oleksandr
2022-05-11 18:42   ` Julien Grall
2022-05-05  0:16 ` [PATCH v6 3/7] xen: introduce xen,enhanced dom0less property Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot Stefano Stabellini
2022-05-05  7:26   ` Jan Beulich
2022-05-05 20:24     ` Stefano Stabellini
2022-05-10 16:30   ` Rahul Singh
2022-05-10 16:35     ` Julien Grall
2022-05-11  7:46       ` Bertrand Marquis
2022-05-11  8:38         ` Julien Grall
2022-05-11  8:46           ` Bertrand Marquis
2022-05-11  9:10             ` Julien Grall
2022-05-11  9:18               ` Bertrand Marquis
2022-05-11 10:53                 ` Rahul Singh
2022-05-11 13:11                   ` Julien Grall [this message]
2022-05-11 14:57                     ` Rahul Singh
2022-05-11 15:05                       ` Rahul Singh
2022-05-11 15:25                         ` Julien Grall
2022-05-13  1:23               ` Stefano Stabellini
2022-05-13  9:24                 ` Julien Grall
2022-05-13 20:52                   ` Stefano Stabellini
2022-05-14 13:06                     ` Julien Grall
2022-05-11 18:52   ` Julien Grall
2022-05-05  0:16 ` [PATCH v6 5/7] xenstored: send an evtchn notification on introduce_domain Stefano Stabellini
2022-05-05  7:30   ` Juergen Gross
2022-05-11 19:00   ` Julien Grall
2022-05-13  1:16     ` Stefano Stabellini
2022-05-13  6:23       ` Juergen Gross
2022-05-13 20:42         ` Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 6/7] tools: add example application to initialize dom0less PV drivers Stefano Stabellini
2022-05-05  7:47   ` Juergen Gross
2022-05-05 20:24     ` Stefano Stabellini
2022-05-11 19:11   ` Julien Grall
2022-05-13  1:09     ` Stefano Stabellini
2022-05-13  9:34       ` Julien Grall
2022-05-13 20:36         ` Stefano Stabellini
2022-05-05  0:16 ` [PATCH v6 7/7] docs: document dom0less + " Stefano Stabellini
2022-05-11 19:13   ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=573e94c4-7de0-e442-c9d8-559b55ae3144@xen.org \
    --to=julien@xen.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Rahul.Singh@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=lucmiccio@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@xilinx.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.