[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 02/18] introduction of generalized boot info
- To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 19 Jul 2022 15:11:55 +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=GMIYP5hlYXCfohQKOngoeBwMxv8+5FmVs6MIHhxCB88=; b=SX65p7GBXs9hMxl0yw85QSzompWouZU3wfDJ4ir95HSlfIt2T+Kbh3Xq2Rhz/t8mKfEPiTDa5BPMmWaZH0Y1skEKi6jTXxRtT/PUynZ3fyrmQ9AxwfV6+wgnH44UrdCHZ6WeKh/nzWjZnyhVbhcNISJGPuHAzULjb40HpbDf9MccYO5vkDQGS3hV8DJXmapxUNjSkFZCCUWmQlzTBG+/GOS0VkNPamYPiIPLoa9KmhX+npdG+pkp3bUlpTygs+tsr7IIx1ugUmlBNEWHEk+1tiNYDtBWzijvwI9OahWWFZqSB2pv8mihDesIfHRUw9MI4KjJH6ovqcKALnpgvfCpvg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SzufNF2FX6yfgxE/lk4IZ9hc+Dt7PwZChVxoSuUnz1gmsILS2S2LTuFkRcZiCPqsXveaF1W1W80W0myyPduN2m1eXm5xXcgFeaCOOOPq6GWHeArAEtTByr4KxitMQGZ8+fFtcztVy3cyHnElTMuivW/LcGNlexyNSfWgkDH2OAmwUnb4EvPoE/XM6CjWO4/Xvt2GUVWFnLRXNJhE/GhArB0sQBh91NBe+cxZYeH7JZpTZ6BEYWfOcyvjihmaJE9U5vrQ53thk7E9FAs4fMhNRq32ZEbKoigM2cK32tQc2xvKDP/pBBsrDUKJV78COoifBoNiEplKuszQZicB+ngN3Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: scott.davis@xxxxxxxxxx, christopher.clark@xxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 19 Jul 2022 13:12:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 06.07.2022 23:04, Daniel P. Smith wrote:
> --- /dev/null
> +++ b/xen/arch/x86/include/asm/bootinfo.h
> @@ -0,0 +1,48 @@
> +#ifndef __ARCH_X86_BOOTINFO_H__
> +#define __ARCH_X86_BOOTINFO_H__
> +
> +/* unused for x86 */
> +struct arch_bootstring { };
> +
> +struct __packed arch_bootmodule {
> +#define BOOTMOD_FLAG_X86_RELOCATED 1U << 0
Such macro expansions need parenthesizing.
> + uint32_t flags;
> + uint32_t headroom;
> +};
Since you're not following any external spec, on top of what Julien
said about the __packed attribute I'd also like to point out that
in many cases here there's no need to use fixed-width types.
> +struct __packed arch_boot_info {
> + uint32_t flags;
> +#define BOOTINFO_FLAG_X86_MEMLIMITS 1U << 0
> +#define BOOTINFO_FLAG_X86_BOOTDEV 1U << 1
> +#define BOOTINFO_FLAG_X86_CMDLINE 1U << 2
> +#define BOOTINFO_FLAG_X86_MODULES 1U << 3
> +#define BOOTINFO_FLAG_X86_AOUT_SYMS 1U << 4
> +#define BOOTINFO_FLAG_X86_ELF_SYMS 1U << 5
> +#define BOOTINFO_FLAG_X86_MEMMAP 1U << 6
> +#define BOOTINFO_FLAG_X86_DRIVES 1U << 7
> +#define BOOTINFO_FLAG_X86_BIOSCONFIG 1U << 8
> +#define BOOTINFO_FLAG_X86_LOADERNAME 1U << 9
> +#define BOOTINFO_FLAG_X86_APM 1U << 10
> +
> + bool xen_guest;
As the example of this, with just the header files being introduced
here it is not really possible to figure what these fields are to
be used for and hence whether they're legitimately represented here.
> + char *boot_loader_name;
> + char *kextra;
const?
Jan
|