Displaying 20 results from an estimated 56 matches for "guest_feature_select".
2013 May 29
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...;device_feature_select;
case offsetof(struct virtio_pci_common_cfg, device_feature):
+ assert(size == sizeof cfg.device_feature);
/* TODO: 64-bit features */
return proxy->device_feature_select ? 0 : proxy->host_features;
case offsetof(struct virtio_pci_common_cfg, guest_feature_select):
+ assert(size == sizeof cfg.guest_feature_select);
return proxy->guest_feature_select;
case offsetof(struct virtio_pci_common_cfg, guest_feature):
+ assert(size == sizeof cfg.guest_feature);
/* TODO: 64-bit features */
return proxy->guest_feature_selec...
2013 May 29
6
[PATCH RFC] virtio-pci: new config layout: using memory BAR
Anthony Liguori <aliguori at us.ibm.com> writes:
> "Michael S. Tsirkin" <mst at redhat.com> writes:
>> + case offsetof(struct virtio_pci_common_cfg, device_feature_select):
>> + return proxy->device_feature_select;
>
> Oh dear no... Please use defines like the rest of QEMU.
It is pretty ugly.
Yet the structure definitions are descriptive,
2013 May 29
6
[PATCH RFC] virtio-pci: new config layout: using memory BAR
Anthony Liguori <aliguori at us.ibm.com> writes:
> "Michael S. Tsirkin" <mst at redhat.com> writes:
>> + case offsetof(struct virtio_pci_common_cfg, device_feature_select):
>> + return proxy->device_feature_select;
>
> Oh dear no... Please use defines like the rest of QEMU.
It is pretty ugly.
Yet the structure definitions are descriptive,
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...g, device_feature_select):
+ return proxy->device_feature_select;
+ case offsetof(struct virtio_pci_common_cfg, device_feature):
+ /* TODO: 64-bit features */
+ return proxy->device_feature_select ? 0 : proxy->host_features;
+ case offsetof(struct virtio_pci_common_cfg, guest_feature_select):
+ return proxy->guest_feature_select;
+ case offsetof(struct virtio_pci_common_cfg, guest_feature):
+ /* TODO: 64-bit features */
+ return proxy->guest_feature_select ? 0 : vdev->guest_features;
+ case offsetof(struct virtio_pci_common_cfg, msix_config):
+ return vdev...
2013 May 28
3
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...g, device_feature_select):
+ return proxy->device_feature_select;
+ case offsetof(struct virtio_pci_common_cfg, device_feature):
+ /* TODO: 64-bit features */
+ return proxy->device_feature_select ? 0 : proxy->host_features;
+ case offsetof(struct virtio_pci_common_cfg, guest_feature_select):
+ return proxy->guest_feature_select;
+ case offsetof(struct virtio_pci_common_cfg, guest_feature):
+ /* TODO: 64-bit features */
+ return proxy->guest_feature_select ? 0 : vdev->guest_features;
+ case offsetof(struct virtio_pci_common_cfg, msix_config):
+ return vdev...
2013 May 28
0
[PATCH RFC] virtio-pci: new config layout: using memory BAR
...oposed new ring layout yet.
Regards,
Anthony Liguori
> + case offsetof(struct virtio_pci_common_cfg, device_feature):
> + /* TODO: 64-bit features */
> + return proxy->device_feature_select ? 0 : proxy->host_features;
> + case offsetof(struct virtio_pci_common_cfg, guest_feature_select):
> + return proxy->guest_feature_select;
> + case offsetof(struct virtio_pci_common_cfg, guest_feature):
> + /* TODO: 64-bit features */
> + return proxy->guest_feature_select ? 0 : vdev->guest_features;
> + case offsetof(struct virtio_pci_common_cfg, ms...
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>
---
2013 May 27
1
[PATCH rusty/virtio-pci-new-layout] virtio: new layout minor header fixups
...ne of the VIRTIO_PCI_CAP_*_CFG. */
+ __u8 bar; /* Where to find it. */
__le32 offset; /* Offset within bar. */
__le32 length; /* Length. */
};
@@ -144,7 +146,7 @@ struct virtio_pci_common_cfg {
__le32 device_feature_select; /* read-write */
__le32 device_feature; /* read-only */
__le32 guest_feature_select; /* read-write */
- __le32 guest_feature; /* read-only */
+ __le32 guest_feature; /* read-write */
__le16 msix_config; /* read-write */
__le16 num_queues; /* read-only */
__u8 device_status; /* read-write */
--
MST
2013 May 27
1
[PATCH rusty/virtio-pci-new-layout] virtio: new layout minor header fixups
...ne of the VIRTIO_PCI_CAP_*_CFG. */
+ __u8 bar; /* Where to find it. */
__le32 offset; /* Offset within bar. */
__le32 length; /* Length. */
};
@@ -144,7 +146,7 @@ struct virtio_pci_common_cfg {
__le32 device_feature_select; /* read-write */
__le32 device_feature; /* read-only */
__le32 guest_feature_select; /* read-write */
- __le32 guest_feature; /* read-only */
+ __le32 guest_feature; /* read-write */
__le16 msix_config; /* read-write */
__le16 num_queues; /* read-only */
__u8 device_status; /* read-write */
--
MST
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support,
but I'm pretty sure we should never allow these patches upstream.
Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG.
Rusty Russell (2):
virtio_pci: abstract all MMIO accesses.
virtio: Introducing virtio_pci.no_mmio, the worst boot option in
history.
drivers/virtio/virtio_pci_common.c |
2015 Feb 11
2
[RFC 0/2] virtio_pci: patches never to apply.
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support,
but I'm pretty sure we should never allow these patches upstream.
Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG.
Rusty Russell (2):
virtio_pci: abstract all MMIO accesses.
virtio: Introducing virtio_pci.no_mmio, the worst boot option in
history.
drivers/virtio/virtio_pci_common.c |
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...mp;= VP_VDPA_FEATURES;
>> +
>> + return features;
>> +}
>> +
>> +static int vp_vdpa_set_features(struct vdpa_device *vdpa, u64 features)
>> +{
>> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
>> +
>> + vp_iowrite32(0, &vp_vdpa->common->guest_feature_select);
>> + vp_iowrite32((u32)features, &vp_vdpa->common->guest_feature);
>> + vp_iowrite32(1, &vp_vdpa->common->guest_feature_select);
>> + vp_iowrite32(features >> 32, &vp_vdpa->common->guest_feature);
>> +
>> + return 0;
>> +}
&g...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...mp;= VP_VDPA_FEATURES;
>> +
>> + return features;
>> +}
>> +
>> +static int vp_vdpa_set_features(struct vdpa_device *vdpa, u64 features)
>> +{
>> + struct vp_vdpa *vp_vdpa = vdpa_to_vp(vdpa);
>> +
>> + vp_iowrite32(0, &vp_vdpa->common->guest_feature_select);
>> + vp_iowrite32((u32)features, &vp_vdpa->common->guest_feature);
>> + vp_iowrite32(1, &vp_vdpa->common->guest_feature_select);
>> + vp_iowrite32(features >> 32, &vp_vdpa->common->guest_feature);
>> +
>> + return 0;
>> +}
&g...
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches.
Coding style and funny jokes are his.
Bugs and a star wars reference (should be easy to spot) are mine.
Untested, but useful as basis for beginning the qemu work.
TODO:
= simplify probing: use a common probe function, probe with modern driver
first, if that fails - probe with legacy driver.
BUGS: ATM legacy driver can win and drive a transitional device
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches.
Coding style and funny jokes are his.
Bugs and a star wars reference (should be easy to spot) are mine.
Untested, but useful as basis for beginning the qemu work.
TODO:
= simplify probing: use a common probe function, probe with modern driver
first, if that fails - probe with legacy driver.
BUGS: ATM legacy driver can win and drive a transitional device
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...t; +
> + for (i = 0; i < length; i++)
> + iowrite8(*p++, (u8 *)hw->net_cfg + offset + i);
> +}
> +
> +static void ifcvf_set_features(struct ifcvf_hw *hw, u64 features)
> +{
> + struct virtio_pci_common_cfg *cfg = hw->common_cfg;
> +
> + iowrite32(0, &cfg->guest_feature_select);
> + iowrite32(features & ((1ULL << 32) - 1), &cfg->guest_feature);
> +
> + iowrite32(1, &cfg->guest_feature_select);
> + iowrite32(features >> 32, &cfg->guest_feature);
> +}
> +
> +static int ifcvf_config_features(struct ifcvf_hw *hw)
>...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...t; +
> + for (i = 0; i < length; i++)
> + iowrite8(*p++, (u8 *)hw->net_cfg + offset + i);
> +}
> +
> +static void ifcvf_set_features(struct ifcvf_hw *hw, u64 features)
> +{
> + struct virtio_pci_common_cfg *cfg = hw->common_cfg;
> +
> + iowrite32(0, &cfg->guest_feature_select);
> + iowrite32(features & ((1ULL << 32) - 1), &cfg->guest_feature);
> +
> + iowrite32(1, &cfg->guest_feature_select);
> + iowrite32(features >> 32, &cfg->guest_feature);
> +}
> +
> +static int ifcvf_config_features(struct ifcvf_hw *hw)
>...
2014 Dec 30
0
[PATCH RFC v2 4/7] virtio-pci: define layout for virtio 1.0
...o_pci_cap cap;
+ __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */
+};
+
+/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */
+struct virtio_pci_common_cfg {
+ /* About the whole device. */
+ __le32 device_feature_select; /* read-write */
+ __le32 device_feature; /* read-only */
+ __le32 guest_feature_select; /* read-write */
+ __le32 guest_feature; /* read-write */
+ __le16 msix_config; /* read-write */
+ __le16 num_queues; /* read-only */
+ __u8 device_status; /* read-write */
+ __u8 config_generation; /* read-only */
+
+ /* About a specific virtqueue. */
+ __le16 queue_select; /* read-write */...
2014 Dec 30
0
[PATCH RFC v2 4/7] virtio-pci: define layout for virtio 1.0
...o_pci_cap cap;
+ __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */
+};
+
+/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */
+struct virtio_pci_common_cfg {
+ /* About the whole device. */
+ __le32 device_feature_select; /* read-write */
+ __le32 device_feature; /* read-only */
+ __le32 guest_feature_select; /* read-write */
+ __le32 guest_feature; /* read-write */
+ __le16 msix_config; /* read-write */
+ __le16 num_queues; /* read-only */
+ __u8 device_status; /* read-write */
+ __u8 config_generation; /* read-only */
+
+ /* About a specific virtqueue. */
+ __le16 queue_select; /* read-write */...