From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B42BC2FE56F; Sat, 12 Sep 2026 14:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789222970; cv=none; b=rHo0EYrr9xEq23F3GA5/BApqgFoNbrTxWvxpGeeBHfGAvZgpB4FHcxEPlr1bCTV5VdKK1Q/wXizaVUH/b9FzFSj1jlhcEHfr7gDWr5Zo6lo3hydOomvdUty5L+NcONRVRA7TYd88SIZWN56b0KQV9kxJKVI5o+i5wGhJlvPeXU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789222970; c=relaxed/simple; bh=Dne7K+sjpgyzrIx9OzNdzjrZU8jX5O+iJ2hlIkdWoYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LSuWIjII1yyLgW3XfjNUUEGC5VHLOeko/hUvm9MIBaUmtO+IPSspKA/tuAB0led5kNfshTzN2yVSEXhF/c4QyEf6pEM7tZNW7IWsgtSZveXf7+ysPxuEgVrpxTLOIMiagU6JMaPs8OKpafHVKEHA5eSPaMVc/+aodJwSjRprGcA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ymeV4MoQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ymeV4MoQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5A041F000FF; Sat, 12 Sep 2026 14:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789222969; bh=aK16Uatjms2U8xjpxfaP7sXkNUXKiKE3OFJIsFAFRKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ymeV4MoQZ3rNnXL7b8+0p+KSQNKVq+UWcUxGh9dgowXIOSCoihKeAEGQhkMzRDR+e MgBCe2u3RZV47cXKaZGRWhoP7oxYWfWWyeIOa/ggDOKrYvQ4sCqqMGNRt5OcEXyXc6 OQrjRfiZvkoW74r9pBO1v6O4Qag2cvWtvMuK8qss= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Fu Hao , Tingyin Duan , Joerg Roedel , Sasha Levin Subject: [PATCH 6.6 0694/1424] iommu/amd: Add support for Hygon family 18h model 4h IOAPIC Date: Sat, 12 Sep 2026 08:52:06 +0200 Message-ID: <20260912065622.840905103@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fu Hao [ Upstream commit 5beda8cadb1f072140e58b1edb7604444a42d955 ] The SB IOAPIC is on the device 0xb from Hygon family 18h model 4h. Signed-off-by: Fu Hao Tested-by: Tingyin Duan Signed-off-by: Joerg Roedel Stable-dep-of: 04fee302fac7 ("iommu/amd: Fix false positive in SB IOAPIC IVRS validation") Signed-off-by: Sasha Levin --- drivers/iommu/amd/init.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 908500ff2d814..04bdb48d7dc05 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -3022,6 +3022,9 @@ static void __init free_iommu_resources(void) /* SB IOAPIC is always on this device in AMD systems */ #define IOAPIC_SB_DEVID ((0x00 << 8) | PCI_DEVFN(0x14, 0)) +/* SB IOAPIC for Hygon family 18h model 4h is on the device 0xb */ +#define IOAPIC_SB_DEVID_FAM18H_M4H ((0x00 << 8) | PCI_DEVFN(0xb, 0)) + static bool __init check_ioapic_information(void) { const char *fw_bug = FW_BUG; @@ -3047,7 +3050,12 @@ static bool __init check_ioapic_information(void) pr_err("%s: IOAPIC[%d] not in IVRS table\n", fw_bug, id); ret = false; - } else if (devid == IOAPIC_SB_DEVID) { + } else if (devid == IOAPIC_SB_DEVID || + (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON && + boot_cpu_data.x86 == 0x18 && + boot_cpu_data.x86_model >= 0x4 && + boot_cpu_data.x86_model <= 0xf && + devid == IOAPIC_SB_DEVID_FAM18H_M4H)) { has_sb_ioapic = true; } } -- 2.53.0