From 7f9779b736ea8670f61df949e0e068a067ec5252 Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Tue, 8 Jan 2019 11:31:01 -0800 Subject: [PATCH] doc: add skylake NUC w/GPU passthrough doc Document a community reference release for the Skylake NUC with GPU passthrough as a one-time snapshot release, not supported or maintained. Includes a tar patch file. Signed-off-by: David B. Kinder --- doc/static/downloads/skl-patches-for-acrn.tar | Bin 0 -> 20480 bytes doc/tutorials/skl-nuc.rst | 122 ++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 doc/static/downloads/skl-patches-for-acrn.tar create mode 100644 doc/tutorials/skl-nuc.rst diff --git a/doc/static/downloads/skl-patches-for-acrn.tar b/doc/static/downloads/skl-patches-for-acrn.tar new file mode 100644 index 0000000000000000000000000000000000000000..fdcf646189be37b89b96e435422722066dafcf31 GIT binary patch literal 20480 zcmeHOX>;31lJ!^dS5&J#9$6wt+#uDa!?YyZ+P03B7?fvcZ zvHc7d(=NPCSs3 zSc>uIq@g#Fd_D<1p0`q`@Pj{$|NB-aIHO>nsW9-SNK@ty)^|T&pUqA9cy5&ulM9kHcuF5su)qGXws_*!gVtR6? zYr3i_8>XfyuI6`Cc9O*GlBZ0um@My$e@ul28$@QG{dE|oJRY#O5G8x@sr=OD+sV9P`=(>ICt>!F zmd8FbmF=O6!h&$bnMb6!-^A}Q&UsdZNxZZ7oPPU!#KlkPd86TnLBJ$w5Ejg7-$UNL zr?C;nKEGj|z_bEQb6YJ}_8i4CWk^Fdb)9&>mwIDwZ;#zO!>d)IDoKfi4qyFTxfNXlk+;$Uk zWDT{YbX!WJ@gKb%|Ie9&|5eHVpClQVO54w+B9VCPxFasTJ^vu3PM$;U*_v3OsO-PSaTyF`ZC^()FqkA;D}sSq2LrO& z%46rONLXpL3|7l(t8Fwc<0MI$m&8Suj98c>NE9p|r)iQE+=m+!&TNo5=`i$i_S2Q* zgU}$1Idfv49T+Vzf4Etg_>ip^`Z?XOeoyxh zFY!63O+x;$mPuoxqg9Y6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PkrDYyr`S0)xq`N5+1 zyW3p(*}!yz4(F%|)sAHtdRJfXXO~DU``D!}6sQ%$Xd)G&k1iP@;b~jYfpCiUN4o0i zCxc~Egj^ABu#>5CnD7bWT(Ht)D?=3tz_cS^`fQLBk(xyIk4FrrPSc@#jT-Z-{WY-c zJHZp~x-Kpkq9{7bHyVnQS^I*w676peNXg&hY&ZQ2}E02GxHs z(J;7`Mh>?7P|Ce51OkZquev8gHQ;=W_*M1b1NEO~n#P^_Pc!w+{jYCd?5&_E>OZ+- z_$dBVLvg*XhiBNR8|@)D-Bgd?(#wxm4J1^v59^o#LeZNDloc(M-UM7LTk9?(^7unv?BA)>l9{HQrs6m;w7 z6`=x&3f(0(o2odN4MI3aLdGH;5S#!79 zOV-By?KTcrM9J-E;e==6I}RVlZad~5an4;2BsU`NoU1K)d2D%()}HUwE(x~BG49Mg zlFVHe%8@k-f_FzzgXQ_}4qVNU2NvtI6DDq2gUsyYTT$>N6=~Piw_6$zxAd zCglubZ4Q&XaI?@yf{P~#o{UnDNh4fwij-zv_+i5S){q#rs!e2^(qK|B=`GuSs%@iX zuWqSs3peGq+LqA(7z9I%CS}!OLiexoWW<}V(&Ba>e>PpioOUzoZsK+x9r3y2U^=f> zx4NV2W;>&+c;1LR8Ez|?U0J%GM6ECyOqp5V9f;$6_mV}urXKU6SvV;%PwTyA?Qx#9 zN1@xk#%UxD4p0WP#Kfa89^bUmYhBS{vAC~^TL>+^1@#!JWNK4RtY%%qK`e?cT#=E`l;4??KCPGE7n6R?_bk#jQO3 zF`RgnqUM?}WsI>2sn2Y0$h~V;o@fI_8;p?Yjc~($U_(3hh{rv}JSnABQE*32eBA>= zlY704k3zao#6kp>mNRj}k)5KQ=QfT2>=gfJr1w-Whl?)dO`_ + +Software Configuration +********************** + +* `acrn-hypervisor tag acrn-2018w39.6-140000p + `_ +* `acrn-kernel tag acrn-2018w39.6-140000p + `_ +* Clear Linux: version: 25130 (UOS and SOS use this version) + +Source code patches are provided in `skl-patches-for-acrn.tar file +<../_static/downloads/skl-patches-for-acrn.tar>`_ to work around or add support for +enabling GPU passthrough: + +* 0001-hv-workaround-for-system-hang-on-non-apicv-devices.patch +* 0002-hv-More-changes-to-enable-GPU-passthru.patch +* 0003-dm-increase-interrupt-storm-threshold-for-gpu-passth.patch +* 0004-dm-passthrough-opregion-to-uos-gpu.patch +* 0005-dm-modify-launch-script-to-support-gpu-passthrough.patch + +Software Setup +************** + +Please follow the :ref:`getting-started-apl-nuc`, with the following changes: + +1. Set up a Clear Linux Operating System + + Clear Linux will update to the latest version during installation. + Run this command (as root) to roll back to version 25130, using the + ``–x`` switch to ignore version mismatch:: + + # swupd verify -x --fix --picky -m 25130 + # swupd autoupdate -–disable + # reboot + +#. Add the ACRN hypervisor to the EFI Partition + + Refer to :ref:`getting-started-building` + to build the hypervisor, device model, and tools. + + Download and untar this `skl-patches-for-acrn.tar file + <../_static/downloads/skl-patches-for-acrn.tar>`_, apply these patches to the + acrn-hypervisor, and build it:: + + $ git clone https://github.com/projectacrn/acrn-hypervisor + $ cd acrn-hypervisor + $ git checkout acrn-2018w39.6-140000p + $ tar xf ~/Downloads/skl-patches-for-acrn.tar + $ git am *.patch + $ make + + This build process creates new ``acrn-dm``, ``acrn.efi`` and + ``launch_uos.sh`` files. + +#. Replace ``acrn-dm`` with this new version (as root):: + + # cp build/devicemodel/acrn-dm /usr/bin/acrn-dm + +#. Put the new ``acrn.efi`` hypervisor application (included in the + Clear Linux release) on the EFI partition (as root):: + + # mount /dev/nvme0n1p1 /mnt + # mkdir /mnt/EFI/acrn + # cp build/hypervisor/acrn.efi /mnt/EFI/acrn/ + +#. Configure the EFI firmware to boot the ACRN hypervisor by default. + This assumes you are on an NVMe SSD as in the Skull Canyon:: + + # efibootmgr -c -l "\EFI\acrn\acrn.efi" -d /dev/nvme0n1 -p 1 -L "ACRN" + +#. Create a boot entry for ACRN Service OS by making a few edits to the + ``acrn.conf`` file (note the options line must be one long line, without + any line breaks):: + + # vim /mnt/loader/entries/acrn.conf + title The ACRN Service OS + linux /EFI/org.clearlinux/kernel-org.clearlinux.pk414-sos.4.14.68-99 + options pci_devices_ignore=(0:18:1) console=tty0 console=ttyS2 i915.nuclear_pageflip=1 root=/dev/nvme0n1p3 rw rootwait ignore_loglevel no_timer_check consoleblank=0 i915.tsd_init=7 i915.tsd_delay=2000 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_guc_loading=0 i915.enable_guc_submission=0 i915.enable_preemption=1 i915.context_priority_mode=2 i915.enable_gvt=1 i915.enable_initial_modeset=0 i915.enable_guc=0 hvlog=2M@0x1FE00000 + +#. Don't Enable weston service (skip this step found in the NUC's getting + started guide). + +#. Set up Reference UOS by running the modified ``launch_uos.sh`` in + ``acrn-hypervisor/devicemodel/samples/nuc/launch_uos.sh`` + +#. After UOS is launched, do these steps to run GFX workloads: + + a) install weston and glmark2:: + + #swupd bundle-add desktop glmark2 + #) Add new user cl_uos:: + + # useradd cl_uos + # passwd cl_uos + # usermod -G wheel -a cl_uos + #) Enable weston service:: + + # systemctl enable weston@cl_uos + # systemctl start weston@cl_uos + #) Disable weston screen saver:: + + # vim .config/weston.ini + [core] + idle-time=0 + #) run glmark2:: + + # glmark2-es2-wayland