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

Commit

Permalink
updateInterface: enable hot-add nic on arm64
Browse files Browse the repository at this point in the history
For now, update interface in agent will fail when hot-add
nic to a running containers on arm64 as rescan pci bus will
occur between uf and bf of shpc hotplug interrupt handling.

Another problem is that the rootBusPath will be
"/devices/platform/4010000000.pcie/pci0000:00" on arm64.

To enable hot-add nic on arm64, rootBusPath should be changed here
and shpc hotplug should be disabled in guest kernel.

This patch just change rootBusPath.

Fixes: #544
Signed-off-by: Jianyong Wu <[email protected]>
  • Loading branch information
jongwu committed May 15, 2019
1 parent f1fd336 commit 701344e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 2 deletions.
3 changes: 1 addition & 2 deletions device.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ const (
)

const (
rootBusPath = "/devices/pci0000:00"
pciBusMode = 0220
pciBusMode = 0220
)

var (
Expand Down
11 changes: 11 additions & 0 deletions device_amd64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Copyright (c) 2019 ARM Limited
//
// SPDX-License-Identifier: Apache-2.0
//

package main

const (
rootBusPath = "/devices/pci0000:00"
)
9 changes: 9 additions & 0 deletions device_arm64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (c) 2019 ARM Limited
//
// SPDX-License-Identifier: Apache-2.0
//

package main

const rootBusPath = "/devices/platform/4010000000.pcie/pci0000:00"
11 changes: 11 additions & 0 deletions device_ppc64le.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Copyright (c) 2019 ARM Limited
//
// SPDX-License-Identifier: Apache-2.0
//

package main

const (
rootBusPath = "/devices/pci0000:00"
)
11 changes: 11 additions & 0 deletions device_s390x.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Copyright (c) 2019 ARM Limited
//
// SPDX-License-Identifier: Apache-2.0
//

package main

const (
rootBusPath = "/devices/pci0000:00"
)

0 comments on commit 701344e

Please sign in to comment.