Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbbKHNap (ORCPT ); Sun, 8 Nov 2015 08:30:45 -0500 Received: from a.ns.miles-group.at ([95.130.255.143]:11949 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbbKHNaj (ORCPT ); Sun, 8 Nov 2015 08:30:39 -0500 Subject: Re: [RFC PATCH 19/28] lkl tools: host lib: virtio block device To: Octavian Purdila References: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> <1446582059-17355-20-git-send-email-octavian.purdila@intel.com> Cc: Linux-Arch , LKML , Hajime Tazaki , Anton Ivanov From: Richard Weinberger X-Enigmail-Draft-Status: N1110 Message-ID: <563F4E7A.9040704@nod.at> Date: Sun, 8 Nov 2015 14:30:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2441 Lines: 65 Am 08.11.2015 um 05:15 schrieb Octavian Purdila: > On Sat, Nov 7, 2015 at 2:24 PM, Richard Weinberger > wrote: >> On Tue, Nov 3, 2015 at 9:20 PM, Octavian Purdila >> wrote: >>> Host independent implementation for virtio block devices. The host >>> dependent part of the host library must provide an implementation for >>> lkl_dev_block_ops. >>> >>> Disks can be added to the LKL configuration via lkl_disk_add(), a new >>> LKL application API. >>> >>> Signed-off-by: Octavian Purdila >>> --- >>> tools/lkl/include/lkl.h | 20 ++++++++ >>> tools/lkl/include/lkl_host.h | 21 ++++++++ >>> tools/lkl/lib/virtio_blk.c | 116 +++++++++++++++++++++++++++++++++++++++++++ >>> 3 files changed, 157 insertions(+) >>> create mode 100644 tools/lkl/lib/virtio_blk.c >> > > Hi Richard, > >> Can you please outline what the differences between this driver and >> UML's block driver are? >> > > LKL actually uses the standard virtio block driver, it does not > implement a new (Linux kernel) driver. > > This patch is the implementation for the host side device (in virtio's > spec lingo). > > Or maybe I misunderstood your question? I just realized, that virtio does not depend on PCI, I thought you've implemented something on your own. That said, UML could also use virtio block. >> While UML and LKL have different goals they could at least share some drivers. >> UML also has networking drivers you could reuse. >> Maybe it would make sense to integrate LKL completely into arch/um if >> we find a nice way >> to combine them. >> CONFIG_UML_LIBRARY, hmm? >> Would be a nice opportunity to clear away some dung from arch/um and >> refactor it. :-) >> > > Yeah, that would be nice :) I think the key part is to define the > right host operations (in LKL terms) that can support UML. I'll have > to spend some time to study UML's internals a bit to see if that would > be doable. arch/um/os-Linux/ is a good place to start. It implements most things on the host side. Drivers like UML'S block driver always have foo_user.c and foo_kern.c part. In case of any questions, just ask! Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/