1. Quick help

First of all, have a look on help
root@mercury:/opt/tmp/xen-unstable.hg-rev-24869# make help
Installation targets:
  install          - build and install everything
  install-xen      - build and install the Xen hypervisor
  install-tools    - build and install the control tools
  install-kernels  - build and install guest kernels
  install-stubdom  - build and install the stubdomain images
  install-docs     - build and install user documentation

Building targets:
  dist             - build and install everything into local dist directory
  world            - clean everything, delete guest kernel build
                     trees then make dist
  xen              - build and install Xen hypervisor
  tools            - build and install tools
  stubdom          - build and install the stubdomain images
  kernels          - build and install guest kernels
  kbuild           - synonym for make kernels
  docs             - build and install user documentation
  dev-docs         - build developer-only documentation

Cleaning targets:
  clean            - clean the Xen, tools and docs (but not guest kernel trees)
  distclean        - clean plus delete kernel build trees and
                     local downloaded files
  kdelete          - delete guest kernel build trees
  kclean           - clean guest kernel build trees

Miscellaneous targets:
  prep-kernels     - prepares kernel directories, does not build
  uninstall        - attempt to remove installed Xen tools
                     (use with extreme care!)

Trusted Boot (tboot) targets:
  build-tboot      - download and build the tboot module
  install-tboot    - download, build, and install the tboot module
  clean-tboot      - clean the tboot module if it exists

  [ this documentation is sadly not complete ]

2. Compile

  1. Download Xen sources
    hg clone -r $rev http://xenbits.xensource.com/staging/xen-unstable.hg/ xen-unstable.hg-rev-${rev}
    cd xen-unstable.hg-rev-${rev}
  2. Launch configure
  3. Make a initial build for tools
    make tools
    cd tools/
    make clean
    cd ..
    cat /root/compil_xen.sh 
  4. Apply patches for VGA Passthrough / NVIDIA
    wget -q http://www.davidgis.fr/download/xen-4.2_rev24798_gfx-passthrough-patchs.tar.bz2
    tar xvjf xen-4.2_rev24798_gfx-passthrough-patchs.tar.bz2
    for file in $(ls xen-4.2_rev24798_gfx-passthrough-patchs/*);do patch -p1 < $file;done
  5. Copy VGA BIOS of your NVIDIA graphic card
    cp -vf /path/to/vgabios-pt.bin  tools/firmware/vgabios/vgabios-pt.bin
  6. Compil and install
    make xen && make tools && make stubdom \
    make install-xen && make install-tools PYTHON_PREFIX_ARG= && make install-stubdom