Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4828912ybv; Tue, 11 Feb 2020 04:17:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxPQnEgZ4ZAJOvemHRq4E4hPxixC9otIjU/nbTQ6mCkdPc1nKwVx4JM+ixpro4c9GkPo7k6 X-Received: by 2002:aca:514e:: with SMTP id f75mr2771959oib.103.1581423477273; Tue, 11 Feb 2020 04:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581423477; cv=none; d=google.com; s=arc-20160816; b=Pjt0PYNrjbXVrER6TI6Za8IkGvYjNGcN9EO7drQ8P5NpARDMHl71zc8kGbVMe9prYY hoagoAIDXa43ERxkxTvtXrd3IIlSqxZQcnrmvd8y8LvOm9WJ2CtNWYf3xwa+HFZxLefi DBWQPE/t0/8lcAgSz0xV5/9fmbaCYb/AjzyCGMeuScjgEMl+Wozndn01q6FCA330GwUj j6r1R7IKq0ji+kR1/WBrWhGf4UeC8o4SM0XOI0YWzjpfu+NWSEB9t6EuGpZnjgiVMI1P vtZuorY9lpZNwXboemWoz/ONmF5OBY9Kpi0pInrMhBdlbtDd2A7MP9My7/aj8N0wcFlO DPew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uywzlgED9FQaejQMPT8+w69RgaNeWiLfzY9AcwWvmwg=; b=d2BqmO5QkvdfpB6wqSZxYl+poPb37uWeCx0Uymyf3q9DEIH2xsIemLw64qjmqjr9ar d77U1GyczAGkFPcIW/aB6y8OT7Yga/jGT8Wh+qNk9BKiH1uCNqGeJhEINdgMmhd7QjTR PkzQrxuMjILUmsHIK3zYIwonb+YFMZ0wKVbv5wRcL/O0FcJ6J9LGNiyprPGoutq1RXjP gBvpz8BbpSzanxwb2gwLxrTZ0R/CNwuErHZVbG1J4PCNvQZmviFyS/uo/dt4wWK11No6 l9YvUhELGPoHC/QwxWmGi7rOu/v1CUnUhXnBCwZ9HzQ1UKgQXDcVAHFOjrh0061BW6pV 1BYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hRPvIjyg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w187si1699903oif.94.2020.02.11.04.17.45; Tue, 11 Feb 2020 04:17:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hRPvIjyg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728600AbgBKLWF (ORCPT + 99 others); Tue, 11 Feb 2020 06:22:05 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:36472 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727728AbgBKLWF (ORCPT ); Tue, 11 Feb 2020 06:22:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581420124; 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=uywzlgED9FQaejQMPT8+w69RgaNeWiLfzY9AcwWvmwg=; b=hRPvIjygClf432wTh2wSuk1BXNrNHcAOezemVpjjVtYRiwV8USqlsCsbEW83K1pGHTbNMR v5Gr+ezDCo/EmbWlKQ6zgayCEJFFhmqre6O9L++EE/W2i42IbbG7LlGZI4Xh/RwSPr1KZ6 9t9bwlGDR7MK/q1lF3qyt06QqKArMlo= 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-237-8-LIvPDoPhOexdyXYJALwg-1; Tue, 11 Feb 2020 06:22:02 -0500 X-MC-Unique: 8-LIvPDoPhOexdyXYJALwg-1 Received: by mail-qt1-f199.google.com with SMTP id e37so6353621qtk.7 for ; Tue, 11 Feb 2020 03:22:02 -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=uywzlgED9FQaejQMPT8+w69RgaNeWiLfzY9AcwWvmwg=; b=uMpwFmqOMvgcjgPrqtKujN30iRzHP3b9vgRu0XhfKyhmsewSGLPvIHxdM5jETLgkBm wkQcnHdXZXgoCu8HwdNKlgPtoSUB1O4y2Yo/SwTqDwIuXa/x82z9RD7pHMNLXU/wBRAy kFHea7BH3Jlg123ZO8wSl4LNyJnnWIGRfcJWyrnA0zWnM21NSWPMdtHJ2qqcSYzI2H5B dF9+l5RP+haOPQ+0+C1/77nqZUeIgHwg0fDXvPlLFOu6DjQ7QI4o10tg1ycwr9w1mrqz P8gXIsg+ndQQARR0naXWnCL++k8+rFfoYOwgG+34ndQHEljypbualda/1pvOCUgQVcSv nI2Q== X-Gm-Message-State: APjAAAXG2HbRIq9gZ9Dabtcxq5Wd/ET9+gX1RPrJkP2dUQWj5ayxiohP NgJx7ZTjO/AeuRLNy+ZH+n0aMqxEz5CcuoEriQZ61iyJH0Wb/i2iqt19+EiB/fLRrR1G5Bhufgn C3t7rn+mp2iMTxchl63xCWIJW X-Received: by 2002:a37:4a46:: with SMTP id x67mr5025572qka.160.1581420122034; Tue, 11 Feb 2020 03:22:02 -0800 (PST) X-Received: by 2002:a37:4a46:: with SMTP id x67mr5025556qka.160.1581420121807; Tue, 11 Feb 2020 03:22:01 -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 t23sm1896118qto.88.2020.02.11.03.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:22:00 -0800 (PST) Date: Tue, 11 Feb 2020 06:21:56 -0500 From: "Michael S. Tsirkin" To: "Liu, Jing2" Cc: Jason Wang , Zha Bin , linux-kernel@vger.kernel.org, virtio-dev@lists.oasis-open.org, slp@redhat.com, qemu-devel@nongnu.org, chao.p.peng@linux.intel.com, gerry@linux.alibaba.com Subject: Re: [virtio-dev] Re: [PATCH v2 4/5] virtio-mmio: add MSI interrupt feature support Message-ID: <20200211061932-mutt-send-email-mst@kernel.org> References: <4c3d13be5a391b1fc50416838de57d903cbf8038.1581305609.git.zhabin@linux.alibaba.com> <0c71ff9d-1a7f-cfd2-e682-71b181bdeae4@redhat.com> 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 Tue, Feb 11, 2020 at 11:35:43AM +0800, Liu, Jing2 wrote: > > On 2/11/2020 11:17 AM, Jason Wang wrote: > > > > On 2020/2/10 下午5:05, Zha Bin wrote: > > > From: Liu Jiang > > > > > > Userspace VMMs (e.g. Qemu microvm, Firecracker) take advantage of using > > > virtio over mmio devices as a lightweight machine model for modern > > > cloud. The standard virtio over MMIO transport layer only supports one > > > legacy interrupt, which is much heavier than virtio over PCI transport > > > layer using MSI. Legacy interrupt has long work path and causes specific > > > VMExits in following cases, which would considerably slow down the > > > performance: > > > > > > 1) read interrupt status register > > > 2) update interrupt status register > > > 3) write IOAPIC EOI register > > > > > > We proposed to add MSI support for virtio over MMIO via new feature > > > bit VIRTIO_F_MMIO_MSI[1] which increases the interrupt performance. > > > > > > With the VIRTIO_F_MMIO_MSI feature bit supported, the virtio-mmio MSI > > > uses msi_sharing[1] to indicate the event and vector mapping. > > > Bit 1 is 0: device uses non-sharing and fixed vector per event mapping. > > > Bit 1 is 1: device uses sharing mode and dynamic mapping. > > > > > > I believe dynamic mapping should cover the case of fixed vector? > > > Actually this bit *aims* for msi sharing or msi non-sharing. > > It means, when msi sharing bit is 1, device doesn't want vector per queue > > (it wants msi vector sharing as name) and doesn't want a high interrupt > rate. > > So driver turns to !per_vq_vectors and has to do dynamical mapping. > > So they are opposite not superset. > > Thanks! > > Jing what's the point of all this flexibility? the cover letter complains about the code size of pci, then you go back and add a ton of options with no justification. > > > Thanks > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org > >