mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
fix(host): gpu probe miss 3d type gpu (#17805)
This commit is contained in:
@@ -2032,6 +2032,12 @@ func (h *SHostInfo) getNicsOvsOffloadInterfaces(nics []string) ([]isolated_devic
|
||||
}
|
||||
|
||||
func (h *SHostInfo) probeSyncIsolatedDevices() (*jsonutils.JSONArray, error) {
|
||||
for _, driver := range []string{"vfio", "vfio_iommu_type1", "vfio-pci"} {
|
||||
if out, err := procutils.NewRemoteCommandAsFarAsPossible("modprobe", driver).Output(); err != nil {
|
||||
log.Errorf("failed probe driver %s: %s %s", driver, out, err)
|
||||
}
|
||||
}
|
||||
|
||||
offloadNics, err := h.getNicsOvsOffloadInterfaces(options.HostOptions.OvsOffloadNics)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -370,7 +370,7 @@ func (d *PCIDevice) IsBootVGA() (bool, error) {
|
||||
}
|
||||
|
||||
func (d *PCIDevice) forceBindVFIOPCIDriver(useBootVGA bool) error {
|
||||
if !utils.IsInStringArray(d.ClassCode, []string{CLASS_CODE_VGA, CLASS_CODE_VGA}) {
|
||||
if !utils.IsInStringArray(d.ClassCode, []string{CLASS_CODE_VGA, CLASS_CODE_3D}) {
|
||||
return nil
|
||||
}
|
||||
isBootVGA, err := d.IsBootVGA()
|
||||
|
||||
Reference in New Issue
Block a user