public inbox for pve-devel@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 v3 2/8] tests: cfg2cmd: add q35 + win7 + hostpci test
Date: Tue,  8 Sep 2026 15:52:02 +0200	[thread overview]
Message-ID: <20260908135729.3869365-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260908135729.3869365-1-d.csapak@proxmox.com>

For windows 7 and q35, the hostpci devices have different addresses on
the pcie bus, so test for that.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/test/cfg2cmd/q35-win7-hostpci.conf     | 17 ++++++++++
 src/test/cfg2cmd/q35-win7-hostpci.conf.cmd | 37 ++++++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 src/test/cfg2cmd/q35-win7-hostpci.conf
 create mode 100644 src/test/cfg2cmd/q35-win7-hostpci.conf.cmd

diff --git a/src/test/cfg2cmd/q35-win7-hostpci.conf b/src/test/cfg2cmd/q35-win7-hostpci.conf
new file mode 100644
index 00000000..dac7d538
--- /dev/null
+++ b/src/test/cfg2cmd/q35-win7-hostpci.conf
@@ -0,0 +1,17 @@
+# TEST: Config with q35, hostpci passthrough as pcie & Windows7
+bios: ovmf
+bootdisk: scsi0
+cores: 1
+efidisk0: local:100/vm-100-disk-1.qcow2,size=128K
+hostpci0: f0:42.0
+hostpci1: f0:43.0,pcie=1
+hostpci4: 00:43.1,pcie=1
+machine: q35
+memory: 512
+net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0
+numa: 1
+ostype: win7
+scsihw: virtio-scsi-pci
+smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687
+sockets: 2
+vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d
diff --git a/src/test/cfg2cmd/q35-win7-hostpci.conf.cmd b/src/test/cfg2cmd/q35-win7-hostpci.conf.cmd
new file mode 100644
index 00000000..66f8aec5
--- /dev/null
+++ b/src/test/cfg2cmd/q35-win7-hostpci.conf.cmd
@@ -0,0 +1,37 @@
+/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' \
+  -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
+  -drive 'if=pflash,unit=1,id=drive-efidisk0,format=qcow2,file=/var/lib/vz/images/100/vm-100-disk-1.qcow2' \
+  -smp '2,sockets=2,cores=1,maxcpus=2' \
+  -nodefaults \
+  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
+  -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
+  -global 'kvm-pit.lost_tick_policy=discard' \
+  -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' \
+  -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \
+  -device 'vmgenid,guid=54d1c06c-8f5b-440f-b5b2-6eab1380e13d' \
+  -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \
+  -device 'vfio-pci,host=0000:f0:42.0,id=hostpci0,bus=pci.0,addr=0x10' \
+  -device 'vfio-pci,host=0000:f0:43.0,id=hostpci1,bus=pcie.0,addr=0x11' \
+  -device 'vfio-pci,host=0000:00:43.1,id=hostpci4,bus=pcie.0,addr=0x9' \
+  -device 'VGA,id=vga,bus=pcie.0,addr=0x1' \
+  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
+  -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,bootindex=300' \
+  -rtc 'driftfix=slew,base=localtime' \
+  -machine 'hpet=off,type=pc-q35-5.1+pve0'
-- 
2.47.3





  parent reply	other threads:[~2026-09-08 13:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 13:52 [PATCH qemu-server v3 0/8] pci: bridges: cleanup and hotplug fix Dominik Csapak
2026-09-08 13:52 ` [PATCH qemu-server v3 1/8] tests: cfg2cmd: add test for ivshmem with q35 Dominik Csapak
2026-09-08 13:52 ` Dominik Csapak [this message]
2026-09-08 13:52 ` [PATCH qemu-server v3 3/8] code cleanup: pci: don't export print_pcie_root_port Dominik Csapak
2026-09-08 13:52 ` [PATCH qemu-server v3 4/8] code cleanup: hot-plug: simplify getting bridge for device Dominik Csapak
2026-09-08 13:52 ` [PATCH qemu-server v3 5/8] hotplug: don't try to hotplug bridges Dominik Csapak
2026-09-08 13:52 ` [PATCH qemu-server v3 6/8] cfg2cmd: reject guests with machine version below 5.0 Dominik Csapak
2026-09-08 13:52 ` [PATCH qemu-server v3 7/8] cfg2cmd: pci: add bridges to device list up front Dominik Csapak
2026-09-08 13:52 ` [PATCH qemu-server v3 8/8] cfg2cmd: pci: add pci.4 by default starting with machine version 11.1 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=20260908135729.3869365-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal