OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [virtio-dev] [PATCH v3 1/7] Vhost-vsock device: Fixed endiannes issue.

On 14/03/16 11:18, Cornelia Huck wrote:
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index 2c5963c..9378f23 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -481,6 +481,8 @@ static int vhost_vsock_set_features(struct vhost_vsock *vsock, u64 features)
  		vq = &vsock->vqs[i];
  		vq->acked_features = features;
+		vq->is_le = virtio_legacy_is_little_endian();
+		vhost_init_is_le(vq);

Hm... I'm not 100% sure that ->set_features() is the right place to
init this.

Probably the legacy init can be done somewhere else, maybe earlier, but the other init (vhost_init_is_le) cannot be done earlier. if the guest is big endian and the device doesn't negotiate virtio version 1 then it is big endian. therefore we can only initialize that once we see the features.

I'll try to find a more appropriate place for the legacy init now.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]