From: Sairaj Kodilkar <sarunkod@amd.com>
To: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>,
<qemu-devel@nongnu.org>
Cc: <mst@redhat.com>, <pbonzini@redhat.com>,
<richard.henderson@linaro.org>, <philmd@linaro.org>,
<suravee.suthikulpanit@amd.com>, <vasant.hegde@amd.com>,
<marcel.apfelbaum@gmail.com>, <eduardo@habkost.net>,
<aik@amd.com>
Subject: Re: [PATCH v2 0/2] amd_iommu: Cleanups and fixes (PART 2)
Date: Wed, 15 Oct 2025 10:11:56 +0530 [thread overview]
Message-ID: <b486ed18-a7c0-4035-a27c-7bfb87c7c789@amd.com> (raw)
In-Reply-To: <a50b49dc-d35d-4db9-b177-9901bef6ed75@oracle.com>
On 10/15/2025 2:57 AM, Alejandro Jimenez wrote:
> Hi,
>
> On 10/13/25 1:00 AM, Sairaj Kodilkar wrote:
>> This series provide fixes for following two issues:
>>
>> 1. AMD IOMMU fails to detect the devices when they are attached to
>> PCI bus with
>> bus id != 0.
>> e.g. With following command line, dhclient command fails inside
>> the guest
>>
>> -device
>> pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x5
>> \
>> -netdev user,id=USER0,hostfwd=tcp::3333-:22 \
>> -device
>> virtio-net-pci,id=vnet0,iommu_platform=on,disable-legacy=on,romfile=,netdev=USER0,bus=pci.1,addr=0
>> \
>>
>> 2. Current AMD IOMMU supports IOVAs upto 60 bit which cause failure
>> while
>> setting up the devices when guest is booted with command line
>> "iommu.forcedac=1".
>>
>> One example of the failure is when there are two virtio ethernet
>> devices
>> attached to the guest with command line
>> -netdev user,id=USER0 \
>> -netdev user,id=USER1 \
>> -device
>> virtio-net-pci,id=vnet0,iommu_platform=on,disable-legacy=on,romfile=,netdev=USER0
>> \
>> -device
>> virtio-net-pci,id=vnet1,iommu_platform=on,disable-legacy=on,romfile=,netdev=USER1
>> \
>> In this case dhclient fails for second device with following
>> dmesg
>> [ 24.802644] virtio_net virtio0 enp0s1: TX timeout on
>> queue: 0, sq: output.0, vq: 0x1, name: output.0, 5664000 usecs ago
>> [ 29.856716] virtio_net virtio0 enp0s1: NETDEV WATCHDOG: CPU:
>> 59: transmit queue 0 timed out 10720 ms
>> [ 29.858585] virtio_net virtio0 enp0s1: TX timeout on queue: 0,
>> sq: output.0, vq: 0x1, name: output.0, 10720000 usecs ago
>>
>> -------------------------------------------------------------------------------
>>
>>
>> Change log: > ----------
>> P1:
>
> I generally like to include a link to the previous version. Not a
> must, but makes it easier others to follow the series history.
>
>> - Use fixed type uint8_t for devfn
>> - Use uintptr_t instead of uint64_t
>> - Build hash key using lower 56 bits of bus pointer and 8 bits of
>> devfn
>> - Use gboolean instead of int for amdvi_find_as_by_devid
>> - Update comments
>> - Use IOMMU_NOTIFIER_NONE instead of IOMMU_NONE
>>
>> P2:
>> - Reword commit message
>> - Correctly initialize `struct amdvi_iotlb_key`
>> - Remove unused macro
>>
>
> Before sending a new revision, ideally you should run a smoke test (or
> more thorough testing depending on the scope of the changes). But at
> the bare minimum please make sure a clean build is done. There are
> trivial issues in both patches that cause compilation errors. See the
> replies for details.
Hi Alejandro,
Yep I did that, but I think that somehow I tested a different branch
thats why failed to catch these errors.
Sorry for inconvenience. Will take care of it in future !
Thanks
Sairaj
>
> Thank you,
> Alejandro
>
>> -------------------------------------------------------------------------------
>>
>>
>> Base commit: (qemu uptream) eb7abb4a719f
>>
>> -------------------------------------------------------------------------------
>>
>>
>> Sairaj Kodilkar (2):
>> amd_iommu: Fix handling device on buses != 0
>> amd_iommu: Support 64 bit address for IOTLB lookup
>>
>> hw/i386/amd_iommu.c | 179 +++++++++++++++++++++++++++-----------------
>> hw/i386/amd_iommu.h | 6 +-
>> 2 files changed, 113 insertions(+), 72 deletions(-)
>>
>
prev parent reply other threads:[~2025-10-15 4:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 5:00 [PATCH v2 0/2] amd_iommu: Cleanups and fixes (PART 2) Sairaj Kodilkar
2025-10-13 5:00 ` [PATCH v2 1/2] amd_iommu: Fix handling device on buses != 0 Sairaj Kodilkar
2025-10-13 8:15 ` Michael S. Tsirkin
2025-10-14 5:43 ` Sairaj Kodilkar
2025-10-14 9:02 ` Michael S. Tsirkin
2025-10-14 21:46 ` Alejandro Jimenez
2025-10-15 4:44 ` Sairaj Kodilkar
2025-10-15 7:32 ` Michael S. Tsirkin
2025-10-15 16:19 ` Alejandro Jimenez
2025-10-14 21:28 ` Alejandro Jimenez
2025-10-13 5:00 ` [PATCH v2 2/2] amd_iommu: Support 64 bit address for IOTLB lookup Sairaj Kodilkar
2025-10-13 8:19 ` Michael S. Tsirkin
2025-10-14 8:21 ` Sairaj Kodilkar
2025-10-14 9:04 ` Sairaj Kodilkar
2025-10-14 9:05 ` Michael S. Tsirkin
2025-10-14 9:12 ` Sairaj Kodilkar
2025-10-14 9:15 ` Michael S. Tsirkin
2025-10-14 21:28 ` Alejandro Jimenez
2025-10-14 21:27 ` [PATCH v2 0/2] amd_iommu: Cleanups and fixes (PART 2) Alejandro Jimenez
2025-10-15 4:41 ` Sairaj Kodilkar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b486ed18-a7c0-4035-a27c-7bfb87c7c789@amd.com \
--to=sarunkod@amd.com \
--cc=aik@amd.com \
--cc=alejandro.j.jimenez@oracle.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).