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

Re: Definition of mfn_t in x86's hvm/grant_table.h


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 16 Oct 2023 13:20:29 +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=TbBq8pRSxRP44XmGxkT84V0CiQz4ir70N6Vc0YoZsNc=; b=FjCKPMe65Dz3DTglUzbFxUSGUB+DSgpOMzvlRlQQMtsGnPxHfhzQekQ4xXhk3cH5YFiAr7WKRAUEQVa+w5CBtPrsy6jUdeKonBpKGVmxGC808Neqy8fjSCXIiAIHF23HodQ1lRFg6Gg58HDKmsIoWF5OIpCy32+vkM7t8ywI6Q2Q+74bo+kn+NzI8IcFjSWtOT43Gmv7a6ncB+mcMF6f0vBpptEIoVBaev3wnOYAEftKJY8qVyUcnwNLJbjU+ML6bFdEfBbi2hdKQVRMbwKedheV5B9L73x89CoWZ3urYEL2gdvBUxB7R4a4XzKkiVsDTFEzrOyxiYyzKWllvEJxHA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gY8qP2lzFJHotdp5KaNhk4JoVPk/azhcQ9Myq/jEPRZdPvA/QtwLA1cbSnpLx0Hs5AtpV+cZqEmsTPYmnBJzkvou3rPS5rercr3e3vMfbr9AGSzpve5+CW45YlycAEmKOkTZeLD82qUX4n3SBVLVbrAyOwSNeADpoe8diVveyld9XnfbO72+zBh4p6er8cQh8Jr78CyQPzwjcJf2XKZSJbfdkigT4s4CtVRT1VrVnt9Ezu6h1KTrUP3TLOXIlYEyF4AuRN38To7PY40vDPZd5SQ1aq0QEgOOzWeTzvt47jHxO5X/+ONMFFhfjbwiMXO/0nc8D8zrtXGD7JNO3fiQhQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, roger.pau@xxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 16 Oct 2023 11:21:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.09.2023 10:51, Nicola Vetrini wrote:
> while fixing a violation of R8.4 related to a missing include in 
> x86/hvm/grant_table.c
> I included <asm/hvm/grant_table.h>, since that file contains just the 
> declarations needed
> by the .c file. However, since the declaration uses the type mfn_t, 
> which is defined in an
> header not included from hvm/grant_table.h I'm wondering what is 
> preferred:
> 1. include #include <asm/paging.h> in asm/hvm/grant_table.h, so that 
> mfn_t can be used
>    without relying on other headers using this one to provide it.
> 2. include <asm/grant_table.h> in x86/hvm/grant_table.c, which includes 
> more declarations
>    than needed, but has all type definitions.
> 
> I prefer (1), but (2) does not have major downsides either.

Why asm/paging.h? xen/mm-frame.h is what you need for mfn_t. I'd be fine
with (1) in that case, but if it was asm/paging.h that's needed (for
another reason) I guess I'd prefer (2).

Jan



 


Rackspace

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