On Wed, 26 Nov 2014 20:50:05 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Wed, Nov 26, 2014 at 06:28:42PM +0100, Cornelia Huck wrote:
virtio-net (non-vhost) and virtio-blk have everything in place to support
virtio 1.0: let's enable the feature bit for them.
Hmm I doubt that.
At
On Wed, Nov 26, 2014 at 10:09:54AM +0100, Cornelia Huck wrote:
On Tue, 25 Nov 2014 23:20:11 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Tue, Nov 25, 2014 at 06:29:42PM +0100, Cornelia Huck wrote:
On Tue, 25 Nov 2014 18:41:35 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, 27 Nov 2014 12:54:34 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Wed, Nov 26, 2014 at 10:09:54AM +0100, Cornelia Huck wrote:
The old s390 virtio transport in kvm_virtio.c is not part of virtio 1.0.
It might or might not be a good idea to add code in kvm_virtio.c
On Thu, Nov 27, 2014 at 12:02:52PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 12:54:34 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Wed, Nov 26, 2014 at 10:09:54AM +0100, Cornelia Huck wrote:
The old s390 virtio transport in kvm_virtio.c is not part of virtio 1.0.
It
At this point, no transports set any of the high 32 feature bits.
Since transports generally can't (yet) cope with such bits, add BUG_ON
checks to make sure they are not set by mistake.
Based on rproc patch by Rusty.
Signed-off-by: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Michael S.
From: Rusty Russell ru...@rustcorp.com.au
It seemed like a good idea, but it's actually a pain when we get more
than 32 feature bits. Just change it to a u32 for now.
Cc: Brian Swetland swetl...@google.com
Cc: Christian Borntraeger borntrae...@de.ibm.com
Signed-off-by: Rusty Russell
From: Rusty Russell ru...@rustcorp.com.au
Change the u32 to a u64, and make sure to use 1ULL
in all devices.
Note: transports are unchanged, and only set low 32 bit.
This ensures that no transport sets e.g. VERSION_1
by mistake without proper support.
MST: drop most transport-specific changes.
Based on original patches by Rusty Russell, Thomas Huth
and Cornelia Huck.
Note: at this time, we do not negotiate this feature bit
in core, drivers have to declare VERSION_1 support explicitly.
For this reason we treat this bit as a device bit
and not as a transport bit for now.
After all
virtio 1.0 makes all memory structures LE, so
we need APIs to conditionally do a byteswap on BE
architectures.
To make it easier to check code statically,
add virtio specific types for multi-byte integers
in memory.
Add low level wrappers that do a byteswap conditionally, these will be
useful
We (ab)use virtio conversion functions for device-specific
config space accesses.
Based on original patches by Cornelia and Rusty.
Signed-off-by: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
Use virtioXX_to_cpu and friends for access to
all multibyte structures in memory.
Note: this is intentionally mechanical.
A follow-up patch will split long lines etc.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/virtio/virtio_ring.c | 89
set FEATURES_OK as per virtio 1.0 spec
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
include/uapi/linux/virtio_config.h | 2 ++
drivers/virtio/virtio.c| 29 ++---
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git
From: Cornelia Huck cornelia.h...@de.ibm.com
For virtio-1, we can theoretically have a more complex virtqueue
layout with avail and used buffers not on a contiguous memory area
with the descriptor table. For now, it's fine for a transport driver
to stay with the old layout: It needs, however, a
virtio-blk has some legacy feature bits that modern drivers
must not negotiate, but are needed for old legacy hosts
(that e.g. don't support virtio-scsi).
Allow a separate legacy feature table for such cases.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
include/linux/virtio.h | 4
Now that we use u64 for bits, we can simply them together.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/virtio/virtio.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 6faa014..498bded 100644
Based on patch by Cornelia Huck.
Note: for consistency, and to avoid sparse errors,
convert all fields, even those no longer in use
for virtio v1.0.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
Based on patches by Rusty Russell, Cornelia Huck.
Note: more code changes are needed for 1.0 support
(due to different header size).
So we don't advertize support for 1.0 yet.
Signed-off-by: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by:
It's never declared so no need to make it extern.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/block/virtio_blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index f601f16..055f3df 100644
---
virtio 1.0 doesn't use virtio_net_hdr anymore, and in fact, it's not
really useful since virtio_net_hdr_mrg_rxbuf includes that as the first
field anyway.
Let's drop it, precalculate header len and store within vi instead.
This way we can also remove struct skb_vnet_hdr.
Signed-off-by: Michael
Too many places poke at [rs]q-vq-vdev-priv just to get
the vi structure. Let's just pass the pointer around: seems
cleaner, and might even be faster.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com
---
drivers/net/virtio_net.c | 38
If a device appears while module is being removed,
driver will get a callback after we've given up
on the major number.
In theory this means this major number can get reused
by something else, resulting in a conflict.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
With VERSION_1 virtio_net uses same header size
whether mergeable buffers are enabled or not.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
Our buffer length check is not strict enough for mergeable
buffers: buffer can still be shorter that header + address
by 2 bytes.
Fix that up.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com
---
drivers/net/virtio_net.c | 2 +-
1 file
Now that we have completed 1.0 support, enable it in our driver.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/net/virtio_net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index a0e64cf..c6a72d3 100644
---
We need to use bit 32 for virtio 1.0
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/vhost.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 3eda654..c624b09 100644
--- a/drivers/vhost/vhost.h
+++
vhost/net keeps a copy of some used ring but (ab)uses length
field for internal house-keeping. This works because
for tx used length is always 0.
Suppress sparse errors: we use native endian-ness internally but never
expose it to guest.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/vhost.c | 93 +++
1 file changed, 56 insertions(+), 37 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c90f437..4d379ed 100644
---
The spec states that mac in config space is only driver-writable in the
legacy case. Fence writing it in virtnet_set_mac_address() in the
virtio 1.0 case.
Suggested-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/net/virtio_net.c | 3 ++-
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 1ac58d0..984242e 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -61,7 +61,8 @@
len is always initialized since function is called with size 0.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 984242e..54ffbb0 100644
---
Note: for consistency, and to avoid sparse errors,
convert all fields, even those no longer in use
for virtio v1.0.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
---
include/linux/virtio_scsi.h | 32 +++-
Include all endian conversions as required by virtio 1.0.
Don't set virtio 1.0 yet, since that requires ANY_LAYOUT
which we don't yet support.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
---
drivers/vhost/scsi.c | 22 --
1
Replace uXX by __uXX and _packed by __attribute((packed))
as seems to be the norm for userspace headers.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
---
include/uapi/linux/virtio_scsi.h | 74
Yet another version of the virtio-1 support patches.
This one has seen some (very) light testing with the virtio-1 guest
support patches currently on vhost-next.
Changes from v3:
- Add support for FEATURES_OK. We refuse to set features after the
driver has set this in the status field, and we
From: Thomas Huth th...@linux.vnet.ibm.com
Add the new VIRTIO_F_VERSION_1 definition to the virtio_config.h
linux header.
Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
linux-headers/linux/virtio_config.h |3 +++
1 file changed,
The only user of this function was virtio-ccw, and it should use
virtio_set_features() like everybody else: We need to make sure
that bad features are masked out properly, which this function did
not do.
Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com
Signed-off-by: Cornelia Huck
We need to check guest feature size, not host feature size to find
out whether we should call virtio_set_features(). This check is
possible now that vdev-guest_features is an array.
Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
From: Thomas Huth th...@linux.vnet.ibm.com
Handle the virtio-ccw revision according to what the guest sets.
When revision 1 is selected, we have a virtio-1 standard device
with byteswapping for the virtio rings.
When a channel gets disabled, we have to revert to the legacy behavior
in case the
For virtio-1 devices, the driver must not attempt to set feature bits
after it set FEATURES_OK in the device status. Simply reject it in
that case.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
hw/virtio/virtio.c | 17 +++--
include/hw/virtio/virtio.h |2 ++
virtio-1 allow setting of the FEATURES_OK status bit to fail if
the negotiated feature bits are inconsistent: let's fail
virtio_set_status() in that case and update virtio-ccw to post an
error to the guest.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
hw/s390x/virtio-ccw.c |
Handle endianness conversion for virtio-1 virtqueues correctly.
Note that dataplane now needs to be built per-target.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
hw/block/dataplane/virtio-blk.c |4 +-
hw/scsi/virtio-scsi-dataplane.c |2 +-
From: Thomas Huth th...@linux.vnet.ibm.com
We need a possibility to run code when a subchannel gets disabled.
This patch adds the necessary infrastructure.
Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
hw/s390x/css.c | 12
Devices operating as virtio 1.0 may not allow writes to the mac
address in config space.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
hw/net/virtio-net.c |1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 1e214b5..ad477bf 100644
virtio-1 devices always use num_buffers in the header, even if
mergeable rx buffers have not been negotiated.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
hw/net/virtio-net.c |9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/net/virtio-net.c
virtio-ccw should now have everything in place to operate virtio 1.0
devices, so let's enable revision 1.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
---
hw/s390x/virtio-ccw.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/s390x/virtio-ccw.h
On Thu, Nov 27, 2014 at 04:16:33PM +0100, Cornelia Huck wrote:
Yet another version of the virtio-1 support patches.
This one has seen some (very) light testing with the virtio-1 guest
support patches currently on vhost-next.
Changes from v3:
- Add support for FEATURES_OK. We refuse to
On Thu, 27 Nov 2014 17:24:22 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 04:16:33PM +0100, Cornelia Huck wrote:
Yet another version of the virtio-1 support patches.
This one has seen some (very) light testing with the virtio-1 guest
support patches currently
On Thu, Nov 27, 2014 at 04:16:36PM +0100, Cornelia Huck wrote:
With virtio-1, we support more than 32 feature bits. Let's make
vdev-guest_features depend on the number of supported feature bits,
allowing us to grow the feature bits automatically.
We also need to enhance the internal
On Thu, 27 Nov 2014 17:34:19 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 04:16:36PM +0100, Cornelia Huck wrote:
With virtio-1, we support more than 32 feature bits. Let's make
vdev-guest_features depend on the number of supported feature bits,
allowing us to
On Thu, Nov 27, 2014 at 04:31:39PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 17:24:22 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 04:16:33PM +0100, Cornelia Huck wrote:
Yet another version of the virtio-1 support patches.
This one has seen some
On Thu, Nov 27, 2014 at 04:40:29PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 17:34:19 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 04:16:36PM +0100, Cornelia Huck wrote:
With virtio-1, we support more than 32 feature bits. Let's make
vdev-guest_features
On Thu, 27 Nov 2014 17:42:11 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 04:31:39PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 17:24:22 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 04:16:33PM +0100, Cornelia Huck wrote:
From: Rusty Russell ru...@rustcorp.com.au
It seemed like a good idea, but it's actually a pain when we get more
than 32 feature bits. Just change it to a u32 for now.
Cc: Brian Swetland swetl...@google.com
Cc: Christian Borntraeger borntrae...@de.ibm.com
Signed-off-by: Rusty Russell
On Thu, Nov 27, 2014 at 05:06:51PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 17:42:11 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 04:31:39PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 17:24:22 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 05:15:42PM +0100, David Hildenbrand wrote:
From: Rusty Russell ru...@rustcorp.com.au
It seemed like a good idea, but it's actually a pain when we get more
than 32 feature bits. Just change it to a u32 for now.
Cc: Brian Swetland swetl...@google.com
Cc:
On Thu, 27 Nov 2014 18:18:25 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 05:06:51PM +0100, Cornelia Huck wrote:
So we should have a per-device callback into the transport layer, say
check_legacy()?
I would just have 2 masks: legacy_features and features.
But
That's the whole reason for the patch.
I guess you disagree with it, but it's much easier
to deal with simple integers.
Well, I can live with it :)
clear_bit() and friends are just easier to understand when scanning the code
(at least for me).
On Thu, Nov 27, 2014 at 05:28:42PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 18:18:25 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 05:06:51PM +0100, Cornelia Huck wrote:
So we should have a per-device callback into the transport layer, say
On Thu, Nov 27, 2014 at 05:28:42PM +0100, Cornelia Huck wrote:
On Thu, 27 Nov 2014 18:18:25 +0200
Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Nov 27, 2014 at 05:06:51PM +0100, Cornelia Huck wrote:
So we should have a per-device callback into the transport layer, say
Hi Michael,
Do you have a tree from where I could pull these patches ?
Thanks,
C.
On 11/24/2014 12:54 PM, Michael S. Tsirkin wrote:
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/vhost.c | 93
+++
1 file changed, 56
It seemed like a good idea to use bitmap for features
in struct virtio_device, but it's actually a pain,
and seems to become even more painful when we get more
than 32 feature bits. Just change it to a u32 for now.
Based on patch by Rusty.
Suggested-by: David Hildenbrand d...@linux.vnet.ibm.com
Add low level APIs to test/set/clear feature bits.
For use by transports, to make it easier to
write code independent of feature bit array format.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
include/linux/virtio_config.h | 53 ---
1 file changed,
Based on original patches by Rusty Russell, Thomas Huth
and Cornelia Huck.
Note: at this time, we do not negotiate this feature bit
in core, drivers have to declare VERSION_1 support explicitly.
For this reason we treat this bit as a device bit
and not as a transport bit for now.
After all
Change u32 to u64, and use BIT_ULL and 1ULL everywhere.
Note: transports are unchanged, and only set low 32 bit.
This guarantees that no transport sets e.g. VERSION_1
by mistake without proper support.
Based on patch by Rusty.
Signed-off-by: Rusty Russell ru...@rustcorp.com.au
Signed-off-by:
We (ab)use virtio conversion functions for device-specific
config space accesses.
Based on original patches by Cornelia and Rusty.
Signed-off-by: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
virtio 1.0 makes all memory structures LE, so
we need APIs to conditionally do a byteswap on BE
architectures.
To make it easier to check code statically,
add virtio specific types for multi-byte integers
in memory.
Add low level wrappers that do a byteswap conditionally, these will be
useful
From: Cornelia Huck cornelia.h...@de.ibm.com
For virtio-1, we can theoretically have a more complex virtqueue
layout with avail and used buffers not on a contiguous memory area
with the descriptor table. For now, it's fine for a transport driver
to stay with the old layout: It needs, however, a
Now that we use u64 for bits, we can simply them together.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/virtio/virtio.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 9248125..3e78f4b 100644
set FEATURES_OK as per virtio 1.0 spec
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
include/uapi/linux/virtio_config.h | 2 ++
drivers/virtio/virtio.c| 29 ++---
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git
Based on patches by Rusty Russell, Cornelia Huck.
Note: more code changes are needed for 1.0 support
(due to different header size).
So we don't advertize support for 1.0 yet.
Signed-off-by: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by:
virtio-blk has some legacy feature bits that modern drivers
must not negotiate, but are needed for old legacy hosts
(that e.g. don't support virtio-scsi).
Allow a separate legacy feature table for such cases.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
include/linux/virtio.h | 4
Based on patch by Cornelia Huck.
Note: for consistency, and to avoid sparse errors,
convert all fields, even those no longer in use
for virtio v1.0.
Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
It's never declared so no need to make it extern.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/block/virtio_blk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index f601f16..055f3df 100644
---
If a device appears while module is being removed,
driver will get a callback after we've given up
on the major number.
In theory this means this major number can get reused
by something else, resulting in a conflict.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
Too many places poke at [rs]q-vq-vdev-priv just to get
the vi structure. Let's just pass the pointer around: seems
cleaner, and might even be faster.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com
---
drivers/net/virtio_net.c | 38
With VERSION_1 virtio_net uses same header size
whether mergeable buffers are enabled or not.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
We need to use bit 32 for virtio 1.0
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/vhost.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 3eda654..c624b09 100644
--- a/drivers/vhost/vhost.h
+++
Add guest memory access wrappers to handle virtio endianness
conversions.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/vhost.h | 31 +++
1 file changed, 31 insertions(+)
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index
vhost/net keeps a copy of some used ring but (ab)uses length
field for internal house-keeping. This works because
for tx used length is always 0.
Suppress sparse errors: we use native endian-ness internally but never
expose it to guest.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/net.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index dce5c58..cae22f9 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -416,7 +416,7
The spec states that mac in config space is only driver-writable in the
legacy case. Fence writing it in virtnet_set_mac_address() in the
virtio 1.0 case.
Suggested-by: Cornelia Huck cornelia.h...@de.ibm.com
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/net/virtio_net.c | 3 ++-
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/vhost.c | 93 +++
1 file changed, 56 insertions(+), 37 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c90f437..4d379ed 100644
---
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index cae22f9..1ac58d0 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -1027,7 +1027,8 @@ static
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 1ac58d0..984242e 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -61,7 +61,8 @@
len is always initialized since function is called with size 0.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
drivers/vhost/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 984242e..54ffbb0 100644
---
Replace uXX by __uXX and _packed by __attribute((packed))
as seems to be the norm for userspace headers.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
---
include/uapi/linux/virtio_scsi.h | 74
Include all endian conversions as required by virtio 1.0.
Don't set virtio 1.0 yet, since that requires ANY_LAYOUT
which we don't yet support.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
---
drivers/vhost/scsi.c | 22 --
1
Note: for consistency, and to avoid sparse errors,
convert all fields, even those no longer in use
for virtio v1.0.
Signed-off-by: Michael S. Tsirkin m...@redhat.com
Acked-by: Paolo Bonzini pbonz...@redhat.com
---
include/linux/virtio_scsi.h | 32 +++-
88 matches
Mail list logo