[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 11 May 2022 10:53:12 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H1O+F2a6vmcjR7JhjnusIHWlZB1fB9W548d5dY5ooNY=; b=kGBzLjXzvV9vvts9OSbQpPI13tcJlqWoTezweSaDHKengi4pXWN9UTIgJfwEvHr+grFGZh9ld9x7AfvI8jLab73gXxIbbApq8zmblEtH9zn1YZOX5G29aylRoNVEe4HdoYjK03HPVQ2zOmsGtqfHlW2lKkwlMmC8Hu33egeAVBZb8F4KrG6ewFjfolVlcp7dYewPGJGCgSKMllEBQ35RHVwYqjL16laegmqOAO/v9HDKwXei9sPEaN1fCcgoQrE1gfXwROwWldeuhozLrhNygjVx1N0sQ7fD3q8m8K+XCf9XLmNPSXYjegQ00sQMDTQ/DdfV/U5BktPyoHdoAsmfxw==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H1O+F2a6vmcjR7JhjnusIHWlZB1fB9W548d5dY5ooNY=; b=gM6R5pM2uF+nMss2scDOt/sYLeBRgx6BsiM61XXw8U7DIcz3lXMsM7SYENRv03b+Y0VmAgKz9F+WN9cqv1xKWjqKx+/uLNUY2CywTOOWKA0FJRuMWxh7BDcYfFVjHYj3L6VR0op1QDzSqOYUaxqIJ2/B52LOu29toAj6pLarLlyYz6cxFSf6DVU9QFnCCZ14aqJLk3fVyk9aFxj20UlIPuV3wc30gZZe5rNEEFW/INPrduMXq+qmzD0B8O78D37hxjB8JRYmH5XJkM4E9Cq21+/TK22y3zyrTztDONHygvnZOX3+xJBz1FBzZAR4czVtjhPAfEshsSpzy6TuxoW+Gw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=QMj9U8PIS4gyMQylabZ5WH7kxfFTAPfytz49AkVP6wHggoxT9DSUG+8q1+rxzpYRMae/Izovo77QbFEqi2j3LTSY45HNtrCUtG9AXtKcNyqJzcMhG8HVOo/C8JJp0gbKogVVItujiEMbnJ677kA9ulIeeUkdwGA0XaXv5CtDZJvLJjj28RB6jrNtt7sv0UCw3gvQ6m4IoDZyK+rO/oQA9LtNpxpU2N0uSFj88YX4DLb/WiwW/lKp53q7/5dCPokBiz5mKdGVZ6PDn92f/AsEcKrs1TYpy6VF1JBp6Zs7TncyKV5OfXd5cqY23lAII2j2l4kRtC4swUuR4lHkhT+NsA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YltLhnlMWw88s/Twarrwjq/CdAKF2kaom2ULM+pgGgdNOWQ9K0Iib4bsu0WxFDagS7F99MPdGt5Igf4JpvRTlFYRDUBGcUDo+Vtah0GBZx5TkVVonetRAxPpi8YQvp2dL0b/fNdxEEPSwe99UMDNQjSiMNyWpanaufKwT9vCx83LmXOm+iuG1gKxV0nPyj43Cirg8RQPZooJosn7ZUcd1rSUstc5q9eM+QADCTTFdGp7OAA4Gy0tBqM1K1zfWDslZ2SfnCQtLNise7znYvK1gWPggvlHXBDJWrFDvzqlgUpsjVJif+KJwwOyEjK2McvQgAYnNWs6HYSzZZ2aqE4ZFg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, Luca Miccio <lucmiccio@xxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 11 May 2022 10:54:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYYBWH2ZK8TL5ueU+mSOXui+uVga0YVmwAgAABRACAAP62gIAADosAgAACPoCAAAaAgIAAAkiAgAAaewA=
  • Thread-topic: [PATCH v6 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot

Hi Julien

> On 11 May 2022, at 10:18 am, Bertrand Marquis <Bertrand.Marquis@xxxxxxx> 
> wrote:
> 
> Hi Julien,
> 
>> On 11 May 2022, at 10:10, Julien Grall <julien@xxxxxxx> wrote:
>> 
>> Hi Bertrand,
>> 
>> On 11/05/2022 09:46, Bertrand Marquis wrote:
>>>> On 11 May 2022, at 09:38, Julien Grall <julien@xxxxxxx> wrote:
>>>> 
>>>> Hi Bertrand,
>>>> 
>>>> On 11/05/2022 08:46, Bertrand Marquis wrote:
>>>>>> On 10 May 2022, at 17:35, Julien Grall <julien@xxxxxxx> 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.

Regards,
Rahul
> Cheers
> Bertrand
> 
>> 
>> Cheers,
>> 
>> --
>> Julien Grall


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.