[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ARI and igb emulation
From: |
Ani Sinha |
Subject: |
Re: ARI and igb emulation |
Date: |
Thu, 29 Jun 2023 08:18:32 +0530 |
> On 28-Jun-2023, at 6:19 PM, Ani Sinha <anisinha@redhat.com> wrote:
>
>
>
>> On 28-Jun-2023, at 6:15 PM, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>>
>> Adding CC.
>>
>> On 2023/06/28 21:24, Akihiko Odaki wrote:
>>> On 2023/06/27 23:32, Ani Sinha wrote:
>>>> 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
>>>>
>>>> 1. https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg05478.html
>>>> 2. https://www.qemu.org/docs/master/system/devices/igb.html
>>>>
>>>>
>>> This 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.
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.