On Fri, Oct 24, 2014 at 12:12 AM, Michael S. Tsirkin wrote:
> 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.
Yes, th
Signed-off-by: Michael S. Tsirkin
---
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 adfba9f..1f8b111 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -478,7
On Tue, Oct 07, 2014 at 04:39:56PM +0200, Cornelia Huck wrote:
> This patchset aims to get us some way to implement virtio-1 compliant
> and transitional devices in qemu. Branch available at
>
> git://github.com/cohuck/qemu virtio-1
>
> I've mainly focused on:
> - endianness handling
> - extended
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
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_ne
With VERSION_1 virtio_net uses same header size
whether mergeable buffers are enabled or not.
Signed-off-by: Michael S. Tsirkin
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 9c6d50f..a2
Too many places poke at [rs]q->vq->vdev->priv just to get
the the vi structure. Let's just pass the pointer around: seems
cleaner, and might even be faster.
Signed-off-by: Michael S. Tsirkin
---
drivers/net/virtio_net.c | 36 +++-
1 file changed, 19 insertions(+)
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 S
Note: stub out endian-ness conversion for now.
We'll add a flag to control it for BE guests later.
Signed-off-by: Michael S. Tsirkin
---
This will be needed once __virtio16 typedefs come in.
drivers/net/tun.c | 34 +-
1 file changed, 17 insertions(+), 17 deletio
the following is needed on top of v4 virtio 1.0 support
that I sent. Will squash it in for v5.
Signed-off-by: Michael S. Tsirkin
---
drivers/virtio/virtio.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 85a164e..e9018b4 100644
virtio blk has some legacy feature bits that modern drivers
must not negotiate, but are needed for old legacy hosts
(e.g. that dn't support virtio scsi).
Allow a separate legacy feature table for such cases.
Signed-off-by: Michael S. Tsirkin
---
include/linux/virtio.h | 4
drivers/virtio/
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.
Reviewed-by: Thomas Huth
Reviewed-by: David Hildenbrand
Signed-off-by: Cornelia Huck
Signed-off-by: Michael S. Tsirkin
---
include/
Based on patches by Rusty Russell, Cornelia Huck.
Signed-off-by: Rusty Russell
Signed-off-by: Cornelia Huck
Signed-off-by: Michael S. Tsirkin
---
include/uapi/linux/virtio_net.h | 15 ---
drivers/net/virtio_net.c| 34 +-
2 files changed, 29 i
From: Rusty Russell
Change the u32 to a u64, and make sure to use 1ULL everywhere!
Cc: Brian Swetland
Cc: Christian Borntraeger
[Thomas Huth: fix up virtio-ccw get_features]
Signed-off-by: Rusty Russell
Signed-off-by: Cornelia Huck
Acked-by: Pawel Moll
Acked-by: Ohad Ben-Cohen
Signed-off-
From: Cornelia Huck
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 way to access
the location
From: Rusty Russell
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
Cc: Christian Borntraeger
Signed-off-by: Rusty Russell
Signed-off-by: Cornelia Huck
Acked-by: Pawel Moll
Acked-by: Ohad Ben-Co
set FEATURES_OK as per virtio 1.0 spec
Signed-off-by: Michael S. Tsirkin
---
include/uapi/linux/virtio_config.h | 2 ++
drivers/virtio/virtio.c| 29 ++---
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/virtio_config.h
b/in
Now that we use u64 for bits, we can simply & them together.
Signed-off-by: Michael S. Tsirkin
---
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 a3df817..0f44cff 100644
--- a/drivers/
We (ab)use virtio conversion functions for device-specific
config space accesses.
Reviewed-by: David Hildenbrand
Signed-off-by: Rusty Russell
Signed-off-by: Cornelia Huck
Signed-off-by: Michael S. Tsirkin
---
include/linux/virtio_config.h | 9 ++---
1 file changed, 6 insertions(+), 3 dele
virtio 1.0 is LE, virtio without 1.0 is native endian.
Signed-off-by: Michael S. Tsirkin
---
include/linux/virtio_config.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 4bc2ebe..952b6d7 100644
--- a/inc
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.
After all drivers are converted, we will be able to
move VERSION_1 to core and drop it from all driver
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 e.g
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
---
drivers/virtio/virtio_ring.c | 89 ++--
1 file cha
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.
To fix, cleanup in reverse order of initialization.
Signed-off-by: Michael S.
On Thu, Oct 23, 2014 at 03:30:06PM +0200, Cornelia Huck wrote:
> On Thu, 23 Oct 2014 15:51:39 +0300
> "Michael S. Tsirkin" wrote:
>
> > On Thu, Oct 23, 2014 at 02:28:08PM +0200, Cornelia Huck wrote:
> > > On Wed, 22 Oct 2014 21:44:44 +0300
> > > "Michael S. Tsirkin" wrote:
> > >
> > > > set FEA
On Thu, 23 Oct 2014 15:51:39 +0300
"Michael S. Tsirkin" wrote:
> On Thu, Oct 23, 2014 at 02:28:08PM +0200, Cornelia Huck wrote:
> > On Wed, 22 Oct 2014 21:44:44 +0300
> > "Michael S. Tsirkin" wrote:
> >
> > > set FEATURES_OK as per virtio 1.0 spec
> > >
> > > Signed-off-by: Michael S. Tsirkin
It's never declared so no need to make it extern.
Signed-off-by: Michael S. Tsirkin
---
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 93e23a7..a68f4c6 100644
--- a/drivers/block/virti
On Thu, Oct 23, 2014 at 02:28:08PM +0200, Cornelia Huck wrote:
> On Wed, 22 Oct 2014 21:44:44 +0300
> "Michael S. Tsirkin" wrote:
>
> > set FEATURES_OK as per virtio 1.0 spec
> >
> > Signed-off-by: Michael S. Tsirkin
> > ---
> > include/uapi/linux/virtio_config.h | 2 ++
> > drivers/virtio/vi
On Wed, 22 Oct 2014 21:44:44 +0300
"Michael S. Tsirkin" wrote:
> set FEATURES_OK as per virtio 1.0 spec
>
> Signed-off-by: Michael S. Tsirkin
> ---
> include/uapi/linux/virtio_config.h | 2 ++
> drivers/virtio/virtio.c| 29 ++---
> 2 files changed, 24 inser
On Wed, 22 Oct 2014 21:44:34 +0300
"Michael S. Tsirkin" wrote:
> virtio 1.0 is LE, virtio without 1.0 is native endian.
>
> Signed-off-by: Michael S. Tsirkin
> ---
> include/linux/virtio_config.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Looks sane.
_
On Wed, 22 Oct 2014 21:44:31 +0300
"Michael S. Tsirkin" wrote:
> Based on original patches by Rusty Russell, Thomas Huth
> and Cornelia Huck.
>
> Signed-off-by: Michael S. Tsirkin
> ---
> include/uapi/linux/virtio_config.h | 7 +--
> drivers/virtio/virtio_ring.c | 2 ++
> 2 files cha
On Thu, Oct 23, 2014 at 08:44:09AM +0200, Jan Kiszka wrote:
> On 2014-10-22 22:34, Benjamin Herrenschmidt wrote:
> > On Wed, 2014-10-22 at 16:17 +0200, Jan Kiszka wrote:
> >> I thought about this again, and I'm not sure anymore if we can use
> >> ACPI
> >> to "black-list" the incompatible virtio de
On Thu, Oct 23, 2014 at 09:54:05AM +0200, Cornelia Huck wrote:
> On Wed, 22 Oct 2014 21:44:08 +0300
> "Michael S. Tsirkin" wrote:
>
> > 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 s
On Wed, 22 Oct 2014 21:44:08 +0300
"Michael S. Tsirkin" wrote:
> 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.
>
On Thu, Oct 23, 2014 at 07:34:16AM +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2014-10-22 at 16:17 +0200, Jan Kiszka wrote:
> > I thought about this again, and I'm not sure anymore if we can use
> > ACPI
> > to "black-list" the incompatible virtio devices. Reason: hotplug. To
> > my
> > understa
34 matches
Mail list logo