Skip to content

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: kata-containers#544
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
  • Loading branch information
jongwu committed May 15, 2019
1 parent f1fd336 commit 5f9df74
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
3 changes: 1 addition & 2 deletions device.go
Expand Up @@ -35,8 +35,7 @@ const (
)

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

var (
Expand Down
12 changes: 12 additions & 0 deletions device_amd64.go
@@ -0,0 +1,12 @@
//
// Copyright (c) 2019 Intel Corporation
// 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
@@ -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"
12 changes: 12 additions & 0 deletions device_ppc64le.go
@@ -0,0 +1,12 @@
//
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019 ARM Limited
//
// SPDX-License-Identifier: Apache-2.0
//

package main

const (
rootBusPath = "/devices/pci0000:00"
)
12 changes: 12 additions & 0 deletions device_s390x.go
@@ -0,0 +1,12 @@
//
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2019 ARM Limited
//
// SPDX-License-Identifier: Apache-2.0
//

package main

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

0 comments on commit 5f9df74

Please sign in to comment.