Displaying 8 results from an estimated 8 matches for "lduw_le_p".
2015 Feb 25
0
Qemu and virtio 1.0
...irtio/virtio.c
@@ -662,7 +662,12 @@ uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr)
k->get_config(vdev, vdev->config);
- val = lduw_p(vdev->config + addr);
+ /* Virtio 1.0 is always LE */
+ if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
+ val = lduw_le_p(vdev->config + addr);
+ } else {
+ val = lduw_p(vdev->config + addr);
+ }
return val;
}
@@ -677,7 +682,12 @@ uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr)
k->get_config(vdev, vdev->config);
- val = ldl_p(vdev->config + addr);
+ /*...
2015 Feb 25
0
Qemu and virtio 1.0
...irtio/virtio.c
@@ -662,7 +662,12 @@ uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr)
k->get_config(vdev, vdev->config);
- val = lduw_p(vdev->config + addr);
+ /* Virtio 1.0 is always LE */
+ if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
+ val = lduw_le_p(vdev->config + addr);
+ } else {
+ val = lduw_p(vdev->config + addr);
+ }
return val;
}
@@ -677,7 +682,12 @@ uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr)
k->get_config(vdev, vdev->config);
- val = ldl_p(vdev->config + addr);
+ /*...
2015 Mar 02
1
Qemu and virtio 1.0
...uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr)
>
> k->get_config(vdev, vdev->config);
>
> - val = lduw_p(vdev->config + addr);
> + /* Virtio 1.0 is always LE */
> + if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> + val = lduw_le_p(vdev->config + addr);
> + } else {
> + val = lduw_p(vdev->config + addr);
> + }
> return val;
> }
>
> @@ -677,7 +682,12 @@ uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr)
>
> k->get_config(vdev, vdev->config);
>...
2015 Mar 02
1
Qemu and virtio 1.0
...uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr)
>
> k->get_config(vdev, vdev->config);
>
> - val = lduw_p(vdev->config + addr);
> + /* Virtio 1.0 is always LE */
> + if (virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) {
> + val = lduw_le_p(vdev->config + addr);
> + } else {
> + val = lduw_p(vdev->config + addr);
> + }
> return val;
> }
>
> @@ -677,7 +682,12 @@ uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr)
>
> k->get_config(vdev, vdev->config);
>...
2015 Mar 02
4
[PATCH 1/2] virtio: add modern config accessors
...virtio_config_modern_readw(VirtIODevice *vdev, uint32_t addr)
+{
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
+ uint16_t val;
+
+ if (addr + sizeof(val) > vdev->config_len) {
+ return (uint32_t)-1;
+ }
+
+ k->get_config(vdev, vdev->config);
+
+ val = lduw_le_p(vdev->config + addr);
+ return val;
+}
+
+uint32_t virtio_config_modern_readl(VirtIODevice *vdev, uint32_t addr)
+{
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
+ uint32_t val;
+
+ if (addr + sizeof(val) > vdev->config_len) {
+ return (uint32_t)-1;
+ }
+
+...
2015 Mar 02
4
[PATCH 1/2] virtio: add modern config accessors
...virtio_config_modern_readw(VirtIODevice *vdev, uint32_t addr)
+{
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
+ uint16_t val;
+
+ if (addr + sizeof(val) > vdev->config_len) {
+ return (uint32_t)-1;
+ }
+
+ k->get_config(vdev, vdev->config);
+
+ val = lduw_le_p(vdev->config + addr);
+ return val;
+}
+
+uint32_t virtio_config_modern_readl(VirtIODevice *vdev, uint32_t addr)
+{
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
+ uint32_t val;
+
+ if (addr + sizeof(val) > vdev->config_len) {
+ return (uint32_t)-1;
+ }
+
+...
2014 Nov 27
22
[PATCH RFC v4 00/16] qemu: towards virtio-1 host support
Yet another version of the virtio-1 support patches.
This one has seen some (very) light testing with the virtio-1 guest
support patches currently on vhost-next.
Changes from v3:
- Add support for FEATURES_OK. We refuse to set features after the
driver has set this in the status field, and we allow to fail
setting the status if the features are inconsistent.
- Add missing virtio-1 changes
2014 Nov 27
22
[PATCH RFC v4 00/16] qemu: towards virtio-1 host support
Yet another version of the virtio-1 support patches.
This one has seen some (very) light testing with the virtio-1 guest
support patches currently on vhost-next.
Changes from v3:
- Add support for FEATURES_OK. We refuse to set features after the
driver has set this in the status field, and we allow to fail
setting the status if the features are inconsistent.
- Add missing virtio-1 changes