all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 2/4] tests: add test for legacy-igd passthrough
Date: Mon,  7 Sep 2026 13:00:19 +0200	[thread overview]
Message-ID: <20260907110621.2122120-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260907110621.2122120-1-d.csapak@proxmox.com>

this has some implications for pci address calculation (e.g. for pci.2)
so having a test for it will avoid some problems.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 .../cfg2cmd/linux-hostpci-legacy-igd.conf     | 16 ++++++++
 .../cfg2cmd/linux-hostpci-legacy-igd.conf.cmd | 38 +++++++++++++++++++
 src/test/run_config2command_tests.pl          |  1 +
 3 files changed, 55 insertions(+)
 create mode 100644 src/test/cfg2cmd/linux-hostpci-legacy-igd.conf
 create mode 100644 src/test/cfg2cmd/linux-hostpci-legacy-igd.conf.cmd

diff --git a/src/test/cfg2cmd/linux-hostpci-legacy-igd.conf b/src/test/cfg2cmd/linux-hostpci-legacy-igd.conf
new file mode 100644
index 00000000..37f3cfee
--- /dev/null
+++ b/src/test/cfg2cmd/linux-hostpci-legacy-igd.conf
@@ -0,0 +1,16 @@
+# TEST: Config with legacy-igd
+bios: ovmf
+bootdisk: scsi0
+cores: 1
+efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+hostpci0: 00:02.0,legacy-igd=on
+machine: pc
+memory: 512
+net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
+numa: 1
+ostype: l26
+scsihw: virtio-scsi-pci
+smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
+sockets: 2
+vga: none
+vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
diff --git a/src/test/cfg2cmd/linux-hostpci-legacy-igd.conf.cmd b/src/test/cfg2cmd/linux-hostpci-legacy-igd.conf.cmd
new file mode 100644
index 00000000..21dd22ef
--- /dev/null
+++ b/src/test/cfg2cmd/linux-hostpci-legacy-igd.conf.cmd
@@ -0,0 +1,38 @@
+/usr/bin/kvm \
+  -id 8006 \
+  -name vm8006 \
+  -no-shutdown \
+  -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \
+  -mon 'chardev=qmp,mode=control' \
+  -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \
+  -mon 'chardev=qmp-event,mode=control' \
+  -pidfile /var/run/qemu-server/8006.pid \
+  -daemonize \
+  -smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e687' \
+  -object '{"id":"throttle-drive-efidisk0","limits":{},"qom-type":"throttle-group"}' \
+  -blockdev '{"driver":"raw","file":{"driver":"file","filename":"/usr/share/pve-edk2-firmware//OVMF_CODE.fd"},"node-name":"pflash0","read-only":true}' \
+  -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"file","filename":"/var/lib/vz/images/100/vm-100-disk-1.qcow2","node-name":"e70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"f70e3017c5a79fdee5a04aa92ac1e9c","read-only":false},"node-name":"drive-efidisk0","read-only":false,"throttle-group":"throttle-drive-efidisk0"}' \
+  -smp '2,sockets=2,cores=1,maxcpus=2' \
+  -nodefaults \
+  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+  -vga none \
+  -nographic \
+  -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \
+  -m 512 \
+  -object 'memory-backend-ram,id=ram-node0,size=256M' \
+  -numa 'node,nodeid=0,cpus=0,memdev=ram-node0' \
+  -object 'memory-backend-ram,id=ram-node1,size=256M' \
+  -numa 'node,nodeid=1,cpus=1,memdev=ram-node1' \
+  -global 'PIIX4_PM.disable_s3=1' \
+  -global 'PIIX4_PM.disable_s4=1' \
+  -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
+  -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.1,addr=0x1e' \
+  -device 'vmgenid,guid=54d1c06c-8f5b-440f-b5b2-6eab1380e13d' \
+  -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \
+  -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \
+  -device 'vfio-pci,host=0000:00:02.0,id=hostpci0,bus=pci.0,addr=0x2' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
+  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \
+  -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' \
+  -device 'virtio-net-pci,mac=2E:01:68:F9:9C:87,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300,host_mtu=1500,host_tunnel=off' \
+  -machine 'pflash0=pflash0,pflash1=drive-efidisk0,hpet=off,type=pc+pve0'
diff --git a/src/test/run_config2command_tests.pl b/src/test/run_config2command_tests.pl
index 47250c67..28f538d3 100755
--- a/src/test/run_config2command_tests.pl
+++ b/src/test/run_config2command_tests.pl
@@ -128,6 +128,7 @@ my $base_env = {
 };
 
 my $pci_devs = [
+    "0000:00:02.0",
     "0000:00:43.1",
     "0000:00:f4.0",
     "0000:00:ff.1",
-- 
2.47.3





  parent reply	other threads:[~2026-09-07 11:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 11:00 [PATCH qemu-server 0/4] pci: bridges: cleanup and hotplug fix Dominik Csapak
2026-09-07 11:00 ` [PATCH qemu-server 1/4] tests: add test with q35 and scsihw2 Dominik Csapak
2026-09-07 11:00 ` Dominik Csapak [this message]
2026-09-07 11:00 ` [PATCH qemu-server 3/4] pci: don't try to hotplug bridges Dominik Csapak
2026-09-07 11:00 ` [PATCH qemu-server 4/4] pci: bridges: add bridges to devices up front Dominik Csapak
2026-09-07 12:47 ` superseded: [PATCH qemu-server 0/4] pci: bridges: cleanup and hotplug fix Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260907110621.2122120-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal