From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-dev-return-6739-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 9CFCA985DD1 for ; Wed, 12 Feb 2020 08:19:10 +0000 (UTC) Date: Wed, 12 Feb 2020 03:18:57 -0500 From: "Michael S. Tsirkin" Message-ID: <20200212024158-mutt-send-email-mst@kernel.org> References: <8a4ea95d6d77a2814aaf6897b5517353289a098e.1581305609.git.zhabin@linux.alibaba.com> <20200211062205-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: Subject: [virtio-dev] Re: [PATCH v2 1/5] virtio-mmio: add notify feature for per-queue Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline To: Jason Wang Cc: Zha Bin , virtio-dev@lists.oasis-open.org, slp@redhat.com, jing2.liu@linux.intel.com, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, chao.p.peng@linux.intel.com, gerry@linux.alibaba.com List-ID: On Wed, Feb 12, 2020 at 11:39:54AM +0800, Jason Wang wrote: >=20 > On 2020/2/11 =E4=B8=8B=E5=8D=887:33, Michael S. Tsirkin wrote: > > On Mon, Feb 10, 2020 at 05:05:17PM +0800, Zha Bin wrote: > > > From: Liu Jiang > > >=20 > > > The standard virtio-mmio devices use notification register to signal > > > backend. This will cause vmexits and slow down the performance when w= e > > > passthrough the virtio-mmio devices to guest virtual machines. > > > We proposed to update virtio over MMIO spec to add the per-queue > > > notify feature VIRTIO_F_MMIO_NOTIFICATION[1]. It can allow the VMM to > > > configure notify location for each queue. > > >=20 > > > [1]https://lkml.org/lkml/2020/1/21/31 > > >=20 > > > Signed-off-by: Liu Jiang > > > Co-developed-by: Zha Bin > > > Signed-off-by: Zha Bin > > > Co-developed-by: Jing Liu > > > Signed-off-by: Jing Liu > > > Co-developed-by: Chao Peng > > > Signed-off-by: Chao Peng > > Hmm. Any way to make this static so we don't need > > base and multiplier? >=20 >=20 > E.g page per vq? >=20 > Thanks Problem is, is page size well defined enough? Are there cases where guest and host page sizes differ? I suspect there might be. But I also think this whole patch is unproven. Is someone actually working on QEMU code to support pass-trough of virtio-pci as virtio-mmio for nested guests? What's the performance gain like? --=20 MST --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org 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=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no 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 6044BC2BA83 for ; Wed, 12 Feb 2020 08:19:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33FDC20714 for ; Wed, 12 Feb 2020 08:19:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bw4Q030w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbgBLITK (ORCPT ); Wed, 12 Feb 2020 03:19:10 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:60704 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728287AbgBLITK (ORCPT ); Wed, 12 Feb 2020 03:19:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581495549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EoDtK+hRJA9oLfg2EbJN/Grnn0SbIx7vrfQip2G4KnY=; b=bw4Q030wwjkAPODS/D8hlugvKFRpSw4GD8PMqh4m7Sn9KOpvmW9acKes84xEE/M2aHEiAv gKWkQtQ4FL5CYh+MWM2OZNVEC28f00LjmsZw85eOAdH4c39uoQkomyFDZpSYA480c3S7/x 8fkTyyUksn9lgYXDVwlo/9yVRiGZjx0= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-UEv4Cx2IPriwFyM1Ps2M_g-1; Wed, 12 Feb 2020 03:19:03 -0500 X-MC-Unique: UEv4Cx2IPriwFyM1Ps2M_g-1 Received: by mail-qt1-f199.google.com with SMTP id n4so775614qtv.5 for ; Wed, 12 Feb 2020 00:19:03 -0800 (PST) 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:content-transfer-encoding :in-reply-to; bh=EoDtK+hRJA9oLfg2EbJN/Grnn0SbIx7vrfQip2G4KnY=; b=dwGxXLoCNBLbrZDKhJYsSlDuXrtwGAQhHL/cedGGu6tA+INt1sEFI9nkqO7EJDp0dN BfGFLIVr66XhMxyH7ZLMsOsRY8Jlt+CylyIqejTEExc07e5sH4ei1c9rfstt8wJWyMQT u+AKLyLSLRAY2YDD4wRg1eiRrKLWb12+z6YzjxYdazdvk0HmiTmCRkc4CDFeAwMdR65w 2fQt7eySPGXa/4Xa9DbK2SEqH7J3xkwSrcJb7HX+FDsPC8fjx7d90Uwh9uBY+MNl29Yb zR+Z1WaKHwXfVIXn3u9Z/8a51qRYtp8RHp4hWQGFyZFGxSi8tq4jOpDEInla4BNYuWue Fnow== X-Gm-Message-State: APjAAAXyy6KCs6GlCnbzdTL/O4Q8+7t9yB9/Ro0l75PqX9mFGauxS9JW ZOPuRSzdW6IwaNUecitwFSXndIZtuz6SczoXwr905sGXiV+LL2rA1BBaE4JBMouQX5QpFXqSbge Wgl1/hTWlmVqmLyrsWIpXa0bq X-Received: by 2002:ae9:eb4b:: with SMTP id b72mr5998864qkg.316.1581495543146; Wed, 12 Feb 2020 00:19:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwTyMar0/OsjMBaqlOf+gA2ZS0CQ7snrBolXpR8Rj24500NDWQIaqutLJBRjx+fU7ShGzK/6w== X-Received: by 2002:ae9:eb4b:: with SMTP id b72mr5998856qkg.316.1581495542934; Wed, 12 Feb 2020 00:19:02 -0800 (PST) Received: from redhat.com (bzq-79-176-41-183.red.bezeqint.net. [79.176.41.183]) by smtp.gmail.com with ESMTPSA id d197sm3455610qkc.16.2020.02.12.00.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 00:19:02 -0800 (PST) Date: Wed, 12 Feb 2020 03:18:57 -0500 From: "Michael S. Tsirkin" To: Jason Wang Cc: Zha Bin , virtio-dev@lists.oasis-open.org, slp@redhat.com, jing2.liu@linux.intel.com, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, chao.p.peng@linux.intel.com, gerry@linux.alibaba.com Subject: Re: [PATCH v2 1/5] virtio-mmio: add notify feature for per-queue Message-ID: <20200212024158-mutt-send-email-mst@kernel.org> References: <8a4ea95d6d77a2814aaf6897b5517353289a098e.1581305609.git.zhabin@linux.alibaba.com> <20200211062205-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 11:39:54AM +0800, Jason Wang wrote: > > On 2020/2/11 下午7:33, Michael S. Tsirkin wrote: > > On Mon, Feb 10, 2020 at 05:05:17PM +0800, Zha Bin wrote: > > > From: Liu Jiang > > > > > > The standard virtio-mmio devices use notification register to signal > > > backend. This will cause vmexits and slow down the performance when we > > > passthrough the virtio-mmio devices to guest virtual machines. > > > We proposed to update virtio over MMIO spec to add the per-queue > > > notify feature VIRTIO_F_MMIO_NOTIFICATION[1]. It can allow the VMM to > > > configure notify location for each queue. > > > > > > [1]https://lkml.org/lkml/2020/1/21/31 > > > > > > Signed-off-by: Liu Jiang > > > Co-developed-by: Zha Bin > > > Signed-off-by: Zha Bin > > > Co-developed-by: Jing Liu > > > Signed-off-by: Jing Liu > > > Co-developed-by: Chao Peng > > > Signed-off-by: Chao Peng > > Hmm. Any way to make this static so we don't need > > base and multiplier? > > > E.g page per vq? > > Thanks Problem is, is page size well defined enough? Are there cases where guest and host page sizes differ? I suspect there might be. But I also think this whole patch is unproven. Is someone actually working on QEMU code to support pass-trough of virtio-pci as virtio-mmio for nested guests? What's the performance gain like? -- MST 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=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no 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 5D0EBC2BA83 for ; Wed, 12 Feb 2020 08:19:57 +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 22C9A20714 for ; Wed, 12 Feb 2020 08:19:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ewpH+VyG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22C9A20714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1nFU-0004AO-9u for qemu-devel@archiver.kernel.org; Wed, 12 Feb 2020 03:19:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35222) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1nEo-0003Fy-6e for qemu-devel@nongnu.org; Wed, 12 Feb 2020 03:19:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1nEk-0004CF-OI for qemu-devel@nongnu.org; Wed, 12 Feb 2020 03:19:12 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:44933 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1nEk-00049t-Ga for qemu-devel@nongnu.org; Wed, 12 Feb 2020 03:19:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581495548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qUXVcjehGq7OvZm9lAbu+qnRwb9r0Dmhj/3TwZjythI=; b=ewpH+VyGwPupOyY3ssiyuntvppWQLlx57UkjxQbHsauE+qpRnjTTE/E88RzM/EfWOdfDfZ QkgLHTrITQCVeD3iaYAEwaiT8vKeZdN43hROEUnjY8ZkJluOQN9eVNvyIk/1Pk1GfKURW5 8C5TA+8r+4ZWARACHp7GujtumqY1YNA= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-0PNa9B_wNBCyp5f4DHfNcg-1; Wed, 12 Feb 2020 03:19:03 -0500 Received: by mail-qv1-f71.google.com with SMTP id de8so944592qvb.16 for ; Wed, 12 Feb 2020 00:19:03 -0800 (PST) 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:content-transfer-encoding :in-reply-to; bh=EoDtK+hRJA9oLfg2EbJN/Grnn0SbIx7vrfQip2G4KnY=; b=jIMgeYxnl5jClhH1G6WO+3hGQpZU0pjROHlzNhlhGuY91hLvRjulkMsNzgtZYKdZSJ gkxW/gIfWWCmyUYBbkIxFCkd2lSrJ8beto47snMZU0eOIeyD78lIFnVizTey3CxPDT6p mz17GBpVYe8R0SEBDopTKOpXkT9dIJtIRysmWprGD0QS/g5fTxuuMxnVp9HZRMdKbn1f 8cTswNQe5baJ5I8lQgrsW2T2cXX8XclEtfhDBZzWglh7Qfu/2uMvOSrCxZ/DiejOvGrU oQv4OSkY1b4f1GZto4sGkrrTqs6ObQ1Gp+WwAU7xWZtuWk8xW32neD9Egp4lEYwoSaxG b2Pg== X-Gm-Message-State: APjAAAWTHDeiSkHs01CbknYBgD7Kt9Vy6/KZwhEnLWqg6UzHAK+KHNn4 Bo/IhHNKPqj6787triu2h9aSJnCHElaTncl9iV2BTRjK1L7rsRpnx2e4kB0v4Yo7M+Hua1EeG7j mhGIgA4S4WE0hXA8= X-Received: by 2002:ae9:eb4b:: with SMTP id b72mr5998866qkg.316.1581495543146; Wed, 12 Feb 2020 00:19:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwTyMar0/OsjMBaqlOf+gA2ZS0CQ7snrBolXpR8Rj24500NDWQIaqutLJBRjx+fU7ShGzK/6w== X-Received: by 2002:ae9:eb4b:: with SMTP id b72mr5998856qkg.316.1581495542934; Wed, 12 Feb 2020 00:19:02 -0800 (PST) Received: from redhat.com (bzq-79-176-41-183.red.bezeqint.net. [79.176.41.183]) by smtp.gmail.com with ESMTPSA id d197sm3455610qkc.16.2020.02.12.00.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 00:19:02 -0800 (PST) Date: Wed, 12 Feb 2020 03:18:57 -0500 From: "Michael S. Tsirkin" To: Jason Wang Subject: Re: [PATCH v2 1/5] virtio-mmio: add notify feature for per-queue Message-ID: <20200212024158-mutt-send-email-mst@kernel.org> References: <8a4ea95d6d77a2814aaf6897b5517353289a098e.1581305609.git.zhabin@linux.alibaba.com> <20200211062205-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: X-MC-Unique: 0PNa9B_wNBCyp5f4DHfNcg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: virtio-dev@lists.oasis-open.org, Zha Bin , slp@redhat.com, jing2.liu@linux.intel.com, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, chao.p.peng@linux.intel.com, gerry@linux.alibaba.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, Feb 12, 2020 at 11:39:54AM +0800, Jason Wang wrote: >=20 > On 2020/2/11 =E4=B8=8B=E5=8D=887:33, Michael S. Tsirkin wrote: > > On Mon, Feb 10, 2020 at 05:05:17PM +0800, Zha Bin wrote: > > > From: Liu Jiang > > >=20 > > > The standard virtio-mmio devices use notification register to signal > > > backend. This will cause vmexits and slow down the performance when w= e > > > passthrough the virtio-mmio devices to guest virtual machines. > > > We proposed to update virtio over MMIO spec to add the per-queue > > > notify feature VIRTIO_F_MMIO_NOTIFICATION[1]. It can allow the VMM to > > > configure notify location for each queue. > > >=20 > > > [1]https://lkml.org/lkml/2020/1/21/31 > > >=20 > > > Signed-off-by: Liu Jiang > > > Co-developed-by: Zha Bin > > > Signed-off-by: Zha Bin > > > Co-developed-by: Jing Liu > > > Signed-off-by: Jing Liu > > > Co-developed-by: Chao Peng > > > Signed-off-by: Chao Peng > > Hmm. Any way to make this static so we don't need > > base and multiplier? >=20 >=20 > E.g page per vq? >=20 > Thanks Problem is, is page size well defined enough? Are there cases where guest and host page sizes differ? I suspect there might be. But I also think this whole patch is unproven. Is someone actually working on QEMU code to support pass-trough of virtio-pci as virtio-mmio for nested guests? What's the performance gain like? --=20 MST