From 5ca651714b201f70cfcfa4bf3d2fab979e0afad3 Mon Sep 17 00:00:00 2001 From: DuanqiangWen Date: Thu, 2 Mar 2023 05:03:52 -0500 Subject: [PATCH] openeuler: pci: workaround multiple functions can be assigned to only one VM driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I66W4Y CVE: NA workaround if multiple functions on a PCl device belong to the same IOMMU group, they can be directly assigned to only one VM as well, letting multiple functions belong to different IOMMU group. Signed-off-by: DuanqiangWen --- drivers/net/ethernet/netswift/ngbe/ngbe_type.h | 5 ----- drivers/net/ethernet/netswift/txgbe/txgbe_type.h | 5 ----- drivers/pci/quirks.c | 1 + include/linux/pci_ids.h | 2 ++ 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/netswift/ngbe/ngbe_type.h b/drivers/net/ethernet/netswift/ngbe/ngbe_type.h index ab175d1292cc..bae091ffd6e0 100644 --- a/drivers/net/ethernet/netswift/ngbe/ngbe_type.h +++ b/drivers/net/ethernet/netswift/ngbe/ngbe_type.h @@ -65,11 +65,6 @@ #endif /************ ngbe_register.h ************/ -/* Vendor ID */ -#ifndef PCI_VENDOR_ID_TRUSTNETIC -#define PCI_VENDOR_ID_TRUSTNETIC 0x8088 -#endif - /* Device IDs */ /* copper */ #define NGBE_DEV_ID_EM_TEST 0x0000 diff --git a/drivers/net/ethernet/netswift/txgbe/txgbe_type.h b/drivers/net/ethernet/netswift/txgbe/txgbe_type.h index 691750ee4e4b..131bc428767e 100644 --- a/drivers/net/ethernet/netswift/txgbe/txgbe_type.h +++ b/drivers/net/ethernet/netswift/txgbe/txgbe_type.h @@ -89,11 +89,6 @@ #endif /************ txgbe_register.h ************/ -/* Vendor ID */ -#ifndef PCI_VENDOR_ID_TRUSTNETIC -#define PCI_VENDOR_ID_TRUSTNETIC 0x8088 -#endif - /* Device IDs */ #define TXGBE_DEV_ID_SP1000 0x1001 #define TXGBE_DEV_ID_WX1820 0x2001 diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e6ffe0b3a647..4fc517689699 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4979,6 +4979,7 @@ static const struct pci_dev_acs_enabled { /* because rootcomplex Vendor id is 0x17cd on phytium cpu */ { 0x17cd, PCI_ANY_ID, pci_quirk_xgene_acs }, #endif + { PCI_VENDOR_ID_TRUSTNETIC, PCI_ANY_ID, pci_quirk_mf_endpoint_acs }, { 0 } }; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 0f1a8978d0cc..2582180d5142 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -3139,4 +3139,6 @@ #define PCI_VENDOR_ID_NCUBE 0x10ff +#define PCI_VENDOR_ID_TRUSTNETIC 0x8088 + #endif /* _LINUX_PCI_IDS_H */ -- GitLab