Skip to contentSkip to conversation

HOWTO: Patch to arbitrary Linux Kernel to support PV drivers for domU HVM

DISCUSSION Alex Bligh 2 participants 3 messages May 9, 2010 – May 10, 2010

lore
Share & tools
lore

Alex Bligh

author
#0 lore raw

I have made up a patch for an arbitrary Linux kernel (I'm using Ubuntu's Lucid kernel 2.6.32-22) which adds support for PV drivers with under domU HVM.

Previously, to build pvdrivers for a kernel, you had to xenify it,
build the xenified kernel with CONFIG_XEN switched of, then add the unmodified_drivers, then build them. That prevents you building pvdrivers for any kernel you do not have xenifying patches for.

With this patch, you can build pvdrivers against an arbitrary kernel (such as a distributor's kernel). This is useful to me, as I want to stick with distributor kernels. In essence what I have done is untangled some (but not all) of the build/header spaghetti from unmodified_drivers. The source files are about 2 x perl -pi -e away from what's in unmodified_drivers plus a xenified kernel, just in different directories. I've also made them build as built-ins.

It's described in more detail here:
http://blog.alex.org.uk/archives/23
Patch is here:
http://www.alex.org.uk/pvdrivers.20100509-1955.patch

The drivers seem to work ok.

Signature · 1 line
Alex Bligh
#1 lore raw
Quoted 17 lines · Alex Bligh

I have made up a patch for an arbitrary Linux kernel (I'm using Ubuntu's Lucid kernel 2.6.32-22) which adds support for PV drivers with under domU HVM.

Previously, to build pvdrivers for a kernel, you had to xenify it, build the xenified kernel with CONFIG_XEN switched of, then add the unmodified_drivers, then build them. That prevents you building pvdrivers for any kernel you do not have xenifying patches for.

With this patch, you can build pvdrivers against an arbitrary kernel (such as a distributor's kernel). This is useful to me, as I want to stick with distributor kernels. In essence what I have done is untangled some (but not all) of the build/header spaghetti from unmodified_drivers. The source files are about 2 x perl -pi -e away from what's in unmodified_drivers plus a xenified kernel, just in different directories. I've also made them build as built-ins.

Quoted 7 lines

It's described in more detail here:
http://blog.alex.org.uk/archives/23
Patch is here:
http://www.alex.org.uk/pvdrivers.20100509-1955.patch

The drivers seem to work ok.

Great, thanks!

I'll update this info to the wiki later today.

-- Pasi

#2 lore raw
Quoted 23 lines · Pasi Kärkkäinen
Quoted 22 lines · Alex Bligh

I have made up a patch for an arbitrary Linux kernel (I'm using Ubuntu's Lucid kernel 2.6.32-22) which adds support for PV drivers with under domU HVM.

Previously, to build pvdrivers for a kernel, you had to xenify it, build the xenified kernel with CONFIG_XEN switched of, then add the unmodified_drivers, then build them. That prevents you building pvdrivers for any kernel you do not have xenifying patches for.

With this patch, you can build pvdrivers against an arbitrary kernel (such as a distributor's kernel). This is useful to me, as I want to stick with distributor kernels. In essence what I have done is untangled some (but not all) of the build/header spaghetti from unmodified_drivers. The source files are about 2 x perl -pi -e away from what's in unmodified_drivers plus a xenified kernel, just in different directories. I've also made them build as built-ins.

It's described in more detail here:
http://blog.alex.org.uk/archives/23
Patch is here:
http://www.alex.org.uk/pvdrivers.20100509-1955.patch

Quoted 7 lines
Quoted 2 lines

The drivers seem to work ok.

Great, thanks!

I'll update this info to the wiki later today.

http://wiki.xensource.com/xenwiki/XenLinuxPVonHVMdrivers

Also added to:
http://wiki.xensource.com/xenwiki/XenCommonProblems

-- Pasi