RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2019314 - [ovmf] nc broken after hotplug device for windows guest
Summary: [ovmf] nc broken after hotplug device for windows guest
Keywords:
Status: CLOSED DUPLICATE of bug 2004829
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.0
Hardware: x86_64
OS: Windows
high
high
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: CongLi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-02 08:16 UTC by menli@redhat.com
Modified: 2021-11-24 00:53 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-04 08:46:52 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-101463 0 None None None 2021-11-02 08:18:19 UTC

Description menli@redhat.com 2021-11-02 08:16:47 UTC
Description of problem:
nc broken after hotplug for windows guest

Version-Release number of selected component (if applicable):
qemu-kvm-6.1.0-5.el9.x86_64
kernel-5.14.0-7.el9.x86_64
seabios-bin-1.14.0-6.el9.noarch
virtio-win-prewhql-0.1-213.iso


How reproducible:
100%

Steps to Reproduce:
1. start a ovmf windows guest
 /usr/libexec/qemu-kvm \
    -name 'ovmf' \
    -machine q35 \
    -nodefaults \
    -vga std  \
    -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x3 \
    -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x3.0x1 \
    -device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x3.0x2 \
    -device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x3.0x3 \
    -device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x3.0x4 \
    -device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x3.0x5 \
    -device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x3.0x6 \
    -device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x3.0x7 \
    -blockdev node-name=file_stg1,driver=file,cache.direct=on,cache.no-flush=off,filename=/home/123/win2019-64-virtio.qcow2,aio=threads \
    -blockdev node-name=drive_stg1,driver=qcow2,cache.direct=on,cache.no-flush=off,file=file_stg1 \
    -device virtio-blk-pci,id=stg1,drive=drive_stg1,bus=pci.8,addr=0x0 \
    -device virtio-net-pci,mac=9a:36:83:b6:3d:05,id=idJVpmsF,netdev=id23ZUK6,bus=pci.3  \
    -netdev tap,id=id23ZUK6,vhost=on \
    -m 14336  \
    -smp 2,maxcpus=4 \
     -cpu 'Skylake-Server-IBRS',ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,hv_stimer,hv_synic,hv_vpindex,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi,kvm_pv_unhalt=on \
    -drive id=drive_cd1,if=none,snapshot=off,aio=threads,cache=none,media=cdrom,file=/home/kvm_autotest_root/iso/windows/winutils.iso\
    -device ide-cd,id=cd2,drive=drive_cd1,bus=ide.0,unit=0 \
    -device piix3-usb-uhci,id=usb -device usb-tablet,id=input0 \
    -vnc :10  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -qmp tcp:0:1231,server,nowait \
    -monitor stdio \
    -drive file=/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on  \
    -drive file=/home/OVMF_VARS.fd,if=pflash,format=raw,unit=1  \


2. connect to guest session: 
# nc -C $guest_ip 10022

3. hotplug blk device 

{"execute": "blockdev-add", "arguments": {"node-name": "file_stg0", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/storage0.raw", "cache": {"direct": true, "no-flush": false}}, "id": "hM7JFSeo"}
{"return": {}, "id": "hM7JFSeo"}
{"execute": "blockdev-add", "arguments": {"node-name": "drive_stg0", "driver": "raw", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_stg0"}, "id": "QOuMpwwZ"}
{"return": {}, "id": "QOuMpwwZ"}
{"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "stg0", "drive": "drive_stg0", "write-cache": "on", "bus": "pci.7", "addr": "0x0"}, "id": "T8sSU2i0"}
{"return": {}, "id": "T8sSU2i0"}


Actual results:
after step3 hotplug, Ncat: Connection reset by peer.



Expected results:
Ncat should connect normally after hotplug.

Additional info:
1. not reproduce this issue with seabios
2. not hit on qemu-kvm-6.0.0-30.module+el8.5.0+12586+476da3e1.x86_64

Comment 1 menli@redhat.com 2021-11-02 10:20:52 UTC
edk2 version:

edk2-ovmf-20210527gite1999b264f1f-6.el9.noarch

Comment 2 Xueqiang Wei 2021-11-02 23:49:15 UTC
I found the nc disconnection only at the first time.


Versions:
kernel-5.14.0-1.7.1.el9.x86_64
qemu-kvm-6.1.0-6.el9
edk2-ovmf-20210527gite1999b264f1f-7.el9.noarch
win11 with virtio-win-prewhql-0.1-211.iso


1. boot a Win11 guest

# mkdir /tmp/mytpm
# /usr/bin/swtpm_setup --tpm2 --tpmstate /tmp/mytpm --create-ek-cert --create-platform-cert --overwrite --lock-nvram
# /usr/bin/swtpm socket --daemon --ctrl type=unixio,path=/tmp/avocado_596hxgoj/avocado-vt-vm1_tpm0_swtpm.sock,mode=0600 --tpmstate dir=/tmp/mytpm,mode=0600 --tpm2

/usr/libexec/qemu-kvm \
    -S  \
    -name 'avocado-vt-vm1'  \
    -sandbox on  \
    -blockdev node-name=file_ovmf_code,driver=file,filename=/usr/share/OVMF/OVMF_CODE.secboot.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_code,driver=raw,read-only=on,file=file_ovmf_code \
    -blockdev node-name=file_ovmf_vars,driver=file,filename=/home/kvm_autotest_root/images/avocado-vt-vm1_win11-64-virtio-scsi.qcow2_VARS.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_vars,driver=raw,read-only=off,file=file_ovmf_vars \
    -machine q35,memory-backend=mem-machine_mem,pflash0=drive_ovmf_code,pflash1=drive_ovmf_vars \
    -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
    -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
    -nodefaults \
    -device VGA,bus=pcie.0,addr=0x2 \
    -m 109568 \
    -object memory-backend-ram,size=109568M,id=mem-machine_mem  \
    -smp 56,maxcpus=56,cores=28,threads=1,dies=1,sockets=2  \
    -cpu 'Icelake-Server-noTSX',hv_stimer,hv_synic,hv_vpindex,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi,+kvm_pv_unhalt \
    -chardev socket,wait=off,path=/tmp/avocado_596hxgoj/monitor-qmpmonitor1-20211101-171713-6TwaG1GI,server=on,id=qmp_id_qmpmonitor1  \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,wait=off,path=/tmp/avocado_596hxgoj/monitor-catch_monitor-20211101-171713-6TwaG1GI,server=on,id=qmp_id_catch_monitor  \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=id7CzbRb \
    -chardev socket,wait=off,path=/tmp/avocado_596hxgoj/serial-serial0-20211101-171713-6TwaG1GI,server=on,id=chardev_serial0 \
    -device isa-serial,id=serial0,chardev=chardev_serial0  \
    -chardev socket,id=seabioslog_id_20211101-171713-6TwaG1GI,path=/tmp/avocado_596hxgoj/seabios-20211101-171713-6TwaG1GI,server=on,wait=off \
    -device isa-debugcon,chardev=seabioslog_id_20211101-171713-6TwaG1GI,iobase=0x402 \
    -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
    -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \
    -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/win11-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
    -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
    -device virtio-net-pci,mac=9a:6d:9b:a3:91:92,id=idu0gazB,netdev=idVL4RzC,bus=pcie-root-port-3,addr=0x0  \
    -netdev tap,id=idVL4RzC,vhost=on \
    -blockdev node-name=file_cd1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
    -device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on  \
    -vnc :0  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=c,strict=off \
    -chardev socket,id=char_vtpm_tpm0,path=/tmp/avocado_596hxgoj/avocado-vt-vm1_tpm0_swtpm.sock \
    -tpmdev emulator,chardev=char_vtpm_tpm0,id=emulator_vtpm_tpm0 \
    -device tpm-crb,id=tpm-crb_vtpm_tpm0,tpmdev=emulator_vtpm_tpm0 \
    -enable-kvm \
    -device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5 \
    -monitor stdio \
    -qmp tcp:0:6666,server,nowait \


2. connect to guest session
# nc -C  10.73.116.196 10022

get disk index
C:\>wmic diskdrive get index
Index  
0


3. hotplug blk device

# telnet localhost 6666

{"execute":"qmp_capabilities"}
{"return": {}}

{"execute": "blockdev-add", "arguments": {"node-name": "file_stg0", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/storage0.raw", "cache": {"direct": true, "no-flush": false}}, "id": "hM7JFSeo"}
{"return": {}, "id": "hM7JFSeo"}

{"execute": "blockdev-add", "arguments": {"node-name": "drive_stg0", "driver": "raw", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_stg0"}, "id": "QOuMpwwZ"}
{"return": {}, "id": "QOuMpwwZ"}

{"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "stg0", "drive": "drive_stg0", "write-cache": "on", "bus": "pcie_extra_root_port_0", "addr": "0x0"}, "id": "T8sSU2i0"}
{"return": {}, "id": "T8sSU2i0"}

{"execute": "query-block"}


4. re-connect guest session
# nc -C  10.73.116.196 10022


5. get disk index after hotplug blk disk

C:\>wmic diskdrive get index
Index  
0      
1


6. unplug blk device and re-hotplug it

{"execute":"device_del","arguments":{"id":"stg0"} }
{"return": {}}

{"timestamp": {"seconds": 1635894046, "microseconds": 658627}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/stg0/virtio-backend"}}
{"timestamp": {"seconds": 1635894046, "microseconds": 658821}, "event": "DEVICE_DELETED", "data": {"device": "stg0", "path": "/machine/peripheral/stg0"}}

{"execute": "blockdev-del","arguments": { "node-name": "drive_stg0"}}
{"return": {}}

{"execute": "blockdev-del","arguments": { "node-name": "file_stg0"}}
{"return": {}}

{"execute": "blockdev-add", "arguments": {"node-name": "file_stg0", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/storage0.raw", "cache": {"direct": true, "no-flush": false}}, "id": "hM7JFSeo"}
{"return": {}, "id": "hM7JFSeo"}

{"execute": "blockdev-add", "arguments": {"node-name": "drive_stg0", "driver": "raw", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_stg0"}, "id": "QOuMpwwZ"}
{"return": {}, "id": "QOuMpwwZ"}

{"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "stg0", "drive": "drive_stg0", "write-cache": "on", "bus": "pcie_extra_root_port_0", "addr": "0x0"}, "id": "T8sSU2i0"}
{"return": {}, "id": "T8sSU2i0"}


7. check nc session

C:\>wmic diskdrive get index
Index  
0      
1 


After step 3, nc disconnection
C:\>
Ncat: Connection reset by peer.

After step 5, nc works well.
After step 7, nc works well.

Comment 3 Xueqiang Wei 2021-11-03 06:22:47 UTC
Tested in rhel8.6, also hit it.

Versions:
kernel-4.18.0-348.3.el8.x86_64
qemu-kvm-6.1.0-4.module+el8.6.0+13039+4b81a1dc
edk2-ovmf-20210527gite1999b264f1f-3.el8.noarch
win11 with virtio-win-prewhql-0.1-211.iso

Comment 4 qing.wang 2021-11-03 07:58:19 UTC
Reproduce on

Red Hat Enterprise Linux release 9.0 Beta (Plow)
5.14.0-11.el9.x86_64
qemu-kvm-6.1.0-6.el9.x86_64
seabios-bin-1.14.0-7.el9.noarch
edk2-ovmf-20210527gite1999b264f1f-6.el9.noarch



It looks like related to device add operation not limit on block device.

Steps:

1.boot vm
/usr/libexec/qemu-kvm \
  -name testvm \
  -machine q35,pflash0=drive_ovmf_code,pflash1=drive_ovmf_vars \
  -m 4G \
  -smp 8 \
  -cpu host,svm,+kvm_pv_unhalt \
  -device ich9-usb-ehci1,id=usb1 \
  -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
   \
    -blockdev node-name=file_ovmf_code,driver=file,filename=/usr/share/OVMF/OVMF_CODE.secboot.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_code,driver=raw,read-only=on,file=file_ovmf_code \
    -blockdev node-name=file_ovmf_vars,driver=file,filename=/home/ovmf/OVMF_VARS.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_vars,driver=raw,read-only=off,file=file_ovmf_vars  \
  \
  -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x3,chassis=1 \
  -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x3.0x1,bus=pcie.0,chassis=2 \
  -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x3.0x2,bus=pcie.0,chassis=3 \
  -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x3.0x3,bus=pcie.0,chassis=4 \
  -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x3.0x4,bus=pcie.0,chassis=5 \
  -device pcie-root-port,id=pcie-root-port-5,port=0x5,addr=0x3.0x5,bus=pcie.0,chassis=6 \
  -device pcie-root-port,id=pcie-root-port-6,port=0x6,addr=0x3.0x6,bus=pcie.0,chassis=7 \
  -device pcie-root-port,id=pcie-root-port-7,port=0x7,addr=0x3.0x7,bus=pcie.0,chassis=8 \
  -device pcie-root-port,id=pcie_extra_root_port_0,bus=pcie.0,addr=0x4  \
  -device virtio-scsi-pci,id=scsi0,bus=pcie-root-port-5 \
  -device virtio-scsi-pci,id=scsi1,bus=pcie-root-port-6 \
  -blockdev driver=qcow2,file.driver=file,cache.direct=off,cache.no-flush=on,file.filename=/home/kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2,node-name=drive_image1   \
  -device scsi-hd,id=os,drive=drive_image1,bus=scsi0.0,bootindex=0,serial=OS_DISK   \
  \
  -blockdev driver=qcow2,file.driver=file,file.filename=/home/kvm_autotest_root/images/data1.qcow2,node-name=data_image1   \
  -device scsi-hd,id=data1,drive=data_image1,bus=scsi0.0,bootindex=1,serial=DATA_DISK   \
  -vnc :5 \
  -monitor stdio \
  -qmp tcp:0:5955,server=on,wait=off \
  -device virtio-net-pci,mac=9a:b5:b6:b1:b2:b7,id=nic1,netdev=nicpci,bus=pcie-root-port-7 \
  -netdev tap,id=nicpci \
  -chardev socket,id=qmpmonitor1,path=/var/tmp/run-qmp.log,server=on,wait=off \
  -mon chardev=qmpmonitor1,mode=control \
  -chardev socket,id=serial1,path=/var/tmp/run-serial.log,server=on,wait=off \
  -device isa-serial,chardev=serial1 \
  -D debug.log \
  -boot menu=on,reboot-timeout=1000,strict=off \


2.create nc connection with guest ip and port
nc -C 10.73.114.185  10022

3.create nc connection with socket file
nc -U /var/tmp/run-serial.log

4.hotplug new device (nic or block)
{"execute": "qmp_capabilities"}
{ "execute": "netdev_add", "arguments": { "type":"tap","id":"idb8GVnn","vhost":true,"script":"/etc/qemu-ifup"}}
{"execute": "device_add", "arguments": { "driver":"virtio-net-pci","netdev":"idb8GVnn","mac":"00:1a:4a:42:0b:01","id": "idVn2ph4","bus":"pcie_extra_root_port_0"}}

5.check NC connection 

Result:
Rhe nc connnection with guest ip and port is broken
Ncat: Connection reset by peer. 

The nc connection with socked file is keep.

Comment 6 Peixiu Hou 2021-11-03 12:21:26 UTC
Also hit this issue when hotpluging virtio-scsi-pci device.

Here are remote shell server logs:
Shell server: waiting for clients to connect...
File transfer server: waiting for clients to connect...
Shell server: new client connected (10.73.73.9:45796)
Shell server: client disconnected (10.73.73.9:45796)   ----after virtio-scsi-pci device was pluged
Child exited
SocketToChild thread exited

nc connection disconnected after run this command:
{'execute': 'device_add', 'arguments': {'id':'virtio_scsi_pci1', 'driver':'virtio-scsi-pci', 'num_queues':'12', 'bus':'pcie_extra_root_port_0', 'addr':'0x0'},'id': '9PP8WMx4'}

Reproduced with qemu-kvm-6.1.0-5.el9.x86_64
Other versions:
kernel-5.14.0-9.el9.x86_64
edk2-ovmf-20210527gite1999b264f1f-6.el9.noarch
virtio-win-prewhql-213/214

Also tried to test with qemu-kvm-6.0.0-13.el9_b.5.x86_64, cannot reproduce this issue.
other versions:
5.14.0-6.el9.x86_64
edk2-ovmf-20210527gite1999b264f1f-6.el9.noarch
virtio-win-prewhql-213

Thanks~
Peixiu

Comment 7 qing.wang 2021-11-04 07:57:43 UTC
Tested on 
Red Hat Enterprise Linux release 9.0 Beta (Plow)
5.14.0-11.el9.x86_64
qemu-kvm-6.1.0-6.el9.x86_64
seabios-bin-1.14.0-7.el9.noarch
edk2-ovmf-20210527gite1999b264f1f-6.el9.noarch

It does not reproduce after adding following option on VM command.
-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off 

 
The question is  "ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off" is necessary for the OVMF ?

/usr/libexec/qemu-kvm \
  -name testvm \
  -machine q35,pflash0=drive_ovmf_code,pflash1=drive_ovmf_vars \
  -m 4G \
  -smp 8 \
  -cpu host,svm,+kvm_pv_unhalt \
  -device ich9-usb-ehci1,id=usb1 \
  -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
  -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off \
   \
    -blockdev node-name=file_ovmf_code,driver=file,filename=/usr/share/OVMF/OVMF_CODE.secboot.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_code,driver=raw,read-only=on,file=file_ovmf_code \
    -blockdev node-name=file_ovmf_vars,driver=file,filename=/home/ovmf/OVMF_VARS.fd,auto-read-only=on,discard=unmap \
    -blockdev node-name=drive_ovmf_vars,driver=raw,read-only=off,file=file_ovmf_vars  \
  \
  -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x3,chassis=1 \
  -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x3.0x1,bus=pcie.0,chassis=2 \
  -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x3.0x2,bus=pcie.0,chassis=3 \
  -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x3.0x3,bus=pcie.0,chassis=4 \
  -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x3.0x4,bus=pcie.0,chassis=5 \
  -device pcie-root-port,id=pcie-root-port-5,port=0x5,addr=0x3.0x5,bus=pcie.0,chassis=6 \
  -device pcie-root-port,id=pcie-root-port-6,port=0x6,addr=0x3.0x6,bus=pcie.0,chassis=7 \
  -device pcie-root-port,id=pcie-root-port-7,port=0x7,addr=0x3.0x7,bus=pcie.0,chassis=8 \
  -device pcie-root-port,id=pcie_extra_root_port_0,bus=pcie.0,addr=0x4  \
  -device virtio-scsi-pci,id=scsi0,bus=pcie-root-port-5 \
  -device virtio-scsi-pci,id=scsi1,bus=pcie-root-port-6 \
  -blockdev driver=qcow2,file.driver=file,cache.direct=off,cache.no-flush=on,file.filename=/home/kvm_autotest_root/images/win2019-64-virtio-scsi.qcow2,node-name=drive_image1   \
  -device scsi-hd,id=os,drive=drive_image1,bus=scsi0.0,bootindex=0,serial=OS_DISK   \
  \
  -blockdev driver=qcow2,file.driver=file,file.filename=/home/kvm_autotest_root/images/data1.qcow2,node-name=data_image1   \
  -device scsi-hd,id=data1,drive=data_image1,bus=scsi0.0,bootindex=1,serial=DATA_DISK   \
  -vnc :5 \
  -monitor stdio \
  -qmp tcp:0:5955,server=on,wait=off \
  -device virtio-net-pci,mac=9a:b5:b6:b1:b2:b7,id=nic1,netdev=nicpci,bus=pcie-root-port-7 \
  -netdev tap,id=nicpci \
  -chardev socket,id=qmpmonitor1,path=/var/tmp/run-qmp.log,server=on,wait=off \
  -mon chardev=qmpmonitor1,mode=control \
  -chardev socket,id=serial1,path=/var/tmp/run-serial.log,server=on,wait=off \
  -device isa-serial,chardev=serial1 \
  -D debug.log \
  -boot menu=on,reboot-timeout=1000,strict=off \

Comment 8 CongLi 2021-11-04 08:46:52 UTC

*** This bug has been marked as a duplicate of bug 2004829 ***


Note You need to log in before you can comment on or make changes to this bug.