fix(host): fix get disk pci addr (#14173)

Fix hot-plug virtio disk failed.
after add usb and rng deivce, available pci address should update.

Signed-off-by: wanyaoqi <wanyaoqi1995@163.com>

Co-authored-by: wanyaoqi <wanyaoqi1995@163.com>
This commit is contained in:
Jian Qiu
2022-04-29 02:45:57 +08:00
committed by GitHub
parent a17016ae7c
commit eb1c333b2d

View File

@@ -205,7 +205,8 @@ func (s *SKVMGuestInstance) getDriveDesc(disk api.GuestdiskJsonDesc, isArm bool)
}
func (s *SKVMGuestInstance) GetDiskAddr(idx int) int {
var base = 5
// host-bridge / isa-bridge / vga / serial / network / block / usb / rng
var base = 7
if s.IsVdiSpice() {
base += 10
}