Skip to contentSkip to conversation

virtio-mmio: Correct the name of the guest features selector

PATCH In review Sasha Levin 3 participants 4 messages Nov 15, 2011 – Nov 16, 2011 virtio core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-mmio: Correct the name of the guest features selector

Guest features selector spelling mistake.

---

Hopefully not too late to fix, should possibly be done in one of the next RCs since it's user facing.

 include/linux/virtio_mmio.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/virtio_mmio.h +1 -1
index 27c7ede..5c7b6f0 100644
@@ -63,7 +63,7 @@
 #define VIRTIO_MMIO_GUEST_FEATURES	0x020
 
 /* Activated features set selector - Write Only */
-#define VIRTIO_MMIO_GUEST_FEATURES_SET	0x024
+#define VIRTIO_MMIO_GUEST_FEATURES_SEL	0x024
 
 /* Guest's memory page size in bytes - Write Only */
 #define VIRTIO_MMIO_GUEST_PAGE_SIZE	0x028
Signature · 1 line
1.7.8.rc1
#1 lore raw
Quoted 7 lines · Sasha Levin

Guest features selector spelling mistake.

include/linux/virtio_mmio.h +0 -0
index 27c7ede..5c7b6f0 100644

include/linux/virtio_mmio.h line 69

Quoted 8 lines
include/linux/virtio_mmio.h +1 -1
@@ -63,7 +63,7 @@
 #define VIRTIO_MMIO_GUEST_FEATURES	0x020
 
 /* Activated features set selector - Write Only */
-#define VIRTIO_MMIO_GUEST_FEATURES_SET	0x024
+#define VIRTIO_MMIO_GUEST_FEATURES_SEL	0x024
 
 /* Guest's memory page size in bytes - Write Only */
 #define VIRTIO_MMIO_GUEST_PAGE_SIZE	0x028

Damn. Sorry about it. But if you change the header you'll need to change the driver:

drivers/virtio/virtio_mmio.c +1 -1
index 1f25bb9..10bb8b9 100644
@@ -161,7 +161,7 @@ static void vm_finalize_features(struct virtio_device *vdev)
        vring_transport_features(vdev);
 
        for (i = 0; i < ARRAY_SIZE(vdev->features); i++) {
-               writel(i, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES_SET);
+               writel(i, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES_SEL);
                writel(vdev->features[i],
                                vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES);
        }

Cheers!

Paweł

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#2 lore raw
In reply to Sasha Levin
Quoted 7 lines · Sasha Levin

Guest features selector spelling mistake.

include/linux/virtio_mmio.h +0 -0
index 27c7ede..5c7b6f0 100644

include/linux/virtio_mmio.h line 69

Quoted 8 lines
include/linux/virtio_mmio.h +1 -1
@@ -63,7 +63,7 @@
 #define VIRTIO_MMIO_GUEST_FEATURES	0x020
 
 /* Activated features set selector - Write Only */
-#define VIRTIO_MMIO_GUEST_FEATURES_SET	0x024
+#define VIRTIO_MMIO_GUEST_FEATURES_SEL	0x024
 
 /* Guest's memory page size in bytes - Write Only */
 #define VIRTIO_MMIO_GUEST_PAGE_SIZE	0x028

Damn. Sorry about it. But if you change the header you'll need to change the driver:

drivers/virtio/virtio_mmio.c +1 -1
index 1f25bb9..10bb8b9 100644
@@ -161,7 +161,7 @@ static void vm_finalize_features(struct virtio_device *vdev)
        vring_transport_features(vdev);
 
        for (i = 0; i < ARRAY_SIZE(vdev->features); i++) {
-               writel(i, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES_SET);
+               writel(i, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES_SEL);
                writel(vdev->features[i],
                                vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES);
        }

Cheers!

Paweł

#3 lore raw
Quoted 25 lines · Pawel Moll
Quoted 7 lines · Sasha Levin

Guest features selector spelling mistake.

include/linux/virtio_mmio.h +0 -0
index 27c7ede..5c7b6f0 100644

include/linux/virtio_mmio.h line 69

Quoted 8 lines
include/linux/virtio_mmio.h +1 -1
@@ -63,7 +63,7 @@
 #define VIRTIO_MMIO_GUEST_FEATURES	0x020
 
 /* Activated features set selector - Write Only */
-#define VIRTIO_MMIO_GUEST_FEATURES_SET	0x024
+#define VIRTIO_MMIO_GUEST_FEATURES_SEL	0x024
 
 /* Guest's memory page size in bytes - Write Only */
 #define VIRTIO_MMIO_GUEST_PAGE_SIZE	0x028

Damn. Sorry about it. But if you change the header you'll need to change the driver:

drivers/virtio/virtio_mmio.c +0 -0
index 1f25bb9..10bb8b9 100644

drivers/virtio/virtio_mmio.c static void vm_finalize_features(struct virtio_device *vdev) · line 167

Quoted 8 lines
drivers/virtio/virtio_mmio.c +1 -1
@@ -161,7 +161,7 @@ static void vm_finalize_features(struct virtio_device *vdev)
        vring_transport_features(vdev);
 
        for (i = 0; i < ARRAY_SIZE(vdev->features); i++) {
-               writel(i, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES_SET);
+               writel(i, vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES_SEL);
                writel(vdev->features[i],
                                vm_dev->base + VIRTIO_MMIO_GUEST_FEATURES);
        }

Rolled together and applied.

Thanks,
Rusty.