*/
+// Issue a V3_VM_KSTREAM_USER_CONNECT on the VM to acquire an fd for the device
+
// get size of pending request
+// Note that this is not the wrong ioctl - the connect ioctl applies to the VM device
+// the following ioctls apply to the FD returned by the connect
#define V3_KSTREAM_REQUEST_SIZE_IOCTL (11244+1)
// get the pending request
#define V3_KSTREAM_REQUEST_PULL_IOCTL (11244+2)
#define USER
#endif
+
struct palacios_user_keyed_stream_url {
uint64_t len;
char url[0]; // len describes it
// This structure is used for both requests (kernel->user)
// and responses (user->kernel)
//
+// for a readkey request, the buf contains the tag
+// for a readkey response, the buf contains the data
+// for a writekey request, the buf contains the data + key
+// for a writekey request, the buf contains nothing
struct palacios_user_keyed_stream_op {
uint64_t len; // total structure length (all)
#define PALACIOS_KSTREAM_READ_KEY 6
sint64_t xfer; // total bytes read or written (request/response)
+ //
void *user_key; // user tag for an open key (response)
uint64_t buf_len; // buffer len
- char buf[0]; // expanded as needed (key or valye)
+ uint64_t data_off; // offset of data within the buffer
+ // 0..buffer_len-1 is tag
+ // rest is data
+ char buf[0]; // expanded as needed (key or value)
- // The buffer contains the key or the value
+ // The buffer contains the key or the value
};