qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] docs: pcie: describe PCIe option ROMs


From: Heinrich Schuchardt
Subject: Re: [PATCH 1/1] docs: pcie: describe PCIe option ROMs
Date: Wed, 20 Jul 2022 12:26:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.1

On 7/20/22 08:42, Heinrich Schuchardt wrote:
Provide a descriptions of the options that control the emulation of option
ROMS for PCIe devices.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
  docs/pcie.txt | 25 +++++++++++++++++++++++++
  1 file changed, 25 insertions(+)

diff --git a/docs/pcie.txt b/docs/pcie.txt
index 89e3502075..a22c1f69f7 100644
--- a/docs/pcie.txt
+++ b/docs/pcie.txt
@@ -292,6 +292,31 @@ 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``)
+  Specifies that an option ROM is available. If set to ``0``, no option ROM
+  is present.
+
+``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.
+
+``romfile``
+  Defines the name of the file to be loaded as option ROM.
+  Some devices like virtio-net-pci define a default file name.
+  The file size may neither exceed 2 GiB nor ``romsize``.
+
+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. 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,rombar=0

If no ROM file exists, this is good enough.

If it does exist and I create multiple virtio-net-pci devices with rombar=0, I get an error indicating that the same ROM is used twice:

qemu-system-riscv64: -device virtio-net-pci,netdev=eth1,mq=on,rombar=0: duplicate fw_cfg file name: genroms/efi-virtio.rom

I ended up using to solve the problem:

-device virtio-net-pci,netdev=eth1,mq=on,rombar=0,romfile=

I guess some input from the maintainers would be helpful here:

- Why is the file read if rombar=0? Is this a bug?
- Why can't the same option ROM file be used twice? It is read-only.

Best regards

Heinrich

7. Virtio devices
  =================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]