Skip to contentSkip to conversation

kvm-guest-drivers-linux-1

ANNOUNCE Avi Kivity 8 participants 10 messages Mar 6, 2008 – Mar 16, 2008 1 message not in the archive KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

This is the first release of block and network drivers for Linux guests running on a kvm host. The drivers are intended for guest kernels 2.6.18-2.6.24. Newer kernels include the drivers; older kernels may not work. kvm-61 or later is needed in the host.

Network throughput is around 1 Gbit/sec; latency is currently a less than stellar 0.3 msec. Both these figures will be improved in the future.

The drivers are available from the download page of the kvm website, below.

To use, download the drivers into the guest (using one of the emulated network cards), unpack the package, and type

make
sudo make install

You will need the kernel development package installed.

To use the drivers, reboot with '-net nic,model=virtio' instead of the usual setting, and 'modprobe virtio_net' to load the module. Similarly use '-drive ...,if=virtio' for the block device, and the corresponding virtio_blk.ko.

Initial release:
- virtio pci driver (Anthony Liguori, Rusty Russell, Dor Laor)
- virtio network driver (Anthony Liguori, Rusty Russell, Dor Laor)
- virtio block driver (Anthony Liguori, Rusty Russell, Dor Laor)
- backports to Linux 2.6.18-2.6.24 (Anthony Liguori, Rusty Russell, Dor Laor)

http://kvm.qumranet.com/

Signature · 7 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Very nice !

1. How about releasing those in ISO format instead (or in addition to...) tarballs?

2. I have a problem compiling it.
"make sync LINUX=." fails.

I have read the README:
"Where /path/to/kernel is the path to a recent kernel tree containing virtio drivers. At the moment, this must be Rusty Russell's virtio patch queue[1] applied on top of Linus' git tree[2]."

What does it means ? That I need kernel-2.6.25 sources? Well, since we release a tarball, can we include part of 2.6.25 ? It is a bit unclear, what must I do to compile it.

Signature · 6 lines
-Alexey Eremenko "Technologov"

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
#3 lore raw
Quoted 5 lines · Alexey Eremenko

Very nice !

1. How about releasing those in ISO format instead (or in addition to...) tarballs?

It's not a bad idea. What we really need is for people to submit spec/deb files for older distros. Then it's a matter of compiling those RPMs/debs and putting them on an ISO.

Quoted 8 lines

2. I have a problem compiling it.
"make sync LINUX=." fails.

I have read the README:
"Where /path/to/kernel is the path to a recent kernel tree containing virtio drivers. At the moment, this must be Rusty Russell's virtio patch queue[1] applied on top of Linus' git tree[2]."

The released tarball has already done a "make sync". The README is out of date, it should work against Linus' latest git tree.

Quoted 4 lines

What does it means ? That I need kernel-2.6.25 sources? Well, since we release a tarball, can we include part of 2.6.25 ? It is a bit unclear, what must I do to compile it.

It should just be a matter of doing a make && make install in the guest.

Regards,

Anthony Liguori

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#4 lore raw
In reply to Avi Kivity
Quoted 10 lines · Avi Kivity

This is the first release of block and network drivers for Linux guests
running on a kvm host. The drivers are intended for guest kernels 2.6.18-2.6.24. Newer kernels include the drivers; older kernels may not work. kvm-61 or later is needed in the host.

Network throughput is around 1 Gbit/sec; latency is currently a less than stellar 0.3 msec. Both these figures will be improved in the future.

The drivers are available from the download page of the kvm website, below.

Quoted 7 lines

To use, download the drivers into the guest (using one of the emulated network cards), unpack the package, and type

make
sudo make install

You will need the kernel development package installed.

Excellent, thanks!

Just 1 question: Above is the instruction for guest. How about the host? Dont we need to install anything??

I suppose that qemu in the latest kvm package already supported virtio, but I think we need some support from host kernel as well?

J

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#5 lore raw
Quoted 11 lines · Avi Kivity
Quoted 7 lines

This is the first release of block and network drivers for Linux guests
running on a kvm host. The drivers are intended for guest kernels 2.6.18-2.6.24. Newer kernels include the drivers; older kernels may not work. kvm-61 or later is needed in the host.
installed.

thanks alot for this!

Quoted 6 lines

Just 1 question: Above is the instruction for guest. How about the host? Dont we need to install anything??

I suppose that qemu in the latest kvm package already supported virtio, but I think we need some support from host kernel as well?

no, virtio drivers are only needed on guest - but you need latest kvm modules on host.

Thomas

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#6 lore raw
In reply to Jun Koi
Quoted 21 lines · Jun Koi
Quoted 12 lines · Avi Kivity

This is the first release of block and network drivers for Linux guests
running on a kvm host. The drivers are intended for guest kernels 2.6.18-2.6.24. Newer kernels include the drivers; older kernels may not work. kvm-61 or later is needed in the host.

Network throughput is around 1 Gbit/sec; latency is currently a less than stellar 0.3 msec. Both these figures will be improved in the
future.

The drivers are available from the download page of the kvm website,
below.

Quoted 7 lines

To use, download the drivers into the guest (using one of the emulated network cards), unpack the package, and type

make
sudo make install

You will need the kernel development package installed.

Quoted 7 lines

Excellent, thanks!

Just 1 question: Above is the instruction for guest. How about the host? Dont we need to install anything??

I suppose that qemu in the latest kvm package already supported virtio, but I think we need some support from host kernel as well?

Hi Jun,

No, AFAIK we don't need any support from the host kernel. We just need a virtio backend to be present in qemu, which is there in the latest kvm-userspace.

Signature · 7 lines
regards,
balaji rao

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
#7 lore raw
Quoted 5 lines · Balaji Rao
Quoted 5 lines

Excellent, thanks!

Just 1 question: Above is the instruction for guest. How about the host? Dont we need to install anything??

Quoted 9 lines
Quoted 3 lines

I suppose that qemu in the latest kvm package already supported virtio, but I think we need some support from host kernel as well?

Hi Jun,

No, AFAIK we don't need any support from the host kernel. We just need a virtio backend to be present in qemu, which is there in the latest kvm-userspace.

Correct. In the future, we may have kernel backends but you should still be able to use the userspace backends.

Regards,

Anthony Liguori

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#8 lore raw
In reply to Avi Kivity
Quoted 4 lines · Avi Kivity
Quoted 4 lines

This is the first release of block and network drivers for Linux guests running on a kvm host. The drivers are intended for guest kernels 2.6.18-2.6.24. Newer kernels include the drivers; older kernels may not work. kvm-61 or later is needed in the host.

Trying to build against 2.6.24 gives the following:

CC [M] /root/kvm/kvm-guest-drivers-linux-1/virtio_net.o
/root/kvm/kvm-guest-drivers-linux-1/virtio_net.c: In function 'receive_skb':
/root/kvm/kvm-guest-drivers-linux-1/virtio_net.c:101: error: implicit declaration of function 'skb_partial_csum_set' make[2]: *** [/root/kvm/kvm-guest-drivers-linux-1/virtio_net.o] Error 1
make[1]: *** [_module_/root/kvm/kvm-guest-drivers-linux-1] Error 2

it seems that function isn't available in 2.6.18-2.6.24 or in the driver download.

Looks like the missing function doesn't show up until 2.6.25-rc1 which appears to have all of the virtio drivers anyway ?

Iain

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#9 lore raw
Quoted 7 lines · Iain Paton

Trying to build against 2.6.24 gives the following:

CC [M] /root/kvm/kvm-guest-drivers-linux-1/virtio_net.o
/root/kvm/kvm-guest-drivers-linux-1/virtio_net.c: In function 'receive_skb':
/root/kvm/kvm-guest-drivers-linux-1/virtio_net.c:101: error: implicit declaration of function 'skb_partial_csum_set' make[2]: *** [/root/kvm/kvm-guest-drivers-linux-1/virtio_net.o] Error 1
make[1]: *** [_module_/root/kvm/kvm-guest-drivers-linux-1] Error 2

This change fixes the build here.

external-module-compat.h renamed from external-module-compat.h~ +2 -2
@@ -13,6 +13,8 @@
 #define COMPAT_cb_softirq
 #endif
 
+#define COMPAT_csum_offset
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
 
 struct virtio_device_id {
@@ -63,8 +65,6 @@
 } while(0)
 #define netif_rx_schedule(dev, napi) netif_rx_schedule(dev)
 
-#define COMPAT_csum_offset
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
 
 #define scsi_cmd_ioctl(filp, rq, gendisk, cmd, data) \
Signature · 9 lines
Paul Collins
Wellington, New Zealand

Dag vijandelijk luchtschip de huismeester is dood

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
author Applied
#10 lore raw
Quoted 5 lines · Paul Collins
Quoted 2 lines · Iain Paton

Trying to build against 2.6.24 gives the following:

Quoted 9 lines
Quoted 6 lines

CC [M] /root/kvm/kvm-guest-drivers-linux-1/virtio_net.o
/root/kvm/kvm-guest-drivers-linux-1/virtio_net.c: In function 'receive_skb':
/root/kvm/kvm-guest-drivers-linux-1/virtio_net.c:101: error: implicit declaration of function 'skb_partial_csum_set' make[2]: *** [/root/kvm/kvm-guest-drivers-linux-1/virtio_net.o] Error 1
make[1]: *** [_module_/root/kvm/kvm-guest-drivers-linux-1] Error 2

This change fixes the build here.

Applied, thanks.

Signature · 7 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/