Displaying 14 results from an estimated 14 matches for "virtio_mdev_config_generation".
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...> +
> > > +/* Selected queue's Used Ring address, 64 bits in two halves */
> > > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
> > > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
> > > +
> > > +/* Configuration atomicity value */
> > > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
> > > +
> > > +/* The config space is defined by each driver as
> > > + * the per-driver configuration space - Read Write */
> > > +#define VIRTIO_MDEV_CONFIG 0x100
> > Mixing device and generic config space is what virtio pci did,
> > caused l...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...> +
> > > +/* Selected queue's Used Ring address, 64 bits in two halves */
> > > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
> > > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
> > > +
> > > +/* Configuration atomicity value */
> > > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
> > > +
> > > +/* The config space is defined by each driver as
> > > + * the per-driver configuration space - Read Write */
> > > +#define VIRTIO_MDEV_CONFIG 0x100
> > Mixing device and generic config space is what virtio pci did,
> > caused l...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...;
> +}
> +
> +static u32 virtio_mdev_generation(struct virtio_device *vdev)
> +{
> + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev);
> +
> + if (vm_dev->version == 1)
> + return 0;
> + else
> + return virtio_mdev_readl(vm_dev->mdev,
> + VIRTIO_MDEV_CONFIG_GENERATION);
> +}
> +
> +static u8 virtio_mdev_get_status(struct virtio_device *vdev)
> +{
> + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev);
> +
> + return virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_STATUS) & 0xff;
> +}
> +
> +static void virtio_mdev_se...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...;
> +}
> +
> +static u32 virtio_mdev_generation(struct virtio_device *vdev)
> +{
> + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev);
> +
> + if (vm_dev->version == 1)
> + return 0;
> + else
> + return virtio_mdev_readl(vm_dev->mdev,
> + VIRTIO_MDEV_CONFIG_GENERATION);
> +}
> +
> +static u8 virtio_mdev_get_status(struct virtio_device *vdev)
> +{
> + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev);
> +
> + return virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_STATUS) & 0xff;
> +}
> +
> +static void virtio_mdev_se...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...RTIO_MDEV_QUEUE_AVAIL_HIGH 0x094
>> +
>> +/* Selected queue's Used Ring address, 64 bits in two halves */
>> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
>> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
>> +
>> +/* Configuration atomicity value */
>> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
>> +
>> +/* The config space is defined by each driver as
>> + * the per-driver configuration space - Read Write */
>> +#define VIRTIO_MDEV_CONFIG 0x100
> Mixing device and generic config space is what virtio pci did,
> caused lots of problems with extensions.
&...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...L_LOW 0x090
> +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094
> +
> +/* Selected queue's Used Ring address, 64 bits in two halves */
> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
> +
> +/* Configuration atomicity value */
> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
> +
> +/* The config space is defined by each driver as
> + * the per-driver configuration space - Read Write */
> +#define VIRTIO_MDEV_CONFIG 0x100
IIUC, we can use above registers with virtio-mdev parent's
read()/write() to access the mdev device from kernel driver.
As you...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...L_LOW 0x090
> +#define VIRTIO_MDEV_QUEUE_AVAIL_HIGH 0x094
> +
> +/* Selected queue's Used Ring address, 64 bits in two halves */
> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
> +
> +/* Configuration atomicity value */
> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
> +
> +/* The config space is defined by each driver as
> + * the per-driver configuration space - Read Write */
> +#define VIRTIO_MDEV_CONFIG 0x100
IIUC, we can use above registers with virtio-mdev parent's
read()/write() to access the mdev device from kernel driver.
As you...
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...>>> +/* Selected queue's Used Ring address, 64 bits in two halves */
>>>> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
>>>> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
>>>> +
>>>> +/* Configuration atomicity value */
>>>> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
>>>> +
>>>> +/* The config space is defined by each driver as
>>>> + * the per-driver configuration space - Read Write */
>>>> +#define VIRTIO_MDEV_CONFIG 0x100
>>> Mixing device and generic config space is what virtio pci did,
>>...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...>ops->write(mdev, buf, len, &off);
+
+ return;
+}
+
+static u32 virtio_mdev_generation(struct virtio_device *vdev)
+{
+ struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev);
+
+ if (vm_dev->version == 1)
+ return 0;
+ else
+ return virtio_mdev_readl(vm_dev->mdev,
+ VIRTIO_MDEV_CONFIG_GENERATION);
+}
+
+static u8 virtio_mdev_get_status(struct virtio_device *vdev)
+{
+ struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev);
+
+ return virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_STATUS) & 0xff;
+}
+
+static void virtio_mdev_set_status(struct virtio_device *vdev, u8 status)
+{...
2019 Sep 11
1
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ed Ring address, 64 bits in two halves */
> > > > > +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
> > > > > +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
> > > > > +
> > > > > +/* Configuration atomicity value */
> > > > > +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
> > > > > +
> > > > > +/* The config space is defined by each driver as
> > > > > + * the per-driver configuration space - Read Write */
> > > > > +#define VIRTIO_MDEV_CONFIG 0x100
> > > > Mixing device and generic confi...
2019 Sep 10
8
[RFC PATCH 0/4] mdev based hardware virtio offloading support
Hi all:
There are hardware that can do virtio datapath offloading while having
its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver to
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...RTIO_MDEV_QUEUE_AVAIL_HIGH 0x094
>> +
>> +/* Selected queue's Used Ring address, 64 bits in two halves */
>> +#define VIRTIO_MDEV_QUEUE_USED_LOW 0x0a0
>> +#define VIRTIO_MDEV_QUEUE_USED_HIGH 0x0a4
>> +
>> +/* Configuration atomicity value */
>> +#define VIRTIO_MDEV_CONFIG_GENERATION 0x0fc
>> +
>> +/* The config space is defined by each driver as
>> + * the per-driver configuration space - Read Write */
>> +#define VIRTIO_MDEV_CONFIG 0x100
> IIUC, we can use above registers with virtio-mdev parent's
> read()/write() to access the mdev device f...
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...reak;
> + case VIRTIO_MDEV_QUEUE_AVAIL_HIGH:
> + *val = vq->driver_addr_hi;
> + break;
> + case VIRTIO_MDEV_QUEUE_USED_LOW:
> + *val = vq->device_addr_lo;
> + break;
> + case VIRTIO_MDEV_QUEUE_USED_HIGH:
> + *val = vq->device_addr_hi;
> + break;
> + case VIRTIO_MDEV_CONFIG_GENERATION:
> + *val = 1;
> + break;
> + default:
> + pr_err("Unsupported mdev read offset at 0x%x\n", pos);
> + break;
> + }
> +
> + return 4;
> +}
> +
> +static ssize_t mvnet_read_net_config(struct mdev_device *mdev,
> + char *buf, size_t count, loff...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...E_AVAIL_LOW:
+ *val = vq->driver_addr_lo;
+ break;
+ case VIRTIO_MDEV_QUEUE_AVAIL_HIGH:
+ *val = vq->driver_addr_hi;
+ break;
+ case VIRTIO_MDEV_QUEUE_USED_LOW:
+ *val = vq->device_addr_lo;
+ break;
+ case VIRTIO_MDEV_QUEUE_USED_HIGH:
+ *val = vq->device_addr_hi;
+ break;
+ case VIRTIO_MDEV_CONFIG_GENERATION:
+ *val = 1;
+ break;
+ default:
+ pr_err("Unsupported mdev read offset at 0x%x\n", pos);
+ break;
+ }
+
+ return 4;
+}
+
+static ssize_t mvnet_read_net_config(struct mdev_device *mdev,
+ char *buf, size_t count, loff_t pos)
+{
+ struct mvnet_state *mvnet = mdev_get_drvdata(md...