Lines Matching refs:vdx
38 do_data_write(int vmfd, struct vm_data_xfer *vdx) in do_data_write() argument
40 if (ioctl(vmfd, VM_DATA_WRITE, vdx) != 0) { in do_data_write()
43 if (vdx->vdx_result_len != vdx->vdx_len) { in do_data_write()
45 vdx->vdx_len, vdx->vdx_result_len); in do_data_write()
50 do_data_read(int vmfd, struct vm_data_xfer *vdx) in do_data_read() argument
52 if (ioctl(vmfd, VM_DATA_READ, vdx) != 0) { in do_data_read()
55 if (vdx->vdx_result_len != vdx->vdx_len) { in do_data_read()
57 vdx->vdx_len, vdx->vdx_result_len); in do_data_read()
62 query_data_size(int vmfd, struct vm_data_xfer *vdx) in query_data_size() argument
64 vdx->vdx_len = 0; in query_data_size()
65 vdx->vdx_data = NULL; in query_data_size()
66 vdx->vdx_flags = 0; in query_data_size()
68 if (ioctl(vmfd, VM_DATA_READ, vdx) == 0) { in query_data_size()
76 return (vdx->vdx_result_len); in query_data_size()
106 struct vm_data_xfer vdx = { in main() local
112 const uint32_t msr_sz = query_data_size(vmfd, &vdx); in main()
122 vdx.vdx_data = entries; in main()
123 vdx.vdx_len = msr_sz; in main()
124 do_data_read(vmfd, &vdx); in main()
153 do_data_write(vmfd, &vdx); in main()
163 vdx.vdx_data = small_list; in main()
164 vdx.vdx_len = sizeof (small_list); in main()
165 vdx.vdx_flags = VDX_FLAG_READ_COPYIN; in main()
166 do_data_read(vmfd, &vdx); in main()
184 vdx.vdx_data = &dbg_entries; in main()
185 vdx.vdx_len = sizeof (dbg_entries); in main()
186 vdx.vdx_flags = VDX_FLAG_READ_COPYIN; in main()
188 do_data_read(vmfd, &vdx); in main()
190 vdx.vdx_flags = 0; in main()
191 do_data_write(vmfd, &vdx); in main()