Files
kata-containers/virtcontainers/utils/utils_linux_ppc64le.go
Nitesh Konkar 8cf0f0602f vsock: set VHOST_VSOCK_SET_GUEST_CID based based on arch
set VHOST_VSOCK_SET_GUEST_CID depending on
the host architecture.

Fixes: #1988

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-08-30 14:36:15 +05:30

19 lines
578 B
Go

// Copyright (c) 2019 IBM
//
// SPDX-License-Identifier: Apache-2.0
//
package utils
// from <linux/vhost.h>
// VHOST_VSOCK_SET_GUEST_CID = _IOW(VHOST_VIRTIO, 0x60, __u64)
// _IOC_WRITE is 1 for arch generic and 4 for powerpc
// Code reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/uapi/asm/ioctl.h
// Explanation: https://github.com/kata-containers/runtime/pull/1989#issuecomment-525993135
const ioctlVhostVsockSetGuestCid = 0x8008AF60
func getIoctlVhostVsockGuestCid() uintptr {
return ioctlVhostVsockSetGuestCid
}