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

Re: [PATCH v3 7/7] xen/arm: introduce new xen,enhanced property value


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 6 Sep 2022 07:24:05 +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=59AoVz2istsXFBBqxHue9M0HNmlUglvw20I7+sBJ31c=; b=joPWL3KeZLbyPviPcuOr2msCTrsISV6ZW+v4InbORn4Vs0/daUDLw+zO6lFP/cUfY7lpSz+AhD/IAPttg1gMZXonQ73SJjaRuZUWfVSst944GMA/X9Obmvh03yQgGXf9dGnJSK6XNh0motjkeS7cdHNtgLxudFNuoJ8U3eYIIU4o3bPCiZytIGbk8iLAvtPtRRAjfHdVbTYGbfGz5SEjjqtRdbmr8rbbhVOrrDHE3EC3TRBJcqiJnl9sYtcn0FHSsFaB8RCtIzr+FKiHwL0TXVFmfTruJ5HAEd4tXZQRLuT7Ag8Ua0JsB8NerZTebMwXQFG+s9U7QmYs1ol+mMd9Cw==
  • 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=59AoVz2istsXFBBqxHue9M0HNmlUglvw20I7+sBJ31c=; b=FEWK+j7uocb6/+Yz6+bwM4Np9nPvTA5bLcn2+o9GLhjjQPNHdkd/ei5nrGmLhDlfMJ5MLhc6R7mZ2HzN744ylqfsrXjCmiRBWwX/Y/yuOsG4bPOMx8dHsSXdcCTES4CQfhdcUi3XOYRjXKCKYmupfSHhhZv6DMG17+mlkConC1ItzkDZvfKvQD/1nMCquQcgqrIVPuRDQvm4dEPa0JdU8qFHlUK4wycLA1r/AS5TldeXX60F0P7mHCkI5yGQfj0a7GH/XPPuKe+xm8DiRuU29ZGU1JZJv2q8q6+2P0R7LlJTi9WLfu0uZAfy9W15AR50vHAnbho5w9L4q+72YvK7pQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=MZE2GuoOVkczEc07poGmo+WlLuCYajxVV3OWexsSfPljzZiVQ6UyfeSB2QjuXxfUx3ku2a9/nRz3L14F1sm9IUGCjEWk0aHa7/fBdsiRWzV4jJzhiebY3DD+3N+ZCr+4Lke877ed9ltcKijqV/y1rOIVNs1mB6dLYOz7TgTMuF3xgm5ltfqIj46/qyU2YCkyqs0bIHfj660JERMtA2RSuaXHivKFDOm1TyjiZtvslVkfLUXXxPhkxwwzuY5l/ae+h0EjSVanwHUBZqml0kUjvyfMo8QIjAMBiMfA8a46yLl8mMOZ/aRLRqaYUEYbY4187RKhhAyJaMeL6QH8/CGxnQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FC5vdW7sY/c/FbVOXdUZaXNS49umovAJnYr542NyCNRiqoaOnN39S2yJh7aOs//M38x2Gfdn4ZmYiigOT0AGB9XRotY3GIq8mZMPVqP/igqV/OWr4pLhTmWkoohW5leNEEO5aH7gwK+tx5AInY+cXklSmBVP27Mng259DAtrwvq2GxcO+5iZ4yRF/hISM/JIF9oGXVXVMSz8/rqAvIPLpk/xMEDAisve5+72mApm9eIP9+xsALYOdKgBgyue2kNefy/rYLms5kt9ExUt4SYw4YFNUaKNB1q7ZG7vMUR3w+L/4/T9DM8lSdZHTu6J6rg1f8tgjDqq3Lca+4hUhSmIHw==
  • 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>, Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 06 Sep 2022 07:24:19 +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: AQHYveOAeMLlOwX5Mka7ZrpAabJW7K3K4ewAgAFZKACAAAQoAIAADY8AgAAHN4CABGESgIAACJcAgAADEoCAAAPFgIAADnWAgAAKUACAAJguAIAAkgwA
  • Thread-topic: [PATCH v3 7/7] xen/arm: introduce new xen,enhanced property value

Hi Stefano,

> On 5 Sep 2022, at 23:41, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Mon, 5 Sep 2022, Rahul Singh wrote:
>>> On 5 Sep 2022, at 1:59 pm, Bertrand Marquis <Bertrand.Marquis@xxxxxxx> 
>>> wrote:
>>> 
>>> Hi Julien,
>>> 
>>>> On 5 Sep 2022, at 13:08, Julien Grall <julien@xxxxxxx> wrote:
>>>> 
>>>> 
>>>> 
>>>> On 05/09/2022 12:54, Bertrand Marquis wrote:
>>>>> Hi Julien,
>>>>>> On 5 Sep 2022, at 12:43, Julien Grall <julien@xxxxxxx> wrote:
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 05/09/2022 12:12, Rahul Singh wrote:
>>>>>>> Hi Julien,
>>>>>> 
>>>>>> Hi Rahul,
>>>>>> 
>>>>>>>> On 2 Sep 2022, at 5:20 pm, Julien Grall <julien@xxxxxxx> wrote:
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 02/09/2022 16:54, Rahul Singh wrote:
>>>>>>>>> Hi Julien,
>>>>>>>> 
>>>>>>>> Hi Rahul,
>>>>>>>> 
>>>>>>>>>> On 2 Sep 2022, at 4:05 pm, Julien Grall <julien@xxxxxxx> wrote:
>>>>>>>>>> 
>>>>>>>>>> Hi Bertrand,
>>>>>>>>>> 
>>>>>>>>>> On 02/09/2022 15:51, Bertrand Marquis wrote:
>>>>>>>>>>>> On 1 Sep 2022, at 19:15, Julien Grall <julien@xxxxxxx> wrote:
>>>>>>>>>>>> AFAIU, it is not possible to have *_xenstore = true and *_enhanced 
>>>>>>>>>>>> = false. I think it would be clearer if ``dom0less_enhanced`` is 
>>>>>>>>>>>> turned to an enum with 3 values:
>>>>>>>>>>>> - None
>>>>>>>>>>>> - NOXENSTORE/BASIC
>>>>>>>>>>>> - FULLY_ENHANCED
>>>>>>>>>>>> 
>>>>>>>>>>>> If we want to be future proof, I would use a field 'flags' where 
>>>>>>>>>>>> non-zero means enhanced. Each bit would indicate which features of 
>>>>>>>>>>>> Xen is exposed.
>>>>>>>>>>> I think that could be a good solution if we do it this way:
>>>>>>>>>>> - define a dom0less feature field and have defines like the 
>>>>>>>>>>> following:
>>>>>>>>>>> #define DOM0LESS_GNTTAB
>>>>>>>>>>> #define DOM0LESS_EVENTCHN
>>>>>>>>>>> #define DOM0LESS_XENSTORE >
>>>>>>>>>>> - define dom0less enhanced as the right combination:
>>>>>>>>>>> #define DOM0LESS_ENHANCED = (DOM0LESS_GNTTAB| DOM0LESS_EVENTCHN| 
>>>>>>>>>>> DOM0LESS_XENSTORE)
>>>>>>>>>> 
>>>>>>>>>> I would rather introduce DOM0LESS_ENHANCED_BASIC (or similar) 
>>>>>>>>>> instead of defining a bit for gnttab and evtchn. This will avoid the 
>>>>>>>>>> question of why we are introducing bits for both features but not 
>>>>>>>>>> the hypercall...
>>>>>>>>>> 
>>>>>>>>>> As this is an internal interface, it would be easier to modify 
>>>>>>>>>> afterwards.
>>>>>>>>> How about this?
>>>>>>>>> /*
>>>>>>>>> * List of possible features for dom0less domUs
>>>>>>>>> *
>>>>>>>>> * DOM0LESS_ENHANCED_BASIC: Xen PV interfaces, including grant-table 
>>>>>>>>> and
>>>>>>>>> *                                                          evtchn, 
>>>>>>>>> will be enabled for the VM.
>>>>>>>> 
>>>>>>>> Technically, the guest can already use the grant-table and evtchn 
>>>>>>>> interfaces. This also reads quite odd to me because "including" 
>>>>>>>> doesn't tell what's not enabled. So one could assume Xenstored is also 
>>>>>>>> enabled. In fact the wording for ``DOM0LESS_ENHANCED`` is what makes 
>>>>>>>> it a lot more confusing.
>>>>>>>> 
>>>>>>>> So I would suggest the following wording:
>>>>>>>> 
>>>>>>>> "Notify the OS it is running on top of Xen. All the default features 
>>>>>>>> but Xenstore will be available. Note that an OS *must* not rely on the 
>>>>>>>> availability of Xen features if this is not set.
>>>>>>>> "
>>>>>>>> 
>>>>>>>> The wording can be updated once we properly disable event 
>>>>>>>> channel/grant table when the flag is not set.
>>>>>>>> 
>>>>>>>>> * DOM0LESS_XENSTORE:              Xenstore will be enabled for the VM.
>>>>>>>> 
>>>>>>>> I would make clear this can't be used without the first one.
>>>>>>>> 
>>>>>>>>> * DOM0LESS_ENHANCED:              Xen PV interfaces, including 
>>>>>>>>> grant-table xenstore >   *                                            
>>>>>>>>>               and
>>>>>>>> evtchn, will be enabled for the VM.
>>>>>>>> 
>>>>>>>> See above about "PV interfaces". So I would suggest to reword to:
>>>>>>>> 
>>>>>>>> "Notify the OS it is running on top of Xen. All the default features 
>>>>>>>> (including Xenstore) will be available".
>>>>>>>> 
>>>>>>>>> */
>>>>>>>>> #define DOM0LESS_ENHANCED_BASIC BIT(0, UL)
>>>>>>>>> #define DOM0LESS_XENSTORE       BIT(1, UL)
>>>>>>>> 
>>>>>>>> Based on the comment above, I would consider to define 
>>>>>>>> DOM0LESS_XENSTORE as bit 0 and 1 set.
>>>>>>>> 
>>>>>>>>> #define DOM0LESS_ENHANCED       (DOM0LESS_ENHANCED_BASIC | 
>>>>>>>>> DOM0LESS_XENSTORE)
>>>>>>> Bertrand and I discussed this again we came to the conclusion that 
>>>>>>> DOM0LESS_ENHANCED_BASIC is not
>>>>>>> the suitable name as this makes the code unclear and does not 
>>>>>>> correspond to DT settings. We propose this
>>>>>>> please let me know your thoughts.
>>>>>> 
>>>>>> To me the default of "enhanced" should be all Xen features. Anything 
>>>>>> else should be consider as reduced/basic/minimum. Hence why I still 
>>>>>> think we need to add it in the name even if this is not what we expose 
>>>>>> in the DT. In fact...
>>>>>>> /*
>>>>>>> * List of possible features for dom0less domUs
>>>>>>> *
>>>>>>> * DOM0LESS_XENSTORE:              Xenstore will be enabled for the VM. 
>>>>>>> This feature
>>>>>>> *                                                 can't be enabled 
>>>>>>> without the DOM0LESS_ENHANCED.
>>>>>>> * DOM0LESS_ENHANCED:              Notify the OS it is running on top of 
>>>>>>> Xen. All the
>>>>>>> *                                                         default 
>>>>>>> features (including Xenstore) will be
>>>>>>> *                                                         available. 
>>>>>>> Note that an OS *must* not rely on the
>>>>>>> *                                                         availability 
>>>>>>> of Xen features if this is not set.
>>>>>> 
>>>>>> ... what you wrote here match what I wrote above. So it is not clear to 
>>>>>> me what's the point of having a flag DOM0LESS_XENSTORE.
>>>>> When we looked at the code with the solution using BASIC, it was really 
>>>>> not easy to understand.
>>>> 
>>>> I don't quite understand how this is different from ENHANCED, 
>>>> ENHANCED_FULL. In fact, without looking at the documentation, they mean 
>>>> exactly the same...
>>>> 
>>>> The difference between "BASIC" and "ENHANCED" is clear. You know that in 
>>>> one case, you would get less than the other.
>>>> 
>>>>> By the way the comment is wrong and correspond to what should be 
>>>>> ENHANCED_FULL here
>>>>> ENHANCED would be the base without Xenstore.
>>>> 
>>>> Thanks for the confirmation. I am afraid, I am strongly against the 
>>>> terminology you proposed (see above why).
>>>> 
>>>> I think BASIC (or similar name) is better. But I am open to suggestion so 
>>>> long it is not "DOM0LESS_ENHANCED" vs "DOM0LESS_ENHANCED_FULL".
>>> 
>>> I do not agree but I think this is only internal and could easily be 
>>> modified one day if we have more use-cases.
>>> So let’s go for BASIC and unblock this before the feature freeze.
>>> 
>>> Bertrand
>> 
>> Please have a look once if this looks okay.
>> 
>> /*                                                                           
>>    
>> * List of possible features for dom0less domUs                               
>>   
>> *                                                                            
>>   
>> * DOM0LESS_ENHANCED_BASIC:   Notify the OS it is running on top of Xen. All 
>> the  
>> *                                                            default 
>> features (excluding Xenstore) will be       
>> *                                                            available. Note 
>> that an OS *must* not rely on the   
>> *                                                            availability of 
>> Xen features if this is not set.    
>> * DOM0LESS_XENSTORE:                 Xenstore will be enabled for the VM. 
>> This feature   
>> *                                                            can't be 
>> enabled without the DOM0LESS_ENHANCED_BASIC.                            
>> * DOM0LESS_ENHANCED:                 Notify the OS it is running on top of 
>> Xen. All the  
>> *                                                            default 
>> features (including Xenstore) will be       
>> *                                                            available. Note 
>> that an OS *must* not rely on the   
>> *                                                            availability of 
>> Xen features if this is not set.    
>> */                                                                           
>>   
>> #define DOM0LESS_ENHANCED_BASIC     BIT(0, UL)                               
>>    
>> #define DOM0LESS_XENSTORE                  BIT(1, UL)                        
>>           
>> #define DOM0LESS_ENHANCED                 (DOM0LESS_ENHANCED_BASIC  |  
>> DOM0LESS_XENSTORE)
> 
> Let me have a chance to propose a naming scheme as well :-)
> 
> I agree with Julien: I prefer this proposal compared to the earlier one
> by Bertrand and Rahul because I think it is a lot clearer and "ENHANCED"
> should mean everything. Also, it makes it easier from a compatibility
> perspective because it matches the current definition.
> 
> But I also agree with Bertrand that "BASIC" doesn't sound nice. I think
> we should keep "DOM0LESS_ENHANCED" and "DOM0LESS_XENSTORE" as suggested
> here, but replace "DOM0LESS_ENHANCED_BASIC" with something better. Some
> ideas:
> 
> - DOM0LESS_ENHANCED_LIMITED
> - DOM0LESS_ENHANCED_MINI

Personally I do not find those more clear then BASIC

> - DOM0LESS_ENHANCED_NO_XS

This has the problem to be true now but would need renaming if we introduce a 
definition for an other bit.

> - DOM0LESS_ENHANCED_GNT_EVTCHN

I would vote for this one as it explicitly state what is in so the bitset 
system is even more meaningful.

> 
> Any of these are better than BASIC from my point of view. Now I am off
> to get the green paint for my shed.

Have fun ;-)

Cheers
Bertrand




 


Rackspace

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