fix(host): fix gpu device vendor check strategy

Check gpu device vendor id on class code is DISPLAY.

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
wanyaoqi
2024-04-16 15:57:08 +08:00
parent 554640d3ab
commit f8ac80b7a0
+1 -1
View File
@@ -95,7 +95,7 @@ func getPassthroughGPUs(filteredAddrs []string, enableWhitelist bool, whitelistM
if !utils.IsInArray(dev.ClassCode, GpuClassCodes) {
continue
}
if !utils.IsInStringArray(dev.VendorId, []string{api.NVIDIA_VENDOR_ID, api.AMD_VENDOR_ID}) {
if dev.ClassCode == CLASS_CODE_DISP && !utils.IsInStringArray(dev.VendorId, []string{api.NVIDIA_VENDOR_ID, api.AMD_VENDOR_ID}) {
log.Infof("Skip add device %s vendor is unsupport", dev.Addr)
continue
}