mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemuBuildPCIHostdevDevStr: Always format PCI domain onto cmd line
While it's true that older QEMUs were not able to deal with PCI domains, we don't support those versions anymore (see 4a42ece13a538). Therefore it is safe to always format fully expanded PCI address. Format PCI domain always as it will simplify next commits. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
86e3de0565
commit
1737d11e1b
@ -4933,10 +4933,10 @@ qemuBuildPCIHostdevDevStr(const virDomainDef *def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virBufferAddLit(&buf, ",host=");
|
virBufferAddLit(&buf, ",host=");
|
||||||
if (pcisrc->addr.domain)
|
virBufferAsprintf(&buf, "%.4x:%.2x:%.2x.%.1x",
|
||||||
virBufferAsprintf(&buf, "%.4x:", pcisrc->addr.domain);
|
pcisrc->addr.domain,
|
||||||
virBufferAsprintf(&buf, "%.2x:%.2x.%.1x",
|
pcisrc->addr.bus,
|
||||||
pcisrc->addr.bus, pcisrc->addr.slot,
|
pcisrc->addr.slot,
|
||||||
pcisrc->addr.function);
|
pcisrc->addr.function);
|
||||||
virBufferAsprintf(&buf, ",id=%s", dev->info->alias);
|
virBufferAsprintf(&buf, ",id=%s", dev->info->alias);
|
||||||
if (dev->info->bootIndex)
|
if (dev->info->bootIndex)
|
||||||
|
@ -27,5 +27,5 @@ server,nowait \
|
|||||||
-usb \
|
-usb \
|
||||||
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
||||||
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
||||||
-device pci-assign,host=06:12.5,id=hostdev0,bus=pci.0,addr=0x3 \
|
-device pci-assign,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x3 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
||||||
|
@ -27,4 +27,4 @@ server,nowait \
|
|||||||
-usb \
|
-usb \
|
||||||
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
||||||
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
||||||
-device pci-assign,host=06:12.5,id=hostdev0,bus=pci.0,addr=0x3
|
-device pci-assign,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x3
|
||||||
|
@ -24,6 +24,6 @@ server,nowait \
|
|||||||
-rtc base=utc \
|
-rtc base=utc \
|
||||||
-no-shutdown \
|
-no-shutdown \
|
||||||
-device zpci,uid=1,fid=0,target=hostdev0,id=zpci1 \
|
-device zpci,uid=1,fid=0,target=hostdev0,id=zpci1 \
|
||||||
-device vfio-pci,host=00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
|
-device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x1 \
|
||||||
-device zpci,uid=2,fid=1,target=balloon0,id=zpci2 \
|
-device zpci,uid=2,fid=1,target=balloon0,id=zpci2 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2
|
||||||
|
@ -28,6 +28,6 @@ server,nowait \
|
|||||||
-device zpci,uid=65535,fid=4294967295,target=hostdev0,id=zpci65535 \
|
-device zpci,uid=65535,fid=4294967295,target=hostdev0,id=zpci65535 \
|
||||||
-device vfio-pci,host=ffff:00:00.0,id=hostdev0,bus=pci.1,addr=0x1f \
|
-device vfio-pci,host=ffff:00:00.0,id=hostdev0,bus=pci.1,addr=0x1f \
|
||||||
-device zpci,uid=1,fid=0,target=hostdev1,id=zpci1 \
|
-device zpci,uid=1,fid=0,target=hostdev1,id=zpci1 \
|
||||||
-device vfio-pci,host=00:00.0,id=hostdev1,bus=pci.0,addr=0x2 \
|
-device vfio-pci,host=0000:00:00.0,id=hostdev1,bus=pci.0,addr=0x2 \
|
||||||
-device zpci,uid=2,fid=1,target=balloon0,id=zpci2 \
|
-device zpci,uid=2,fid=1,target=balloon0,id=zpci2 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
||||||
|
@ -24,6 +24,6 @@ server,nowait \
|
|||||||
-rtc base=utc \
|
-rtc base=utc \
|
||||||
-no-shutdown \
|
-no-shutdown \
|
||||||
-device zpci,uid=25,fid=31,target=hostdev0,id=zpci25 \
|
-device zpci,uid=25,fid=31,target=hostdev0,id=zpci25 \
|
||||||
-device vfio-pci,host=00:00.0,id=hostdev0,bus=pci.0,addr=0x8 \
|
-device vfio-pci,host=0000:00:00.0,id=hostdev0,bus=pci.0,addr=0x8 \
|
||||||
-device zpci,uid=1,fid=0,target=balloon0,id=zpci1 \
|
-device zpci,uid=1,fid=0,target=balloon0,id=zpci1 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x1
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x1
|
||||||
|
@ -27,5 +27,5 @@ server,nowait \
|
|||||||
-usb \
|
-usb \
|
||||||
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
||||||
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
||||||
-device vfio-pci,host=06:12.5,id=hostdev0,bus=pci.0,addr=0x3 \
|
-device vfio-pci,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x3 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
||||||
|
@ -27,4 +27,5 @@ server,nowait \
|
|||||||
-usb \
|
-usb \
|
||||||
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
||||||
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 \
|
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 \
|
||||||
-device pci-assign,host=03:07.1,id=hostdev0,bootindex=1,bus=pci.0,addr=0x3
|
-device pci-assign,host=0000:03:07.1,id=hostdev0,bootindex=1,bus=pci.0,\
|
||||||
|
addr=0x3
|
||||||
|
@ -27,5 +27,5 @@ server,nowait \
|
|||||||
-usb \
|
-usb \
|
||||||
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
||||||
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
||||||
-device vfio-pci,host=03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
|
-device vfio-pci,host=0000:03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
||||||
|
@ -27,5 +27,5 @@ server,nowait \
|
|||||||
-usb \
|
-usb \
|
||||||
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
||||||
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
||||||
-device pci-assign,host=03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
|
-device pci-assign,host=0000:03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
||||||
|
@ -33,7 +33,7 @@ addr=0x3,rombar=1 \
|
|||||||
-netdev user,id=hostnet1 \
|
-netdev user,id=hostnet1 \
|
||||||
-device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:24:a5:9e,bus=pci.0,\
|
-device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:24:a5:9e,bus=pci.0,\
|
||||||
addr=0x4,romfile=/etc/fake/bootrom.bin \
|
addr=0x4,romfile=/etc/fake/bootrom.bin \
|
||||||
-device pci-assign,host=06:12.5,id=hostdev0,bus=pci.0,addr=0x5,rombar=0 \
|
-device pci-assign,host=0000:06:12.5,id=hostdev0,bus=pci.0,addr=0x5,rombar=0 \
|
||||||
-device pci-assign,host=06:12.6,id=hostdev1,bus=pci.0,addr=0x6,rombar=1,\
|
-device pci-assign,host=0000:06:12.6,id=hostdev1,bus=pci.0,addr=0x6,rombar=1,\
|
||||||
romfile=/etc/fake/bootrom.bin \
|
romfile=/etc/fake/bootrom.bin \
|
||||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user