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

Re: [PATCH 01/11] xen: reserve flags for internal usage in xen_domctl_createdomain


  • To: Julien Grall <julien@xxxxxxx>, Penny Zheng <penny.zheng@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 11 Oct 2021 13:13:02 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=hQXq58kpHN9JB/4f2ub/bjpEwq412Za9mK4KLYwjdmY=; b=OJkpTp5tyIqiztd3QX85KXcngKBTERLPqZ5W5xEcnr2YpF714v6vSgVAO0xKTPtESsujBNPGEj3XG2zA04aKzIzEQrLpc0S8IiNMSQK/16fqhlwQ5STW8mbg+zo66VFc81PJekDSxnito1HlkMEqoBPLzpdwgs35jWGtFzgskws9RmupUPMXpJjJHiZnJBPhMmXnBpp1ZDsi1+izW9g5ioTYH772AyCjAIpj+drTb9vVsECBgEea4r8AVLp1O+4d+FZZ7W4A9uPrA2KoGbMlJrUyQDy76EAJf06/hdm3i68kWhxqZ1V1E8zYdAh48ev4TH/lsCfQppOFEj3PPlXYwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UIa5sPcuNAlWJ2OhtkdcavgWZ+X1bNWh6b+5fEvW3JtZ4/T35yI2nc0fWoB1LwNjrSRDseHkClqdHWgQePec2jVKVZDPtnzsB6Jolrsw9pPsa8t8UFem+K6VKOV8TQVZtFsPbobZOemwuCjKG1vlXCe/NziQ5TMvY6poEOdOPyRpnQlYm5D5KU5DMNQziRwJvOZj6tYUAHaX6swkfhy0QdT1VIFGIQDtM67uqo2AUlB1928JVYX8K0MYzt0CKFcT+cJRHu7GzLn+sr6kPk9wK2N2qYJb6OgJUqTIR737ztf4PmcmatzJfk05j+iRXW76+oYs4e6yF+/OBgsOXCtxuw==
  • Authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand.Marquis@xxxxxxx, Wei.Chen@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx
  • Delivery-date: Mon, 11 Oct 2021 11:13:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.10.2021 12:45, Julien Grall wrote:
> Hi Jan,
> 
> On 28/09/2021 13:05, Jan Beulich wrote:
>> On 23.09.2021 11:54, Julien Grall wrote:
>>> On 23/09/2021 08:11, Penny Zheng wrote:
>>>> From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
>>>>
>>>> We are passing an extra special boolean flag at domain creation to
>>>> specify whether we want to the domain to be privileged (i.e. dom0) or
>>>> not. Another flag will be introduced later in this series.
>>>>
>>>> Reserve bits 16-31 from the existing flags bitfield in struct
>>>> xen_domctl_createdomain for internal Xen usage.
>>>
>>> I am a bit split with this approach. This feels a bit of a hack to
>>> reserve bits for internal purpose in external headers. But at the same
>>> time I can see how this is easier to deal with it over repurposing the
>>> last argument of domain_create().
>>
>> I actually have trouble seeing why that's easier. It is a common thing
>> to widen a bool to "unsigned int flags" when more than one control is
>> needed.
> 
> I was suggesting this is easier for the following two reasons:
>    1) All the option flags (internal and external) are in a single place.
>    2) Reduce the risk to make a mistake when widening the field. In 
> particular in the context of backporting. Although, this looks unlikely 
> here.
> 
>> Plus this makes things needlessly harder once (in the future)
>> the low 16 bits are exhausted in the public interface.
> 
> That's why I suggested this sounds like a hack. At the same time the 
> split between external vs internal option is a bit more a pain for the 
> developper. So I didn't feel pushing for one vs the other. That said, I 
> will not argue against if you want to push for repurposing the last 
> argument.

In which case - Penny, would you please change the patch accordingly?

Jan




 


Rackspace

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