Getting Xen working for Intel(R) Xeon Phi(tm) Coprocessor

How to build and run Xen clients that can recognize Intel(R) Xeon Phi(tm) Coprocessor

In order to have Xen recognize the existence of Intel® Xeon Phi Coprocessors installed on Intel(R) Xeon(R) processor-based  hosts, it is necessary  to use a recent Xen unstable version , and a patched Qemu.    Although these patches aren’t yet in the mainstream stable releases, it is possible for you to get Xen working with the attached patches, which are covered under the GPL license.       We can't absolutely guarantee these instructions will work with every unstable release of Xen and Qemu -- by the nature of these releases being unstable.

Here is how to make it all work:

1.       Download the xen unstable 25970  version of the Xen release:, patch it (with the xen patch attached to this document) and build it.    

2.       Obtain Qemu from the github repository: (we tested with version aabc8530c7ba2be89e21463f051056ad7c255e6e) ) and clone it to /localdir/qemu

3.       Apply the attached patch to qemu

4.       Configure qemu with './configure' '--enable-xen' '--target-list=x86_64-softmmu'; then build qemu.    (more information about building and running an upstream qemu can be found here:

5.        Before you create a guest, add the following two lines in the guest configuration file

   device_model_version = 'qemu-xen'

   device_model_override ='/localdir/qemu/x86_64-softmmu/qemu-system-x86_64'

if you have multiple (3 or 4) Intel Xeon Phi Coprocessor cards installed in the system, add “shadow_mem = 64” in your guest configuration file. Also note the default shadow_mem setting should be 8 for configurations where 1 coprocessor is installed.

6.       Add the Intel Xeon Phi Coprocessor Bus:Device.function (BDF) number in the guest configure file and create the guest.   You can obtain this BDF number by running "lspci | grep -i co-pro".   An example of what that output looks like is below:

84:00.0 Co-processor: Intel Corporation Device 225c (rev 10)

     (in this case the BDF number is 84:00.0)

7.  For the guest OS, we recommend RedHat* Enterprise Linux 6 update 3 or newer releases.


After this, your Xen client should be able to recognize the existence of an installed Intel®  Xeon Phi™ Coprocessor in your host system.    If you experience problems and/or want to discuss this topic with us, we invite you to post to our Community Forum


Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.
Arquivo xen-qemu-patches.tar.gz1.91 KB