fix(host): get pci controller type

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
wanyaoqi
2023-05-25 20:43:51 +08:00
parent 2fe92ee856
commit 42040bcb54
+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