From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f66.google.com ([209.85.166.66]:40344 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbfKZLmz (ORCPT ); Tue, 26 Nov 2019 06:42:55 -0500 Received: by mail-io1-f66.google.com with SMTP id b26so18265044ion.7 for ; Tue, 26 Nov 2019 03:42:54 -0800 (PST) MIME-Version: 1.0 References: <64a5d6c94d331058331af7d191d2cdbe870d009b.1573179553.git.thehajime@gmail.com> In-Reply-To: From: Octavian Purdila Date: Tue, 26 Nov 2019 13:42:43 +0200 Message-ID: Subject: Re: [RFC v2 03/37] lkl: architecture skeleton for Linux kernel library Content-Type: text/plain; charset="UTF-8" Sender: linux-arch-owner@vger.kernel.org List-ID: To: Richard Weinberger Cc: Hajime Tazaki , linux-um , Linux-Arch , Patrick Collins , Levente Kurusa , Matthieu Coudron , Conrad Meyer , Jens Staal , Motomu Utsumi , Lai Jiangshan , Akira Moroo , Petros Angelatos , Yuan Liu , Xiao Jia , Mark Stillwell , linux-kernel-library , Pierre-Hugues Husson , Michael Zimmermann , Luca Dariz , "Edison M . Castro" On Tue, Nov 26, 2019 at 12:00 AM Richard Weinberger wrote: > > On Fri, Nov 8, 2019 at 6:03 AM Hajime Tazaki wrote: > > > > From: Octavian Purdila > > > > Adds the LKL Kconfig, vmlinux linker script, basic architecture > > headers and miscellaneous basic functions or stubs such as > > dump_stack(), show_regs() and cpuinfo proc ops. > > > > The headers we introduce in this patch are simple wrappers to the > > asm-generic headers or stubs for things we don't support, such as > > ptrace, DMA, signals, ELF handling and low level processor operations. > > > > The kernel configuration is automatically updated to reflect the > > endianness of the host, 64bit support or the output format for > > vmlinux's linker script. We do this by looking at the ld's default > > output format. > > > > Signed-off-by: Andreas Abel > > Signed-off-by: Conrad Meyer > > Signed-off-by: Edison M. Castro > > Signed-off-by: H.K. Jerry Chu > > Signed-off-by: Hajime Tazaki > > Signed-off-by: Jens Staal > > Signed-off-by: Lai Jiangshan > > Signed-off-by: Levente Kurusa > > Signed-off-by: Luca Dariz > > Signed-off-by: Mark Stillwell > > Signed-off-by: Matthieu Coudron > > Signed-off-by: Michael Zimmermann > > Signed-off-by: Motomu Utsumi > > Signed-off-by: Patrick Collins > > Signed-off-by: Petros Angelatos > > Signed-off-by: Pierre-Hugues Husson > > Signed-off-by: Xiao Jia > > Signed-off-by: Yuan Liu > > Signed-off-by: Octavian Purdila > > Can we please have this chain cleaned up? > Please see process/submitting-patches.rst. > > > --- > > MAINTAINERS | 8 + > > arch/um/lkl/.gitignore | 2 + > > arch/um/lkl/Kconfig | 95 ++++++ > > arch/um/lkl/Kconfig.debug | 0 > > arch/um/lkl/configs/lkl_defconfig | 91 ++++++ > > arch/um/lkl/include/asm/Kbuild | 80 +++++ > > arch/um/lkl/include/asm/bitsperlong.h | 11 + > > arch/um/lkl/include/asm/byteorder.h | 7 + > > arch/um/lkl/include/asm/cpu.h | 14 + > > arch/um/lkl/include/asm/elf.h | 15 + > > arch/um/lkl/include/asm/mutex.h | 7 + > > arch/um/lkl/include/asm/processor.h | 60 ++++ > > arch/um/lkl/include/asm/ptrace.h | 25 ++ > > arch/um/lkl/include/asm/sched.h | 23 ++ > > arch/um/lkl/include/asm/syscalls.h | 18 ++ > > arch/um/lkl/include/asm/syscalls_32.h | 43 +++ > > arch/um/lkl/include/asm/tlb.h | 12 + > > arch/um/lkl/include/asm/uaccess.h | 64 ++++ > > arch/um/lkl/include/asm/unistd_32.h | 31 ++ > > arch/um/lkl/include/asm/vmlinux.lds.h | 14 + > > arch/um/lkl/include/asm/xor.h | 9 + > > arch/um/lkl/include/uapi/asm/Kbuild | 9 + > > arch/um/lkl/include/uapi/asm/bitsperlong.h | 13 + > > arch/um/lkl/include/uapi/asm/byteorder.h | 11 + > > arch/um/lkl/include/uapi/asm/siginfo.h | 11 + > > arch/um/lkl/include/uapi/asm/swab.h | 11 + > > arch/um/lkl/include/uapi/asm/syscalls.h | 348 +++++++++++++++++++++ > > I think this is the first big thing which needs a unification. > > In UML we try hard to re-use headers from x86. > We also have some headers in arch/x86/um/. > > LKL should do the same. At least try hard to avoid duplication. > In LKL we tried to avoid coupling the kernel build part to a particular architecture, to make it easier to port it (to different arches, but as well to other OSes or special environments [1][2]). That is the main reason for having two build steps, one for kernel proper, and one for the host. That is why the host part was placed into tools/lkl to make it clear that is not part of the kernel proper. I think this is one of the biggest differences between UML and LKL and it would be helpful to get feedback of what people think of a potential similar split for UML. [1] https://www.haiku-os.org/blog/lucian/2010-07-08_booting_lkl_inside_haiku/ [2] https://github.com/lkl/lkl-ntk-driver-poc From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd44.google.com ([2607:f8b0:4864:20::d44]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZZFC-0001jH-WD for linux-um@lists.infradead.org; Tue, 26 Nov 2019 11:43:00 +0000 Received: by mail-io1-xd44.google.com with SMTP id z26so16646743iot.8 for ; Tue, 26 Nov 2019 03:42:55 -0800 (PST) MIME-Version: 1.0 References: <64a5d6c94d331058331af7d191d2cdbe870d009b.1573179553.git.thehajime@gmail.com> In-Reply-To: From: Octavian Purdila Date: Tue, 26 Nov 2019 13:42:43 +0200 Message-ID: Subject: Re: [RFC v2 03/37] lkl: architecture skeleton for Linux kernel library List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Richard Weinberger Cc: Linux-Arch , Levente Kurusa , Matthieu Coudron , Conrad Meyer , Lai Jiangshan , Jens Staal , Motomu Utsumi , linux-um , Akira Moroo , Petros Angelatos , Yuan Liu , Xiao Jia , Mark Stillwell , linux-kernel-library , "Edison M . Castro" , Patrick Collins , Pierre-Hugues Husson , Michael Zimmermann , Luca Dariz , Hajime Tazaki On Tue, Nov 26, 2019 at 12:00 AM Richard Weinberger wrote: > > On Fri, Nov 8, 2019 at 6:03 AM Hajime Tazaki wrote: > > > > From: Octavian Purdila > > > > Adds the LKL Kconfig, vmlinux linker script, basic architecture > > headers and miscellaneous basic functions or stubs such as > > dump_stack(), show_regs() and cpuinfo proc ops. > > > > The headers we introduce in this patch are simple wrappers to the > > asm-generic headers or stubs for things we don't support, such as > > ptrace, DMA, signals, ELF handling and low level processor operations. > > > > The kernel configuration is automatically updated to reflect the > > endianness of the host, 64bit support or the output format for > > vmlinux's linker script. We do this by looking at the ld's default > > output format. > > > > Signed-off-by: Andreas Abel > > Signed-off-by: Conrad Meyer > > Signed-off-by: Edison M. Castro > > Signed-off-by: H.K. Jerry Chu > > Signed-off-by: Hajime Tazaki > > Signed-off-by: Jens Staal > > Signed-off-by: Lai Jiangshan > > Signed-off-by: Levente Kurusa > > Signed-off-by: Luca Dariz > > Signed-off-by: Mark Stillwell > > Signed-off-by: Matthieu Coudron > > Signed-off-by: Michael Zimmermann > > Signed-off-by: Motomu Utsumi > > Signed-off-by: Patrick Collins > > Signed-off-by: Petros Angelatos > > Signed-off-by: Pierre-Hugues Husson > > Signed-off-by: Xiao Jia > > Signed-off-by: Yuan Liu > > Signed-off-by: Octavian Purdila > > Can we please have this chain cleaned up? > Please see process/submitting-patches.rst. > > > --- > > MAINTAINERS | 8 + > > arch/um/lkl/.gitignore | 2 + > > arch/um/lkl/Kconfig | 95 ++++++ > > arch/um/lkl/Kconfig.debug | 0 > > arch/um/lkl/configs/lkl_defconfig | 91 ++++++ > > arch/um/lkl/include/asm/Kbuild | 80 +++++ > > arch/um/lkl/include/asm/bitsperlong.h | 11 + > > arch/um/lkl/include/asm/byteorder.h | 7 + > > arch/um/lkl/include/asm/cpu.h | 14 + > > arch/um/lkl/include/asm/elf.h | 15 + > > arch/um/lkl/include/asm/mutex.h | 7 + > > arch/um/lkl/include/asm/processor.h | 60 ++++ > > arch/um/lkl/include/asm/ptrace.h | 25 ++ > > arch/um/lkl/include/asm/sched.h | 23 ++ > > arch/um/lkl/include/asm/syscalls.h | 18 ++ > > arch/um/lkl/include/asm/syscalls_32.h | 43 +++ > > arch/um/lkl/include/asm/tlb.h | 12 + > > arch/um/lkl/include/asm/uaccess.h | 64 ++++ > > arch/um/lkl/include/asm/unistd_32.h | 31 ++ > > arch/um/lkl/include/asm/vmlinux.lds.h | 14 + > > arch/um/lkl/include/asm/xor.h | 9 + > > arch/um/lkl/include/uapi/asm/Kbuild | 9 + > > arch/um/lkl/include/uapi/asm/bitsperlong.h | 13 + > > arch/um/lkl/include/uapi/asm/byteorder.h | 11 + > > arch/um/lkl/include/uapi/asm/siginfo.h | 11 + > > arch/um/lkl/include/uapi/asm/swab.h | 11 + > > arch/um/lkl/include/uapi/asm/syscalls.h | 348 +++++++++++++++++++++ > > I think this is the first big thing which needs a unification. > > In UML we try hard to re-use headers from x86. > We also have some headers in arch/x86/um/. > > LKL should do the same. At least try hard to avoid duplication. > In LKL we tried to avoid coupling the kernel build part to a particular architecture, to make it easier to port it (to different arches, but as well to other OSes or special environments [1][2]). That is the main reason for having two build steps, one for kernel proper, and one for the host. That is why the host part was placed into tools/lkl to make it clear that is not part of the kernel proper. I think this is one of the biggest differences between UML and LKL and it would be helpful to get feedback of what people think of a potential similar split for UML. [1] https://www.haiku-os.org/blog/lucian/2010-07-08_booting_lkl_inside_haiku/ [2] https://github.com/lkl/lkl-ntk-driver-poc _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um