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

Re: [PATCH v3 10/14] x86/vmx: move declarations used only by vmx code from vmx.h to private headers


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 28 Feb 2023 09:05:57 +0100
  • 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=ViZO164QXL7VhNXQ52sU14Q8GwFpea/e/CMUIxCpHME=; b=g1bwVU3UlAdXGjJ6B7vPSvy9qv7RkkJRoKXp5WFud+HNklx5FfYXN7/vguuezrZ5skF6wK+XO+w2b/FVrvx+uDcSC+BPqvAz3YimQlS56eVtN6SQFB95yvu0Siaapys8DqPLiQIBjK8lQ3MI/t3TEe8zaFPIFSotr1sjPX1hpMzZw3wQcdmZjmkWzsU6JPC+j1SV9+n3AqnhAhP8rk2B4n9gYiqazud1vfGOTtjubqyMo3nTOYI0Z2kM4EJRDzj0j6UeNxqpnkoxHsJIGJCnORPkKA38bEl8vBnkmaoRE7avapw64cnbuZJWnfnwDMrf3xmSyk4dgmIxssZZ0hIxWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=djpdxQGO6nqURVHb8OnVqpIjdGvrAcXifJ1GI8rz/aXeDCe3Dq6XfyFW1oSt96DD6siafFT2upe1Uli8rCY8wWybQtLIUvu6p532SYFT45OVzJH05xBNSNtLYnmLWQJqQaR61xLbalZdYY8FZ6J4b8tAkAtP29uwrRnCiwURQ9ccwmU7vvTVYprKp43g4nBkot9PQRNCCSkIh2HIUwaNA8MKkm3jSrRNFmis18/8cfOETl/5jkEsCJXTBZDIqhCt6v9Xpdy42xmhJ411CL4NvEioFZDtkSDU2Kkkp4kY6vmng/89fcLZWwl1LrFHqRLppAMdzp3aSIOlYh4ptu37Eg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 28 Feb 2023 08:06:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.02.2023 08:36, Xenia Ragiadakou wrote:
> 
> On 2/27/23 17:25, Jan Beulich wrote:
>> On 24.02.2023 19:50, Xenia Ragiadakou wrote:
>>> --- /dev/null
>>> +++ b/xen/arch/x86/hvm/vmx/pi.h
>>> @@ -0,0 +1,78 @@
>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>> +/*
>>> + * pi.h: VMX Posted Interrupts
>>> + *
>>> + * Copyright (c) 2004, Intel Corporation.
>>> + */
>>> +
>>> +#ifndef __X86_HVM_VMX_PI_PRIV_H__
>>> +#define __X86_HVM_VMX_PI_PRIV_H__
>>
>> I can see that you need something to disambiguate the two vmx.h. But
>> here you don't need the PRIV infix, do you? Even in the private vmx.h
>> I'd like to ask to consider e.g. __VMX_H__ as the guard (and then
>> __PI_H__ here), rather than one which doesn't really match the
>> filename.
> 
> I do agree that adding _PRIV_ is off target.
> For the purpose of disambiguation, the header guards need to conform to 
> a well specified pattern guaranteed not to be used for anything else.
> For that reason I would suggest the guard to include the path, not just 
> the file name.

But as we see the path can be ambiguous, unless all non-private headers
had an "INCLUDE" infix. Hence my proposal would be no path at all for
private headers, and path (as we frequently but perhaps not consistently
have it) for non-private ones.

> In any case, the pattern that is used to generate the header guards 
> should be mentioned in the coding style doc.

Perhaps.

Jan




 


Rackspace

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