[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFC] Virtio support v1



Hi!

Attached is a patchset adding support for virtio net and block devices.

There is only three small patches:
 * a new "virtio-modules" package is added to kernel-wedge,
 * virtio-modules is built for i386 (and should be added in the future
   to other architectures supported by qemu),
 * a small change is done to partman's humandev, reusing Xen virtual
   disks templates.

Both network and block drivers are loaded automatically and no other
components require, as far as I have seen, further modifications.
grub-installer has been taught about virtio block devices by Colin in
r52925.

The speed improvements seems quite important from my tests, so I
really think this is a worthwhile inclusion (at least for us, d-i
developpers ;) ).

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
commit 661b299249ba1b14aa561eb13727af258ff7d141
Author: Jérémy Bobbio <lunar@debian.org>
Date:   Sat Jul 5 22:05:00 2008 +0000

    Add virtio-modules to kernel-wedge

diff --git a/packages/kernel/kernel-wedge/debian/changelog b/packages/kernel/kernel-wedge/debian/changelog
index baae7cf..72b69ee 100644
--- a/packages/kernel/kernel-wedge/debian/changelog
+++ b/packages/kernel/kernel-wedge/debian/changelog
@@ -1,3 +1,11 @@
+kernel-wedge (2.46) UNRELEASED; urgency=low
+
+  [ Jérémy Bobbio ]
+  * Add virtio-modules package used to improve I/O when run inside a
+    compatible emulator.
+
+ -- Jérémy Bobbio <lunar@debian.org>  Sat, 05 Jul 2008 21:57:06 +0000
+
 kernel-wedge (2.45) unstable; urgency=low
 
   [ Frans Pop ]
diff --git a/packages/kernel/kernel-wedge/modules/virtio-modules b/packages/kernel/kernel-wedge/modules/virtio-modules
new file mode 100644
index 0000000..35c02f5
--- /dev/null
+++ b/packages/kernel/kernel-wedge/modules/virtio-modules
@@ -0,0 +1,4 @@
+virtio_net
+virtio_blk
+virtio_balloon
+virtio_pci
diff --git a/packages/kernel/kernel-wedge/package-list b/packages/kernel/kernel-wedge/package-list
index 1762804..13eba22 100644
--- a/packages/kernel/kernel-wedge/package-list
+++ b/packages/kernel/kernel-wedge/package-list
@@ -420,3 +420,9 @@ Depends: kernel-image
 Priority: extra
 Description: zlib modules
  This package contains zlib modules.
+
+Package: virtio-modules
+Depends: kernel-image
+Priority: extra
+Description: virtio modules
+ This packages contains virtio modules.

commit 5b7210c490cbb727de6160c9961e24d82b3defb2
Author: Jérémy Bobbio <lunar@debian.org>
Date:   Sat Jul 5 22:36:24 2008 +0000

    Add virtio-modules to linux-kernel-di-i386-2.6

diff --git a/packages/kernel/linux-kernel-di-i386-2.6/debian/changelog b/packages/kernel/linux-kernel-di-i386-2.6/debian/changelog
index 67b1620..8870f99 100644
--- a/packages/kernel/linux-kernel-di-i386-2.6/debian/changelog
+++ b/packages/kernel/linux-kernel-di-i386-2.6/debian/changelog
@@ -1,3 +1,10 @@
+linux-kernel-di-i386-2.6 (1.63) UNRELEASED; urgency=low
+
+  [ Jérémy Bobbio ]
+  * Add virtio-modules.
+
+ -- Jérémy Bobbio <lunar@debian.org>  Sat, 05 Jul 2008 22:05:44 +0000
+
 linux-kernel-di-i386-2.6 (1.62) unstable; urgency=low
 
   [ Frans Pop ]
diff --git a/packages/kernel/linux-kernel-di-i386-2.6/debian/control.stub b/packages/kernel/linux-kernel-di-i386-2.6/debian/control.stub
index f301480..593a500 100644
--- a/packages/kernel/linux-kernel-di-i386-2.6/debian/control.stub
+++ b/packages/kernel/linux-kernel-di-i386-2.6/debian/control.stub
@@ -3,5 +3,5 @@ Section: debian-installer
 Priority: optional
 Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
 Uploaders: Joey Hess <joeyh@debian.org>, Frans Pop <fjp@debian.org>
-Build-Depends: kernel-wedge (>= 2.45)
+Build-Depends: kernel-wedge (>= 2.46)
 Vcs-Svn: svn://svn.debian.org/d-i/trunk/packages/kernel/linux-kernel-di-i386-2.6
diff --git a/packages/kernel/linux-kernel-di-i386-2.6/modules/i386/virtio-modules b/packages/kernel/linux-kernel-di-i386-2.6/modules/i386/virtio-modules
new file mode 100644
index 0000000..61da396
--- /dev/null
+++ b/packages/kernel/linux-kernel-di-i386-2.6/modules/i386/virtio-modules
@@ -0,0 +1 @@
+#include <virtio-modules>

commit 0a1a0eb55b2c6cd9b3d2bf75541c4ee942364dc3
Author: Jérémy Bobbio <lunar@debian.org>
Date:   Sat Jul 5 23:09:10 2008 +0000

    Improve display of virtio virtual disks in partman

diff --git a/packages/partman/partman-base/debian/changelog b/packages/partman/partman-base/debian/changelog
index daca21f..b1e93e0 100644
--- a/packages/partman/partman-base/debian/changelog
+++ b/packages/partman/partman-base/debian/changelog
@@ -1,7 +1,11 @@
 partman-base (122) UNRELEASED; urgency=low
 
+  [ Otavio Salvador ]
   * Do not list /dev/mtd devices since they aren't supported by parted.
 
+  [ Jérémy Bobbio ]
+  * Improve display of virtio virtual disks.
+
  -- Otavio Salvador <otavio@debian.org>  Thu, 26 Jun 2008 16:58:01 -0300
 
 partman-base (121) unstable; urgency=low
diff --git a/packages/partman/partman-base/lib/base.sh b/packages/partman/partman-base/lib/base.sh
index 3fb29d3..e7510e3 100644
--- a/packages/partman/partman-base/lib/base.sh
+++ b/packages/partman/partman-base/lib/base.sh
@@ -806,15 +806,15 @@ humandev () {
 	    disk="${1#/dev/}"
 	    humandev_dasd_disk /sys/block/$disk/$(readlink /sys/block/$disk/device)
 	    ;;
-	/dev/xvd[a-z])
-	    drive=$(printf '%d' "'$(echo $1 | sed 's,^/dev/xvd\([a-z]\).*,\1,')")
+	/dev/*vd[a-z])
+	    drive=$(printf '%d' "'$(echo $1 | sed 's,^/dev/x\?vd\([a-z]\).*,\1,')")
 	    drive=$(($drive - 96))
 	    linux=${1#/dev/}
 	    db_metaget partman/text/virtual_disk description
 	    printf "$RET" "$drive" "$linux"
 	    ;;
-	/dev/xvd[a-z][0-9]*)
-	    drive=$(printf '%d' "'$(echo $1 | sed 's,^/dev/xvd\([a-z]\).*,\1,')")
+	/dev/*vd[a-z][0-9]*)
+	    drive=$(printf '%d' "'$(echo $1 | sed 's,^/dev/x\?vd\([a-z]\).*,\1,')")
 	    drive=$(($drive - 96))
 	    part=$(echo $1 | sed 's,^/dev/xvd[a-z]\([0-9][0-9]*\).*,\1,')
 	    linux=${1#/dev/}

Attachment: signature.asc
Description: Digital signature


Reply to: