Jason Wang 429711aec2 vhost: switch to use new message format
We use to have message like:

struct vhost_msg {
	int type;
	union {
		struct vhost_iotlb_msg iotlb;
		__u8 padding[64];
	};
};

Unfortunately, there will be a hole of 32bit in 64bit machine because
of the alignment. This leads a different formats between 32bit API and
64bit API. What's more it will break 32bit program running on 64bit
machine.

So fixing this by introducing a new message type with an explicit
32bit reserved field after type like:

struct vhost_msg_v2 {
	__u32 type;
	__u32 reserved;
	union {
		struct vhost_iotlb_msg iotlb;
		__u8 padding[64];
	};
};

We will have a consistent ABI after switching to use this. To enable
this capability, introduce a new ioctl (VHOST_SET_BAKCEND_FEATURE) for
userspace to enable this feature (VHOST_BACKEND_F_IOTLB_V2).

Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-06 10:41:04 -07:00
..
2018-06-15 17:24:40 +09:00
2017-11-24 16:22:58 -07:00
2018-07-15 00:08:41 +02:00
2018-06-12 15:06:35 +02:00
2018-08-03 10:03:57 -07:00
2017-11-28 16:54:00 +01:00
2018-04-11 10:28:37 -07:00
2018-03-05 10:43:37 -05:00
2018-01-14 23:06:30 -05:00
2018-06-30 21:08:12 +09:00
2018-01-16 16:47:29 +01:00
2018-06-07 12:45:58 -07:00
2018-07-24 14:44:00 -07:00
2018-05-24 22:55:07 -04:00
2018-06-15 18:10:01 -03:00
2018-02-06 22:53:56 +00:00
2018-05-31 00:13:56 +08:00
2018-03-20 03:17:41 +02:00
2018-04-14 11:59:31 -04:00
2018-07-23 21:17:44 -07:00
2017-11-24 10:18:41 +00:00
2017-11-16 10:49:00 +09:00
2018-04-11 10:28:37 -07:00
2017-11-13 21:05:31 -08:00
2018-04-11 10:28:37 -07:00
2018-04-26 15:08:04 -04:00
2018-02-06 18:32:44 -08:00
2018-03-26 13:22:58 -06:00
2016-12-16 00:13:32 +02:00