Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2196928pxb; Fri, 25 Mar 2022 12:51:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHS5ywsYOSZaVZyw5r7KW6S2ZZ04q9pGbN/7Jev0s8woZePsED/+7T6WSgLZItqpAap/Nw X-Received: by 2002:a17:90a:2d8b:b0:1c7:9120:4771 with SMTP id p11-20020a17090a2d8b00b001c791204771mr14701546pjd.164.1648237870643; Fri, 25 Mar 2022 12:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237870; cv=none; d=google.com; s=arc-20160816; b=kFLppceLtjSjvXe/uKvMvC/33SWkHMr5yn7csGag6r3kZ5832MjbXASvJQ0fnjZ3Hm iZPDth1H52s5ATtlV7hUzcomOOu5TpOelH4cU5Deb4rmIdyGrm1NrD7T9/REA8B54a9U F8rJ1WVBC7b7ZJ0KWmj5pHHp0v/uhtvPg2aJu99lcZJWRp4QyTam4DpxWpTlpWahbQkR envy2EzoNvhpBbrKNuP7KV3bpO/2HByEosQisjNqCaUvirZIoDd4BMxJqFpANtcr5FgW lmkjHoa1XKT668Wzms5BamfBCYodZzZqMYStrFs6s+vYpeqjLcFhdpYxd8oxwp4d5w8K qUNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=YG01IvqBzypFttWyr61/58YsVshIZUGldKDL1nfzsRk=; b=Rx+rGRACi4+vJduHbjTJGj9VwOOqtjodC/X6vh+FETAKQBos5YQHkLA2wqwiJiiZYb oJoC9UHHjbN+cMkIk3GsFGxRUlDJ8znKYfHf24A0TLnyFMS8WBMdCWYIn0VdgTTQhRfX l2ls4jAlBbYo9FTq29GA/RoB5N92JyTlC6By0Jico4cYYj+A3NF/kh6eXkAh7TN4jF/b x3Ek/i/+7CqE4bfgm93AlFllNQ8UH375IZ1Y7CLA3GmOkczrZI6kgKdxwLa/D/beO68q bkcALDjZwb4Z4moIH9YlnbQxh0KpET8EvzVUCMNKnoMdLBO9SBcVnoTrVqsZErGt3qf+ 3Ihg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=DuhBj2JS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d4-20020a655884000000b003861839232csi3303161pgu.388.2022.03.25.12.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:51:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=DuhBj2JS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4B9772D026B; Fri, 25 Mar 2022 11:40:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348012AbiCXNCQ (ORCPT + 99 others); Thu, 24 Mar 2022 09:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350354AbiCXNCA (ORCPT ); Thu, 24 Mar 2022 09:02:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB93F90CEA; Thu, 24 Mar 2022 06:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=YG01IvqBzypFttWyr61/58YsVshIZUGldKDL1nfzsRk=; t=1648126828; x=1649336428; b=DuhBj2JSpSD9rd/13a4sA3PxCrlZTitxsNZPmMuyP8GHczM HbnJCN1qUqUa/FXw5hTf/MxZd61rL2ugJ2M6X0bAE/+6Hm0VAHZjkfU5Azw7cz17seJQpaVIADgJK Lj6tC5YMLATzMVB78XYdl8kELZMHpxcVP2ZuWEcKV+95raCTwe49e+LyNCfmEEkNVHUPVby8Cvd8q vb27xv6T4J/WgwpGCjJFdJAU4gvbHCfqjds+SfvP+QvkWLJngVELiktioaWiVTYuzpQDyRKtqa22q RXR8SN9AaqL1Z2wz69tTzFBD+0Y5Iv2HC8Q70YUgfLqBVU4HB9X/GiaOE4+2QPcw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nXN4V-00HWDe-B6; Thu, 24 Mar 2022 14:00:11 +0100 Message-ID: <7f405d8d09a83954aa3411eff8b71ee687c7ec33.camel@sipsolutions.net> Subject: Re: [RFC v1 01/10] roadtest: import libvhost-user from QEMU From: Johannes Berg To: Vincent Whitchurch , linux-kernel@vger.kernel.org Cc: kernel@axis.com, devicetree@vger.kernel.org, linux-um@lists.infradead.org, shuah@kernel.org, brendanhiggins@google.com, linux-kselftest@vger.kernel.org, jic23@kernel.org, linux-iio@vger.kernel.org, lgirdwood@gmail.com, broonie@kernel.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, linux-rtc@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org Date: Thu, 24 Mar 2022 14:00:10 +0100 In-Reply-To: <20220311162445.346685-2-vincent.whitchurch@axis.com> References: <20220311162445.346685-1-vincent.whitchurch@axis.com> <20220311162445.346685-2-vincent.whitchurch@axis.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2022-03-11 at 17:24 +0100, Vincent Whitchurch wrote: > Import the libvhost-user from QEMU for use in the implementation of the > virtio devices in the roadtest backend. > So hm, I wonder if this is the sensible thing to do? Not that I mind importing qemu code, but: 1) the implementation is rather complex in some places, and has support for a LOT of virtio/vhost-user features that are really not needed in these cases, for performance etc. It's also close to 4k LOC. 2) the implementation doesn't support time-travel mode which might come in handy We have another implementation that might be simpler: https://github.com/linux-test-project/usfstl/blob/main/src/vhost.c but it probably has dependencies on other things in this library, but vhost.c itself is only ~1k LOC. (But I need to update it, I'm sure we have some unpublished bugfixes etc. in this code) johannes