[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: Julien Grall <julien@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Mon, 5 Sep 2022 11:12:47 +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=FfCop8JFo+U16ITqf9+5QrgRFfTvtTJT7PypKA86ri0=; b=khYszJVT5b0scdgr1K5xBaoKr6+dpuPcmD9xhe7PURSFPoC6fP+Kzt3ogIaf2xZyHKVRrGP/ewN1pRfpbKT0WE7bZP2OZrdC3eglziHA5cteVdlbdisbLRXFuvxGY6niu8EyDtl5OizHyJvKHLVrT1sel8U97P6MFdqFtjiZ+34YRxILj9z3l9fInSsBzIwlxjMZcSfQj9BYqYA7l7LHNdikmCKzwm1dfK7wvgVcpBfNdWBcxtBJFoavYXHfx+SXTR9p8XBWRm3KSR9iroKB7ESW+2qX0lGpIeeyYvZUPT5gINeFkxVnLj6pIPUdQAI0HJTtVelBESqaHZiBlAMzig==
  • 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=FfCop8JFo+U16ITqf9+5QrgRFfTvtTJT7PypKA86ri0=; b=T0xauWHPDk53m2d27RnDpmYDkRhXOLVevhOTC2pmKmxR93TQywsGK2MSM166EqIYhtoHVIIFM52MDKc/Kx6sZTdXUipild4mr3DSQBS0h9A6KVZV8RkyHFwB4R7FpGd0z5Z4EXRUpJtPoCPNcPKvivPHMc4OJTS3Dt4hRrqsYgk8p53tuUqE67/itkM7wibx/LdFsYixUxepke9QyvH3q7ZOWwMkgFS4Q18lt0s+XhaOLSUAYlo9Qq5YyYUfRPFPqK6FkviR/29rL6hrqqGzPAXzlD3JKCakSDPNVqobUmF2kvuTyDjH+Pa10pvXKdiKiivZnSdjU071WdaoG5YDXA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=bI8y0hFSwpiPQ18l4W3mITeQFmZF3ZaL9rZyXL4AsQ7XY6a5+zUyzP2HR+SKKJ01ZKBGFjBJlz2ewtT3HuG36+Ym/kQgU0RxvMDJBYIgPr7WiVwjqBiLRWFGZXD8qdwXGA4JIeEY96ptLpNbKYk8UPS2RV8fDVZCqPok6AvHIJqyph4/hOWc34yhh063KSF4Mnri8/Gw12WDX2VbsKWVMSEcUpb4n4Hm6sdO3aYZkKosK/EyGQu4G62Fbdxb9ttFqkXvtFboalKror/SbU33f74OU430hNGEXAV3di83MtRfhSGic+66pmb6QKg1FeZNe7sPQp7tfHNwo2SzmNwAHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=asYmtwP6rYlRe1EmdUwYYfO6gC/RI1CtRURpH7+Z3WsE5gMd6oV9xr4YAjgUIRlNxK3TxeS35sI7rdY4lH0RhzJrh59MiI5aHMcWujSQcwxh+5E1gYzIMwRkta7fNhzhBgJpZpBfUt2vtuprG8m5jKKp8w9bB2yClEu1EiuPbYkYEhghFYH0w5T0Bu/PPUeiGd6cB1Rb2YqHec3AbMBXrMVjg35UZ/bDSCS6OjtwpnFUY4SEnrtXcmgL9KO7jvcrVECZgcMrdRCU9Q85hwXAunb8cX81XRHWupGynrlh1/8CvzqASFKwetiL4CMdWZ7Yuunma2rXIixdPu7WjPYV8w==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 05 Sep 2022 11:13:13 +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: AQHYveOA33HU3e+ak0GIRMMly1Yth63K4ewAgAFZKoCAAAQmAIAADY6AgAAHOICABGESgA==
  • Thread-topic: [PATCH v3 7/7] xen/arm: introduce new xen,enhanced property value

Hi Julien,

> 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.  
 
/*                                                                              
 * 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.    
 */                                                                             
#define DOM0LESS_XENSTORE       BIT(0, UL)                                      
#define DOM0LESS_ENHANCED       BIT(1,UL)                                       
#define DOM0LESS_ENHANCED_FULL  (DOM0LESS_XENSTORE | DOM0LESS_ENHANCED)

Regards,
Rahul


 


Rackspace

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