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

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


  • To: Julien Grall <julien@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 7 Sep 2022 14:19:03 +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=/cBNynxtWFQG6rFHdjzUL5ny1LFAiYA1K+GrixRua6E=; b=UPoq0n+vJPNUkiKo2oBe9UYt5LLQ3T8XezEC4N6932LRO8rPs+nLw4wexyFXQq3h/LfNUNzf9slIZ8qEbplr5pqWWXdRE4rn6OK9S3GtFyMky/OEHhCg8HoiG0aaI887qyQOcSW5/d+7jnaviJIQS66T8adWPX0NUyv60flYuEg+vw9TGBZ/EhtZDWEljVOi0ZMDg+ZhNUCF9VUf71deREQbEnmgbf1xMcxTajABCgwGdtl3g4U+ObcHu+EIwt77OjXn/3NCEHa6gpBazXIKSL7xStlQmp3ohBBnkz346yDUZMcmB4YriNy/10dZWwJVn0trdzV/Vtd/rvS6MlqvWg==
  • 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=/cBNynxtWFQG6rFHdjzUL5ny1LFAiYA1K+GrixRua6E=; b=eBoKjsv/TVlRKNE7F+us/Iut62llupTSld8rRdISQR/mICFk37Oo18TDwQ0LKrN+ONSQY4sw2Nw/PIIlT/f4vlmS8fEYZ3Yc+Y98YnUsMxNot+PUALgCiM3tlyr7PvYmEwdsF8nE7KWBqLRTsqW+4ibPBHvSnLwjSEiLAh0/z2YJOfJqBd3N09B60P9C6S/tVsMzDGJIUxE6Fij2AgdHFbzMLlhuJcw09yrLGWqIdZ+CpquzGgXhg0ZwDofS9v4Ny4jL80FNRkyi6jIigGs2c/FymVjKIzkRE4ACFEkBY0S6Q6u36g58j1j0KDrW+bRaP7fNyF8M08JKPdTiXAnqXg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=kK3CDf/NuXXDKK2hdtT6iQoXnQ30PCvNOIa9hxr6cWpYALSYv+VfZ64bvktX5ePHbvkj0lZ12Ks8N+kf11Jynsw+54KNsLKdKmaeKpLACvABgPaxy9CTCBIRCq3j/I1nHakWTvug26CGw2bHRi2td3dED1bgr0uLgvuTzQPGNr3AKYeuANUThnixjC5S4pE0dvgQdiitot5mWosLrKX2QTkQzF698wKf8eiktq4I/zyD4E16AlFR22VlxkfOINiugsRx9ptPlqe2f4nL5QgFHVZvtchOuoSN8VjpVfE/R8oXSERncS676aBSB/7J53RJkL5p00Oiovhz64K3Zq/j7w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ytg8y4OOZrPJ6aqlefv+2Xznf9MdKvaVciekEr1a/5+DMjLpweB+ynwwpSzbIPKsVrOeyMl1DL+k/7HIr6nLtTre1VShbvjRMTc8m0dCC0tQH0+EAbHDnPNtKeHIUe5wfLWUFv/BO8/VsDwl04mgtKBH14Cdj7xvY8gPYoMplgp75eq+UWQqM0Zi/zoOnsxSU3GapuMsRxlshhfP1I6A3D7DwYVrGHsMd/ffnjRFM2VdyMQ6yeJ/xDHzdkf19HzktjfoKOxmwqL2k5LsS1YErDy+W4/PpCP9f3xUD246NnAxjwFHxODLlAsPP6xvwWMDbrou+VBeI+QTdd0dX3HKHw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 07 Sep 2022 14:19:24 +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: AQHYwfap3Ps5bdyrBEC9qTgdrU+ZKq3T8h2AgAAThAA=
  • Thread-topic: [PATCH v4 6/7] xen/arm: introduce new xen,enhanced property value

Hi Julien,

> On 7 Sep 2022, at 2:09 pm, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Rahul
> 
> On 06/09/2022 14:40, Rahul Singh wrote:
>> Introduce a new "xen,enhanced" dom0less property value "no-xenstore" to
>> disable xenstore interface for dom0less guests.
>> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
>> ---
>> Changes in v4:
>>  - Implement defines for dom0less features
>> Changes in v3:
>>  - new patch in this version
>> ---
>>  docs/misc/arm/device-tree/booting.txt |  4 ++++
>>  xen/arch/arm/domain_build.c           | 10 ++++++----
>>  xen/arch/arm/include/asm/kernel.h     | 23 +++++++++++++++++++++--
>>  3 files changed, 31 insertions(+), 6 deletions(-)
>> diff --git a/docs/misc/arm/device-tree/booting.txt 
>> b/docs/misc/arm/device-tree/booting.txt
>> index 98253414b8..1b0dca1454 100644
>> --- a/docs/misc/arm/device-tree/booting.txt
>> +++ b/docs/misc/arm/device-tree/booting.txt
>> @@ -204,6 +204,10 @@ with the following properties:
>>      - "disabled"
>>      Xen PV interfaces are disabled.
>>  +    - no-xenstore
>> +    Xen PV interfaces, including grant-table will be enabled but xenstore
> 
> Please use "All default" in front. So it is clear that everything is enabled 
> but xenstore.

Ack. 
> 
>> +    will be disabled for the VM.
>> +
>>      If the xen,enhanced property is present with no value, it defaults
>>      to "enabled". If the xen,enhanced property is not present, PV
>>      interfaces are disabled.
>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>> index 707e247f6a..0b164ef595 100644
>> --- a/xen/arch/arm/domain_build.c
>> +++ b/xen/arch/arm/domain_build.c
>> @@ -2891,7 +2891,7 @@ static int __init prepare_dtb_domU(struct domain *d, 
>> struct kernel_info *kinfo)
>>              goto err;
>>      }
>>  -    if ( kinfo->dom0less_enhanced )
>> +    if ( kinfo->dom0less_feature & DOM0LESS_ENHANCED_NO_XS )
>>      {
>>          ret = make_hypervisor_node(d, kinfo, addrcells, sizecells);
>>          if ( ret )
>> @@ -3209,10 +3209,12 @@ static int __init construct_domU(struct domain *d,
>>           (rc == 0 && !strcmp(dom0less_enhanced, "enabled")) )
>>      {
>>          if ( hardware_domain )
>> -            kinfo.dom0less_enhanced = true;
>> +            kinfo.dom0less_feature = DOM0LESS_ENHANCED;
>>          else
>> -            panic("Tried to use xen,enhanced without dom0\n");
>> +            panic("At the moment, Xenstore support requires dom0 to be 
>> present\n");
>>      }
>> +    else if ( rc == 0 && !strcmp(dom0less_enhanced, "no-xenstore") )
>> +        kinfo.dom0less_feature = DOM0LESS_ENHANCED_NO_XS;
>>        if ( vcpu_create(d, 0) == NULL )
>>          return -ENOMEM;
>> @@ -3252,7 +3254,7 @@ static int __init construct_domU(struct domain *d,
>>      if ( rc < 0 )
>>          return rc;
>>  -    if ( kinfo.dom0less_enhanced )
>> +    if ( kinfo.dom0less_feature & DOM0LESS_XENSTORE )
>>      {
>>          ASSERT(hardware_domain);
>>          rc = alloc_xenstore_evtchn(d);
>> diff --git a/xen/arch/arm/include/asm/kernel.h 
>> b/xen/arch/arm/include/asm/kernel.h
>> index c4dc039b54..ad240494ea 100644
>> --- a/xen/arch/arm/include/asm/kernel.h
>> +++ b/xen/arch/arm/include/asm/kernel.h
>> @@ -9,6 +9,25 @@
>>  #include <xen/device_tree.h>
>>  #include <asm/setup.h>
>>  +/*
>> + * List of possible features for dom0less domUs
>> + *
>> + * DOM0LESS_ENHANCED_NO_XS: 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_NO_XS.
>> + * 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_NO_XS  BIT(0, U)
>> +#define DOM0LESS_XENSTORE        BIT(1, U)
>> +#define DOM0LESS_ENHANCED        (DOM0LESS_ENHANCED_NO_XS | 
>> DOM0LESS_XENSTORE)
>> +
>>  struct kernel_info {
>>  #ifdef CONFIG_ARM_64
>>      enum domain_type type;
>> @@ -36,8 +55,8 @@ struct kernel_info {
>>      /* Enable pl011 emulation */
>>      bool vpl011;
>>  -    /* Enable PV drivers */
>> -    bool dom0less_enhanced;
>> +    /* Enable/Disable PV drivers interface,grant table, evtchn or xenstore 
>> */
> 
> The part after "," is technically wrong because it also affects other 
> interfaces. But I would drop it to avoid any stale comment (we may add new 
> one in the futures).

Ok . I will remove and will comment like this:
/* Enable/Disable PV drivers interfaces */
 
Regards,
Rahul


 


Rackspace

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