linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hajime Tazaki <thehajime@gmail.com>
To: richard.weinberger@gmail.com
Cc: linux-um@lists.infradead.org, tavi.purdila@gmail.com,
	retrage01@gmail.com, linux-arch@vger.kernel.org
Subject: Re: [RFC PATCH 00/47] Unifying LKL into UML
Date: Sun, 27 Oct 2019 11:34:13 +0900	[thread overview]
Message-ID: <m2blu2x6fu.wl-thehajime@gmail.com> (raw)
In-Reply-To: <CAFLxGvyshYxocTNrzWV0mLQ-_qZzMG7u64=ySMbjrsu8j4cwTQ@mail.gmail.com>


Hello Richard,

Thanks for the review.

On Sat, 26 Oct 2019 06:34:59 +0900,
Richard Weinberger wrote:
> 
> On Wed, Oct 23, 2019 at 6:39 AM Hajime Tazaki <thehajime@gmail.com> wrote:
> >
> > This RFC patchset is to ask opinions from UML people, whether LKL codes is
> > good to integrate into UML code base.  We wish to have any kind of feedback
> > from your kind reviews.  There are numbers of commits which should be asked
> > for reviews to other mailing lists; we will do it later once we got
> > discussed in this mailing list.
> 
> Thanks a lot for doing this, this effort is much appreciated! :-)
> 
> > # sorry for the long list of patches: we can make it smaller by only
> >   including basic set of LKL (e.g., removing foreign OS support, etc) if
> >   you wish.
> 
> Let use see how the review goes. First I'll give it a high level review to make
> sure we all talk about the same things.

Thanks.

> Please CC linux-arch@vger.kernel.org for the next patch round.
> Integrating LKL (into arch/um/) is something which needs more audience and
> feedback from Arnd Bergmann, our global arch maintainer.

Sure, will Cc.

> >
> > LKL (Linux Kernel Library) is aiming to allow reusing the Linux kernel code
> > as extensively as possible with minimal effort and reduced maintenance
> > overhead.
> >
> > Examples of how LKL can be used are: creating userspace applications
> > (running on Linux and other operating systems) that can read or write Linux
> > filesystems or can use the Linux networking stack, creating kernel drivers
> > for other operating systems that can read Linux filesystems, bootloaders
> > support for reading/writing Linux filesystems, etc.
> >
> > With LKL, the kernel code is compiled into an object file that can be
> > directly linked by applications. The API offered by LKL is based on the
> > Linux system call interface.
> >
> > LKL is originally implemented as an architecture port in arch/lkl, but this
> > series of commits tries to integrate this into arch/um as one of the mode
> > of UML.  This was discussed during RFC email of LKL (*1).
> >
> > The latest LKL version can be found at https://github.com/lkl/linux
> >
> > Milestone
> > =========
> > This patches is just a first step toward upstreaming *library mode* of
> > Linux kernel, but we think we need to have several steps toward our goal,
> > describing in the below.
> >
> > 1. Put LKL code under arch/um (arch/um/lkl), and build it in a
> > separate way from UML.
> 
> Makes sense.
> 
> > 2. Share common parts of implementation between UML and LKL.
> 
> Since both UML and LKL are usermode ports there is a lot of potential.
> From my side it is also no big deal if there is some duplication which can be
> resolved in later releases. Unifiing needs deep thoughts and miding odd corner
> cases.

I understand.

> > 3. Reimplement UML features with LKL API (if we wish)
> 
> Yep. In the last release UML got virtio support, so there is hope. ;-)

Good news.

> > For the step 1, we put LKL as one of SUBARCH in order to make less effort
> > to integrate (make ARCH=um SUBARCH=lkl).  The modification to existing UML
> > code is trying to be minimized.
> 
> I'm not sure if SUBARCH is the right approach. How do I build a i386
> lkl on x86_64?

This is currently handled under tools/lkl: building
arch/um/lkl part only requires toolchain information (e.g.,
CROSS_COMPILE=).

So to build i386 liblkl.a, do `make ARCH=um SUBARCH=lkl`,
which might not be intuitive..

> Maybe we can use another variable like UMMODE={library,kernel}?

We will try to find this way to switch the mode instead.

> > The RFC patches also includes and a bit of step 2 as a proof of possibility
> > to share the code.  For this, we used the virtio device code of LKL and use
> > it from UML by enabling virtio-mmio driver with UML code.
> >
> >
> >
> > Building LKL the host library and LKL applications
> > ==================================================
> >
> > % cd tools/lkl
> > % make
> 
> Is there a reason why tool/lkl is not under arch/um?

I thought that this way makes clear distinction between host
hardware/environment *dependent* (tools/lkl) part and
*independent* (arch/um/lkl).

We can rename it to tools/um instead.

But if using new tools directory makes noisy, we would try to
move those under arch/um.

-- Hajime

  reply	other threads:[~2019-10-27  2:34 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1571798507.git.thehajime@gmail.com>
2019-10-25 21:34 ` [RFC PATCH 00/47] Unifying LKL into UML Richard Weinberger
2019-10-27  2:34   ` Hajime Tazaki [this message]
2019-11-08  5:02 ` [RFC v2 00/37] " Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 01/37] asm-generic: atomic64: allow using generic atomic64 on 64bit platforms Hajime Tazaki
2019-11-25 22:02     ` Richard Weinberger
2019-11-26 14:02       ` Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 02/37] arch: add __SYSCALL_DEFINE_ARCH Hajime Tazaki
2019-11-25 22:02     ` Richard Weinberger
2019-11-27  4:15       ` Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 03/37] lkl: architecture skeleton for Linux kernel library Hajime Tazaki
2019-11-25 22:00     ` Richard Weinberger
2019-11-26 11:42       ` Octavian Purdila
2019-11-26 14:17       ` Hajime Tazaki
2019-11-26 16:02         ` Richard Weinberger
2020-02-05  7:37           ` Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 04/37] lkl: host interface Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 05/37] lkl: memory handling Hajime Tazaki
2019-11-25 22:10     ` Richard Weinberger
2020-02-05  7:38       ` Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 06/37] lkl: kernel threads support Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 07/37] lkl: interrupt support Hajime Tazaki
2019-11-25 22:13     ` Richard Weinberger
2020-02-05  7:38       ` Hajime Tazaki
2020-02-05 10:49         ` Anton Ivanov
2020-02-05 14:24           ` Hajime Tazaki
2020-02-18  8:18             ` Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 08/37] lkl: system call interface and application API Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 09/37] lkl: timers, time and delay support Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 10/37] lkl: memory mapped I/O support Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 11/37] lkl: basic kernel console support Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 12/37] lkl: initialization and cleanup Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 13/37] lkl: plug in the build system Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 14/37] lkl tools: skeleton for host side library, tests and tools Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 15/37] lkl tools: host lib: add utilities functions Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 16/37] lkl tools: host lib: memory mapped I/O helpers Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 17/37] lkl tools: host lib: virtio devices Hajime Tazaki
2019-11-25 22:07     ` Richard Weinberger
2019-11-26  8:43       ` Johannes Berg
2019-11-26  8:50         ` Richard Weinberger
2019-11-26  8:52           ` Johannes Berg
2019-11-26 10:09             ` Richard Weinberger
2019-11-26 10:16               ` Johannes Berg
2019-11-26 10:42                 ` Octavian Purdila
2019-11-26 10:49                   ` Anton Ivanov
2019-11-27  4:06                     ` Hajime Tazaki
2019-11-26 16:04                   ` Richard Weinberger
2019-11-27  4:08                     ` Hajime Tazaki
2019-11-27 14:28                       ` Richard Weinberger
2019-11-28  9:53                         ` Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 18/37] lkl tools: host lib: virtio block device Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 19/37] lkl tools: host lib: filesystem helpers Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 20/37] lkl tools: host lib: posix host operations Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 21/37] lkl tools: "boot" test Hajime Tazaki
2020-01-23 19:33     ` Brendan Higgins
2020-01-24  4:32       ` Hajime Tazaki
2020-03-02 19:51       ` Luis Chamberlain
2020-03-02 22:25         ` Brendan Higgins
2019-11-08  5:02   ` [RFC v2 22/37] lkl tools: tool that reads/writes to/from a filesystem image Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 23/37] lkl tools: tool that converts a filesystem image to tar Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 24/37] lkl tools: virtio: add network device support Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 25/37] checkpatch: avoid showing BIT_ULL warnings for tools/ files Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 26/37] tools: Add the lkl host library to the common tools Makefile Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 27/37] lkl tools: add lklfuse Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 28/37] lkl: add system call hijack support Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 29/37] lkl: add documentation Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 30/37] scripts: revert CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX patches Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 31/37] lkl: add support for Windows hosts Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 32/37] lkl tools: add support for Windows host Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 33/37] kallsyms: Add a config option to select section for kallsyms Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 34/37] lkl: Android ARM (arm/arm64) support Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 35/37] um lkl: add CI tests Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 36/37] um: use lkl virtio_net_tap device as UML device Hajime Tazaki
2019-11-08  5:02   ` [RFC v2 37/37] um: add lkl virtio-blk device Hajime Tazaki
2019-11-08  9:13   ` [RFC v2 00/37] Unifying LKL into UML Anton Ivanov
2019-11-08 11:17     ` Octavian Purdila

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=m2blu2x6fu.wl-thehajime@gmail.com \
    --to=thehajime@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=retrage01@gmail.com \
    --cc=richard.weinberger@gmail.com \
    --cc=tavi.purdila@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).