Merge pull request #15334 from wanyaoqi/fix/remove-pcie-extend-bus-check

fix(host): remove has pcie extend bus check
This commit is contained in:
Zexi Li
2022-11-09 23:06:19 +08:00
committed by GitHub
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ func (s *SKVMGuestInstance) initMachineDefaultDevices() error {
func (s *SKVMGuestInstance) initGuestPciControllers() (*desc.PCIController, *desc.PCIController) {
var isPcie = s.isPcie()
var pciRoot, pciBridge *desc.PCIController
if isPcie && s.hasPcieExtendBus() {
if isPcie {
pciRoot = s.addPCIController(desc.CONTROLLER_TYPE_PCIE_ROOT, "")
s.addPCIController(desc.CONTROLLER_TYPE_PCIE_TO_PCI_BRIDGE, desc.CONTROLLER_TYPE_PCIE_ROOT)
pciBridge = s.addPCIController(desc.CONTROLLER_TYPE_PCI_BRIDGE, desc.CONTROLLER_TYPE_PCIE_TO_PCI_BRIDGE)
+1 -3
View File
@@ -2163,9 +2163,7 @@ func (s *SKVMGuestInstance) OnResumeSyncMetadataInfo() {
} else {
meta.Set("__cpu_mode", jsonutils.NewString(api.CPU_MODE_HOST))
}
if s.hasPcieExtendBus() {
meta.Set("__pcie_extend_bus", jsonutils.JSONTrue)
}
meta.Set("__pcie_extend_bus", jsonutils.JSONTrue)
cmdline, err := s.getQemuCmdline()
if err != nil {
log.Errorf("Get qemu process cmdline error: %v", err)