ARI and igb emulation
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Michael S. Tsirkin
Quoted 6 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani
Quoted 6 lines
Quoted 3 lines
1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlI think that just creates igb. to test ARI you need to add igbvf devices. Jason maintains it. But really pls go back on-list.
+Jason
+qemu-devel
Quoted 20 lines · Ani Sinha
Quoted 18 lines · Michael S. Tsirkin
Quoted 9 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlI think that just creates igb. to test ARI you need to add igbvf devices. Jason maintains it. But really pls go back on-list.
Review
Quoted 2 lines
(quoted diff) +2
-0+Jason +qemu-devel
Yes, you need to at least create VFS and test some throughput on it (probably need a vIOMMU).
Thanks
Quoted 24 lines · Jason Wang
Quoted 19 lines · Ani Sinha
Quoted 18 lines · Michael S. Tsirkin
Quoted 9 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlI think that just creates igb. to test ARI you need to add igbvf devices. Jason maintains it. But really pls go back on-list.
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+Jason +qemu-develYes, you need to at least create VFS and test some throughput on it (probably need a vIOMMU).
Is there a test that I can run?
Quoted 25 lines · Ani Sinha
Quoted 25 lines · Jason Wang
Quoted 19 lines · Ani Sinha
Quoted 18 lines · Michael S. Tsirkin
Quoted 9 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlI think that just creates igb. to test ARI you need to add igbvf devices. Jason maintains it. But really pls go back on-list.
Quoted 9 lines
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+Jason +qemu-develYes, you need to at least create VFS and test some throughput on it (probably need a vIOMMU).
Is there a test that I can run?
A simple netperf/iperf should be sufficient.
Thanks
Quoted 37 lines · Jason Wang
Quoted 32 lines · Ani Sinha
Quoted 31 lines · Jason Wang
Quoted 20 lines · Ani Sinha
Quoted 18 lines · Michael S. Tsirkin
Quoted 9 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlI think that just creates igb. to test ARI you need to add igbvf devices. Jason maintains it. But really pls go back on-list.
Review
Quoted 2 lines
(quoted diff) +2
-0+Jason +qemu-develYes, you need to at least create VFS and test some throughput on it (probably need a vIOMMU).
Quoted 4 lines
Quoted 2 lines
Is there a test that I can run?
A simple netperf/iperf should be sufficient.
I meant a full test script that uses igb emulation with vfs etc. I really do not have time to set this whole thing up manually. Maybe something was used to test sriov and igb emulation while development and a test might have been committed in QEMU.
Quoted 38 lines · Ani Sinha
Quoted 38 lines · Jason Wang
Quoted 32 lines · Ani Sinha
Quoted 31 lines · Jason Wang
Quoted 20 lines · Ani Sinha
Quoted 18 lines · Michael S. Tsirkin
Quoted 9 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlI think that just creates igb. to test ARI you need to add igbvf devices. Jason maintains it. But really pls go back on-list.
Review
Quoted 2 lines
(quoted diff) +2
-0+Jason +qemu-develYes, you need to at least create VFS and test some throughput on it (probably need a vIOMMU).
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Is there a test that I can run?
A simple netperf/iperf should be sufficient.
I meant a full test script that uses igb emulation with vfs etc. I really do not have time to set this whole thing up manually.
It's not that complicated, start a vm with vIOMMU + igb, create a vf and run a quick netperf.
Quoted 2 lines
Maybe something was used to test sriov and igb emulation while development and a test might have been committed in QEMU.
No, there's a igb qtest but it looks to me it doesn't create vf. There are also automated test scripts in avocado-vt which might require some small tweaks to support igbvf.
Adding Lei for more thoughts.
Thanks
A message that is not in the archive (sent off-list or not yet received): [email protected]
Adding CC.
Quoted 25 lines · Akihiko Odaki
Quoted 10 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlThis indeed resulted in the following error message with igb:
qemu-system-aarch64: PCI: slot 16 is not valid for igbvf, parent device only allows plugging into slot 0.To reproduce the issue, add the following to QEMU command line:
-device pcie-root-port,id=p -device igb,bus=pAnd enable 7 virtual functions on the guest. For Linux, see:
https://docs.kernel.org/PCI/pci-iov-howto.htmlYou may only enforce the slot number restriction only for devices without ARI. The slot number is assumed as 0 when ARI is enabled if I understand correctly.
Regards,
Akihiko Odaki
Quoted 25 lines · Akihiko Odaki
Adding CC.
Quoted 18 lines · Akihiko Odaki
Quoted 10 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlThis indeed resulted in the following error message with igb:
qemu-system-aarch64: PCI: slot 16 is not valid for igbvf, parent device only allows plugging into slot 0.
To reproduce the issue, add the following to QEMU command line:
-device pcie-root-port,id=p -device igb,bus=p
And enable 7 virtual functions on the guest. For Linux, see:
https://docs.kernel.org/PCI/pci-iov-howto.html
You may only enforce the slot number restriction only for devices without ARI. The slot number is assumed as 0 when ARI is enabled if I understand correctly.
So I guess mst was correct as to the reason why the previous conditional checks for !vf :-) Very interesting!
Quoted 30 lines · Ani Sinha
Quoted 26 lines · Akihiko Odaki
Adding CC.
Quoted 18 lines · Akihiko Odaki
Quoted 10 lines · Ani Sinha
Hi :
I am proposing a patch in QEMU [1] which may or may not break ARI but I wanted to give my best shot in making sure I am not breaking anything with ARI enabled. I see that your igb emulation code enables ARI with its SRIOV emulation. I ran the qtest and avocado tests that are mentioned in [2] and they both pass. Is there anything else/any tweaks that I should be doing to make sure I am not breaking ARI with igb?Thanks for information,
Ani1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
2. https://www.qemu.org/docs/master/system/devices/igb.htmlThis indeed resulted in the following error message with igb:
qemu-system-aarch64: PCI: slot 16 is not valid for igbvf, parent device only allows plugging into slot 0. To reproduce the issue, add the following to QEMU command line:
-device pcie-root-port,id=p -device igb,bus=p
And enable 7 virtual functions on the guest. For Linux, see:
https://docs.kernel.org/PCI/pci-iov-howto.html
You may only enforce the slot number restriction only for devices without ARI.
Quoted 1 line
Quoted 1 line
Quoted 1 line
The slot number is assumed as 0 when ARI is enabled if I understand correctly.
Yes, in linux there is something like this:
device = pci_ari_enabled(dev->bus) ? 0 : PCI_SLOT(dev->devfn);
We will have to make similar changes in QEMU to fix all PCI_SLOT references and adjust code accordingly.