I executed the testcase in the virtualization environment of fedora37 qemu 7.0 (I440FX):
./runltp -f kernel_misc -s tpci
after run the testcase 12, leads to guest hung(io hung), the test releases virtio device resource and then reassign.
[ 59.043221][ T2431] ltp_tpci: test-case 12
[ 59.043845][ T2431] ltp_tpci: assign resources
[ 59.044499][ T2431] ltp_tpci: assign resource #0
[ 59.045176][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 262401, start 0xc000, end 0xc07f
[ 59.046456][ T2431] ltp_tpci: assign resource #1
[ 59.047112][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 262656, start 0xfebd3000, end 0xfebd3fff
[ 59.048517][ T2431] ltp_tpci: assign resource #2
[ 59.049369][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 0, start 0x0, end 0x0
[ 59.050593][ T2431] ltp_tpci: assign resource #3
[ 59.051316][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 0, start 0x0, end 0x0
[ 59.052413][ T2431] ltp_tpci: assign resource #4
[ 59.053103][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 1319436, start 0xfe008000, end 0xfe00bfff
[ 59.054522][ T2431] virtio-pci 0000:00:06.0: BAR 4: releasing [mem 0xfe008000-0xfe00bfff 64bit pref]
[ 59.087851][ T2431] virtio-pci 0000:00:06.0: BAR 4: assigned [mem 0x440008000-0x44000bfff 64bit pref]
[ 59.090712][ T2431] ltp_tpci: assign resource to '4', ret '0'
[ 59.091576][ T2431] ltp_tpci: assign resource #5
[ 59.092315][ T2431] ltp_tpci: name = (null), flags = 0, start 0x0, end 0x0
[ 59.093312][ T2431] ltp_tpci: assign resource #6
[ 59.094047][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 0, start 0x0, end 0x0
virtio-pci BAR 4:
before test: virtio-pci 0000:00:06.0: BAR 4: releasing [mem 0xfe008000-0xfe00bfff 64bit pref]
after test: virtio-pci 0000:00:06.0: BAR 4: assigned [mem 0x440008000-0x44000bfff 64bit pref]
ENV: kernel 6.0.7-301.fc37.x86_64, qemu-7.0.0-9.fc37 VM: virsh xml: machine='pc-i440fx-6.2'
I executed the testcase in the virtualization environment of fedora37 qemu 7.0 (I440FX): ./runltp -f kernel_misc -s tpci after run the testcase 12, leads to guest hung(io hung), the test releases virtio device resource and then reassign. [ 59.043221][ T2431] ltp_tpci: test-case 12 [ 59.043845][ T2431] ltp_tpci: assign resources [ 59.044499][ T2431] ltp_tpci: assign resource #0 [ 59.045176][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 262401, start 0xc000, end 0xc07f [ 59.046456][ T2431] ltp_tpci: assign resource #1 [ 59.047112][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 262656, start 0xfebd3000, end 0xfebd3fff [ 59.048517][ T2431] ltp_tpci: assign resource #2 [ 59.049369][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 0, start 0x0, end 0x0 [ 59.050593][ T2431] ltp_tpci: assign resource #3 [ 59.051316][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 0, start 0x0, end 0x0 [ 59.052413][ T2431] ltp_tpci: assign resource #4 [ 59.053103][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 1319436, start 0xfe008000, end 0xfe00bfff [ 59.054522][ T2431] virtio-pci 0000:00:06.0: BAR 4: releasing [mem 0xfe008000-0xfe00bfff 64bit pref] [ 59.087851][ T2431] virtio-pci 0000:00:06.0: BAR 4: assigned [mem 0x440008000-0x44000bfff 64bit pref] [ 59.090712][ T2431] ltp_tpci: assign resource to '4', ret '0' [ 59.091576][ T2431] ltp_tpci: assign resource #5 [ 59.092315][ T2431] ltp_tpci: name = (null), flags = 0, start 0x0, end 0x0 [ 59.093312][ T2431] ltp_tpci: assign resource #6 [ 59.094047][ T2431] ltp_tpci: name = 0000:00:06.0, flags = 0, start 0x0, end 0x0
virtio-pci BAR 4: before test: virtio-pci 0000:00:06.0: BAR 4: releasing [mem 0xfe008000-0xfe00bfff 64bit pref] after test: virtio-pci 0000:00:06.0: BAR 4: assigned [mem 0x440008000-0x44000bfff 64bit pref]
https://lists.linux.it/pipermail/ltp/2021-June/023296.html I found that someone had reported a similar problem to me before [https://lists.linux.it/pipermail/ltp/2021-June/023296.html] The modified method of react is:If I use this modification method it can pass
But the modification method of the ltp community is: [https://github.com/linux-test-project/ltp/commit/d631e9caef6818cffae6e028191787efcf65b3da] https://github.com/linux-test-project/ltp/blame/master/testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c#L445-L446
Can you tell me whether the use of i440fx by vm is caused by the problem of ltp use cases? Looking forward to your reply