search for: vdpasim_featur

Displaying 20 results from an estimated 21 matches for "vdpasim_featur".

Did you mean: vdpasim_features
2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...ers/vdpa/vdpa_sim/vdpa_sim.c @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_features, + VDPASIM_QUEUE_MAX,...
2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...ers/vdpa/vdpa_sim/vdpa_sim.c @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_features, + VDPASIM_QUEUE_MAX,...
2020 Jun 24
1
[PATCH] virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM
...F)) /* Only one queue pair for now. */ diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index c7334cc65bb2..a9bc5e0fb353 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -55,7 +55,7 @@ struct vdpasim_virtqueue { static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | (1ULL << VIRTIO_F_VERSION_1) | - (1ULL << VIRTIO_F_IOMMU_PLATFORM); + (1ULL << VIRTIO_F_ACCESS_PLATFORM); /* State of each vdpasim device */ struct vdpasim { @@ -450,7 +450,7 @@ static int vdpasim_set_feature...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...river_addr; + u32 num; + void *private; + irqreturn_t (*cb)(void *data); +}; + +#define VDPASIM_QUEUE_ALIGN PAGE_SIZE +#define VDPASIM_QUEUE_MAX 256 +#define VDPASIM_DEVICE_ID 0x1 +#define VDPASIM_VENDOR_ID 0 +#define VDPASIM_VQ_NUM 0x2 +#define VDPASIM_NAME "vdpasim-netdev" + +static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | + (1ULL << VIRTIO_F_VERSION_1) | + (1ULL << VIRTIO_F_IOMMU_PLATFORM); + +/* State of each vdpasim device */ +struct vdpasim { + struct vdpasim_virtqueue vqs[2]; + struct work_struct work; + /* spinlock to synchronize virtqueue s...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...river_addr; + u32 num; + void *private; + irqreturn_t (*cb)(void *data); +}; + +#define VDPASIM_QUEUE_ALIGN PAGE_SIZE +#define VDPASIM_QUEUE_MAX 256 +#define VDPASIM_DEVICE_ID 0x1 +#define VDPASIM_VENDOR_ID 0 +#define VDPASIM_VQ_NUM 0x2 +#define VDPASIM_NAME "vdpasim-netdev" + +static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | + (1ULL << VIRTIO_F_VERSION_1) | + (1ULL << VIRTIO_F_IOMMU_PLATFORM); + +/* State of each vdpasim device */ +struct vdpasim { + struct vdpasim_virtqueue vqs[2]; + struct work_struct work; + /* spinlock to synchronize virtqueue s...
2020 May 06
0
[PATCH -next] vdpasim: remove unused variable 'ret'
...@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) > static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) > { > struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; > - int ret; > > - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, > - VDPASIM_QUEUE_MAX, false, > - (struct vring_desc *)(uintptr_t)vq->desc_addr, > - (struct vring_avail *) > - (uintptr_t)vq->driver_addr, > - (struct vring_used *) > - (uintptr_t)vq->device_addr); > + vringh_init_iotlb(&vq->vring, vdpasim_...
2020 Aug 05
3
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...dpasim->config; > > /* DMA mapping must be done by driver */ > if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) > @@ -455,6 +470,12 @@ static int vdpasim_set_features(struct vdpa_device *vdpa, u64 features) > > vdpasim->features = features & vdpasim_features; > > + /* We only know whether guest is using the legacy interface here, so > + * that's the earliest we can set config fields. > + */ We check whether or not ACCESS_PLATFORM is set before which is probably a hint that only modern device is supported. So I wonder just forc...
2020 Aug 05
3
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...dpasim->config; > > /* DMA mapping must be done by driver */ > if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) > @@ -455,6 +470,12 @@ static int vdpasim_set_features(struct vdpa_device *vdpa, u64 features) > > vdpasim->features = features & vdpasim_features; > > + /* We only know whether guest is using the legacy interface here, so > + * that's the earliest we can set config fields. > + */ We check whether or not ACCESS_PLATFORM is set before which is probably a hint that only modern device is supported. So I wonder just forc...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...n_t (*cb)(void *data); > +}; > + > +#define VDPASIM_QUEUE_ALIGN PAGE_SIZE > +#define VDPASIM_QUEUE_MAX 256 > +#define VDPASIM_DEVICE_ID 0x1 > +#define VDPASIM_VENDOR_ID 0 > +#define VDPASIM_VQ_NUM 0x2 > +#define VDPASIM_NAME "vdpasim-netdev" > + > +static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | > + (1ULL << VIRTIO_F_VERSION_1) | > + (1ULL << VIRTIO_F_IOMMU_PLATFORM); > + > +/* State of each vdpasim device */ > +struct vdpasim { > + struct vdpasim_virtqueue vqs[2]; > + struct work_struct work; >...
2020 Jun 24
0
[PATCH v2 1/2] virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM
...F)) /* Only one queue pair for now. */ diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index c7334cc65bb2..a9bc5e0fb353 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -55,7 +55,7 @@ struct vdpasim_virtqueue { static u64 vdpasim_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | (1ULL << VIRTIO_F_VERSION_1) | - (1ULL << VIRTIO_F_IOMMU_PLATFORM); + (1ULL << VIRTIO_F_ACCESS_PLATFORM); /* State of each vdpasim device */ struct vdpasim { @@ -450,7 +450,7 @@ static int vdpasim_set_feature...
2020 Jun 24
4
[PATCH v2 0/2] virtio: modernize DMA quirks
Use generic names for the quirks to make it clear it is not just about the IOMMU, it's about DMA access in general. changes from v1: added patch 2 Michael S. Tsirkin (2): virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM virtio: virtio_has_iommu_quirk -> virtio_has_dma_quirk arch/um/drivers/virtio_uml.c | 2 +- drivers/gpu/drm/virtio/virtgpu_object.c | 2
2020 Apr 02
0
[vhost:vhost 22/22] drivers/vdpa/vdpa_sim/vdpa_sim.c:94:8: error: implicit declaration of function 'vringh_init_iotlb'; did you mean 'vringh_init_kern'?
....c: In function 'vdpasim_queue_ready': >> drivers/vdpa/vdpa_sim/vdpa_sim.c:94:8: error: implicit declaration of function 'vringh_init_iotlb'; did you mean 'vringh_init_kern'? [-Werror=implicit-function-declaration] 94 | ret = vringh_init_iotlb(&vq->vring, vdpasim_features, | ^~~~~~~~~~~~~~~~~ | vringh_init_kern drivers/vdpa/vdpa_sim/vdpa_sim.c: In function 'vdpasim_work': >> drivers/vdpa/vdpa_sim/vdpa_sim.c:149:9: error: implicit declaration of function 'vringh_getdesc_iotlb'; did you mean 'vringh_getdes...
2020 Aug 03
0
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...virtio_net_config *config = &vdpasim->config; /* DMA mapping must be done by driver */ if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) @@ -455,6 +470,12 @@ static int vdpasim_set_features(struct vdpa_device *vdpa, u64 features) vdpasim->features = features & vdpasim_features; + /* We only know whether guest is using the legacy interface here, so + * that's the earliest we can set config fields. + */ + + config->mtu = cpu_to_vdpasim16(vdpasim, 1500); + config->status = cpu_to_vdpasim16(vdpasim, VIRTIO_NET_S_LINK_UP); return 0; } -- MST
2020 Aug 05
0
[PATCH v3 22/38] vdpa_sim: fix endian-ness of config space
...virtio_net_config *config = &vdpasim->config; /* DMA mapping must be done by driver */ if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) @@ -455,6 +470,14 @@ static int vdpasim_set_features(struct vdpa_device *vdpa, u64 features) vdpasim->features = features & vdpasim_features; + /* We generally only know whether guest is using the legacy interface + * here, so generally that's the earliest we can set config fields. + * Note: We actually require VIRTIO_F_ACCESS_PLATFORM above which + * implies VIRTIO_F_VERSION_1, but let's not try to be clever here. + */...
2020 Aug 05
0
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
...im->config; > > /* DMA mapping must be done by driver */ > > if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) > > @@ -455,6 +470,12 @@ static int vdpasim_set_features(struct vdpa_device *vdpa, u64 features) > > vdpasim->features = features & vdpasim_features; > > + /* We only know whether guest is using the legacy interface here, so > > + * that's the earliest we can set config fields. > > + */ > > > We check whether or not ACCESS_PLATFORM is set before which is probably a > hint that only modern device is suppor...
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all: This is an updated version of kernel support for vDPA device. Various changes were made based on the feedback since last verion. One major change is to drop the sysfs API and leave the management interface for future development, and introudce the incremental DMA bus operations. Please see changelog for more information. The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is