All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii <oleksii.kurochko@gmail.com>
To: Michal Orzel <michal.orzel@amd.com>, xen-devel@lists.xenproject.org
Cc: Shawn Anastasio <sanastasio@raptorengineering.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	 "Daniel P. Smith" <dpsmith@apertussolutions.com>
Subject: Re: [PATCH v6 1/8] xen/device-tree: Move Arm's setup.c bootinfo functions to common
Date: Mon, 15 Jul 2024 15:42:13 +0200	[thread overview]
Message-ID: <278883e1998dd91c2f788464ca933bdbf05370f4.camel@gmail.com> (raw)
In-Reply-To: <98144517-5abe-4a82-81b4-6a459826fb2f@amd.com>

Hi Michal,

On Mon, 2024-07-15 at 12:15 +0200, Michal Orzel wrote:
> Hi Oleksii,
> 
> In general, the patch looks ok (apart from Jan comments). Just a
> couple of remarks.
> 
> On 12/07/2024 18:22, Oleksii Kurochko wrote:
> > 
> > 
> > From: Shawn Anastasio <sanastasio@raptorengineering.com>
> > 
> > Arm's setup.c contains a collection of functions for parsing memory
> > map
> > and other boot information from a device tree. Since these routines
> > are
> > generally useful on any architecture that supports device tree
> > booting,
> > move them into xen/common/device-tree.
> > 
> > Suggested-by: Julien Grall <julien@xen.org>
> > Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> > ---
> > Changes in V6:
> >  - update the version of the patch to v6, to show that it is based
> >    on the work done by Shawn in the patch v4.
> > ---
> > Changes in V5:
> >  - add xen/include/xen/bootfdt.h to MAINTAINERS file.
> >  - drop message "Early device tree parsing and".
> >  - After rebase on top of the current staging the following changes
> > were done:
> >    - init bootinfo variable in <common/device-tree/bootinfo.c> with
> > BOOTINFO_INIT;
> >    - update the code of dt_unreserved_regions():
> >        CONFIG_STATIC_SHM related changes and getting of
> > reserved_mem
> >        bootinfo_get_shmem() ??
> >    - update the code of meminfo_overlap_check():
> >        add check ( INVALID_PADDR == bank_start ) to if case.
> >    - update the code of check_reserved_regions_overlap():
> >        CONFIG_STATIC_SHM related changes.
> >    - struct bootinfo was updated ( CONFIG_STATIC_SHM changes )
> >    - add shared_meminfo ( because of CONFIG_STATIC_SHM )
> >    - struct struct membanks was update with __struct group so
> > <xen/kernel> is
> >      neeeded to be included in bootfdt.h
> >    - move BOOTINFO_ACPI_INIT, BOOTINFO_SHMEM_INIT, BOOTINFO_INIT to
> > generic bootfdt.h
> >    - bootinfo_get_reserved_mem(), bootinfo_get_mem(),
> > bootinfo_get_acpi(),
> >      bootinfo_get_shmem() and bootinfo_get_shmem_extra() were moved
> > to xen/bootfdt.h
> >  - s/arm32/CONFIG_SEPARATE_XENHEAP/
> >  - add inclusion of <xen/macros.h> because there are function in
> > <xen/bootfdt.h> which
> >    are using container_of().
> >  ---
> > Changes in v4:
> >   - create new xen/include/bootinfo.h rather than relying on arch's
> >     asm/setup.h to provide required definitions for bootinfo.c
> >   - build bootinfo.c as .init.o
> >   - clean up and sort bootinfo.c's #includes
> >   - use CONFIG_SEPARATE_XENHEAP rather than CONFIG_ARM_32 to guard
> >     xenheap-specific behavior of populate_boot_allocator
> >   - (MAINTAINERS) include all of common/device-tree rather than
> > just
> >     bootinfo.c
> > ---
> >  MAINTAINERS                       |   2 +
> >  xen/arch/arm/include/asm/setup.h  | 187 +-----------
> >  xen/arch/arm/setup.c              | 432 --------------------------
> > --
> >  xen/common/Makefile               |   1 +
> >  xen/common/device-tree/Makefile   |   1 +
> >  xen/common/device-tree/bootinfo.c | 459
> > ++++++++++++++++++++++++++++++
> >  xen/include/xen/bootfdt.h         | 196 +++++++++++++
> >  7 files changed, 660 insertions(+), 618 deletions(-)
> >  create mode 100644 xen/common/device-tree/Makefile
> >  create mode 100644 xen/common/device-tree/bootinfo.c
> >  create mode 100644 xen/include/xen/bootfdt.h
> > 
> 
> [...]
> 
> > diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h
> > new file mode 100644
> > index 0000000000..7cd45b3d4b
> > --- /dev/null
> > +++ b/xen/include/xen/bootfdt.h
> > @@ -0,0 +1,196 @@
> > +#ifndef __XEN_BOOTFDT_H__
> AFAIR, to avoid violating MISRA rule 21.1, we should avoid
> introducing new macros with double underscore.
I will update that in the next patch version.

> 
> > +#define __XEN_BOOTFDT_H__
> > +
> > +#include <xen/types.h>
> > +#include <xen/kernel.h>
> > +#include <xen/macros.h>
> > +
> > +#define MIN_FDT_ALIGN 8
> > +#define MAX_FDT_SIZE SZ_2M
> 2M blob limit is Arm64 specific. What will be the limit on RISCV?
> Shouldn't it be moved to some arch specific file?
Agree, good point.

I should drop that definition here and make it arch specific. I have to
update my patch series where I am introducing BOOTFDT_MAX_SIZE ( or
something similar ) in riscv/config.h.

Thanks.

~ Oleksii




  reply	other threads:[~2024-07-15 13:42 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 16:22 [PATCH v2 0/8] RISCV device tree mapping Oleksii Kurochko
2024-07-12 16:22 ` [PATCH v6 1/8] xen/device-tree: Move Arm's setup.c bootinfo functions to common Oleksii Kurochko
2024-07-15  8:36   ` Jan Beulich
2024-07-15 10:15   ` Michal Orzel
2024-07-15 13:42     ` Oleksii [this message]
2024-07-12 16:22 ` [PATCH v6 2/8] xen/common: Move Arm's bootfdt.c " Oleksii Kurochko
2024-07-12 16:22 ` [PATCH v2 3/8] xen/riscv: enable CONFIG_HAS_DEVICE_TREE Oleksii Kurochko
2024-07-15  8:40   ` Jan Beulich
2024-07-12 16:22 ` [PATCH v2 4/8] xen/riscv: setup fixmap mapping Oleksii Kurochko
2024-07-21  8:46   ` Julien Grall
2024-07-22 14:31     ` Oleksii
2024-07-22 14:44       ` Julien Grall
2024-07-23 12:58     ` oleksii.kurochko
2024-07-23 13:32       ` Julien Grall
2024-07-23 13:27     ` oleksii.kurochko
2024-07-23 13:33       ` Julien Grall
2024-07-23 13:38         ` oleksii.kurochko
2024-07-22 12:42   ` Jan Beulich
2024-07-22 14:36     ` Oleksii
2024-07-22 15:25       ` Jan Beulich
2024-07-22 17:04         ` oleksii.kurochko
2024-07-23 13:34           ` oleksii.kurochko
2024-07-12 16:22 ` [PATCH v2 5/8] xen/riscv: introduce asm/pmap.h header Oleksii Kurochko
2024-07-21  8:51   ` Julien Grall
2024-07-22 12:58     ` Jan Beulich
2024-07-22 14:57       ` Julien Grall
2024-07-22 14:40     ` Oleksii
2024-07-22 12:54   ` Jan Beulich
2024-07-22 14:44     ` Oleksii Kurochko
2024-07-22 14:48       ` Julien Grall
2024-07-22 17:09         ` Oleksii Kurochko
2024-07-22 17:21           ` Julien Grall
2024-07-23  8:02             ` Oleksii Kurochko
2024-07-23  8:36               ` Jan Beulich
2024-07-23  8:55                 ` oleksii.kurochko
2024-07-23 10:02                   ` Jan Beulich
2024-07-23 15:36                     ` oleksii.kurochko
2024-07-23 15:49                       ` Julien Grall
2024-07-23 17:25                         ` oleksii.kurochko
2024-07-23 17:28                           ` oleksii.kurochko
2024-07-23 18:44                             ` Julien Grall
2024-07-12 16:22 ` [PATCH v2 6/8] xen/riscv: introduce generic Xen page table handling Oleksii Kurochko
2024-07-21  9:02   ` Julien Grall
2024-07-22  6:59     ` Jan Beulich
2024-07-22 14:51     ` Oleksii
2024-07-12 16:22 ` [PATCH v2 7/8] xen/riscv: select CONFIG_GENREIC_PT Oleksii Kurochko
2024-07-12 16:22 ` [PATCH v2 8/8] xen/riscv: introduce early_fdt_map() Oleksii Kurochko
2024-07-15  8:52   ` Jan Beulich
2024-07-15 13:58     ` Oleksii
2024-07-15 14:58       ` Jan Beulich
2024-07-15 15:00         ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=278883e1998dd91c2f788464ca933bdbf05370f4.camel@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.