From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2014-12-02 11:44:16
balloon device is not part of virtio 1.0 spec. Still, it's easy enough
to make it handle endian-ness exactly as other virtio 1.0 devices: what
we gain from this, is that there's no need to special-case it in virtio
core.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/uapi/linux/virtio_balloon.h | 5 +++--
drivers/virtio/virtio_balloon.c | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2014-12-02 11:44:26
balloon is the only driver using legacy_only ATM.
It turns out, it's easier to just make balloon support virtio 1.0
endian-ness and drop the flag from core.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio.h | 2 --
drivers/virtio/virtio.c | 4 ----
drivers/virtio/virtio_balloon.c | 1 -
3 files changed, 7 deletions(-)
On Tue, 2 Dec 2014 13:44:06 +0200
"Michael S. Tsirkin" [off-list ref] wrote:
balloon device is not part of virtio 1.0 spec. Still, it's easy enough
to make it handle endian-ness exactly as other virtio 1.0 devices: what
we gain from this, is that there's no need to special-case it in virtio
core.
Well, the balloon is weird in a number of ways, including its always
little-endian config space.
But I'm not quite sure the spec covers this?
Would the respective fields in the spec need updating? While it is
actually talking about legacy requirements, the fields are not
specified as __virtio{16,64}.
Also, is changing the stat fields enough? I've not looked into balloon
operation, but does the payload need some endianess conversion as well?
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2014-12-03 14:02:37
On Tue, Dec 02, 2014 at 07:39:30PM +0100, Cornelia Huck wrote:
On Tue, 2 Dec 2014 13:44:06 +0200
"Michael S. Tsirkin" [off-list ref] wrote:
quoted
balloon device is not part of virtio 1.0 spec. Still, it's easy enough
to make it handle endian-ness exactly as other virtio 1.0 devices: what
we gain from this, is that there's no need to special-case it in virtio
core.
Well, the balloon is weird in a number of ways, including its always
little-endian config space.
Hmm yes, I forgot about that.
But I'm not quite sure the spec covers this?
The spec does not cover balloon. It merely includes a reference section
about legacy balloon device. What to do when that device sets VERSION_1
is really up to us.
Patchset v8 simply makes balloon tell core it's legacy_only.
This is I guess fine as far as it goes.
I was still looking for the best way that involves minimal noise
in core. This looked like the best way: change 4 lines,
and drop all special casing in core, but given the config space
endian-ness mess, I'm not sure anymore.
I guess we'll just stick to what v8 does for now.
Would the respective fields in the spec need updating? While it is
actually talking about legacy requirements, the fields are not
specified as __virtio{16,64}.
Also, is changing the stat fields enough? I've not looked into balloon
operation, but does the payload need some endianess conversion as well?
On Wed, 3 Dec 2014 16:02:28 +0200
"Michael S. Tsirkin" [off-list ref] wrote:
On Tue, Dec 02, 2014 at 07:39:30PM +0100, Cornelia Huck wrote:
quoted
On Tue, 2 Dec 2014 13:44:06 +0200
"Michael S. Tsirkin" [off-list ref] wrote:
quoted
balloon device is not part of virtio 1.0 spec. Still, it's easy enough
to make it handle endian-ness exactly as other virtio 1.0 devices: what
we gain from this, is that there's no need to special-case it in virtio
core.
Well, the balloon is weird in a number of ways, including its always
little-endian config space.
Hmm yes, I forgot about that.
quoted
But I'm not quite sure the spec covers this?
The spec does not cover balloon. It merely includes a reference section
about legacy balloon device. What to do when that device sets VERSION_1
is really up to us.
Patchset v8 simply makes balloon tell core it's legacy_only.
This is I guess fine as far as it goes.
I was still looking for the best way that involves minimal noise
in core. This looked like the best way: change 4 lines,
and drop all special casing in core, but given the config space
endian-ness mess, I'm not sure anymore.
I guess we'll just stick to what v8 does for now.
I don't think the legacy_only approach is so bad, let's keep it for now.