[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: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 11 May 2022 08:46:59 +0000
  • Accept-language: en-GB, 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=wp8b2zNe43K5xxeta2aFqymt5LfwrsDjOUZBTj5Zun4=; b=gBGsi+dOgVYgFk4LXac0o/g1C7Rr56HkHWfys7W0Av2VLK+WF/xe0llbsUJF7cP5eIFpwfeBc/oAFwr3BPDvO0cvmpXEACObZ3U1cxqeYDdj8VqR+qBNa6vK7J5vfheYGqWaNnjIzM63binY/LkqiIiZJ5nsoNCZ0lOmKyDItCNZolgPk2JrmAeLPgHsywoRRgVEvJGGLUGf/Mv6YmOY7j4cFQXhe+2L4mOV+5jtaPTaE9QyME0GYGGffamlArrxeZq33UQsg22d1INNfCz7DnC4zx2fFmsIxjYqaBe7rJ69qclKu2KgAnuY+EjfwA3Zomo7/BGPFY4sE+6CP12R1g==
  • 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=wp8b2zNe43K5xxeta2aFqymt5LfwrsDjOUZBTj5Zun4=; b=XMnhZIsOc+dZsF7dQcLNESYBCwsnS48j/5tEi5yBldxOpep1e45FPuIJAd+ZzyMdDZu1Sx25fNC8RUg+rXsryP1yoXuiI62249xR6Fqxt1xscX0kWY0t/31iLtMDAPfC6RyU5SpQjFgzveqlFcmFoWnLxpj2kFY28UGMGL6nkdvr2x8bwR0GY68MLatLMl4qvACIHWFmIcdbQhFfAj7zzwtyYMLVwMKkGrCSkIRtFJH6CALUV49EKsFoIp6hHwhD9MPbMp2kjI5wE2bEtzkMeVGSqZ/8B8w60CBT/fsdUQIMzLa0aD2RvMljRa5SSCrF67wwdRrMiLG6wWoIrDW5nA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=IsIPO0N/v/ZxN8X4R4HFMZjxAkdV03nAo+oyJ32ERjlBvx6RUSEvvRnrddyBjhrb5Zc86J2fHgQDYOEz/4sYH/MwmU8xOLv5EUMBQkt1IGGYDfTNV/R8MYKWbAdlzDX6V4puulAFz0ie0NZ/NgFksVO8V+WGbRyvDPtlzNXgqU3fs0WHq3KC5OEBOK5kmVM8f1zCSXgOeLkgltwHPgm931dRB/teNQYtfyRJQyCAyxkDoj7poPD3TT4nwj069FFmQQKcZfBHR6fubo9duLJKImqA3JpcesaBhArbWmvsHdAnp6nUAf6s17nVQQ7AdbcRzW7ClTzKFKXxCpK+np/kAA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GqPK3TJDm5QN9xArOcxVXbDi8VKEWhJbnJ473xuL8C7S/6d5TJNwh4U6FU0Cn16P0+goww0THMiZMGv8kuq4rxaAdmcUcHo4AZaC+CULUUvBKP0I+s9vQYDmZSlceQrBi0+doKlC2RAvia8y0SRfJzfw5ER6q3mEkrGSeCogjAxdZgCCuBKJ2CNE9jEpiUyeC9MLlZW0ZhQDNfqm1oichFl0UNrJ84C5XQ76kxrvFHiWx2A2+yCkLgg6emDN/PhAMe/T269lzlG8LAMLPQhHBLXVPvAKl2zPoxHZrNF0vx02eHcR2bXPgfvCGH3kDUKdHcFiNGkq9WwlDnbb/Y1Ttg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Rahul Singh <Rahul.Singh@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 08:47:21 +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: AQHYYBV7IqUb0ECYF0+NQ9CCVyUDtq0YVm2AgAABQwCAAP62gIAADosAgAACPoA=
  • Thread-topic: [PATCH v6 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot


> 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 ?

> 
>>> 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).

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

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