[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: Penny Zheng <penny.zheng@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 28 Sep 2021 14:05:39 +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; bh=OVk5ot41PxQFmAqjFPSjiuilqpeppXXrDTGViWAZDr0=; b=AXl/CrbKe/QAX35qtmVNb1pNPGNIxy4R6TaUwMKmZT72I8z4ObAR0fIm23ppFZdB3RgHfuMB/TQfcmdPS2nBMNfBA5MQOAfNIljL3s9Sq25P+jtQe/AV2DnElmt39uyBehcLZzCU1pCZStWeQZJ7caZruxSCmHbNK/Ot8eaDD/LzPavyTaHK4sCBuxWD4LWa/jrsx2z1Nn4Gqr+l84WoLsdEKo/fl3WmdVUS4S7PkHJ0wH2pp1IcFBu9x57pxPW0UtZvHHYMAnYBcC70rzcRbdVjfpx9zkqNrycf07/V2RStCHsANavY6xNztWKeuT1e53BMcpDnBvhOXL9N53YHDA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cZfD9QWI4BGkgo3z7EqK2IRrA+LMnL2hIHFnHd89N2ctpn0jwME4BCBjg0PCzo7gZ+YunAe8texl/LiS9xlQnC9IdtQGWKYFwLqvsZY/1z/JS8SRungzeTcUnu2U7ou/xRMZE1O2l+/CI190GWjSSlfn9FPxdqyrlnBscywPxCCKjZwq/yvebXun2puRo4aNlHJ1v0YYDRl4MCyMlBAp37MaQEILDIaapyE/Sj4jPnSiZbnMQXiHEGTtnlyE4iv6blWT0ysYS6j8ZLkx1tkNj+VddCN8FaIyqh7wAXbyFmbfJLaIpJ7ZNwOAC3QOoY3TJZmVuJrBdO8jRqrjzERxLw==
- Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
- Cc: Bertrand.Marquis@xxxxxxx, Wei.Chen@xxxxxxx, Julien Grall <julien@xxxxxxx>
- Delivery-date: Tue, 28 Sep 2021 12:05:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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. Plus this makes things needlessly harder once (in the future)
the low 16 bits are exhausted in the public interface.
Jan
|