{"id":321904,"date":"2021-04-22T15:00:37","date_gmt":"2021-04-22T15:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=321904"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=321904","title":{"rendered":"\u041a\u0430\u043a \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 CPU \u0444\u043b\u0430\u0433\u0438 Intel SGX \u0432 libvirt"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u0421 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/gcorelabs\/blog\/537316\/\">\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438 Intel SGX \u0432 \u043d\u0430\u0448\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0431\u043b\u0430\u043a\u043e \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432. \u0417\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u043b\u043a\u0438\u0445 \u0431\u0430\u0433\u043e\u0432 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0436\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dx\/gl\/hx\/dxglhxshknwugps7fbqu31erays.jpeg\"><\/p>\n<p>  \u0415\u0441\u0442\u044c, \u043e\u0434\u043d\u0430\u043a\u043e, \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<hr>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438, \u0447\u0442\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 SGX \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 Nova \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c XML-\u0444\u0430\u0439\u043b \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044d\u0442\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439: \u0437\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 libvirt \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u0441 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 x86. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0445 \u0438 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043e\u0447\u0435\u043d\u044c \u0438 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448 \u043e\u043f\u044b\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438<\/h2>\n<p>  \u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0443 \u0437\u0430\u0434\u0430\u0447\u0438: \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 SGX \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 XML-\u0444\u0430\u0439\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0438 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0435\u0448\u0430\u0442\u044c, \u0432 OpenStack \u0438 libvirt \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 SGX \u043d\u0435 \u0431\u044b\u043b\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u0445 \u0432 XML \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0443\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 <i>Qemu command-line<\/i> \u0432 <a href=\"https:\/\/github.com\/openstack\/nova\/blob\/stable\/train\/nova\/virt\/libvirt\/driver.py\">\u0441\u043a\u0440\u0438\u043f\u0442<\/a> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0443 \u0447\u0435\u0440\u0435\u0437 libvirt, \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/software.intel.com\/content\/www\/us\/en\/develop\/articles\/virtualizing-intel-software-guard-extensions-with-kvm-and-qemu.html#inpage-nav-3-3\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435<\/a> Intel \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432:<\/p>\n<pre><code class=\"bash\">&lt;qemu:commandline&gt;      &lt;qemu:arg value='-cpu'\/&gt;      &lt;qemu:arg value='host,+sgx,+sgxlc'\/&gt;      &lt;qemu:arg value='-object'\/&gt;      &lt;qemu:arg value='memory-backend-epc,id=mem1,size=''' + epc + '''M,prealloc'\/&gt;      &lt;qemu:arg value='-sgx-epc'\/&gt;      &lt;qemu:arg value='id=epc1,memdev=mem1'\/&gt; &lt;\/qemu:commandline&gt;<\/code><\/pre>\n<p>  \u041d\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f:<\/p>\n<pre><code class=\"bash\">[root@compute-sgx ~] cat \/proc\/$PID\/cmdline |xargs -0 printf &quot;%s\\n&quot; |awk '\/cpu\/ { getline x; print $0 RS x; }' -cpu Skylake-Client-IBRS -cpu host,+sgx,+sgxlc<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0448\u0442\u0430\u0442\u043d\u043e, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430\u043c\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0431\u043b\u043e\u043a\u0435 <i>Qemu command-line<\/i>. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0443 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430: \u043a\u0430\u043a\u0443\u044e \u0431\u044b \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043c\u044b \u043d\u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438 \u0432 cpu_model \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 Nova, \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430.<\/p>\n<p>  <em><font color=\"#0a75ad\">\u041a\u0430\u043a \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443?<\/font><\/em><\/p>\n<p>  \u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0439 &lt;<font color=\"#004C97\">qemu:arg value=<\/font><font color=\"#008000\">&#8216;host,+sgx,+sgxlc&#8217;<\/font>\/&gt; \u0438 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043d\u0435\u0451 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0412\u041c. \u0422\u043e\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c libvirt \u0434\u043b\u044f \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432 CPU \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Nov\u2019\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <a href=\"https:\/\/docs.openstack.org\/nova\/train\/configuration\/config.html#libvirt.cpu_model_extra_flags\">cpu_model_extra_flags<\/a>.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0438: \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e Intel IA-32 \u2014 CPUID, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0445 \u0438 \u0431\u0438\u0442\u0430\u0445 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Intel \u043e\u0431 SGX.<\/p>\n<h2>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u043f\u043e\u0438\u0441\u043a: \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0435\u043c\u0441\u044f \u0432 libvirt<\/h2>\n<p>  \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Nova \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u043f\u043f\u0438\u043d\u0433 CPU \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u0438\u043c libvirt\u2019\u043e\u043c.<\/p>\n<p>  \u041c\u044b \u043d\u0430\u0448\u043b\u0438 \u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0444\u043b\u0430\u0433\u0438 CPU \u2014 \u044d\u0442\u043e <a href=\"https:\/\/github.com\/libvirt\/libvirt\/blob\/master\/src\/cpu_map\/x86_features.xml\">x86_features.xml<\/a> (\u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 libvirt 4.7.0). \u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0432\u0448\u0438\u0441\u044c \u0441 \u044d\u0442\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 (\u043a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u043e\u043c, \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e), \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c hex-\u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 7-\u043c \u043b\u0438\u0441\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b cpuid. \u0418\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Intel \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438, \u0432 \u043a\u0430\u043a\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438: sgx \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 EBX \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435, \u0430 sgxlc \u2014 \u0432 ECX.<\/p>\n<pre><code class=\"bash\">[root@compute-sgx ~] cpuid -l 7 -1 |grep SGX       SGX: Software Guard Extensions supported = true       SGX_LC: SGX launch config supported      = true  [root@compute-sgx ~] cpuid -l 7 -1 -r CPU:    0x00000007 0x00: eax=0x00000000 ebx=0x029c6fbf ecx=0x40000000 edx=0xbc000600<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432 sgx \u0438 sgxlc \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b cpuid, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435:<\/p>\n<pre><code class=\"bash\">error : x86Compute:1952 : out of memory<\/code><\/pre>\n<p>  \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043f\u0440\u044f\u043c\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u0435. \u0427\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0432 \u0447\u0451\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043c\u044b \u0437\u0430\u0432\u0435\u043b\u0438 <a href=\"https:\/\/gitlab.com\/libvirt\/libvirt\/-\/issues\/136\">issue<\/a> \u0432 gitlab\u2019e libvirt\u2019a. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 libvirt\u2019a \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0435\u0435, \u0443\u043a\u0430\u0437\u0430\u0432 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e libvirt \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438, \u0433\u0434\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0448\u0438\u0431\u0430\u0442\u044c\u0441\u044f. \u041d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e, \u043d\u0430\u043c \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u044b\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c, \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f <a href=\"https:\/\/github.com\/intel\/qemu-sgx\/blob\/master\/target\/i386\/cpu.c#L949\">\u043a\u043e\u0434\u0430<\/a> \u0432 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c Qemu \u043e\u0442 Intel:<\/p>\n<pre><code class=\"objectivec\">    [FEAT_7_0_EBX] = {         .type = CPUID_FEATURE_WORD,         .feat_names = {             &quot;fsgsbase&quot;, &quot;tsc-adjust&quot;, &quot;sgx&quot;, &quot;bmi1&quot;,             &quot;hle&quot;, &quot;avx2&quot;, NULL, &quot;smep&quot;,             &quot;bmi2&quot;, &quot;erms&quot;, &quot;invpcid&quot;, &quot;rtm&quot;,             NULL, NULL, &quot;mpx&quot;, NULL,             &quot;avx512f&quot;, &quot;avx512dq&quot;, &quot;rdseed&quot;, &quot;adx&quot;,             &quot;smap&quot;, &quot;avx512ifma&quot;, &quot;pcommit&quot;, &quot;clflushopt&quot;,             &quot;clwb&quot;, &quot;intel-pt&quot;, &quot;avx512pf&quot;, &quot;avx512er&quot;,             &quot;avx512cd&quot;, &quot;sha-ni&quot;, &quot;avx512bw&quot;, &quot;avx512vl&quot;,         },         .cpuid = {             .eax = 7,             .needs_ecx = true, .ecx = 0,             .reg = R_EBX,         },         .tcg_features = TCG_7_0_EBX_FEATURES,     },     [FEAT_7_0_ECX] = {         .type = CPUID_FEATURE_WORD,         .feat_names = {             NULL, &quot;avx512vbmi&quot;, &quot;umip&quot;, &quot;pku&quot;,             NULL \/* ospke *\/, &quot;waitpkg&quot;, &quot;avx512vbmi2&quot;, NULL,             &quot;gfni&quot;, &quot;vaes&quot;, &quot;vpclmulqdq&quot;, &quot;avx512vnni&quot;,             &quot;avx512bitalg&quot;, NULL, &quot;avx512-vpopcntdq&quot;, NULL,             &quot;la57&quot;, NULL, NULL, NULL,             NULL, NULL, &quot;rdpid&quot;, NULL,             NULL, &quot;cldemote&quot;, NULL, &quot;movdiri&quot;,             &quot;movdir64b&quot;, NULL, &quot;sgxlc&quot;, NULL,         },         .cpuid = {             .eax = 7,             .needs_ecx = true, .ecx = 0,             .reg = R_ECX,         },<\/code><\/pre>\n<p>  \u0418\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 <i>.feat_names<\/i> \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e (\u043e\u0442 0 \u0434\u043e 31) \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u0437 EBX\/ECX-\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 7-\u0433\u043e \u043b\u0438\u0441\u0442\u0430; \u0435\u0441\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f Qemu \u0438\u043b\u0438 \u044d\u0442\u043e\u0442 \u0431\u0438\u0442 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d, \u0442\u043e \u043e\u043d \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <font color=\"#2E4884\">NULL<\/font>. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435 hex-\u0430\u0434\u0440\u0435\u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0432 libvirt, \u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0431\u0438\u0442 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u041f\u0440\u043e\u0449\u0435 \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0432\u0448\u0438\u0441\u044c \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0438\u0437 <a href=\"https:\/\/en.wikipedia.org\/wiki\/CPUID#EAX=7,_ECX=0:_Extended_Features\">\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/a>. \u0421\u043b\u0435\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u043d \u0431\u0438\u0442 \u0438 \u0442\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430. \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0435\u0439 \u043d\u0430\u0448\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u2014 sgx. \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043e\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043f\u043e\u0434 \u0432\u0442\u043e\u0440\u044b\u043c \u0431\u0438\u0442\u043e\u043c \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 EBX:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3w\/b4\/dj\/3wb4djmenwz3jymhqbutjoam3xw.png\"><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435 Qemu. \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043e\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 feat_names, \u043d\u043e \u044d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0431\u0438\u0442\u043e\u0432 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e\u0442 0:<\/p>\n<pre><code class=\"objectivec\">    [FEAT_7_0_EBX] = {         .type = CPUID_FEATURE_WORD,         .feat_names = {             &quot;fsgsbase&quot;, &quot;tsc-adjust&quot;, &quot;sgx&quot;, &quot;bmi1&quot;,<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u043e\u0442 0, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0434 \u0441\u0432\u043e\u0438\u043c \u0431\u0438\u0442\u043e\u043c \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <font color=\"#008000\">fsgsbase<\/font> \u0438\u0434\u0435\u0442 \u043f\u043e\u0434 0 \u0431\u0438\u0442\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 EBX, \u0438 \u043e\u043d \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0435\u0440\u0432\u044b\u043c.<\/p>\n<p>  \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Intel \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0438 \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c cpuid, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0431\u0438\u0442 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430, \u0430 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u2014 \u043f\u043e\u0434\u043b\u0438\u0441\u0442\u0430. <\/p>\n<p>  \u041c\u044b \u0441\u0442\u0430\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0438 \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0432 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043b\u0438\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 4 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430: EAX, EBX, ECX, EDX. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e 32 \u0431\u0438\u0442\u0430, \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 CPU. \u0411\u0438\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0434\u0432\u043e\u0439\u043a\u0438 \u0438 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432 hex-\u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 libvirt.<\/p>\n<p>  \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 c \u0444\u043b\u0430\u0433\u043e\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 VMX \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <a href=\"https:\/\/github.com\/libvirt\/libvirt\/blob\/master\/src\/cpu_map\/x86_features.xml#L116\">x86_features.xml<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 libvirt\u2019\u043e\u043c:<\/p>\n<p>  &lt;\u2063feature name= <font color=\"green\">\u2063&#8217;vmx&#8217;<\/font>&gt;\u2063<br \/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\u2063cpuid eax_in=<font color=\"green\">&#8216;0x01&#8217;<\/font> ecx=<font color=\"green\">&#8216;0x00000020&#8217;<\/font>\/&gt; # 2<sup>5<\/sup> = 32<sub>10<\/sub> = <font color=\"green\">20<sub>16<\/sub><\/font><br \/>   &lt;\/feature\u2063&gt;<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 1-\u043c \u043b\u0438\u0441\u0442\u0435 \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 ECX \u043f\u043e\u0434 5 \u0431\u0438\u0442\u043e\u043c \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <a href=\"https:\/\/en.wikipedia.org\/wiki\/CPUID#EAX=1:_Processor_Info_and_Feature_Bits\">Feature Information<\/a> \u0432 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438.<\/p>\n<p>  \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 \u044d\u0442\u0438\u043c \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0432 \u0438\u0442\u043e\u0433\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u043b\u0430\u0433\u0438 \u0432 libvirt, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u043b\u0430\u0433\u0438 SGX (\u043f\u043e\u043c\u0438\u043c\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445: sgx \u0438 sgxlc), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u043b\u0438\u0441\u044c \u0432 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c Qemu:<\/p>\n<pre><code class=\"bash\">[root@compute-sgx ~] \/usr\/libexec\/qemu-kvm -cpu help |xargs printf '%s\\n' |grep sgx sgx sgx-debug sgx-exinfo sgx-kss sgx-mode64 sgx-provisionkey sgx-tokenkey sgx1 sgx2 sgxlc<\/code><\/pre>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0444\u043b\u0430\u0433\u043e\u0432 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u043d\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438, \u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0430\u043d\u043a\u043b\u0430\u0432\u043e\u0432 (SECS); \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/www.intel.com\/content\/dam\/www\/public\/emea\/xe\/en\/documents\/manuals\/64-ia-32-architectures-software-developer-vol-3d-part-4-manual.pdf\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> Intel. \u0412 \u043d\u0435\u0439 \u043c\u044b \u043d\u0430\u0448\u043b\u0438, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u043c \u043d\u0430\u0431\u043e\u0440 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 SGX \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043b\u0438\u0441\u0442\u0435 0x12 \u0432 \u043f\u043e\u0434\u043b\u0438\u0441\u0442\u0435 1:<\/p>\n<pre><code class=\"bash\">[root@compute-sgx ~] cpuid -l 0x12 -s 1 -1 CPU:    SGX attributes (0x12\/1):       ECREATE SECS.ATTRIBUTES valid bit mask = 0x000000000000001f0000000000000036 <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hy\/zx\/l_\/hyzxl_i0u36y4tvqrwdha_ouqzq.png\"><\/p>\n<p>  \u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b 38-3 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0442\u044b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0443\u043a\u0430\u0436\u0435\u043c \u043f\u043e\u0437\u0436\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043b\u0430\u0433\u043e\u0432 \u0432 libvirt: sgx-debug, sgx-mode64, sgx-provisionkey, sgx-tokenkey. \u041e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0434 \u0431\u0438\u0442\u0430\u043c\u0438 1, 2, 4 \u0438 5. <\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438 \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c <a href=\"https:\/\/gitlab.com\/libvirt\/libvirt\/-\/issues\/136#note_522068873\">issue<\/a>: libvirt \u0438\u043c\u0435\u0435\u0442 \u043c\u0430\u043a\u0440\u043e\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0444\u043b\u0430\u0433\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0438\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 x86_features.xml \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043b\u0438\u0441\u0442\u044b, \u0431\u0438\u0442\u044b \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c libvirt \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043b\u0438\u0441\u0442 \u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. \u041d\u043e \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 <a href=\"https:\/\/github.com\/libvirt\/libvirt\/blob\/master\/src\/cpu\/cpu_x86.c#L2635\">\u043a\u043e\u0434\u0435<\/a> libvirt\u2019a \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u0438\u043c \u043b\u0438\u0441\u0442\u043e\u043c:<\/p>\n<pre><code class=\"objectivec\">\/* Leaf 0x12: SGX capability enumeration  *  * Sub leaves 0 and 1 is supported if ebx[2] from leaf 0x7 (SGX) is set.  * Sub leaves n &gt;= 2 are valid as long as eax[3:0] != 0.  *\/ static int cpuidSetLeaf12(virCPUDataPtr data,                virCPUx86DataItemPtr subLeaf0) {     virCPUx86DataItem item = CPUID(.eax_in = 0x7);     virCPUx86CPUIDPtr cpuid = &amp;item.data.cpuid;     virCPUx86DataItemPtr leaf7;      if (!(leaf7 = virCPUx86DataGet(&amp;data-&gt;data.x86, &amp;item)) ||         !(leaf7-&gt;data.cpuid.ebx &amp; (1 &lt;&lt; 2)))         return 0;      if (virCPUx86DataAdd(data, subLeaf0) &lt; 0)         return -1;      cpuid-&gt;eax_in = 0x12;     cpuid-&gt;ecx_in = 1;     cpuidCall(cpuid);     if (virCPUx86DataAdd(data, &amp;item) &lt; 0)         return -1;      cpuid-&gt;ecx_in = 2;     cpuidCall(cpuid);     while (cpuid-&gt;eax &amp; 0xf) {         if (virCPUx86DataAdd(data, &amp;item) &lt; 0)             return -1;         cpuid-&gt;ecx_in++;         cpuidCall(cpuid);     }     return 0; }<\/code><\/pre>\n<p>  \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a 2-\u043c\u0443 \u0431\u0438\u0442\u0443 EBX \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 7-\u0433\u043e \u043b\u0438\u0441\u0442\u0430 (\u0442.\u0435. \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 SGX), libvirt \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0441\u0442 0x12 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 \u043f\u043e\u0434\u043b\u0438\u0441\u0442\u0430\u0445 0, 1 \u0438 2. <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b x86_features.xml. \u041c\u044b \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0442\u044b \u0432 hex-\u0444\u043e\u0440\u043c\u0430\u0442 \u2014 \u0438 \u0432\u043e\u0442 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"xml\">  &lt;!-- SGX features --&gt;   &lt;feature name='sgx'&gt;     &lt;cpuid eax_in='0x07' ecx_in='0x00' ebx='0x00000004'\/&gt;   &lt;\/feature&gt;   &lt;feature name='sgxlc'&gt;     &lt;cpuid eax_in='0x07' ecx_in='0x00' ecx='0x40000000'\/&gt;   &lt;\/feature&gt;   &lt;feature name='sgx1'&gt;     &lt;cpuid eax_in='0x12' ecx_in='0x00' eax='0x00000001'\/&gt;   &lt;\/feature&gt;   &lt;feature name='sgx-debug'&gt;     &lt;cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000002'\/&gt;   &lt;\/feature&gt;   &lt;feature name='sgx-mode64'&gt;     &lt;cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000004'\/&gt;   &lt;\/feature&gt;   &lt;feature name='sgx-provisionkey'&gt;     &lt;cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000010'\/&gt;   &lt;\/feature&gt;   &lt;feature name='sgx-tokenkey'&gt;     &lt;cpuid eax_in='0x12' ecx_in='0x01' eax='0x00000020'\/&gt;   &lt;\/feature&gt;<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u044d\u0442\u0438\u0445 \u0444\u043b\u0430\u0433\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 Nova \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <i>cpu_model_extra_flags<\/i>:<\/p>\n<pre><code class=\"bash\">[root@compute-sgx nova] grep cpu_mode nova.conf cpu_mode = custom cpu_model = Skylake-Client-IBRS cpu_model_extra_flags = sgx,sgxlc,sgx1,sgx-provisionkey,sgx-tokenkey,sgx-debug,sgx-mode64  [root@compute-sgx ~] cat \/proc\/$PID\/cmdline |xargs -0 printf &quot;%s\\n&quot; |awk '\/cpu\/ { getline x; print $0 RS x; }' -cpu Skylake-Client-IBRS,sgx=on,sgx-mode64=on,sgx-provisionkey=on,sgx-tokenkey=on,sgx1=on,sgxlc=on <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0434\u0435\u043b\u0430\u0432 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0443\u0442\u044c, \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 libvirt \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0444\u043b\u0430\u0433\u043e\u0432 SGX. \u042d\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u0445 \u043e\u043f\u0446\u0438\u0439 \u0432 XML-\u0444\u0430\u0439\u043b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435: \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 Intel \u0438\u043b\u0438 AMD \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 libvirt. \u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 CPUID \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c. \u0410 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u2014 \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u0438\u0448\u0438\u0442\u0435, \u0431\u0443\u0434\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/gcorelabs\/blog\/553734\/\"> https:\/\/habr.com\/ru\/company\/gcorelabs\/blog\/553734\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\u0421 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/gcorelabs\/blog\/537316\/\">\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438 Intel SGX \u0432 \u043d\u0430\u0448\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0431\u043b\u0430\u043a\u043e \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432. \u0417\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u043b\u043a\u0438\u0445 \u0431\u0430\u0433\u043e\u0432 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0436\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dx\/gl\/hx\/dxglhxshknwugps7fbqu31erays.jpeg\"><\/p>\n<p>  \u0415\u0441\u0442\u044c, \u043e\u0434\u043d\u0430\u043a\u043e, \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-321904","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=321904"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321904\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}