From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D64D3C4361B for ; Mon, 7 Dec 2020 16:54:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3CA2723877 for ; Mon, 7 Dec 2020 16:54:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CA2723877 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmJm9-0002eB-3x for qemu-devel@archiver.kernel.org; Mon, 07 Dec 2020 11:54:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmJkL-0001fc-Sn for qemu-devel@nongnu.org; Mon, 07 Dec 2020 11:52:21 -0500 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:32790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmJkK-0001lV-6Q for qemu-devel@nongnu.org; Mon, 07 Dec 2020 11:52:21 -0500 Received: by mail-ej1-x643.google.com with SMTP id b9so10126421ejy.0 for ; Mon, 07 Dec 2020 08:52:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OTQRBjUe2TNjYMgJefl7n0HpBavaiUEtwmxJsr1/2t4=; b=erKmXltJIFGXdOQcph/EmLbnMRY6RChItOwpRyiu8mFYM+wjLN9CHS8NfD8l6oT6qJ 1f/szmE8g+MJAyGMfg78p8iPicMlWeScTuFEWULsmGKKsuAlilIgx6fw334H1Q6/1R2r qFRDGMSE6bgWNv5M5iOHiqZOmFzj+zS2s/4VInI1sJuZOADPtUs8x7MlwhR1+oGPruEG ydJKuWQ1H76nsoemtOULbMSmbVQAUW1rsuwvKPl4VoUrKRtyPt1353Tsr2CsusdN1oij t/UNHMJUgc6F8336mbycNpSenKA4XbUZoHoG4eaWiwmHcftSFe8ZoQZgiCadTLdwYC3w L1AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OTQRBjUe2TNjYMgJefl7n0HpBavaiUEtwmxJsr1/2t4=; b=bjQX+gjDlb/oOnv13eMWeHzgRONovkvdk9KFHyx9IcwS2/wtsJ5nkP9H7BOGXtsrRj pzYhh5uWY+GKj7wfEQ1FO7Q0GrJvLSdL+X8eh6lVspNXZnoDMkpQ8Gv5HeAeY3XwTwtf tFCkKhnWYIpPOT3lxlCwJJPhPwD0y0dX4Fe6fTeAFeDK1P/FoZDd3rzkqqtTlg95z9FB oT4+qalrFLrmJBrczNJ28FVysyoD9eB5fLx1Irxt4ufDYddYVOkpgd72Gu1w+L/WjpDb DrNKwu4GBn5Kxx6BCnnNMY3qpss2/1KDkUEuKrLlg7ggQAepOGqFzxivBrNz6dNC8t8d S4tw== X-Gm-Message-State: AOAM532jD7IDtti3M6P4FAcAhZh/Gw6uyjPQmRmY/Z3FDTI4FPaa4ty9 2XMh61238jaxCqKof56SbZc= X-Google-Smtp-Source: ABdhPJycsLY1gSAtaotTfUaJl7iKx3GhozpQNix9ydMBC5YVDHoyAJwcCg7JB0Eipy1M7eJ+9OyCCg== X-Received: by 2002:a17:907:28d4:: with SMTP id en20mr19944431ejc.196.1607359938454; Mon, 07 Dec 2020 08:52:18 -0800 (PST) Received: from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id q4sm10641523ejc.78.2020.12.07.08.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 08:52:17 -0800 (PST) Date: Mon, 7 Dec 2020 16:52:16 +0000 From: Stefan Hajnoczi To: Eugenio =?iso-8859-1?Q?P=E9rez?= Subject: Re: [RFC PATCH 05/27] vhost: Add hdev->dev.sw_lm_vq_handler Message-ID: <20201207165216.GL203660@stefanha-x1.localdomain> References: <20201120185105.279030-1-eperezma@redhat.com> <20201120185105.279030-6-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VBq/nvTu32OVLBUP" Content-Disposition: inline In-Reply-To: <20201120185105.279030-6-eperezma@redhat.com> Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=stefanha@gmail.com; helo=mail-ej1-x643.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , qemu-devel@nongnu.org, Daniel Daly , virtualization@lists.linux-foundation.org, Liran Alon , Eli Cohen , Nitin Shrivastav , Alex Barba , Christophe Fontaine , Juan Quintela , Lee Ballard , Lars Ganrot , Rob Miller , Stefano Garzarella , Howard Cai , Parav Pandit , vm , Salil Mehta , Stephen Finucane , Xiao W Wang , Sean Mooney , Stefan Hajnoczi , Jim Harford , Dmytro Kazantsev , Siwei Liu , Harpreet Singh Anand , Michael Lilja , Max Gurtovoy Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --VBq/nvTu32OVLBUP Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 20, 2020 at 07:50:43PM +0100, Eugenio P=E9rez wrote: > Only virtio-net honors it. >=20 > Signed-off-by: Eugenio P=E9rez > --- > include/hw/virtio/vhost.h | 1 + > hw/net/virtio-net.c | 39 ++++++++++++++++++++++++++++----------- > 2 files changed, 29 insertions(+), 11 deletions(-) >=20 > diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h > index 4a8bc75415..b5b7496537 100644 > --- a/include/hw/virtio/vhost.h > +++ b/include/hw/virtio/vhost.h > @@ -83,6 +83,7 @@ struct vhost_dev { > bool started; > bool log_enabled; > uint64_t log_size; > + VirtIOHandleOutput sw_lm_vq_handler; sw =3D=3D software? lm =3D=3D live migration? Maybe there is a name that is clearer. What are these virtqueues called? Shadow vqs? Logged vqs? Live migration is a feature that uses dirty memory logging, but other features may use dirty memory logging too. The name should probably not be associated with live migration. > Error *migration_blocker; > const VhostOps *vhost_ops; > void *opaque; > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 9179013ac4..9a69ae3598 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -2628,24 +2628,32 @@ static void virtio_net_tx_bh(void *opaque) > } > } > =20 > -static void virtio_net_add_queue(VirtIONet *n, int index) > +static void virtio_net_add_queue(VirtIONet *n, int index, > + VirtIOHandleOutput custom_handler) > { We talked about the possibility of moving this into the generic vhost code so that devices don't need to be modified. It would be nice to hide this feature inside vhost. --VBq/nvTu32OVLBUP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl/OXb8ACgkQnKSrs4Gr c8h0zgf/Y8KuZmHAiJe/VBJicMVsGgLkqfkqKp7+bL8u8nU75Wm24ECd47sAbvWK q/BQs7t9VxQ0KBH8DJBGviwxG4bfoAtzXpSKgHRgbvd0AWHqJqfbEcKP+yZ0mKwB uSAsQqNU/K9DxvNiJSzzklUvKmvKPrWXwgWsP2jRKOTAxn2nvNrCO+X9sAveTmEk ZMfFOsHVNVxc4nJIwRsySTnpUz4ADJvzrhGk8cvjIIg/9Gq28EsYiMLWhtQymrj6 iEIZnfg5REWv/w3KzvwqVBaBqVF/QkFk0w8naAuT+KHbr+fKZLtMVC6ebY44vqZN +iQr7fQg3dfy8ba7WFxyYHnVGmZMEQ== =GegK -----END PGP SIGNATURE----- --VBq/nvTu32OVLBUP--