Thread (22 messages) 22 messages, 3 authors, 2015-04-24

Re: [PATCH v5 1/8] virtio: introduce virtio_is_little_endian() helper

flat view

From: Thomas Huth <hidden>
Date: 2015-04-23 17:26:25
Also in: kvm, lkml

Am Thu, 23 Apr 2015 19:22:15 +0200
schrieb Thomas Huth [off-list ref]:
Am Thu, 23 Apr 2015 17:26:20 +0200
schrieb Greg Kurz [off-list ref]:
quoted
Signed-off-by: Greg Kurz <redacted>
---
 include/linux/virtio_config.h |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index ca3ed78..bd1a582 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -205,35 +205,40 @@ int virtqueue_set_affinity(struct virtqueue *vq, int cpu)
 	return 0;
 }
 
+static inline bool virtio_is_little_endian(struct virtio_device *vdev)
+{
+	return virtio_has_feature(vdev, VIRTIO_F_VERSION_1);
+}
So this function returns false when _not_ using version 1, but running
on a little endian host + guest? Sounds confusing. Maybe you could name
it "virtio_is_v1()" or so instead?
Ah, never mind, I should have looked at patch 6 first, then it makes
sense. (maybe you could put a note to the later patch in this patch
description?)

 Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help