mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pu Wen <pu_wen@foxmail.com>
To: Wei Wang <wei.w.wang@hotmail.com>,
	joro@8bytes.org, suravee.suthikulpanit@amd.com,
	thomas.lendacky@amd.com, vasant.hegde@amd.com, aik@amd.com,
	jgg@nvidia.com, kevin.tian@intel.com, xuyongwei@open-hieco.net
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] iommu/amd: Recognize Hygon southbridge IOAPIC for interrupt remapping
Date: Wed, 25 Mar 2026 19:37:30 +0800	[thread overview]
Message-ID: <tencent_EEE4C4F7FAB342FCD386C3DB1F07C12E2205@qq.com> (raw)
In-Reply-To: <SI2PR01MB439392D470CAB8EAB472839EDC49A@SI2PR01MB4393.apcprd01.prod.exchangelabs.com>

On 2026/3/25 19:23, Wei Wang wrote:
> On 3/25/26 6:54 PM, Pu Wen wrote:
>> On 2026/3/25 17:39, Wei Wang wrote:
>>> Hygon systems use the AMD IOMMU driver but newer Hygon platforms report
>>> the southbridge IOAPIC at a different PCI device (00:0b.0), whereas AMD
>>> systems use device 00:14.0.
>> ......
>>> +/* SB IOAPIC device IDs */
>>> +#define IOAPIC_SB_DEVID_AMD    ((0x00 << 8) | PCI_DEVFN(0x14, 0))
>>> +#define IOAPIC_SB_DEVID_HYGON    ((0x00 << 8) | PCI_DEVFN(0x0b, 0))
>> These macro definitions is not accurate, old Hygon processor also use
>> device 0x14, as you mentioned device 0xb is only for 'newer Hygon 
>> platforms'.
>>
> 
> Yes, I noticed that. I mentioned this in the commit log:
> 
> Older Hygon systems still use the original AMD device ID (00:14.0) while
> newer systems use 00:0b.0, so a strict CPU vendor check is insufficient.
> 
> That is also why the code uses the logical OR:
> if (devid == IOAPIC_SB_DEVID_AMD || devid == IOAPIC_SB_DEVID_HYGON)

IMO, if only newer Hygon processor will use device 0xb, the macro should
use a exact name(eg: with a new Hygon family/model), let IOAPIC_SB_DEVID
as the common macro for AMD and Hygon.

-- 
Regards,
Pu Wen


  reply	other threads:[~2026-03-25 11:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25  9:39 Wei Wang
2026-03-25 10:54 ` Pu Wen
2026-03-25 11:23   ` Wei Wang
2026-03-25 11:37     ` Pu Wen [this message]
2026-03-26  8:20       ` Wei Wang

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=tencent_EEE4C4F7FAB342FCD386C3DB1F07C12E2205@qq.com \
    --to=pu_wen@foxmail.com \
    --cc=aik@amd.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vasant.hegde@amd.com \
    --cc=wei.w.wang@hotmail.com \
    --cc=xuyongwei@open-hieco.net \
    /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

all inboxes | Powered by JetHome®