aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/gen/amd64.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-12-29 19:19:49 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-12-29 19:22:35 +0100
commitf02201ce9abdc8b21dee6870bf978ef0ba988a2f (patch)
treecacac16769464f72959e4577fb02b42c7ac2a792 /sys/linux/gen/amd64.go
parent79059de1772b74a9068e3b6a907a692e3414a369 (diff)
sys/linux: describe /dev/vhci interface
Diffstat (limited to 'sys/linux/gen/amd64.go')
-rw-r--r--sys/linux/gen/amd64.go43
1 files changed, 39 insertions, 4 deletions
diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go
index 64bb5a3ae..ba7e75b21 100644
--- a/sys/linux/gen/amd64.go
+++ b/sys/linux/gen/amd64.go
@@ -91,6 +91,7 @@ var resources_amd64 = []*ResourceDesc{
{Name: "fd_uinput", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_uinput"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "fd_userio", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_userio"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "fd_v4l2_buffer", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_v4l2_buffer"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "fd_vhci", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_vhci"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "fd_vhost", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_vhost"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "fd_video", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_video"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
{Name: "genl_fou_family_id", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", TypeSize: 2}}}, Kind: []string{"genl_fou_family_id"}, Values: []uint64{0}},
@@ -23173,6 +23174,28 @@ var structDescs_amd64 = []*KeyedStruct{
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", TypeSize: 16}, Type: &StructType{Key: StructKey{Name: "vfs_cap_elem"}}, Kind: 1, RangeBegin: 2, RangeEnd: 2},
&ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "rootid", TypeSize: 4}},
}}},
+ {Key: StructKey{Name: "vhci_command"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vhci_command", IsVarlen: true}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "vhci_command_generic[HCI_EVENT_PKT]"}, FldName: "HCI_EVENT_PKT"},
+ &StructType{Key: StructKey{Name: "vhci_command_generic[HCI_ACLDATA_PKT]"}, FldName: "HCI_ACLDATA_PKT"},
+ &StructType{Key: StructKey{Name: "vhci_command_generic[HCI_SCODATA_PKT]"}, FldName: "HCI_SCODATA_PKT"},
+ &StructType{Key: StructKey{Name: "vhci_command_vendor_pkt"}, FldName: "HCI_VENDOR_PKT"},
+ }}},
+ {Key: StructKey{Name: "vhci_command_generic[HCI_ACLDATA_PKT]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vhci_command_generic[HCI_ACLDATA_PKT]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 1}}, Val: 2},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}},
+ }}},
+ {Key: StructKey{Name: "vhci_command_generic[HCI_EVENT_PKT]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vhci_command_generic[HCI_EVENT_PKT]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 1}}, Val: 4},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}},
+ }}},
+ {Key: StructKey{Name: "vhci_command_generic[HCI_SCODATA_PKT]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vhci_command_generic[HCI_SCODATA_PKT]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 1}}, Val: 3},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}},
+ }}},
+ {Key: StructKey{Name: "vhci_command_vendor_pkt"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vhci_command_vendor_pkt", TypeSize: 2}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 1}}, Val: 255},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "vhci_vendor_pkt_opcode", FldName: "opcode", TypeSize: 1}}, Vals: []uint64{0, 1, 64, 128}, BitMask: true},
+ }}},
{Key: StructKey{Name: "vhost_iotlb_msg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "vhost_iotlb_msg", TypeSize: 32}, Fields: []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "iova", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "iova"},
@@ -34040,12 +34063,11 @@ var syscalls_amd64 = []*Syscall{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 1024, 8192, 524288, 64, 16384, 65536, 128, 32768, 262144, 256, 131072, 2048, 2097152, 1052672, 512, 4194304}, BitMask: true},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 8}}},
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
- {NR: 257, Name: "openat$vhci", CallName: "openat", Args: []Type{
+ {NR: 257, Name: "openat$vhci", CallName: "openat", MissingArgs: 1, Args: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 8}}, Val: 18446744073709551516},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 10}, Kind: 2, Values: []string{"/dev/vhci\x00"}}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 1024, 8192, 524288, 64, 16384, 65536, 128, 32768, 262144, 256, 131072, 2048, 2097152, 1052672, 512, 4194304}, BitMask: true},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "mode", TypeSize: 8}}},
- }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_vhci", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
{NR: 257, Name: "openat$vhost_vsock", CallName: "openat", Args: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "fd", TypeSize: 8}}, Val: 18446744073709551516},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 17}, Kind: 2, Values: []string{"/dev/vhost-vsock\x00"}}},
@@ -39112,6 +39134,11 @@ var syscalls_amd64 = []*Syscall{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "data", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "uinput_user_dev"}}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "data"},
}},
+ {NR: 1, Name: "write$vhci", CallName: "write", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_vhci", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "data", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "vhci_command"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "size", TypeSize: 8}}, BitSize: 8, Buf: "data"},
+ }},
{NR: 1, Name: "write$vnet", CallName: "write", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "vhost_net", FldName: "fd", TypeSize: 4}},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "buf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "vhost_msg"}}},
@@ -40537,13 +40564,21 @@ var consts_amd64 = []ConstValue{
{Name: "HCISETSCAN", Value: 1074022621},
{Name: "HCISETSCOMTU", Value: 1074022628},
{Name: "HCIUNBLOCKADDR", Value: 1074022631},
+ {Name: "HCI_ACLDATA_PKT", Value: 2},
+ {Name: "HCI_AMP", Value: 1},
{Name: "HCI_CHANNEL_CONTROL", Value: 3},
{Name: "HCI_CHANNEL_MONITOR", Value: 2},
{Name: "HCI_CHANNEL_RAW"},
{Name: "HCI_CHANNEL_USER", Value: 1},
{Name: "HCI_DATA_DIR", Value: 1},
+ {Name: "HCI_EVENT_PKT", Value: 4},
+ {Name: "HCI_EXTERNAL_CONFIG", Value: 64},
{Name: "HCI_FILTER", Value: 2},
+ {Name: "HCI_PRIMARY"},
+ {Name: "HCI_RAW_DEVICE", Value: 128},
+ {Name: "HCI_SCODATA_PKT", Value: 3},
{Name: "HCI_TIME_STAMP", Value: 3},
+ {Name: "HCI_VENDOR_PKT", Value: 255},
{Name: "HDIO_GETGEO", Value: 769},
{Name: "HIDPCONNADD", Value: 1074022600},
{Name: "HIDPCONNDEL", Value: 1074022601},
@@ -46109,4 +46144,4 @@ var consts_amd64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_amd64 = "d9021a754335369176d195ac6cb4ed3a55494516"
+const revision_amd64 = "f91d501104e277ba5dc70f5203fe0ecfdcb7d3bc"