Merge pull request #17160 from wanyaoqi/fix/get-pci-controller-type

fix(host): get pci controller type
This commit is contained in:
Zexi Li
2023-05-26 15:23:50 +08:00
committed by GitHub
+2 -1
View File
@@ -954,7 +954,8 @@ func (s *SKVMGuestInstance) getHotPlugPciControllerType() *desc.PCI_CONTROLLER_T
for i := 0; i < len(s.Desc.PCIControllers); i++ {
switch s.Desc.PCIControllers[i].CType {
case desc.CONTROLLER_TYPE_PCI_ROOT, desc.CONTROLLER_TYPE_PCI_BRIDGE:
return &s.Desc.PCIControllers[i].Controller
var contType = s.Desc.PCIControllers[i].CType
return &contType
}
}
return nil