Chapter 10. Rebuilding the RPM packages from source code
You may need to rebuild the RPMs to get them working properly on your system for specific architectures. Use the source RPMs provided by Red Hat. These instructions will also allow you to install from the source RPMs.
Before compiling, the kverrel and kverbase variables in the xenpv.spec file must be changed to match the kernel version that binary modules are being built for. Usually, this is the value returned from 'uname -r'.
You can then use the following command to rebuild the kmod-xenpv package. Change SOURCE to reflect the correct path to your kmod-xenpv RPM file.
cd /usr/src/redhat/SOURCE/xenpv rpmbuild -bb kmod-xenpv