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

Re: [PATCH v5 02/11] xen: introduce CDF_directmap


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 9 Feb 2022 14:21:02 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • 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=IrQIcCnh+uqnDNwC2NvysJnfMKDvli7VUYxc9MRsG/4=; b=DAFzG5f+e1Eiw2A2IBdHcogMby7Y/PgzanLFsOtrOMLXr1JZVRi+YgmczS6KZrPOA6wxNpEZVliiJ/5TbkjNfkLzbkSycifXF6fnlwdWmp1edtb2pp4E30wzQS6RMpwvUZa5hh3HCElUaWsrHNEcdGTTraQtjE9v4mHMLv2lfZFPrCsJNpHKX+hGuzmQEoTjN41o7izpmDNJ5TNTms62dLMTRvtYLKC5lDklPtDuKUUTftSNk4bmqP95kWRSGHE9BIeOyneZXNdRqP5HzCsJ5C7krHR3UaRJGsRgapcsOWw738m/1BKIut0eEQ1UiyjCPl9LpP/S4D5MOJsekJD4Bg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iFPKg1HOLZ2u+q9BdEdhfr+j2Z/vZfEp9Jh9eGp8QuTB/DuhvqN5js9z/TjQYbsaOoYAJhrUBnqYtsAcFRdF+OMF/jAOJkKgStCmJiSKZr3SgvUETiJt9DpvMqlnw/jYS0ZZWO0uu1hVPbjErTN0apvdEeJ2vqQRVsL3lTXxAWLgQD/5dXegwAJl3291zP9DgQLhtUdGqOCUFhT/YvsGgU5qmohP+1x1S0ItN0ZiKM8nBNUD/hkqWloh7XlW9sIqaV1fmacl4I+sd0GEfpxdpCnvtief1lWYuz6rNOcbfb6K4XDF2RoTZc3fuIkLVvG4KdjxuhFx2S2v3Bv4CWzkgg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand.Marquis@xxxxxxx, Wei.Chen@xxxxxxx, Penny Zheng <penny.zheng@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx
  • Delivery-date: Wed, 09 Feb 2022 13:21:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.02.2022 13:42, Julien Grall wrote:
> On 27/01/2022 07:49, Penny Zheng wrote:
>> --- a/xen/arch/x86/domain.c
>> +++ b/xen/arch/x86/domain.c
>> @@ -722,7 +722,8 @@ static bool emulation_flags_ok(const struct domain *d, 
>> uint32_t emflags)
>>   }
>>   
>>   int arch_domain_create(struct domain *d,
>> -                       struct xen_domctl_createdomain *config)
>> +                       struct xen_domctl_createdomain *config,
>> +                       unsigned int flags)
> 
> Shouldn't we return an error if the flag CDF_directmap is on x86? The 
> other alternative is to...

Hmm, maybe rather assert that the flag is not set? But ...

>> --- a/xen/include/xen/domain.h
>> +++ b/xen/include/xen/domain.h
>> @@ -31,6 +31,8 @@ void arch_get_domain_info(const struct domain *d,
>>   /* CDF_* constant. Internal flags for domain creation. */
>>   /* Is this a privileged domain? */
>>   #define CDF_privileged           (1U << 0)
>> +/* Should domain memory be directly mapped? */
>> +#define CDF_directmap            (1U << 1)
> 
> ... protect this with #ifdef CONFIG_ARM.

... I don't mind an #ifdef here, apart from the general concern over
CONFIG_<arch> uses in common code.

Jan




 


Rackspace

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