Displaying 20 results from an estimated 47 matches for "config_generation".
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...ommon_cfg, hw->notify_base, hw->isr,
> + hw->net_cfg, hw->notify_off_multiplier);
> +
> + return 0;
> +}
> +
> +u8 ifcvf_get_status(struct ifcvf_hw *hw)
> +{
> + u8 old_gen, new_gen, status;
> +
> + do {
> + old_gen = ioread8(&hw->common_cfg->config_generation);
> + status = ioread8(&hw->common_cfg->device_status);
> + new_gen = ioread8(&hw->common_cfg->config_generation);
> + } while (old_gen != new_gen);
> +
> + return status;
> +}
> +
> +void ifcvf_set_status(struct ifcvf_hw *hw, u8 status)
> +{
> +...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...ommon_cfg, hw->notify_base, hw->isr,
> + hw->net_cfg, hw->notify_off_multiplier);
> +
> + return 0;
> +}
> +
> +u8 ifcvf_get_status(struct ifcvf_hw *hw)
> +{
> + u8 old_gen, new_gen, status;
> +
> + do {
> + old_gen = ioread8(&hw->common_cfg->config_generation);
> + status = ioread8(&hw->common_cfg->device_status);
> + new_gen = ioread8(&hw->common_cfg->config_generation);
> + } while (old_gen != new_gen);
> +
> + return status;
> +}
> +
> +void ifcvf_set_status(struct ifcvf_hw *hw, u8 status)
> +{
> +...
2019 Oct 22
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...uct ifcvf_hw *hw, u64 offset,
>>>> + void *dst, int length)
>>>> +{
>>>> + int i;
>>>> + u8 *p;
>>>> + u8 old_gen, new_gen;
>>>> +
>>>> + do {
>>>> + old_gen = ioread8(&hw->common_cfg->config_generation);
>>>> +
>>>> + p = dst;
>>>> + for (i = 0; i < length; i++)
>>>> + *p++ = ioread8((u8 *)hw->dev_cfg + offset + i);
>>>> +
>>>> + new_gen = ioread8(&hw->common_cfg->config_generation);
>>>> + }...
2019 Oct 23
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...void *dst, int length)
>>>>>> +{
>>>>>> + int i;
>>>>>> + u8 *p;
>>>>>> + u8 old_gen, new_gen;
>>>>>> +
>>>>>> + do {
>>>>>> + old_gen = ioread8(&hw->common_cfg->config_generation);
>>>>>> +
>>>>>> + p = dst;
>>>>>> + for (i = 0; i < length; i++)
>>>>>> + *p++ = ioread8((u8 *)hw->dev_cfg + offset + i);
>>>>>> +
>>>>>> + new_gen = ioread8(&hw->common_c...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...ommon_cfg, hw->notify_base, hw->isr,
> + hw->net_cfg, hw->notify_off_multiplier);
> +
> + return 0;
> +}
> +
> +u8 ifcvf_get_status(struct ifcvf_hw *hw)
> +{
> + u8 old_gen, new_gen, status;
> +
> + do {
> + old_gen = ioread8(&hw->common_cfg->config_generation);
> + status = ioread8(&hw->common_cfg->device_status);
> + new_gen = ioread8(&hw->common_cfg->config_generation);
> + } while (old_gen != new_gen);
> +
> + return status;
> +}
> +
> +void ifcvf_set_status(struct ifcvf_hw *hw, u8 status)
> +{
> +...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...ommon_cfg, hw->notify_base, hw->isr,
> + hw->net_cfg, hw->notify_off_multiplier);
> +
> + return 0;
> +}
> +
> +u8 ifcvf_get_status(struct ifcvf_hw *hw)
> +{
> + u8 old_gen, new_gen, status;
> +
> + do {
> + old_gen = ioread8(&hw->common_cfg->config_generation);
> + status = ioread8(&hw->common_cfg->device_status);
> + new_gen = ioread8(&hw->common_cfg->config_generation);
config generation should be only used for config access not status,
and even it did, it should be called from virtio core.
> + } while (old_gen != new_...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...>> +
>> + vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
>> +}
>> +
>> +static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
>> +{
>> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
>> +
>> + return vp_ioread8(&vp_vdpa->common->config_generation);
>> +}
>> +
>> +static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
>> +{
>> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
>> +
>> + return vp_vdpa->id.device;
>> +}
>> +
>> +static u32 vp_vdpa_get_vendor_id(struct vdpa_device *...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...>> +
>> + vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
>> +}
>> +
>> +static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
>> +{
>> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
>> +
>> + return vp_ioread8(&vp_vdpa->common->config_generation);
>> +}
>> +
>> +static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
>> +{
>> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
>> +
>> + return vp_vdpa->id.device;
>> +}
>> +
>> +static u32 vp_vdpa_get_vendor_id(struct vdpa_device *...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...uct vdpa_device *vdpa, u16 qid)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
+}
+
+static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_ioread8(&vp_vdpa->common->config_generation);
+}
+
+static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.device;
+}
+
+static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.vendor;
+...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...uct vdpa_device *vdpa, u16 qid)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
+}
+
+static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_ioread8(&vp_vdpa->common->config_generation);
+}
+
+static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.device;
+}
+
+static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.vendor;
+...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...uct vdpa_device *vdpa, u16 qid)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
+}
+
+static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_ioread8(&vp_vdpa->common->config_generation);
+}
+
+static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.device;
+}
+
+static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.vendor;
+...
2020 Jun 10
2
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...uct vdpa_device *vdpa, u16 qid)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
+}
+
+static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_ioread8(&vp_vdpa->common->config_generation);
+}
+
+static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.device;
+}
+
+static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.vendor;
+...
2020 Jun 10
0
[PATCH V3] vdpa: introduce virtio pci driver
..._vdpa->vring[qid].notify);
> > > +}
> > > +
> > > +static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
> > > +{
> > > + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> > > +
> > > + return vp_ioread8(&vp_vdpa->common->config_generation);
> > > +}
> > > +
> > > +static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
> > > +{
> > > + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> > > +
> > > + return vp_vdpa->id.device;
> > > +}
> > > +
> >...
2020 May 29
0
[PATCH 5/6] vdpa: introduce virtio pci driver
...uct vdpa_device *vdpa, u16 qid)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
+}
+
+static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_ioread8(&vp_vdpa->common->config_generation);
+}
+
+static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.device;
+}
+
+static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.vendor;
+...
2020 Jun 10
0
[PATCH RESEND V2] vdpa: introduce virtio pci driver
...p_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> +
> + vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
> +}
> +
> +static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
> +{
> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> +
> + return vp_ioread8(&vp_vdpa->common->config_generation);
> +}
> +
> +static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
> +{
> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> +
> + return vp_vdpa->id.device;
> +}
> +
> +static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
> +{
> + struct vp_vdpa *vp_...
2020 Jun 10
0
[PATCH V3] vdpa: introduce virtio pci driver
...p_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> +
> + vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
> +}
> +
> +static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
> +{
> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> +
> + return vp_ioread8(&vp_vdpa->common->config_generation);
> +}
> +
> +static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
> +{
> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
> +
> + return vp_vdpa->id.device;
> +}
> +
> +static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
> +{
> + struct vp_vdpa *vp_...
2020 Jun 10
2
[PATCH V2] vdpa: introduce virtio pci driver
...uct vdpa_device *vdpa, u16 qid)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
+}
+
+static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_ioread8(&vp_vdpa->common->config_generation);
+}
+
+static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.device;
+}
+
+static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.vendor;
+...
2020 Jun 10
2
[PATCH V2] vdpa: introduce virtio pci driver
...uct vdpa_device *vdpa, u16 qid)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ vp_iowrite16(qid, vp_vdpa->vring[qid].notify);
+}
+
+static u32 vp_vdpa_get_generation(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_ioread8(&vp_vdpa->common->config_generation);
+}
+
+static u32 vp_vdpa_get_device_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.device;
+}
+
+static u32 vp_vdpa_get_vendor_id(struct vdpa_device *vdpa)
+{
+ struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
+
+ return vp_vdpa->id.vendor;
+...
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
The spec is very clear on this:
4.1.3.1 Driver Requirements: PCI Device Layout
The driver MUST access each field using the ?natural? access method,
i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit
fields and 8-bit accesses for 8-bit fields.
Add type-safe wrappers to prevent access with incorrect width.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
2015 Feb 15
3
[PATCH 1/2] virtio_pci_modern: type-safe io accessors
The spec is very clear on this:
4.1.3.1 Driver Requirements: PCI Device Layout
The driver MUST access each field using the ?natural? access method,
i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit
fields and 8-bit accesses for 8-bit fields.
Add type-safe wrappers to prevent access with incorrect width.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---