From patchwork Sun Aug 14 15:32:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 12942914 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C31B9C25B06 for ; Sun, 14 Aug 2022 15:33:27 +0000 (UTC) Received: from localhost ([::1]:54464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNFcD-00072t-VQ for qemu-devel@archiver.kernel.org; Sun, 14 Aug 2022 11:33:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNFbO-0006FH-8y for qemu-devel@nongnu.org; Sun, 14 Aug 2022 11:32:34 -0400 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]:36110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNFbM-0003uj-MS for qemu-devel@nongnu.org; Sun, 14 Aug 2022 11:32:34 -0400 Received: from workstation5.fritz.box (ip-062-143-094-109.um16.pools.vodafone-ip.de [62.143.94.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id CFF2B3F0DE; Sun, 14 Aug 2022 15:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1660491148; bh=+wfeJV1pyBuwgHaqtb5hJNOUDeVZtoZJune6HwYKWog=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ENkWlxpjY0sHYkSoZx7z9Ly7zBnhz6pl96wme88aTd5MrRRMX7fai/+SREMshcEaJ 5zpOdgpzi1VDQAa9OuqRWcSuoZQqz7Qa87l/Cq4GXVJfZCC33q8fKBX+vEugb21xnM NDYqDmnFAUQY+ppO1v5YdXPrPlUPCly037ByGXT7hGaNi2u/Gstil85BWgBppgof3d vn7L/fQ9B7IB+xgwGAwuqQ1Vwt/3JGFPzzzebYzu9aENRQe/fpFChSvydpnqcmOewC SgKMnXVBtJ/cc8Q6oDCfk1fe1aZny6VrSSaoMLMU5E3LehI9hmdSjq27KBcy15xggI 9HD3CJAynmZ+w== From: Heinrich Schuchardt To: "Michael S . Tsirkin" , Marcel Apfelbaum Cc: qemu-devel@nongnu.org, Heinrich Schuchardt Subject: [PATCH v2 1/1] docs: pcie: describe PCIe option ROMs Date: Sun, 14 Aug 2022 17:32:20 +0200 Message-Id: <20220814153220.2439468-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Received-SPF: pass client-ip=185.125.188.120; envelope-from=heinrich.schuchardt@canonical.com; helo=smtp-relay-canonical-0.canonical.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Provide a descriptions of the options that control the emulation of option ROMS for PCIe devices. Signed-off-by: Heinrich Schuchardt --- v2: correct description of rombar property use romfile= to suppress option ROM loading --- docs/pcie.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/pcie.txt b/docs/pcie.txt index 89e3502075..b60f189bd4 100644 --- a/docs/pcie.txt +++ b/docs/pcie.txt @@ -292,6 +292,34 @@ PCI-PCI Bridge slots can be used for legacy PCI host devices. If you can see the "Express Endpoint" capability in the output, then the device is indeed PCI Express. +8. Option ROM +============= +PCIe devices may provide an option ROM. The following properties control the +emulation of the option ROM: + +``rombar`` (default: ``1``) + For vfio-pci devices a vendor and product ID based denylist exists which + controls if an available option ROM shall be probed. The 'rombar' option + allows to override this setting. The value is used as follows: + 0 = skip probing, 1 = force probing + +``romfile`` + Defines the name of the file to be loaded as option ROM. + The file size may neither exceed 2 GiB nor ``romsize``. + Some devices like virtio-net-pci define a default file name. + +``romsize`` (default: ``-1``) + Specifies the size of the option ROM in bytes. The value must be either + ``-1`` or a power of two. ``-1`` signifies unlimited size. + +Some QEMU PCIe devices like virtio-net-pci use an option ROM by default. In the +following example the option ROM of a virtio-net-pci device is disabled by +specifying an empty ``romfile`` property. This is useful for architectures where +QEMU does not supply an option ROM file. + +.. code-block:: console + + -device virtio-net-pci,netdev=eth1,mq=on,romfile= 7. Virtio devices =================