From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iZWaP-0004lZ-Rs for linux-um@lists.infradead.org; Tue, 26 Nov 2019 08:52:43 +0000 Message-ID: <4ebb14dc67ccb70543617ce1f7066f3f27cd11a8.camel@sipsolutions.net> Subject: Re: [RFC v2 17/37] lkl tools: host lib: virtio devices From: Johannes Berg Date: Tue, 26 Nov 2019 09:52:34 +0100 In-Reply-To: <1662825264.98055.1574758225905.JavaMail.zimbra@nod.at> References: <1531c5f16a00b608635c9a62fa3951807075f950.1573179553.git.thehajime@gmail.com> <1662825264.98055.1574758225905.JavaMail.zimbra@nod.at> MIME-Version: 1.0 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 , cem , tavi purdila , linux-um , retrage01 , liuyuan , pscollins , linux-kernel-library@freelists.org, sigmaepsilon92 , Hajime Tazaki On Tue, 2019-11-26 at 09:50 +0100, Richard Weinberger wrote: > > This isn't really a driver, this is virtio *device-side* code. Our > > virtio_uml is *guest-side* code, and only speaks vhost-user. > > Sorry, bad wording from my side. I meant with "driver" a kernel component. Yeah, though arguably this isn't a kernel component, this is a hypervisor component... We just link them both into the same binary due to the way UML/LKL work. > > I'm not sure how MMIO devices could possibly work though, does LKL > > intercept MMIO somehow? > > My point is that UML and LKL should try to do use the same concept/code > regarding virtio. At the end of day both use virtual devices which use > facilities from the host. > If this is really not possible it needs a good explanation. I think it isn't possible, unless you use vhost-user over a unix domain socket internally to talk between the kernel (virtio_uml) and hypervisor (device) components. In virtio_uml, the device implementation is assumed to be a separate process with a vhost-user connection. Here in LKL, the virtio device is part of the "hypervisor", i.e. in the same process. johannes _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um