Message ID | 20230412094938.2693890-1-luca.fancellu@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | SVE feature for arm guests | expand |
Hi Luca, On this serie I would like to open a discussion on how to handle the vector size and the corresponding command line / configuration / device tree parameters. In general the user must either give a vector size it wants or has a solution to just request the maximum supported size. In the current implementation if a size bigger than the supported one is provided: - we silently disable SVE for dom0 - we silently disable SVE for dom0less - we do not create a guest when done through tools This is not completely coherent and i think we should aim for a coherent behaviour unless we have arguments for this status. Is there any good reason to silently disable for Dom0 and dom0less only ? I see some possible solutions here: - modify parameter behaviour to use the supported size if parameter is bigger than it. This would at least keep SVE enabled if a VM depends on it and could simplify some of the handling by using 2048 to use the maximum supported size. - coherently stop if the parameter value is not supported (including if sve is not supported) - always disable SVE if the parameter value is not supported. To be honest I am not quite sure which solution is better but I am not happy with the different kind of behaviour we have right now. What are your thoughts ? Regards Bertrand
On 18/04/2023 14:13, Bertrand Marquis wrote: > Hi Luca, Hi, > On this serie I would like to open a discussion on how to handle the vector size > and the corresponding command line / configuration / device tree parameters. > > In general the user must either give a vector size it wants or has a solution to > just request the maximum supported size. > > In the current implementation if a size bigger than the supported one is provided: > - we silently disable SVE for dom0 > - we silently disable SVE for dom0less > - we do not create a guest when done through tools > > This is not completely coherent and i think we should aim for a coherent behaviour > unless we have arguments for this status. +1. > Is there any good reason to silently disable for Dom0 and dom0less only ? > > I see some possible solutions here: > > - modify parameter behaviour to use the supported size if parameter is bigger than > it. This would at least keep SVE enabled if a VM depends on it and could simplify > some of the handling by using 2048 to use the maximum supported size. My concern with this approach and the third one is the user may take some time to realize the problem in the xl.cfg. So... > > - coherently stop if the parameter value is not supported (including if sve is > not supported) ... this is my preferred approach because it would be clear that the value passed to Xen is bogus. Cheers,
Hi Julien, > On 18 Apr 2023, at 16:25, Julien Grall <julien@xen.org> wrote: > > > > On 18/04/2023 14:13, Bertrand Marquis wrote: >> Hi Luca, > > Hi, > >> On this serie I would like to open a discussion on how to handle the vector size >> and the corresponding command line / configuration / device tree parameters. >> In general the user must either give a vector size it wants or has a solution to >> just request the maximum supported size. >> In the current implementation if a size bigger than the supported one is provided: >> - we silently disable SVE for dom0 >> - we silently disable SVE for dom0less >> - we do not create a guest when done through tools >> This is not completely coherent and i think we should aim for a coherent behaviour >> unless we have arguments for this status. > > +1. > >> Is there any good reason to silently disable for Dom0 and dom0less only ? >> I see some possible solutions here: >> - modify parameter behaviour to use the supported size if parameter is bigger than >> it. This would at least keep SVE enabled if a VM depends on it and could simplify >> some of the handling by using 2048 to use the maximum supported size. > > My concern with this approach and the third one is the user may take some time to realize the problem in the xl.cfg. So... Good point > >> - coherently stop if the parameter value is not supported (including if sve is >> not supported) > > ... this is my preferred approach because it would be clear that the value passed to Xen is bogus. I agree: we should not silently ignore configuration parameters or try to "fix" them. Cheers Bertrand
> On 18 Apr 2023, at 15:38, Bertrand Marquis <Bertrand.Marquis@arm.com> wrote: > > Hi Julien, > >> On 18 Apr 2023, at 16:25, Julien Grall <julien@xen.org> wrote: >> >> >> >> On 18/04/2023 14:13, Bertrand Marquis wrote: >>> Hi Luca, >> >> Hi, >> >>> On this serie I would like to open a discussion on how to handle the vector size >>> and the corresponding command line / configuration / device tree parameters. >>> In general the user must either give a vector size it wants or has a solution to >>> just request the maximum supported size. >>> In the current implementation if a size bigger than the supported one is provided: >>> - we silently disable SVE for dom0 >>> - we silently disable SVE for dom0less >>> - we do not create a guest when done through tools >>> This is not completely coherent and i think we should aim for a coherent behaviour >>> unless we have arguments for this status. >> >> +1. >> >>> Is there any good reason to silently disable for Dom0 and dom0less only ? >>> I see some possible solutions here: >>> - modify parameter behaviour to use the supported size if parameter is bigger than >>> it. This would at least keep SVE enabled if a VM depends on it and could simplify >>> some of the handling by using 2048 to use the maximum supported size. >> >> My concern with this approach and the third one is the user may take some time to realize the problem in the xl.cfg. So... > > Good point > >> >>> - coherently stop if the parameter value is not supported (including if sve is >>> not supported) >> >> ... this is my preferred approach because it would be clear that the value passed to Xen is bogus. > > I agree: we should not silently ignore configuration parameters or try to "fix" them. Hi Bertrand and Julien, Ok I will update the serie to stop the domain creation if the parameter supplied is wrong or SVE is not supported by the platform. > > Cheers > Bertrand
Hi Luca, > On 18 Apr 2023, at 16:41, Luca Fancellu <Luca.Fancellu@arm.com> wrote: > > > >> On 18 Apr 2023, at 15:38, Bertrand Marquis <Bertrand.Marquis@arm.com> wrote: >> >> Hi Julien, >> >>> On 18 Apr 2023, at 16:25, Julien Grall <julien@xen.org> wrote: >>> >>> >>> >>> On 18/04/2023 14:13, Bertrand Marquis wrote: >>>> Hi Luca, >>> >>> Hi, >>> >>>> On this serie I would like to open a discussion on how to handle the vector size >>>> and the corresponding command line / configuration / device tree parameters. >>>> In general the user must either give a vector size it wants or has a solution to >>>> just request the maximum supported size. >>>> In the current implementation if a size bigger than the supported one is provided: >>>> - we silently disable SVE for dom0 >>>> - we silently disable SVE for dom0less >>>> - we do not create a guest when done through tools >>>> This is not completely coherent and i think we should aim for a coherent behaviour >>>> unless we have arguments for this status. >>> >>> +1. >>> >>>> Is there any good reason to silently disable for Dom0 and dom0less only ? >>>> I see some possible solutions here: >>>> - modify parameter behaviour to use the supported size if parameter is bigger than >>>> it. This would at least keep SVE enabled if a VM depends on it and could simplify >>>> some of the handling by using 2048 to use the maximum supported size. >>> >>> My concern with this approach and the third one is the user may take some time to realize the problem in the xl.cfg. So... >> >> Good point >> >>> >>>> - coherently stop if the parameter value is not supported (including if sve is >>>> not supported) >>> >>> ... this is my preferred approach because it would be clear that the value passed to Xen is bogus. >> >> I agree: we should not silently ignore configuration parameters or try to "fix" them. > > Hi Bertrand and Julien, > > Ok I will update the serie to stop the domain creation if the parameter supplied is wrong or SVE is not supported by the platform. Thanks Bertrand > >> >> Cheers >> Bertrand
On 18.04.2023 16:25, Julien Grall wrote: > On 18/04/2023 14:13, Bertrand Marquis wrote: >> On this serie I would like to open a discussion on how to handle the vector size >> and the corresponding command line / configuration / device tree parameters. >> >> In general the user must either give a vector size it wants or has a solution to >> just request the maximum supported size. >> >> In the current implementation if a size bigger than the supported one is provided: >> - we silently disable SVE for dom0 >> - we silently disable SVE for dom0less >> - we do not create a guest when done through tools >> >> This is not completely coherent and i think we should aim for a coherent behaviour >> unless we have arguments for this status. > > +1. > >> Is there any good reason to silently disable for Dom0 and dom0less only ? >> >> I see some possible solutions here: >> >> - modify parameter behaviour to use the supported size if parameter is bigger than >> it. This would at least keep SVE enabled if a VM depends on it and could simplify >> some of the handling by using 2048 to use the maximum supported size. > > My concern with this approach and the third one is the user may take > some time to realize the problem in the xl.cfg. So... > >> >> - coherently stop if the parameter value is not supported (including if sve is >> not supported) > > ... this is my preferred approach because it would be clear that the > value passed to Xen is bogus. I did say earlier on that this comes with its own downside of preventing boot to complete for no real reason. It's all Arm code, so you're fine to ignore me, but in similar situations elsewhere (sorry, don't recall a concrete example off the top of my head) we've aimed to allow the system to boot, for the admin to then take corrective action if/as needed. Jan
Hi Jan, > On 19 Apr 2023, at 08:28, Jan Beulich <jbeulich@suse.com> wrote: > > On 18.04.2023 16:25, Julien Grall wrote: >> On 18/04/2023 14:13, Bertrand Marquis wrote: >>> On this serie I would like to open a discussion on how to handle the vector size >>> and the corresponding command line / configuration / device tree parameters. >>> >>> In general the user must either give a vector size it wants or has a solution to >>> just request the maximum supported size. >>> >>> In the current implementation if a size bigger than the supported one is provided: >>> - we silently disable SVE for dom0 >>> - we silently disable SVE for dom0less >>> - we do not create a guest when done through tools >>> >>> This is not completely coherent and i think we should aim for a coherent behaviour >>> unless we have arguments for this status. >> >> +1. >> >>> Is there any good reason to silently disable for Dom0 and dom0less only ? >>> >>> I see some possible solutions here: >>> >>> - modify parameter behaviour to use the supported size if parameter is bigger than >>> it. This would at least keep SVE enabled if a VM depends on it and could simplify >>> some of the handling by using 2048 to use the maximum supported size. >> >> My concern with this approach and the third one is the user may take >> some time to realize the problem in the xl.cfg. So... >> >>> >>> - coherently stop if the parameter value is not supported (including if sve is >>> not supported) >> >> ... this is my preferred approach because it would be clear that the >> value passed to Xen is bogus. > > I did say earlier on that this comes with its own downside of preventing > boot to complete for no real reason. It's all Arm code, so you're fine > to ignore me, but in similar situations elsewhere (sorry, don't recall a > concrete example off the top of my head) we've aimed to allow the system > to boot, for the admin to then take corrective action if/as needed. But a guest depending on the feature will just crash later when booting. This is making the assumption that guests are all able to properly adapt to different hardware possibilities. This might be the case when you have a full Linux but if you consider an embedded use case, if something is activated due to command line parameters or configuration ones, it should not be expected that those are ignored I think. There are definitely 2 different needs here, maybe we need to have something like a "strict" switch to allow both use cases ? Bertrand
Hi, Answering to Jan's and Bertrand's e-mail at the same time. On 19/04/2023 08:31, Bertrand Marquis wrote: >> On 19 Apr 2023, at 08:28, Jan Beulich <jbeulich@suse.com> wrote: >> >> On 18.04.2023 16:25, Julien Grall wrote: >>> On 18/04/2023 14:13, Bertrand Marquis wrote: >>>> On this serie I would like to open a discussion on how to handle the vector size >>>> and the corresponding command line / configuration / device tree parameters. >>>> >>>> In general the user must either give a vector size it wants or has a solution to >>>> just request the maximum supported size. >>>> >>>> In the current implementation if a size bigger than the supported one is provided: >>>> - we silently disable SVE for dom0 >>>> - we silently disable SVE for dom0less >>>> - we do not create a guest when done through tools >>>> >>>> This is not completely coherent and i think we should aim for a coherent behaviour >>>> unless we have arguments for this status. >>> >>> +1. >>> >>>> Is there any good reason to silently disable for Dom0 and dom0less only ? >>>> >>>> I see some possible solutions here: >>>> >>>> - modify parameter behaviour to use the supported size if parameter is bigger than >>>> it. This would at least keep SVE enabled if a VM depends on it and could simplify >>>> some of the handling by using 2048 to use the maximum supported size. >>> >>> My concern with this approach and the third one is the user may take >>> some time to realize the problem in the xl.cfg. So... >>> >>>> >>>> - coherently stop if the parameter value is not supported (including if sve is >>>> not supported) >>> >>> ... this is my preferred approach because it would be clear that the >>> value passed to Xen is bogus. >> >> I did say earlier on that this comes with its own downside of preventing >> boot to complete for no real reason. It's all Arm code, so you're fine >> to ignore me, but in similar situations elsewhere (sorry, don't recall a >> concrete example off the top of my head) we've aimed to allow the system >> to boot, for the admin to then take corrective action if/as needed. It is not clear to me why it is necessary for the system to boot in order to take corrective action. In the case of GRUB, you would likely have a fallback for a Linux baremetal boot just in case Xen crash at boot. So you can use the fallback to boot and update your command line in grub.cfg. I agree this is less efficient, but it would be easier for a user to find out there was an issue in the command line passed. > > But a guest depending on the feature will just crash later when booting. > This is making the assumption that guests are all able to properly adapt > to different hardware possibilities. > This might be the case when you have a full Linux but if you consider an > embedded use case, if something is activated due to command line parameters > or configuration ones, it should not be expected that those are ignored I think. > > There are definitely 2 different needs here, maybe we need to have something > like a "strict" switch to allow both use cases ? At the mode, I am not in favor of introducing a switch to relax the check. It will add more code in Xen for a benefit that is not clear to me (see above). Cheers,
On 19.04.2023 09:31, Bertrand Marquis wrote: > Hi Jan, > >> On 19 Apr 2023, at 08:28, Jan Beulich <jbeulich@suse.com> wrote: >> >> On 18.04.2023 16:25, Julien Grall wrote: >>> On 18/04/2023 14:13, Bertrand Marquis wrote: >>>> On this serie I would like to open a discussion on how to handle the vector size >>>> and the corresponding command line / configuration / device tree parameters. >>>> >>>> In general the user must either give a vector size it wants or has a solution to >>>> just request the maximum supported size. >>>> >>>> In the current implementation if a size bigger than the supported one is provided: >>>> - we silently disable SVE for dom0 >>>> - we silently disable SVE for dom0less >>>> - we do not create a guest when done through tools >>>> >>>> This is not completely coherent and i think we should aim for a coherent behaviour >>>> unless we have arguments for this status. >>> >>> +1. >>> >>>> Is there any good reason to silently disable for Dom0 and dom0less only ? >>>> >>>> I see some possible solutions here: >>>> >>>> - modify parameter behaviour to use the supported size if parameter is bigger than >>>> it. This would at least keep SVE enabled if a VM depends on it and could simplify >>>> some of the handling by using 2048 to use the maximum supported size. >>> >>> My concern with this approach and the third one is the user may take >>> some time to realize the problem in the xl.cfg. So... >>> >>>> >>>> - coherently stop if the parameter value is not supported (including if sve is >>>> not supported) >>> >>> ... this is my preferred approach because it would be clear that the >>> value passed to Xen is bogus. >> >> I did say earlier on that this comes with its own downside of preventing >> boot to complete for no real reason. It's all Arm code, so you're fine >> to ignore me, but in similar situations elsewhere (sorry, don't recall a >> concrete example off the top of my head) we've aimed to allow the system >> to boot, for the admin to then take corrective action if/as needed. > > But a guest depending on the feature will just crash later when booting. > This is making the assumption that guests are all able to properly adapt > to different hardware possibilities. > This might be the case when you have a full Linux but if you consider an > embedded use case, if something is activated due to command line parameters > or configuration ones, it should not be expected that those are ignored I think. > > There are definitely 2 different needs here, maybe we need to have something > like a "strict" switch to allow both use cases ? Possibly. Yet along what I've said before - would you then also mean that to fail boot upon encountering entirely unknown command line options? Jan
Hi Jan, > On 19 Apr 2023, at 09:52, Jan Beulich <jbeulich@suse.com> wrote: > > On 19.04.2023 09:31, Bertrand Marquis wrote: >> Hi Jan, >> >>> On 19 Apr 2023, at 08:28, Jan Beulich <jbeulich@suse.com> wrote: >>> >>> On 18.04.2023 16:25, Julien Grall wrote: >>>> On 18/04/2023 14:13, Bertrand Marquis wrote: >>>>> On this serie I would like to open a discussion on how to handle the vector size >>>>> and the corresponding command line / configuration / device tree parameters. >>>>> >>>>> In general the user must either give a vector size it wants or has a solution to >>>>> just request the maximum supported size. >>>>> >>>>> In the current implementation if a size bigger than the supported one is provided: >>>>> - we silently disable SVE for dom0 >>>>> - we silently disable SVE for dom0less >>>>> - we do not create a guest when done through tools >>>>> >>>>> This is not completely coherent and i think we should aim for a coherent behaviour >>>>> unless we have arguments for this status. >>>> >>>> +1. >>>> >>>>> Is there any good reason to silently disable for Dom0 and dom0less only ? >>>>> >>>>> I see some possible solutions here: >>>>> >>>>> - modify parameter behaviour to use the supported size if parameter is bigger than >>>>> it. This would at least keep SVE enabled if a VM depends on it and could simplify >>>>> some of the handling by using 2048 to use the maximum supported size. >>>> >>>> My concern with this approach and the third one is the user may take >>>> some time to realize the problem in the xl.cfg. So... >>>> >>>>> >>>>> - coherently stop if the parameter value is not supported (including if sve is >>>>> not supported) >>>> >>>> ... this is my preferred approach because it would be clear that the >>>> value passed to Xen is bogus. >>> >>> I did say earlier on that this comes with its own downside of preventing >>> boot to complete for no real reason. It's all Arm code, so you're fine >>> to ignore me, but in similar situations elsewhere (sorry, don't recall a >>> concrete example off the top of my head) we've aimed to allow the system >>> to boot, for the admin to then take corrective action if/as needed. >> >> But a guest depending on the feature will just crash later when booting. >> This is making the assumption that guests are all able to properly adapt >> to different hardware possibilities. >> This might be the case when you have a full Linux but if you consider an >> embedded use case, if something is activated due to command line parameters >> or configuration ones, it should not be expected that those are ignored I think. >> >> There are definitely 2 different needs here, maybe we need to have something >> like a "strict" switch to allow both use cases ? > > Possibly. Yet along what I've said before - would you then also mean that to > fail boot upon encountering entirely unknown command line options? I think this should depend: - completely unknow: we can ignore - not supported (sve while sve is not supported by the platform or Xen): we should not ignore I agree that one could use custom command line arguments for lots of reasons (in linux you can do that and get them back from /proc for example) but silently ignoring a parameter that is known to Xen i do not think we should do. I think in most cases, one could think its system is correctly running but could get problems later (or in some cases even not have any) so having a clear error at the beginning is a lot more clear. Bertrand
On 19/04/2023 09:20, Bertrand Marquis wrote: > Hi Jan, > >> On 19 Apr 2023, at 09:52, Jan Beulich <jbeulich@suse.com> wrote: >> >> On 19.04.2023 09:31, Bertrand Marquis wrote: >>> Hi Jan, >>> >>>> On 19 Apr 2023, at 08:28, Jan Beulich <jbeulich@suse.com> wrote: >>>> >>>> On 18.04.2023 16:25, Julien Grall wrote: >>>>> On 18/04/2023 14:13, Bertrand Marquis wrote: >>>>>> On this serie I would like to open a discussion on how to handle the vector size >>>>>> and the corresponding command line / configuration / device tree parameters. >>>>>> >>>>>> In general the user must either give a vector size it wants or has a solution to >>>>>> just request the maximum supported size. >>>>>> >>>>>> In the current implementation if a size bigger than the supported one is provided: >>>>>> - we silently disable SVE for dom0 >>>>>> - we silently disable SVE for dom0less >>>>>> - we do not create a guest when done through tools >>>>>> >>>>>> This is not completely coherent and i think we should aim for a coherent behaviour >>>>>> unless we have arguments for this status. >>>>> >>>>> +1. >>>>> >>>>>> Is there any good reason to silently disable for Dom0 and dom0less only ? >>>>>> >>>>>> I see some possible solutions here: >>>>>> >>>>>> - modify parameter behaviour to use the supported size if parameter is bigger than >>>>>> it. This would at least keep SVE enabled if a VM depends on it and could simplify >>>>>> some of the handling by using 2048 to use the maximum supported size. >>>>> >>>>> My concern with this approach and the third one is the user may take >>>>> some time to realize the problem in the xl.cfg. So... >>>>> >>>>>> >>>>>> - coherently stop if the parameter value is not supported (including if sve is >>>>>> not supported) >>>>> >>>>> ... this is my preferred approach because it would be clear that the >>>>> value passed to Xen is bogus. >>>> >>>> I did say earlier on that this comes with its own downside of preventing >>>> boot to complete for no real reason. It's all Arm code, so you're fine >>>> to ignore me, but in similar situations elsewhere (sorry, don't recall a >>>> concrete example off the top of my head) we've aimed to allow the system >>>> to boot, for the admin to then take corrective action if/as needed. >>> >>> But a guest depending on the feature will just crash later when booting. >>> This is making the assumption that guests are all able to properly adapt >>> to different hardware possibilities. >>> This might be the case when you have a full Linux but if you consider an >>> embedded use case, if something is activated due to command line parameters >>> or configuration ones, it should not be expected that those are ignored I think. >>> >>> There are definitely 2 different needs here, maybe we need to have something >>> like a "strict" switch to allow both use cases ? >> >> Possibly. Yet along what I've said before - would you then also mean that to >> fail boot upon encountering entirely unknown command line options? > > I think this should depend: > - completely unknow: we can ignore > - not supported (sve while sve is not supported by the platform or Xen): we should not ignore > > I agree that one could use custom command line arguments for lots of reasons > (in linux you can do that and get them back from /proc for example) but silently > ignoring a parameter that is known to Xen i do not think we should do. > > I think in most cases, one could think its system is correctly running but could get > problems later (or in some cases even not have any) so having a clear error at the > beginning is a lot more clear. FWIW, I agree with Bertrand. Cheers,