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

Commit

Permalink
qemu: remove multidev in qemu/fsdev parameter on arm64
Browse files Browse the repository at this point in the history
backport this from kata-containers.
As the current qemu of arm64 is so old, the new multidev parameter
in 9pfsdev is not supported on arm64, so disabled it temporarily.

Fixes:#2868
Signed-off-by: Jianyong Wu <[email protected]>
  • Loading branch information
jongwu committed Jul 30, 2020
1 parent 40cfa31 commit 8802bd3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
11 changes: 10 additions & 1 deletion virtcontainers/qemu_arch_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,21 @@ func generic9PVolume(volume types.Volume, nestedRun bool) govmmQemu.FSDevice {
}
}

func genericAppend9PVolume(devices []govmmQemu.Device, volume types.Volume, nestedRun bool) (govmmQemu.FSDevice, error) {
d := generic9PVolume(volume, nestedRun)
return d, nil
}

func (q *qemuArchBase) append9PVolume(devices []govmmQemu.Device, volume types.Volume) ([]govmmQemu.Device, error) {
if volume.MountTag == "" || volume.HostPath == "" {
return devices, nil
}

d := generic9PVolume(volume, q.nestedRun)
d, err := genericAppend9PVolume(devices, volume, q.nestedRun)
if err != nil {
return nil, err
}

devices = append(devices, d)
return devices, nil
}
Expand Down
12 changes: 12 additions & 0 deletions virtcontainers/qemu_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

govmmQemu "github.com/intel/govmm/qemu"
"github.com/kata-containers/runtime/virtcontainers/types"
)

type qemuArm64 struct {
Expand Down Expand Up @@ -110,3 +111,14 @@ func (q *qemuArm64) setIgnoreSharedMemoryMigrationCaps(_ context.Context, _ *gov
func (q *qemuArm64) appendIOMMU(devices []govmmQemu.Device) ([]govmmQemu.Device, error) {
return devices, fmt.Errorf("Arm64 architecture does not support vIOMMU")
}

func (q *qemuArm64) append9PVolume(devices []govmmQemu.Device, volume types.Volume) ([]govmmQemu.Device, error) {
d, err := genericAppend9PVolume(devices, volume, q.nestedRun)
if err != nil {
return nil, err
}

d.Multidev = ""
devices = append(devices, d)
return devices, nil
}

0 comments on commit 8802bd3

Please sign in to comment.