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

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

Signed-off-by: wanyaoqi <wanyaoqi1995@163.com>
This commit is contained in:
wanyaoqi
2022-04-29 02:45:46 +08:00
committed by GitHub
parent c708e4ac11
commit 6f29f7d87a
+2 -1
View File
@@ -372,7 +372,8 @@ func GetNicAddr(index int, disksLen int, isoDevsLen int, isVdiSpice bool) int {
}
func GetDiskAddr(idx int, isVdiSpice bool) int {
var base = 5
// host-bridge / isa-bridge / vga / serial / network / block / usb / rng
var base = 7
if isVdiSpice {
base += 10
}