search for: virtio_vsock_config

Displaying 20 results from an estimated 37 matches for "virtio_vsock_config".

2016 Dec 06
0
[PATCH 07/10] vsock/virtio: add a missing __le annotation
...virtio_transport.c @@ -336,7 +336,7 @@ static void virtio_vsock_reset_sock(struct sock *sk) static void virtio_vsock_update_guest_cid(struct virtio_vsock *vsock) { struct virtio_device *vdev = vsock->vdev; - u64 guest_cid; + __le64 guest_cid; vdev->config->get(vdev, offsetof(struct virtio_vsock_config, guest_cid), &guest_cid, sizeof(guest_cid)); -- MST
2023 Aug 01
0
[PATCH RFC net-next v5 10/14] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit
...40,7 @@ >> > > >> > > /* The feature bitmap for virtio vsock */ >> > > #define VIRTIO_VSOCK_F_SEQPACKET 1 /* SOCK_SEQPACKET supported */ >> > > +#define VIRTIO_VSOCK_F_DGRAM 3 /* SOCK_DGRAM supported */ >> > > >> > > struct virtio_vsock_config { >> > > __le64 guest_cid; >> > >> > pls do not add interface without first getting it accepted in the >> > virtio spec. >> >> Yep, fortunatelly this series is still RFC. >> I think by now we've seen that the implementation is doable, s...
2013 Jun 27
0
[RFC 0/5] Introduce VM Sockets virtio transport
...for it? if not, does it make sense keeping it here? we can always re-add it to the end just like in virtio-net. > Feature bits: > Currently, no feature bits are defined. > > Device configuration layout: > > Two configuration fields are currently defined. > > struct virtio_vsock_config { > __u32 guest_cid; > __u32 max_virtqueue_pairs; > } __packed; > > The guest_cid field specifies the guest context id which likes the guest IP > address. The max_virtqueue_pairs field specifies the maximum number of receive > and transmit virtqueue...
2013 Jun 27
0
[RFC 0/5] Introduce VM Sockets virtio transport
...> > Virtqueues: > 0:controlq; 1:receiveq0; 2:transmitq0 ... 2N+1:receivqN; 2N+2:transmitqN > > Feature bits: > Currently, no feature bits are defined. > > Device configuration layout: > > Two configuration fields are currently defined. > > struct virtio_vsock_config { which fields are RW,RO,WO? > __u32 guest_cid; Given that cid is like an IP address, 32 bit seems too limiting. I would go for a 64 bit one or maybe even 128 bit, so that e.g. GUIDs can be used there. > __u32 max_virtqueue_pairs; I'd make this little endian....
2014 Jul 05
0
[RFC V2 4/7] VSOCK: Introduce virtio-vsock.ko
...zalloc(sizeof(*vsock), GFP_KERNEL); + if (!vsock) + return -ENOMEM; + + vsock->vdev = vdev; + + ret = vsock->vdev->config->find_vqs(vsock->vdev, VSOCK_VQ_MAX, + vsock->vqs, callbacks, names); + if (ret < 0) + goto out; + + vdev->config->get(vdev, offsetof(struct virtio_vsock_config, guest_cid), + &guest_cid, sizeof(guest_cid)); + vsock->guest_cid = le32_to_cpu(guest_cid); + pr_debug("%s:guest_cid=%d\n", __func__, vsock->guest_cid); + + ret = vsock_core_init(&virtio_transport); + if (ret < 0) + goto out_vqs; + + vsock->rx_buf_nr = 0; + vsock-...
2015 Dec 09
0
[PATCH v3 2/4] VSOCK: Introduce virtio-vsock.ko
...ck), GFP_KERNEL); + if (!vsock) { + ret = -ENOMEM; + goto out; + } + + vsock->vdev = vdev; + + ret = vsock->vdev->config->find_vqs(vsock->vdev, VSOCK_VQ_MAX, + vsock->vqs, callbacks, names); + if (ret < 0) + goto out; + + vdev->config->get(vdev, offsetof(struct virtio_vsock_config, guest_cid), + &guest_cid, sizeof(guest_cid)); + vsock->guest_cid = le32_to_cpu(guest_cid); + pr_debug("%s:guest_cid=%d\n", __func__, vsock->guest_cid); + + ret = vsock_core_init(&virtio_transport); + if (ret < 0) + goto out_vqs; + + vsock->rx_buf_nr = 0; + vsock-...
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
...and the hypervisor. Configuration: Subsystem Device ID 13 Virtqueues: 0:controlq; 1:receiveq0; 2:transmitq0 ... 2N+1:receivqN; 2N+2:transmitqN Feature bits: Currently, no feature bits are defined. Device configuration layout: Two configuration fields are currently defined. struct virtio_vsock_config { __u32 guest_cid; __u32 max_virtqueue_pairs; } __packed; The guest_cid field specifies the guest context id which likes the guest IP address. The max_virtqueue_pairs field specifies the maximum number of receive and transmit virtqueue pairs (receiveq0 ... receiveqN and t...
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
...and the hypervisor. Configuration: Subsystem Device ID 13 Virtqueues: 0:controlq; 1:receiveq0; 2:transmitq0 ... 2N+1:receivqN; 2N+2:transmitqN Feature bits: Currently, no feature bits are defined. Device configuration layout: Two configuration fields are currently defined. struct virtio_vsock_config { __u32 guest_cid; __u32 max_virtqueue_pairs; } __packed; The guest_cid field specifies the guest context id which likes the guest IP address. The max_virtqueue_pairs field specifies the maximum number of receive and transmit virtqueue pairs (receiveq0 ... receiveqN and t...
2015 Dec 10
1
[PATCH v3 2/4] VSOCK: Introduce virtio-vsock.ko
...a NULL vsock? > + } > + > + vsock->vdev = vdev; > + > + ret = vsock->vdev->config->find_vqs(vsock->vdev, VSOCK_VQ_MAX, > + vsock->vqs, callbacks, names); > + if (ret < 0) > + goto out; > + > + vdev->config->get(vdev, offsetof(struct virtio_vsock_config, guest_cid), > + &guest_cid, sizeof(guest_cid)); > + vsock->guest_cid = le32_to_cpu(guest_cid); > + pr_debug("%s:guest_cid=%d\n", __func__, vsock->guest_cid); > + > + ret = vsock_core_init(&virtio_transport); > + if (ret < 0) > + goto out_vqs; &g...
2015 Dec 10
1
[PATCH v3 2/4] VSOCK: Introduce virtio-vsock.ko
...a NULL vsock? > + } > + > + vsock->vdev = vdev; > + > + ret = vsock->vdev->config->find_vqs(vsock->vdev, VSOCK_VQ_MAX, > + vsock->vqs, callbacks, names); > + if (ret < 0) > + goto out; > + > + vdev->config->get(vdev, offsetof(struct virtio_vsock_config, guest_cid), > + &guest_cid, sizeof(guest_cid)); > + vsock->guest_cid = le32_to_cpu(guest_cid); > + pr_debug("%s:guest_cid=%d\n", __func__, vsock->guest_cid); > + > + ret = vsock_core_init(&virtio_transport); > + if (ret < 0) > + goto out_vqs; &g...
2016 Dec 06
26
[PATCH 00/10] virtio: sparse fixes
I run latest sparse from git on virtio drivers (turns out the version I had was rather outdated). This patchset fixes a couple of bugs this uncovered, and adds some annotations to make it sparse-clean. In particular, endian-ness is often tricky, so this patchset enabled endian-ness checks for sparse builds. Michael S. Tsirkin (10): virtio_console: drop unused config fields drm/virtio: fix
2016 Dec 06
26
[PATCH 00/10] virtio: sparse fixes
I run latest sparse from git on virtio drivers (turns out the version I had was rather outdated). This patchset fixes a couple of bugs this uncovered, and adds some annotations to make it sparse-clean. In particular, endian-ness is often tricky, so this patchset enabled endian-ness checks for sparse builds. Michael S. Tsirkin (10): virtio_console: drop unused config fields drm/virtio: fix
2014 Jul 05
9
[RFC V2 0/7] Introduce VM Sockets virtio transport
...and the hypervisor. Configuration: Subsystem Device ID 13 Virtqueues: 0:controlq; 1:receiveq0; 2:transmitq0 ... 2N+1:receivqN; 2N+2:transmitqN Feature bits: Currently, no feature bits are defined. Device configuration layout: Two configuration fields are currently defined. struct virtio_vsock_config { __le32 guest_cid; __le32 max_virtqueue_pairs; }; The guest_cid field specifies the guest context id which likes the guest IP address. The max_virtqueue_pairs field specifies the maximum number of receive and transmit virtqueue pairs (receiveq0 ... receiveqN and transmi...
2014 Jul 05
9
[RFC V2 0/7] Introduce VM Sockets virtio transport
...and the hypervisor. Configuration: Subsystem Device ID 13 Virtqueues: 0:controlq; 1:receiveq0; 2:transmitq0 ... 2N+1:receivqN; 2N+2:transmitqN Feature bits: Currently, no feature bits are defined. Device configuration layout: Two configuration fields are currently defined. struct virtio_vsock_config { __le32 guest_cid; __le32 max_virtqueue_pairs; }; The guest_cid field specifies the guest context id which likes the guest IP address. The max_virtqueue_pairs field specifies the maximum number of receive and transmit virtqueue pairs (receiveq0 ... receiveqN and transmi...
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not yet finalized. Please review this code but don't merge until I send an update when the spec is finalized. Thanks! v3: * Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead of REQUEST/RESPONSE/ACK * Remove SOCK_DGRAM support and focus on SOCK_STREAM first (also drop v2 Patch 1, it's
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not yet finalized. Please review this code but don't merge until I send an update when the spec is finalized. Thanks! v3: * Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead of REQUEST/RESPONSE/ACK * Remove SOCK_DGRAM support and focus on SOCK_STREAM first (also drop v2 Patch 1, it's
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...ht (C) Asias He <asias at redhat.com>, 2013 > + */ > + > +#ifndef _UAPI_LINUX_VIRTIO_VSOCK_H > +#define _UAPI_LINUX_VIRTIO_VOSCK_H > + > +#include <linux/types.h> > +#include <linux/virtio_ids.h> > +#include <linux/virtio_config.h> > + > +struct virtio_vsock_config { > + __u32 guest_cid; > + __u32 max_virtqueue_pairs; > +} __packed; > + > +struct virtio_vsock_hdr { > + __u32 src_cid; > + __u32 src_port; > + __u32 dst_cid; > + __u32 dst_port; > + __u32 len; > + __u8 type; > + __u8 op; > + __u8 shut; > + __u64 fwd_cnt;...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...ht (C) Asias He <asias at redhat.com>, 2013 > + */ > + > +#ifndef _UAPI_LINUX_VIRTIO_VSOCK_H > +#define _UAPI_LINUX_VIRTIO_VOSCK_H > + > +#include <linux/types.h> > +#include <linux/virtio_ids.h> > +#include <linux/virtio_config.h> > + > +struct virtio_vsock_config { > + __u32 guest_cid; > + __u32 max_virtqueue_pairs; > +} __packed; > + > +struct virtio_vsock_hdr { > + __u32 src_cid; > + __u32 src_port; > + __u32 dst_cid; > + __u32 dst_port; > + __u32 len; > + __u8 type; > + __u8 op; > + __u8 shut; > + __u64 fwd_cnt;...
2015 Dec 09
0
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...sias at redhat.com>, 2013 + * Copyright (C) Stefan Hajnoczi <stefanha at redhat.com>, 2015 + */ + +#ifndef _UAPI_LINUX_VIRTIO_VSOCK_H +#define _UAPI_LINUX_VIRTIO_VOSCK_H + +#include <linux/types.h> +#include <linux/virtio_ids.h> +#include <linux/virtio_config.h> + +struct virtio_vsock_config { + __le32 guest_cid; + __le32 max_virtqueue_pairs; +}; + +struct virtio_vsock_hdr { + __le32 src_cid; + __le32 src_port; + __le32 dst_cid; + __le32 dst_port; + __le32 len; + __le16 type; /* enum virtio_vsock_type */ + __le16 op; /* enum virtio_vsock_op */ + __le32 flags; + __le32 buf_alloc; + __...
2013 Jun 27
0
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...+ * Copyright (C) Red Hat, Inc., 2013 + * Copyright (C) Asias He <asias at redhat.com>, 2013 + */ + +#ifndef _UAPI_LINUX_VIRTIO_VSOCK_H +#define _UAPI_LINUX_VIRTIO_VOSCK_H + +#include <linux/types.h> +#include <linux/virtio_ids.h> +#include <linux/virtio_config.h> + +struct virtio_vsock_config { + __u32 guest_cid; + __u32 max_virtqueue_pairs; +} __packed; + +struct virtio_vsock_hdr { + __u32 src_cid; + __u32 src_port; + __u32 dst_cid; + __u32 dst_port; + __u32 len; + __u8 type; + __u8 op; + __u8 shut; + __u64 fwd_cnt; + __u64 buf_alloc; +} __packed; + +enum { + VIRTIO_VSOCK_OP_INVALID =...