Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
arm64: correct bridge type for QEMUVIRT machine
Browse files Browse the repository at this point in the history
The device pcie-pci-bridge in qemu will create a pci bus not pcie bus.
It should be corrected for QEMUVIRT.
After correct this, vfio pci device can be hotplugged in arm64.

Fixes: #3016
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
(cherry picked from commit 141de5c)
  • Loading branch information
jongwu authored and amshinde committed Nov 10, 2020
1 parent a8e9cff commit 7df99f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ func genericBridges(number uint32, machineType string) []types.Bridge {
case QemuPC:
bt = types.PCI
case QemuVirt:
bt = types.PCIE
bt = types.PCI
case QemuPseries:
bt = types.PCI
case QemuCCWVirtio:
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/qemu_arm64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestQemuArm64AppendBridges(t *testing.T) {

expectedOut := []govmmQemu.Device{
govmmQemu.BridgeDevice{
Type: govmmQemu.PCIEBridge,
Type: govmmQemu.PCIBridge,
Bus: defaultBridgeBus,
ID: bridges[0].ID,
Chassis: 1,
Expand Down

0 comments on commit 7df99f3

Please sign in to comment.