search for: virtio_mdev_status

Displaying 18 results from an estimated 18 matches for "virtio_mdev_status".

2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...rn 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) > +{ > + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev); > + > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_STATUS, status); > +} > + > +static void...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...rn 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) > +{ > + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev); > + > + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_STATUS, status); > +} > + > +static void...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...irtqueue - Read Only */ > > > +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 > > > + > > > +/* Queue notifier - Write Only */ > > > +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 > > > + > > > +/* Device status register - Read Write */ > > > +#define VIRTIO_MDEV_STATUS 0x060 > > > + > > > +/* Selected queue's Descriptor Table address, 64 bits in two halves */ > > > +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 > > > +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 > > > + > > > +/* Selected queue's Available Ri...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...irtqueue - Read Only */ > > > +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 > > > + > > > +/* Queue notifier - Write Only */ > > > +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 > > > + > > > +/* Device status register - Read Write */ > > > +#define VIRTIO_MDEV_STATUS 0x060 > > > + > > > +/* Selected queue's Descriptor Table address, 64 bits in two halves */ > > > +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 > > > +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 > > > + > > > +/* Selected queue's Available Ri...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ersion == 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) +{ + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev); + + virtio_mdev_writel(vm_dev->mdev, VIRTIO_MDEV_STATUS, status); +} + +static void virtio_mdev_reset(struct virtio_device *vdev) +{...
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 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...gt; >> + >> +/* Alignment of virtqueue - Read Only */ >> +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 >> + >> +/* Queue notifier - Write Only */ >> +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 >> + >> +/* Device status register - Read Write */ >> +#define VIRTIO_MDEV_STATUS 0x060 >> + >> +/* Selected queue's Descriptor Table address, 64 bits in two halves */ >> +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 >> +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 >> + >> +/* Selected queue's Available Ring address, 64 bits in two halves */...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...+#define VIRTIO_MDEV_QUEUE_READY 0x044 > + > +/* Alignment of virtqueue - Read Only */ > +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 > + > +/* Queue notifier - Write Only */ > +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 > + > +/* Device status register - Read Write */ > +#define VIRTIO_MDEV_STATUS 0x060 > + > +/* Selected queue's Descriptor Table address, 64 bits in two halves */ > +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 > +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 > + > +/* Selected queue's Available Ring address, 64 bits in two halves */ > +#define VIRTIO_MD...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...+#define VIRTIO_MDEV_QUEUE_READY 0x044 > + > +/* Alignment of virtqueue - Read Only */ > +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 > + > +/* Queue notifier - Write Only */ > +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 > + > +/* Device status register - Read Write */ > +#define VIRTIO_MDEV_STATUS 0x060 > + > +/* Selected queue's Descriptor Table address, 64 bits in two halves */ > +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 > +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 > + > +/* Selected queue's Available Ring address, 64 bits in two halves */ > +#define VIRTIO_MD...
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...d Only */ >>>> +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 >>>> + >>>> +/* Queue notifier - Write Only */ >>>> +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 >>>> + >>>> +/* Device status register - Read Write */ >>>> +#define VIRTIO_MDEV_STATUS 0x060 >>>> + >>>> +/* Selected queue's Descriptor Table address, 64 bits in two halves */ >>>> +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 >>>> +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 >>>> + >>>> +/* Selected queue's...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
.... + * + * virtio_mdev_readl() + * virtio_mdev_writel() + */ +extern u32 virtio_mdev_readl(struct mdev_device *mdev, loff_t off); +extern void virtio_mdev_writel(struct mdev_device *mdev, loff_t off, u32 val); + +static u8 mdev_get_status(struct mdev_device *mdev) +{ + return virtio_mdev_readl(mdev, VIRTIO_MDEV_STATUS); +} + +static void mdev_set_status(struct mdev_device *mdev, u8 status) +{ + virtio_mdev_writel(mdev, VIRTIO_MDEV_STATUS, status); +} + +static void mdev_add_status(struct mdev_device *mdev, u8 status) +{ + status |= mdev_get_status(mdev); + mdev_set_status(mdev, status); +} + +static void mdev_re...
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...l = mvnet_features; > + break; > + case VIRTIO_MDEV_QUEUE_NUM_MAX: > + *val = MVNET_QUEUE_MAX; > + break; > + case VIRTIO_MDEV_QUEUE_READY: > + *val = vq->ready; > + break; > + case VIRTIO_MDEV_QUEUE_ALIGN: > + *val = MVNET_QUEUE_ALIGN; > + break; > + case VIRTIO_MDEV_STATUS: > + *val = mvnet->status; > + break; > + case VIRTIO_MDEV_QUEUE_DESC_LOW: > + *val = vq->desc_addr_lo; > + break; > + case VIRTIO_MDEV_QUEUE_DESC_HIGH: > + *val = vq->desc_addr_hi; > + break; > + case VIRTIO_MDEV_QUEUE_AVAIL_LOW: > + *val = vq->driv...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...+ *val = mvnet_features >> 32; + else + *val = mvnet_features; + break; + case VIRTIO_MDEV_QUEUE_NUM_MAX: + *val = MVNET_QUEUE_MAX; + break; + case VIRTIO_MDEV_QUEUE_READY: + *val = vq->ready; + break; + case VIRTIO_MDEV_QUEUE_ALIGN: + *val = MVNET_QUEUE_ALIGN; + break; + case VIRTIO_MDEV_STATUS: + *val = mvnet->status; + break; + case VIRTIO_MDEV_QUEUE_DESC_LOW: + *val = vq->desc_addr_lo; + break; + case VIRTIO_MDEV_QUEUE_DESC_HIGH: + *val = vq->desc_addr_hi; + break; + case VIRTIO_MDEV_QUEUE_AVAIL_LOW: + *val = vq->driver_addr_lo; + break; + case VIRTIO_MDEV_QUEUE_AVA...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...el(struct mdev_device *mdev, loff_t off, u32 val); Need to consider a better approach, I feel we should do it through some kind of mdev driver instead of talk to mdev device directly. > + > +static u8 mdev_get_status(struct mdev_device *mdev) > +{ > + return virtio_mdev_readl(mdev, VIRTIO_MDEV_STATUS); > +} > + > +static void mdev_set_status(struct mdev_device *mdev, u8 status) > +{ > + virtio_mdev_writel(mdev, VIRTIO_MDEV_STATUS, status); > +} > + > +static void mdev_add_status(struct mdev_device *mdev, u8 status) > +{ > + status |= mdev_get_status(mdev); > + m...
2019 Sep 11
1
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...QUEUE_ALIGN 0x048 > > > > > + > > > > > +/* Queue notifier - Write Only */ > > > > > +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 > > > > > + > > > > > +/* Device status register - Read Write */ > > > > > +#define VIRTIO_MDEV_STATUS 0x060 > > > > > + > > > > > +/* Selected queue's Descriptor Table address, 64 bits in two halves */ > > > > > +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 > > > > > +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 > > > > > + &g...
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...044 >> + >> +/* Alignment of virtqueue - Read Only */ >> +#define VIRTIO_MDEV_QUEUE_ALIGN 0x048 >> + >> +/* Queue notifier - Write Only */ >> +#define VIRTIO_MDEV_QUEUE_NOTIFY 0x050 >> + >> +/* Device status register - Read Write */ >> +#define VIRTIO_MDEV_STATUS 0x060 >> + >> +/* Selected queue's Descriptor Table address, 64 bits in two halves */ >> +#define VIRTIO_MDEV_QUEUE_DESC_LOW 0x080 >> +#define VIRTIO_MDEV_QUEUE_DESC_HIGH 0x084 >> + >> +/* Selected queue's Available Ring address, 64 bits in two halves */...