[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Definition of mfn_t in x86's hvm/grant_table.h
On 16/10/2023 13:20, Jan Beulich wrote: 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 includesmore 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 finewith (1) in that case, but if it was asm/paging.h that's needed (for another reason) I guess I'd prefer (2). Jan This is part of a patch series now [1].I put asm/paging because asm/grant_table uses it and I wasn't entirely sure whether including mm-frame directly was the right thing to do. I don't remember whether I actually tested that solution, but changing the included header should not be problematic.[1] https://lore.kernel.org/xen-devel/d49c648e940a651790fa6075a3fde40009501262.1696833629.git.nicola.vetrini@xxxxxxxxxxx/ -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |