From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 013371FF0DF for ; Thu, 15 Oct 2026 10:12:00 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 17D4621603; Thu, 15 Oct 2026 10:11:36 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server v2 9/9] machine: add 'pci-layout' option Date: Thu, 15 Oct 2026 10:10:31 +0200 Message-ID: <20261015081041.743422-10-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261015081041.743422-1-d.csapak@proxmox.com> References: <20261015081041.743422-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.242 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) KAM_LOTSOFHASH 0.25 Emails with lots of hash-like gibberish RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JVW5VZI5PV7G2OPFOGLGVLGTBG2W4DEJ X-Message-ID-Hash: JVW5VZI5PV7G2OPFOGLGVLGTBG2W4DEJ X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This allows choosing the new 'grouped' pci layout, which gives every device kind its own set of bridges. With that, the address of a device only depends on its own index, so we can raise the per-kind limits later without moving existing devices. Since the layout is part of the guest ABI, changing it changes the addresses of all devices, so it's only intended for new guests. Guests with the grouped layout always get a qemu-xhci controller, which is also used for the tablet, since the layout does not include the EHCI and UHCI controllers. It puts them behind an usb hub there. The xhci controller is never unplugged there. Signed-off-by: Dominik Csapak --- src/PVE/QemuServer.pm | 23 ++++++--- src/PVE/QemuServer/Machine.pm | 10 ++++ src/PVE/QemuServer/PCI.pm | 3 +- src/PVE/QemuServer/USB.pm | 26 ++++++++-- src/PVE/QemuServer/Virtiofs.pm | 7 ++- src/test/TestsCommon/CommandLineMocks.pm | 24 ++++++++++ src/test/cfg2cmd/q35-grouped-layout.conf | 17 +++++++ src/test/cfg2cmd/q35-grouped-layout.conf.cmd | 47 ++++++++++++++++++ .../cfg2cmd/q35-grouped-virtiofs-viommu.conf | 14 ++++++ .../q35-grouped-virtiofs-viommu.conf.cmd | 46 ++++++++++++++++++ .../simple-grouped-virtiofs-viommu.conf | 16 +++++++ .../simple-grouped-virtiofs-viommu.conf.cmd | 45 +++++++++++++++++ src/test/cfg2cmd/simple-grouped.conf | 15 ++++++ src/test/cfg2cmd/simple-grouped.conf.cmd | 41 ++++++++++++++++ src/test/cfg2cmd/spice-win-grouped.conf | 14 ++++++ src/test/cfg2cmd/spice-win-grouped.conf.cmd | 48 +++++++++++++++++++ src/test/cfg2cmd/virtiofs-viommu.conf | 16 +++++++ src/test/cfg2cmd/virtiofs-viommu.conf.cmd | 40 ++++++++++++++++ 18 files changed, 440 insertions(+), 12 deletions(-) create mode 100644 src/test/cfg2cmd/q35-grouped-layout.conf create mode 100644 src/test/cfg2cmd/q35-grouped-layout.conf.cmd create mode 100644 src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf create mode 100644 src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf.cmd create mode 100644 src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf create mode 100644 src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf.cmd create mode 100644 src/test/cfg2cmd/simple-grouped.conf create mode 100644 src/test/cfg2cmd/simple-grouped.conf.cmd create mode 100644 src/test/cfg2cmd/spice-win-grouped.conf create mode 100644 src/test/cfg2cmd/spice-win-grouped.conf.cmd create mode 100644 src/test/cfg2cmd/virtiofs-viommu.conf create mode 100644 src/test/cfg2cmd/virtiofs-viommu.conf.cmd diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm index fe16e44b..3ad2e080 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -1183,8 +1183,9 @@ sub print_tabletdevice_full { my ($hw_config) = @_; my $usbbus = PVE::QemuServer::USB::get_default_usb_bus($hw_config); + my $port = $hw_config->layout() ne 'legacy' ? '15.7' : '1'; - return "usb-tablet,id=tablet,bus=$usbbus.0,port=1"; + return "usb-tablet,id=tablet,bus=$usbbus.0,port=$port"; } sub print_keyboarddevice_full { @@ -1192,7 +1193,10 @@ sub print_keyboarddevice_full { return if $hw_config->arch() ne 'aarch64'; - return "usb-kbd,id=keyboard,bus=ehci.0,port=2"; + my $usbbus = PVE::QemuServer::USB::get_default_usb_bus($hw_config); + my $port = $hw_config->layout() ne 'legacy' ? '15.8' : '2'; + + return "usb-kbd,id=keyboard,bus=$usbbus.0,port=$port"; } sub print_drive_commandline_full { @@ -1493,6 +1497,7 @@ sub print_vga_device { my $vgamem_mb = $vga->{memory}; my $max_outputs = ''; + my $multifunction = ''; if ($qxlnum) { $type = $id ? 'qxl' : 'qxl-vga'; @@ -1502,6 +1507,10 @@ sub print_vga_device { $max_outputs = ",max_outputs=4"; } } + + if (!$id && $hw_config->windows_version() && $hw_config->layout() ne 'legacy') { + $multifunction = ",multifunction=on"; + } } die "no device-type for $vga->{type}\n" if !$type; @@ -1545,7 +1554,7 @@ sub print_vga_device { if !PVE::Tools::dir_glob_regex('/dev/dri/', "renderD.*"); } - return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}${edidoff}"; + return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}${edidoff}${multifunction}"; } sub vm_is_volid_owner { @@ -3743,7 +3752,9 @@ sub config_to_command { unshift @$devices, '-device', "intel-iommu,intremap=on,caching-mode=on$aw_bits"; push @$machineFlags, 'kernel-irqchip=split'; } elsif ($viommu eq 'virtio') { - push @$devices, '-device', "virtio-iommu-pci$aw_bits"; + # some layouts don't produce an address for it + my $pciaddr = $hw_config->addr('viommu') // ''; + push @$devices, '-device', "virtio-iommu-pci${aw_bits}${pciaddr}"; } } @@ -3759,7 +3770,7 @@ sub config_to_command { push @$machineFlags, 'mem-merge=off' if defined($conf->{'allow-ksm'}) && !$conf->{'allow-ksm'}; - PVE::QemuServer::Virtiofs::config($conf, $vmid, $devices); + PVE::QemuServer::Virtiofs::config($conf, $vmid, $hw_config, $devices); push @$cmd, @$devices; push @$cmd, '-rtc', join(',', @$rtcFlags) if scalar(@$rtcFlags); @@ -4876,7 +4887,7 @@ sub vmconfig_hotplug_pending { $has_usb = 1; last; } - if (!$has_usb) { + if (!$has_usb && $hw_config->()->layout() eq 'legacy') { vm_deviceunplug($vmid, $conf, 'xhci'); } } diff --git a/src/PVE/QemuServer/Machine.pm b/src/PVE/QemuServer/Machine.pm index e60377b2..041024c5 100644 --- a/src/PVE/QemuServer/Machine.pm +++ b/src/PVE/QemuServer/Machine.pm @@ -99,6 +99,16 @@ my $machine_fmt = { "Enables S4 power state. Defaults to false beginning with machine types 9.2+pve1, true before.", optional => 1, }, + 'pci-layout' => { + type => 'string', + optional => 1, + default => 'legacy', + enum => [qw(legacy grouped)], + description => + "The PCI(e) address layout of the guest. 'grouped' gives every device kind" + . " its own set of bridges. Changing it changes the addresses of all devices. This" + . " option is experimental.", + }, }; PVE::JSONSchema::register_format('pve-qemu-machine-fmt', $machine_fmt); diff --git a/src/PVE/QemuServer/PCI.pm b/src/PVE/QemuServer/PCI.pm index 6b4eb179..b35d7177 100644 --- a/src/PVE/QemuServer/PCI.pm +++ b/src/PVE/QemuServer/PCI.pm @@ -622,6 +622,7 @@ sub hardware_config { push @$hostpcie, $i if $res->{pcie}; } + my $machine_conf = PVE::QemuServer::Machine::parse_machine($conf->{machine}); my $machine_type = PVE::QemuServer::Machine::get_vm_machine($conf, $forcemachine); my ($major, $minor, $patch, $pve) = PVE::QemuServer::Helpers::version_parts($machine_version); @@ -635,7 +636,7 @@ sub hardware_config { $major, $minor, $pve, - 'legacy', + $machine_conf->{'pci-layout'} // 'legacy', $hostpcie, ); } diff --git a/src/PVE/QemuServer/USB.pm b/src/PVE/QemuServer/USB.pm index 42b4d3a3..b0024b07 100644 --- a/src/PVE/QemuServer/USB.pm +++ b/src/PVE/QemuServer/USB.pm @@ -121,13 +121,32 @@ my sub assert_usb_index_is_useable { sub get_default_usb_bus { my ($hw_config) = @_; - # we use uhci for old VMs because tablet driver was buggy in older qemu - return $hw_config->machine_type() eq 'i440fx' ? 'uhci' : 'ehci'; + my $layout = $hw_config->layout(); + if ($layout eq 'legacy') { + if ($hw_config->machine_type() eq 'i440fx') { + # we use uhci for old VMs because tablet driver was buggy in older qemu + return 'uhci'; + } else { + return 'ehci'; + } + } else { + return 'xhci'; + } } sub get_usb_controllers { my ($conf, $hw_config) = @_; + if ($hw_config->layout() ne 'legacy') { + my $addr = $hw_config->addr('xhci'); + return ( + "-device", print_qemu_xhci_controller($addr), + # ports 1-14 are reserved for usbX, qemu-xhci has only 15 ports so + # use a hub for tablet and keyboard + "-device", "usb-hub,id=hub,bus=xhci.0,port=15", + ); + } + my $devices = []; my $pciaddr = ""; @@ -183,7 +202,8 @@ sub get_usb_devices { my $use_qemu_xhci = $hw_config->version_at_least(7, 1) && defined($ostype) - && ($ostype eq 'l26' || windows_version($ostype) > 7); + && ($ostype eq 'l26' || windows_version($ostype) > 7) + || $hw_config->layout() ne 'legacy'; for (my $i = 0; $i < $MAX_USB_DEVICES; $i++) { my $devname = "usb$i"; diff --git a/src/PVE/QemuServer/Virtiofs.pm b/src/PVE/QemuServer/Virtiofs.pm index b181db5f..32993d65 100644 --- a/src/PVE/QemuServer/Virtiofs.pm +++ b/src/PVE/QemuServer/Virtiofs.pm @@ -92,7 +92,7 @@ sub assert_virtiofs_config { } sub config { - my ($conf, $vmid, $devices) = @_; + my ($conf, $vmid, $hw_config, $devices) = @_; for (my $i = 0; $i < max_virtiofs(); $i++) { my $opt = "virtiofs$i"; @@ -104,12 +104,15 @@ sub config { push @$devices, '-chardev', "socket,id=virtiofs$i,path=$socket_path_root/vm$vmid-fs$i"; + # some layouts don't produce an address for it + my $pciaddr = $hw_config->addr($opt) // ''; + # queue-size is set 1024 because of bug with Windows guests: # https://bugzilla.redhat.com/show_bug.cgi?id=1873088 # 1024 is also always used in the virtiofs documentations: # https://gitlab.com/virtio-fs/virtiofsd#examples push @$devices, '-device', - 'vhost-user-fs-pci,queue-size=1024' . ",chardev=virtiofs$i,tag=$virtiofs->{dirid}"; + "vhost-user-fs-pci,queue-size=1024,chardev=virtiofs$i,tag=$virtiofs->{dirid}${pciaddr}"; } } diff --git a/src/test/TestsCommon/CommandLineMocks.pm b/src/test/TestsCommon/CommandLineMocks.pm index a4b91136..c2e2f918 100644 --- a/src/test/TestsCommon/CommandLineMocks.pm +++ b/src/test/TestsCommon/CommandLineMocks.pm @@ -187,6 +187,19 @@ my $pci_map_config = { my $usb_map_config = {}; +my $dir_map_config = { + ids => { + share1 => { + type => 'dir', + map => ['node=localhost,path=/mnt/share1'], + }, + share2 => { + type => 'dir', + map => ['node=localhost,path=/mnt/share2'], + }, + }, +}; + my $cpu_hw_capabilities = { # Gathered from an AMD EPYC 9475F running kernel 6.11.11-2-pve 'amd-turin-9005' => @@ -527,6 +540,17 @@ $mapping_pci_module->mock( }, ); +our $mapping_dir_module = Test::MockModule->new("PVE::Mapping::Dir"); +$mapping_dir_module->mock( + config => sub { + return $dir_map_config; + }, + # the mapped paths do not exist on the test host + assert_valid => sub { + return; + }, +); + our $pci_module = Test::MockModule->new("PVE::QemuServer::PCI"); $pci_module->mock( reserve_pci_usage => sub { diff --git a/src/test/cfg2cmd/q35-grouped-layout.conf b/src/test/cfg2cmd/q35-grouped-layout.conf new file mode 100644 index 00000000..e11b0414 --- /dev/null +++ b/src/test/cfg2cmd/q35-grouped-layout.conf @@ -0,0 +1,17 @@ +# TEST: Config with q35, Linux, SPICE, USB & grouped pci-layout +# +bios: ovmf +bootdisk: scsi0 +cores: 2 +efidisk0: local:100/vm-100-disk-1.qcow2,size=128K +machine: q35,pci-layout=grouped +memory: 512 +net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0 +ostype: l26 +scsihw: virtio-scsi-pci +smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687 +usb0: spice +usb1: host=1234:5678 +usb2: host=1-2,usb3=1 +vga: qxl +vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d diff --git a/src/test/cfg2cmd/q35-grouped-layout.conf.cmd b/src/test/cfg2cmd/q35-grouped-layout.conf.cmd new file mode 100644 index 00000000..2cac0f3f --- /dev/null +++ b/src/test/cfg2cmd/q35-grouped-layout.conf.cmd @@ -0,0 +1,47 @@ +/usr/bin/kvm \ + -id 8006 \ + -name vm8006 \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -object 'monitor-qmp,chardev=qmp,id=monitor-qmp' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \ + -object 'monitor-qmp,chardev=qmp-event,id=monitor-qmp-event' \ + -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"}' \ + -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \ + -smp '2,sockets=1,cores=2,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' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 512 \ + -global 'ICH9-LPC.disable_s3=1' \ + -global 'ICH9-LPC.disable_s4=1' \ + -device 'pcie-pci-bridge,id=pve.sys0,bus=pcie.0,addr=0x4,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.virtio-fs0,bus=pcie.0,addr=0x5,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.net0,bus=pcie.0,addr=0x6,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.net1,bus=pcie.0,addr=0x6.1' \ + -device 'pcie-pci-bridge,id=pve.scsi0,bus=pcie.0,addr=0x7,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.virtio-blk0,bus=pcie.0,addr=0x8,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.hostpci0,bus=pcie.0,addr=0x9,multifunction=on' \ + -device 'vmgenid,guid=54d1c06c-8f5b-440f-b5b2-6eab1380e13d' \ + -device 'qemu-xhci,p2=15,p3=15,id=xhci,bus=pve.sys0,addr=0x3' \ + -device 'usb-hub,id=hub,bus=xhci.0,port=15' \ + -chardev 'spicevmc,id=usbredirchardev0,name=usbredir' \ + -device 'usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=xhci.0,port=1' \ + -device 'usb-host,bus=xhci.0,port=2,vendorid=0x1234,productid=0x5678,id=usb1' \ + -device 'usb-host,bus=xhci.0,port=3,hostbus=1,hostport=2,id=usb2' \ + -device 'qxl-vga,id=vga,max_outputs=4,bus=pcie.0,addr=0x2' \ + -device 'virtio-serial,id=spice,bus=pve.sys0,addr=0x5' \ + -chardev 'spicevmc,id=vdagent,name=vdagent' \ + -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \ + -spice 'tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pve.sys0,addr=0x2,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=pve.net0,addr=0x1,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=q35+pve0' diff --git a/src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf b/src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf new file mode 100644 index 00000000..ddc3165b --- /dev/null +++ b/src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf @@ -0,0 +1,14 @@ +# TEST: q35 with grouped pci-layout places virtiofs and virtio-iommu on their reserved addresses +bios: ovmf +bootdisk: scsi0 +cores: 2 +efidisk0: local:100/vm-100-disk-1.qcow2,size=128K +machine: q35,pci-layout=grouped,viommu=virtio +memory: 512 +net0: virtio=2E:01:68:F9:9C:87,bridge=vmbr0 +ostype: l26 +scsihw: virtio-scsi-pci +smbios1: uuid=3dd750ce-d910-44d0-9493-525c0be4e687 +virtiofs0: share1 +virtiofs1: share2,cache=always +vmgenid: 54d1c06c-8f5b-440f-b5b2-6eab1380e13d diff --git a/src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf.cmd b/src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf.cmd new file mode 100644 index 00000000..ce9c13de --- /dev/null +++ b/src/test/cfg2cmd/q35-grouped-virtiofs-viommu.conf.cmd @@ -0,0 +1,46 @@ +/usr/bin/kvm \ + -id 8006 \ + -name vm8006 \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -object 'monitor-qmp,chardev=qmp,id=monitor-qmp' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \ + -object 'monitor-qmp,chardev=qmp-event,id=monitor-qmp-event' \ + -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"}' \ + -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \ + -smp '2,sockets=1,cores=2,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' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 512 \ + -object 'memory-backend-memfd,id=virtiofs-mem,size=512M,share=on' \ + -global 'ICH9-LPC.disable_s3=1' \ + -global 'ICH9-LPC.disable_s4=1' \ + -device 'pcie-pci-bridge,id=pve.sys0,bus=pcie.0,addr=0x4,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.virtio-fs0,bus=pcie.0,addr=0x5,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.net0,bus=pcie.0,addr=0x6,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.net1,bus=pcie.0,addr=0x6.1' \ + -device 'pcie-pci-bridge,id=pve.scsi0,bus=pcie.0,addr=0x7,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.virtio-blk0,bus=pcie.0,addr=0x8,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.hostpci0,bus=pcie.0,addr=0x9,multifunction=on' \ + -device 'vmgenid,guid=54d1c06c-8f5b-440f-b5b2-6eab1380e13d' \ + -device 'qemu-xhci,p2=15,p3=15,id=xhci,bus=pve.sys0,addr=0x3' \ + -device 'usb-hub,id=hub,bus=xhci.0,port=15' \ + -device 'usb-tablet,id=tablet,bus=xhci.0,port=15.7' \ + -device 'VGA,id=vga,bus=pcie.0,addr=0x2' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pve.sys0,addr=0x2,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=pve.net0,addr=0x1,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300,host_mtu=1500,host_tunnel=off' \ + -device 'virtio-iommu-pci,bus=pcie.0,addr=0x3' \ + -chardev 'socket,id=virtiofs0,path=/run/qemu-server/virtiofsd/vm8006-fs0' \ + -device 'vhost-user-fs-pci,queue-size=1024,chardev=virtiofs0,tag=share1,bus=pve.virtio-fs0,addr=0x1' \ + -chardev 'socket,id=virtiofs1,path=/run/qemu-server/virtiofsd/vm8006-fs1' \ + -device 'vhost-user-fs-pci,queue-size=1024,chardev=virtiofs1,tag=share2,bus=pve.virtio-fs0,addr=0x2' \ + -machine 'pflash0=pflash0,pflash1=drive-efidisk0,hpet=off,memory-backend=virtiofs-mem,type=q35+pve0' diff --git a/src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf b/src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf new file mode 100644 index 00000000..48e62907 --- /dev/null +++ b/src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf @@ -0,0 +1,16 @@ +# TEST: i440fx with grouped pci-layout places virtiofs and virtio-iommu on their reserved addresses +bootdisk: scsi0 +cores: 3 +ide2: none,media=cdrom +machine: pc,pci-layout=grouped,viommu=virtio +memory: 768 +name: simple +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +numa: 0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +virtiofs0: share1 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 diff --git a/src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf.cmd b/src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf.cmd new file mode 100644 index 00000000..a6ec8c0c --- /dev/null +++ b/src/test/cfg2cmd/simple-grouped-virtiofs-viommu.conf.cmd @@ -0,0 +1,45 @@ +/usr/bin/kvm \ + -id 8006 \ + -name simple \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -object 'monitor-qmp,chardev=qmp,id=monitor-qmp' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \ + -object 'monitor-qmp,chardev=qmp-event,id=monitor-qmp-event' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '3,sockets=1,cores=3,maxcpus=3' \ + -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' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 768 \ + -object 'memory-backend-memfd,id=virtiofs-mem,size=768M,share=on' \ + -object '{"id":"throttle-drive-scsi0","limits":{},"qom-type":"throttle-group"}' \ + -global 'PIIX4_PM.disable_s3=1' \ + -global 'PIIX4_PM.disable_s4=1' \ + -device 'pci-bridge,id=pve.sys0,chassis_nr=1,bus=pci.0,addr=0x4,multifunction=on' \ + -device 'pci-bridge,id=pve.virtio-fs0,chassis_nr=2,bus=pci.0,addr=0x5,multifunction=on' \ + -device 'pci-bridge,id=pve.net0,chassis_nr=3,bus=pci.0,addr=0x6,multifunction=on' \ + -device 'pci-bridge,id=pve.net1,chassis_nr=4,bus=pci.0,addr=0x6.1' \ + -device 'pci-bridge,id=pve.scsi0,chassis_nr=5,bus=pci.0,addr=0x7,multifunction=on' \ + -device 'pci-bridge,id=pve.virtio-blk0,chassis_nr=6,bus=pci.0,addr=0x8,multifunction=on' \ + -device 'pci-bridge,id=pve.hostpci0,chassis_nr=7,bus=pci.0,addr=0x9,multifunction=on' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'qemu-xhci,p2=15,p3=15,id=xhci,bus=pve.sys0,addr=0x3' \ + -device 'usb-hub,id=hub,bus=xhci.0,port=15' \ + -device 'usb-tablet,id=tablet,bus=xhci.0,port=15.7' \ + -device 'VGA,id=vga,bus=pci.0,addr=0x2' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pve.sys0,addr=0x2,free-page-reporting=on' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \ + -device 'virtio-scsi-pci,id=scsihw0,bus=pve.scsi0,addr=0x1' \ + -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \ + -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \ + -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=A2:C0:43:77:08:A0,netdev=net0,bus=pve.net0,addr=0x1,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300,host_mtu=1500,host_tunnel=off' \ + -device 'virtio-iommu-pci,bus=pci.0,addr=0x3' \ + -chardev 'socket,id=virtiofs0,path=/run/qemu-server/virtiofsd/vm8006-fs0' \ + -device 'vhost-user-fs-pci,queue-size=1024,chardev=virtiofs0,tag=share1,bus=pve.virtio-fs0,addr=0x1' \ + -machine 'hpet=off,memory-backend=virtiofs-mem,type=pc+pve0' diff --git a/src/test/cfg2cmd/simple-grouped.conf b/src/test/cfg2cmd/simple-grouped.conf new file mode 100644 index 00000000..b9b3bb34 --- /dev/null +++ b/src/test/cfg2cmd/simple-grouped.conf @@ -0,0 +1,15 @@ +# TEST: Simple test for a basic configuration with grouped pci layout +bootdisk: scsi0 +cores: 3 +ide2: none,media=cdrom +machine: pc,pci-layout=grouped +memory: 768 +name: simple +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +numa: 0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 diff --git a/src/test/cfg2cmd/simple-grouped.conf.cmd b/src/test/cfg2cmd/simple-grouped.conf.cmd new file mode 100644 index 00000000..c078b037 --- /dev/null +++ b/src/test/cfg2cmd/simple-grouped.conf.cmd @@ -0,0 +1,41 @@ +/usr/bin/kvm \ + -id 8006 \ + -name simple \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -object 'monitor-qmp,chardev=qmp,id=monitor-qmp' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \ + -object 'monitor-qmp,chardev=qmp-event,id=monitor-qmp-event' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '3,sockets=1,cores=3,maxcpus=3' \ + -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' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 768 \ + -object '{"id":"throttle-drive-scsi0","limits":{},"qom-type":"throttle-group"}' \ + -global 'PIIX4_PM.disable_s3=1' \ + -global 'PIIX4_PM.disable_s4=1' \ + -device 'pci-bridge,id=pve.sys0,chassis_nr=1,bus=pci.0,addr=0x4,multifunction=on' \ + -device 'pci-bridge,id=pve.virtio-fs0,chassis_nr=2,bus=pci.0,addr=0x5,multifunction=on' \ + -device 'pci-bridge,id=pve.net0,chassis_nr=3,bus=pci.0,addr=0x6,multifunction=on' \ + -device 'pci-bridge,id=pve.net1,chassis_nr=4,bus=pci.0,addr=0x6.1' \ + -device 'pci-bridge,id=pve.scsi0,chassis_nr=5,bus=pci.0,addr=0x7,multifunction=on' \ + -device 'pci-bridge,id=pve.virtio-blk0,chassis_nr=6,bus=pci.0,addr=0x8,multifunction=on' \ + -device 'pci-bridge,id=pve.hostpci0,chassis_nr=7,bus=pci.0,addr=0x9,multifunction=on' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'qemu-xhci,p2=15,p3=15,id=xhci,bus=pve.sys0,addr=0x3' \ + -device 'usb-hub,id=hub,bus=xhci.0,port=15' \ + -device 'usb-tablet,id=tablet,bus=xhci.0,port=15.7' \ + -device 'VGA,id=vga,bus=pci.0,addr=0x2' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pve.sys0,addr=0x2,free-page-reporting=on' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \ + -device 'virtio-scsi-pci,id=scsihw0,bus=pve.scsi0,addr=0x1' \ + -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \ + -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \ + -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=A2:C0:43:77:08:A0,netdev=net0,bus=pve.net0,addr=0x1,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300,host_mtu=1500,host_tunnel=off' \ + -machine 'hpet=off,type=pc+pve0' diff --git a/src/test/cfg2cmd/spice-win-grouped.conf b/src/test/cfg2cmd/spice-win-grouped.conf new file mode 100644 index 00000000..5cf7aea5 --- /dev/null +++ b/src/test/cfg2cmd/spice-win-grouped.conf @@ -0,0 +1,14 @@ +# TEST: Windows with SPICE multi-monitor (qxl3), a SPICE USB port & grouped pci-layout +bios: ovmf +cores: 2 +efidisk0: local:100/vm-100-disk-1.qcow2,size=128K +machine: pc-q35-11.1,pci-layout=grouped +memory: 2048 +name: spicewin +net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0 +ostype: win11 +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec461 +usb0: spice +vga: qxl3 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf7 diff --git a/src/test/cfg2cmd/spice-win-grouped.conf.cmd b/src/test/cfg2cmd/spice-win-grouped.conf.cmd new file mode 100644 index 00000000..1e8320a3 --- /dev/null +++ b/src/test/cfg2cmd/spice-win-grouped.conf.cmd @@ -0,0 +1,48 @@ +/usr/bin/kvm \ + -id 8006 \ + -name spicewin \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -object 'monitor-qmp,chardev=qmp,id=monitor-qmp' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \ + -object 'monitor-qmp,chardev=qmp-event,id=monitor-qmp-event' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec461' \ + -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=1,cores=2,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,-cet-ibt,-cet-ss,enforce,hv_evmcs,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vpindex,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep' \ + -m 2048 \ + -global 'ICH9-LPC.disable_s3=1' \ + -global 'ICH9-LPC.disable_s4=1' \ + -device 'pcie-pci-bridge,id=pve.sys0,bus=pcie.0,addr=0x4,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.virtio-fs0,bus=pcie.0,addr=0x5,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.net0,bus=pcie.0,addr=0x6,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.net1,bus=pcie.0,addr=0x6.1' \ + -device 'pcie-pci-bridge,id=pve.scsi0,bus=pcie.0,addr=0x7,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.virtio-blk0,bus=pcie.0,addr=0x8,multifunction=on' \ + -device 'pcie-pci-bridge,id=pve.hostpci0,bus=pcie.0,addr=0x9,multifunction=on' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf7' \ + -device 'qemu-xhci,p2=15,p3=15,id=xhci,bus=pve.sys0,addr=0x3' \ + -device 'usb-hub,id=hub,bus=xhci.0,port=15' \ + -chardev 'spicevmc,id=usbredirchardev0,name=usbredir' \ + -device 'usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=xhci.0,port=1' \ + -device 'qxl-vga,id=vga,bus=pcie.0,addr=0x2,multifunction=on' \ + -device 'qxl,id=vga1,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x2.1' \ + -device 'qxl,id=vga2,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x2.2' \ + -device 'virtio-serial,id=spice,bus=pve.sys0,addr=0x5' \ + -chardev 'spicevmc,id=vdagent,name=vdagent' \ + -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \ + -spice 'tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pve.sys0,addr=0x2,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=A2:C0:43:77:08:A1,netdev=net0,bus=pve.net0,addr=0x1,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=300,host_mtu=1500,host_tunnel=off' \ + -rtc 'driftfix=slew,base=localtime' \ + -machine 'pflash0=pflash0,pflash1=drive-efidisk0,hpet=off,type=pc-q35-11.1+pve0' diff --git a/src/test/cfg2cmd/virtiofs-viommu.conf b/src/test/cfg2cmd/virtiofs-viommu.conf new file mode 100644 index 00000000..83cd1907 --- /dev/null +++ b/src/test/cfg2cmd/virtiofs-viommu.conf @@ -0,0 +1,16 @@ +# TEST: legacy pci-layout keeps virtiofs and virtio-iommu without an explicit address +bootdisk: scsi0 +cores: 3 +ide2: none,media=cdrom +machine: pc,viommu=virtio +memory: 768 +name: simple +net0: virtio=A2:C0:43:77:08:A0,bridge=vmbr0 +numa: 0 +ostype: l26 +scsi0: local:8006/vm-8006-disk-0.qcow2,discard=on,size=104858K +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +sockets: 1 +virtiofs0: share1 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 diff --git a/src/test/cfg2cmd/virtiofs-viommu.conf.cmd b/src/test/cfg2cmd/virtiofs-viommu.conf.cmd new file mode 100644 index 00000000..8fb0c249 --- /dev/null +++ b/src/test/cfg2cmd/virtiofs-viommu.conf.cmd @@ -0,0 +1,40 @@ +/usr/bin/kvm \ + -id 8006 \ + -name simple \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -object 'monitor-qmp,chardev=qmp,id=monitor-qmp' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' \ + -object 'monitor-qmp,chardev=qmp-event,id=monitor-qmp-event' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '3,sockets=1,cores=3,maxcpus=3' \ + -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' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 768 \ + -object 'memory-backend-memfd,id=virtiofs-mem,size=768M,share=on' \ + -object '{"id":"throttle-drive-scsi0","limits":{},"qom-type":"throttle-group"}' \ + -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.0,addr=0x1f' \ + -device 'pci-bridge,id=pci.4,chassis_nr=4,bus=pci.1,addr=0x1c' \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' \ + -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' \ + -device 'VGA,id=vga,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' \ + -device 'ide-cd,bus=ide.1,unit=0,id=ide2,bootindex=200' \ + -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \ + -blockdev '{"detect-zeroes":"unmap","discard":"unmap","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"qcow2","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"unmap","discard":"unmap","driver":"file","filename":"/var/lib/vz/images/8006/vm-8006-disk-0.qcow2","node-name":"ecd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"fcd04be4259153b8293415fefa2a84c","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' \ + -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' \ + -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=A2:C0:43:77:08:A0,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' \ + -device virtio-iommu-pci \ + -chardev 'socket,id=virtiofs0,path=/run/qemu-server/virtiofsd/vm8006-fs0' \ + -device 'vhost-user-fs-pci,queue-size=1024,chardev=virtiofs0,tag=share1' \ + -machine 'hpet=off,memory-backend=virtiofs-mem,type=pc+pve0' -- 2.47.3