From nobody Sat Nov 15 22:37:31 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1747223629; cv=none; d=zohomail.com; s=zohoarc; b=aC40vipsDGAJ2GP0WBMfClPzZdUW+cBAtLJLM8rGgHiTgOWCAM7TBxahMrfwedOgmlVhg1tUOKJ6Sax9ugBChzcN2VizIeicAtRONZFwqhZg/FWfYdTNbhANLVt8DMjvCiVPXrPArF4uoymw0HmQczh4Xyg8JeQXkrLmLwqC4+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747223629; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kBvJJ1guqk+Wh8WSiEg/aaEDfWIkM3a0BJ0cG44g7BE=; b=BzW1IMy42rrDcOF6pobODBJRJ51TwtajEVwNVioDayk2KT66ZedYPFz8pXE46EEQWcM8TsqFZOcaEd2lLQf9TgKuaU56+kvoYIqJwSNuFJJ4x3MCy1PbBqOdCj18LdDzPVO2LTd3Q9HhSfnDaurd/7S9ST7r+maTArVIGIwnjrg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1747223629804898.662973719964; Wed, 14 May 2025 04:53:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFAdt-0006Ik-Dx; Wed, 14 May 2025 07:51:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFAdg-00062v-KV for qemu-devel@nongnu.org; Wed, 14 May 2025 07:51:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFAdY-0006Ek-34 for qemu-devel@nongnu.org; Wed, 14 May 2025 07:51:08 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-352-63sCOTZNPnKAfhCjOb46sQ-1; Wed, 14 May 2025 07:50:56 -0400 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-441d438a9b7so3167505e9.1 for ; Wed, 14 May 2025 04:50:56 -0700 (PDT) Received: from redhat.com ([2a0d:6fc0:1517:1000:ea83:8e5f:3302:3575]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-442f396c052sm27873355e9.29.2025.05.14.04.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 04:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747223457; 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: in-reply-to:in-reply-to:references:references; bh=kBvJJ1guqk+Wh8WSiEg/aaEDfWIkM3a0BJ0cG44g7BE=; b=P0FsWYSZb0kCcjreZoQdDQx86qMpDPsVbqGr/FwP3D+SAtrLrmyh6PxzasjDM0SfOh5yze yoF0V2NPeizOvPcdgziVtORRqJ4Grzn7jBAhOVH7wq+2ZOsKqI+38b5CTvr55FGfgbXySV RrRRLQb93i7MQ7858qo/IZkk4Jbpluo= X-MC-Unique: 63sCOTZNPnKAfhCjOb46sQ-1 X-Mimecast-MFC-AGG-ID: 63sCOTZNPnKAfhCjOb46sQ_1747223455 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747223455; x=1747828255; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kBvJJ1guqk+Wh8WSiEg/aaEDfWIkM3a0BJ0cG44g7BE=; b=dE7CFzYKjLDpxLXihp/ximpPp9h63wdcTjKg5vNlQhgpQgbuzWh461StxE5ATokyYP yrClRqFrCV3m+mRQAAMuE38uXfhVQVYD9OufLkeyKvxl2yCjCkiSavaKy1GJsG93s6ur eZYmrFDoXNKkb89fP+CaeTZShNvoUU6di9WHpibxeNMHXaLtYrnhve/bMrHZ4zKakyuS FHCLP9MwBaCmDwQIHk9juYhcUFW74/x/J4EVlWyI1Y1aCezdijE9rxpTfLfqn7w2UtZ5 Pn0HbqwmNE+ktQFqDJc3jFmH2ZpgpKrO/UhKVPyDqip7EWrceIkP82NHvaCUWlWCklBE IzIA== X-Gm-Message-State: AOJu0YzZ0pUBkdLmxV03vqBzr16OB9CBRp1Zb/f1946LlMCTOMcNniXp ksiEMMGUIVwA21YkCnq30RNln52ay43LKONyCENMnYcIjYA292A9FARY0OsZeaX6+2pajhUus4K vWdqcEefgbgFZ8y87NdZQHWRE3Oj9fn7rbDGkvLE6W37YTXpssRFbJtPL1fAqnvgoo+UmyC/B7S LoseNulk2Qxm7RxPd8JylKCu0Xttm1tA== X-Gm-Gg: ASbGncvXQJcmO/rjz0pRqXGZrP5AJcCLIIWPqAw1UVZyxLQHFJyvd5CCXZhZfgWoA5B qcvwqjoXro9tQ784nzKqbiu8lFbMmidFNKPDv/sjYRcNYftZNTVM66aCmAZ49iKjLpJzfl4KVzS Srk7zJBqleJtKBuEb+2yGAw7cSI8dKMNndaivknb3dyy6CXIQ9i6mh0aC6dJWA9KynVsxGz1NlX jDjt7Pd4b759jRcz5103pzxozrg6sV796E/OLGbUjpMZk7pHAtbpG9QU6VuXgj2wpYQJ5OgtTcI +ft+qw== X-Received: by 2002:a05:600c:4f53:b0:439:8878:5029 with SMTP id 5b1f17b1804b1-442f1a0d906mr25135305e9.2.1747223455027; Wed, 14 May 2025 04:50:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnWl41lYrbfwjbiy1PM1u2OOHTggK1qSmnllwJQPj4jtb2JnyoXL+84o5BHp2qS2crE0qSbg== X-Received: by 2002:a05:600c:4f53:b0:439:8878:5029 with SMTP id 5b1f17b1804b1-442f1a0d906mr25135095e9.2.1747223454616; Wed, 14 May 2025 04:50:54 -0700 (PDT) Date: Wed, 14 May 2025 07:50:52 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Akihiko Odaki , Yui Washizu , Pasha Tatashin , Marcel Apfelbaum Subject: [PULL 15/27] docs: Document composable SR-IOV device Message-ID: <6f9bebf1dc6b54b63be739ea247b3942f841b9e3.1747223385.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.686, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1747223630210116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Signed-off-by: Akihiko Odaki Message-Id: <20250314-sriov-v9-8-57dae8ae3ab5@daynix.com> Tested-by: Yui Washizu Tested-by: Pasha Tatashin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 1 + docs/system/index.rst | 1 + docs/system/sriov.rst | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 docs/system/sriov.rst diff --git a/MAINTAINERS b/MAINTAINERS index 6dacd6d004..b579358cdd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2058,6 +2058,7 @@ F: hw/pci-bridge/* F: qapi/pci.json F: docs/pci* F: docs/specs/*pci* +F: docs/system/sriov.rst =20 PCIE DOE M: Huai-Cheng Kuo diff --git a/docs/system/index.rst b/docs/system/index.rst index c21065e519..718e9d3c56 100644 --- a/docs/system/index.rst +++ b/docs/system/index.rst @@ -39,3 +39,4 @@ or Hypervisor.Framework. multi-process confidential-guest-support vm-templating + sriov diff --git a/docs/system/sriov.rst b/docs/system/sriov.rst new file mode 100644 index 0000000000..a851a66a4b --- /dev/null +++ b/docs/system/sriov.rst @@ -0,0 +1,36 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Compsable SR-IOV device +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +SR-IOV (Single Root I/O Virtualization) is an optional extended capability= of a +PCI Express device. It allows a single physical function (PF) to appear as +multiple virtual functions (VFs) for the main purpose of eliminating softw= are +overhead in I/O from virtual machines. + +There are devices with predefined SR-IOV configurations, but it is also po= ssible +to compose an SR-IOV device yourself. Composing an SR-IOV device is curren= tly +only supported by virtio-net-pci. + +Users can configure an SR-IOV-capable virtio-net device by adding +virtio-net-pci functions to a bus. Below is a command line example: + +.. code-block:: shell + + -netdev user,id=3Dn -netdev user,id=3Do + -netdev user,id=3Dp -netdev user,id=3Dq + -device pcie-root-port,id=3Db + -device virtio-net-pci,bus=3Db,addr=3D0x0.0x3,netdev=3Dq,sriov-pf=3Df + -device virtio-net-pci,bus=3Db,addr=3D0x0.0x2,netdev=3Dp,sriov-pf=3Df + -device virtio-net-pci,bus=3Db,addr=3D0x0.0x1,netdev=3Do,sriov-pf=3Df + -device virtio-net-pci,bus=3Db,addr=3D0x0.0x0,netdev=3Dn,id=3Df + +The VFs specify the paired PF with ``sriov-pf`` property. The PF must be +added after all VFs. It is the user's responsibility to ensure that VFs ha= ve +function numbers larger than one of the PF, and that the function numbers +have a consistent stride. + +You may also need to perform additional steps to activate the SR-IOV featu= re on +your guest. For Linux, refer to [1]_. + +.. [1] https://docs.kernel.org/PCI/pci-iov-howto.html --=20 MST