{"id":3773,"date":"2015-12-04T16:40:53","date_gmt":"2015-12-04T07:40:53","guid":{"rendered":"http:\/\/blog.bitmeister.jp\/?p=3773"},"modified":"2016-01-19T16:03:47","modified_gmt":"2016-01-19T07:03:47","slug":"usb%e3%83%9b%e3%82%b9%e3%83%88%e3%82%b3%e3%83%b3%e3%83%88%e3%83%ad%e3%83%bc%e3%83%a9%e3%82%92pci%e3%83%91%e3%82%b9%e3%82%b9%e3%83%ab%e3%83%bc","status":"publish","type":"post","link":"https:\/\/blog.bitmeister.jp\/?p=3773","title":{"rendered":"USB\u30db\u30b9\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092PCI\u30d1\u30b9\u30b9\u30eb\u30fc"},"content":{"rendered":"<p>KVM\u306b\u76f4\u63a5USB\u30c7\u30d0\u30a4\u30b9\u3092\u8a8d\u8b58\u3055\u305b\u3088\u3046\u3068\u601d\u3044\u307e\u3057\u3066\u3001\u306f\u3058\u3081\u306bUSB\u30d1\u30b9\u30b9\u30eb\u30fc\u304c\u601d\u3044\u6d6e\u304b\u3073\u307e\u3057\u305f\u3002\u304c\u3001\u8abf\u3079\u3066\u307f\u308b\u3068\u30d5\u30eb\u30b9\u30d4\u30fc\u30c9\u30e2\u30fc\u30c9(12Mbps)\u306a\u3089\u7c21\u5358\u306b\u3067\u304d\u308b\u3051\u3069\u3001\u30cf\u30a4\u30b9\u30d4\u30fc\u30c9\u30e2\u30fc\u30c9(480Mbps\/USB2.0)\u3092\u4f7f\u3046\u306e\u306f\u8fbc\u307f\u5165\u3063\u305f\u8a2d\u5b9a\u304c\u5fc5\u8981\u3063\u307d\u3044\u3067\u3059\u3002\u3060\u3063\u305f\u3089USB2.0\u30db\u30b9\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3054\u3068PCI\u30d1\u30b9\u30b9\u30eb\u30fc\u3057\u3066\u3042\u3052\u308c\u3070\u7c21\u5358\u3067\u3044\u3044\u304b\u306a\u3068\u601d\u3044\u307e\u3057\u305f\u3002\u3084\u3063\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u3061\u3083\u3093\u3068\u52d5\u3044\u3066\u3044\u308b\u306e\u3067\u4eca\u65e5\u306f\u305d\u306e\u65b9\u6cd5\u3092\u307e\u3068\u3081\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<ol>\n<li>\u74b0\u5883<\/li>\n<p><a href=\"https:\/\/help.ubuntu.com\/community\/KVM\/Installation\" target=\"_blank\">\u4f7f\u7528\u3059\u308b VM Host \u306e OS \u306f Ubuntu 14.04 Server \u3067\u3001KVM\u306e\u74b0\u5883\u69cb\u7bc9\u6e08\u307f\u3001\u30b2\u30b9\u30c8OS\u304c\u65e2\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u524d\u63d0\u3067\u3059\u3002<\/a><br \/>\n\u4f7f\u3063\u305f\u30de\u30b7\u30f3\u306f HP ProLiant ML110 G7 \u3067\u3059\u304c\u3001\u6c4e\u7528\u7684\u306a\u8a2d\u5b9a\u306a\u306e\u3067\u4ed6\u306e\u30de\u30b7\u30f3\u3067\u3082\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<li>BIOS\u306e\u8a2d\u5b9a<\/li>\n<p>AMD\u306a\u3089AMD-Vi\u3001Intel\u306a\u3089VT-d\u3092BIOS\u3067\u6709\u52b9\u306b\u3057\u307e\u3059\u3002\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u306a\u3044\u3068\u3001PCI\u30d1\u30b9\u30b9\u30eb\u30fc\u304c\u3067\u304d\u307e\u305b\u3093\u3002CPU\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u3066\u3082BIOS\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3068\u3069\u3046\u306b\u3082\u306a\u308a\u307e\u305b\u3093\u3002\u4eca\u56de\u306e\u6700\u521d\u306e\u30cf\u30fc\u30c9\u30eb\u306b\u3057\u3066\u6700\u5927\u306e\u30cf\u30fc\u30c9\u30eb\u3067\u3059\u3002<br \/>\n\u30de\u30b7\u30f3\u3092\u518d\u8d77\u52d5\u3057\u3066BIOS\u306e\u8a2d\u5b9a\u753b\u9762\u3092\u8868\u793a\u3057\u3001\u5f53\u8a72\u9805\u76ee\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<li>Grub\u306e\u8a2d\u5b9a<\/li>\n<p>OS\u8d77\u52d5\u6642\u306b\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u4eee\u60f3\u5316\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u3059\u308b\u8a2d\u5b9a\u3092\u66f8\u304d\u307e\u3059\u3002<br \/>\nCPU\u304cAMD\u304bIntel\u304b\u306b\u3088\u3063\u3066\u8a2d\u5b9a\u3059\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u9055\u3044\u307e\u3059\u306e\u3067\u304a\u6c17\u3092\u3064\u3051\u3066\u3002<\/p>\n<ol style=\"list-style-type: lower-alpha;\">\n<li>AMD<\/li>\n<p>amd_iommu=on<\/p>\n<li>Intel<\/li>\n<p>intel_iommu=on\n<\/ol>\n<p>\u3053\u306e\u8a2d\u5b9a\u3092\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u306e\uff12\u884c\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">$ sudo vi \/etc\/default\/grub\r\nGRUB_CMDLINE_LINUX_DEFAULT=&quot;intel_iommu=on nomdmonddf nomdmonisw&quot;\r\nGRUB_CMDLINE_LINUX=&quot;intel_iommu=on&quot;<\/pre>\n<p>GRUB\u306e\u8a2d\u5b9a\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"> $ sudo update-grub<\/pre>\n<p>\u305d\u3057\u3066\u518d\u8d77\u52d5\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"> $ sudo reboot<\/pre>\n<p>\u30de\u30c3\u30d4\u30f3\u30b0\u3055\u308c\u3066\u305d\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u3044\u305f\u3089OK\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"> $ dmesg | grep IOMMU\r\n&#x5B;    0.000000] Intel-IOMMU: enabled\r\n...<\/pre>\n<li>USB\u30db\u30b9\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u78ba\u8a8d<\/li>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"> $ lspci -D | grep USB\r\n0000:00:1a.0 USB controller: Intel Corporation 6 Series\/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)\r\n0000:00:1d.0 USB controller: Intel Corporation 6 Series\/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)<\/pre>\n<p>\u3053\u306e\u5148\u982d\u306e16\u9032\u6570\u306e\u7f85\u5217\u3001<strong>0000:00:1a.0<\/strong>\u304c\u91cd\u8981\u3067\u3001\u5de6\u304b\u3089\u9806\u306b0000\u304cdomain\u300100\u304cbus\u30011a\u304cslot\u30010\u304cfunction\u3067\u3059\u3002\u4eca\u56de\u306f\u3001\u3053\u306eUSB2.0\u30db\u30b9\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092PCI\u30d1\u30b9\u30b9\u30eb\u30fc\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002USB3.0\u30db\u30b9\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u3082\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u624b\u5143\u306b\u8a66\u305b\u308b\u30de\u30b7\u30f3\u304c\u306a\u3044\u306e\u3067\u3084\u3063\u3066\u307e\u305b\u3093\u3002Intel 7 Series\u30018 Series\u306eEHCI\u3068\u304bxHCI\u3082\u304d\u3063\u3068\u3067\u304d\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3002<br \/>\nHP ML110 G7 \u3067\u306f\u30010000:00:1a.0\u304c\u30d5\u30ed\u30f3\u30c8\u30d1\u30cd\u30ebUSB\u30dd\u30fc\u30c8\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u30010000:00:1d.0\u304c\u30d0\u30c3\u30af\u30d1\u30cd\u30ebUSB\u30dd\u30fc\u30c8\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u3057\u305f\u3002\u8a2d\u5b9a\u3059\u308b\u30de\u30b7\u30f3\u306e\u3069\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u304c\u3069\u3053\u306eUSB\u30dd\u30fc\u30c8\u3092\u5236\u5fa1\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<li>VM\u306e\u8a2d\u5b9a<\/li>\n<p>device\u30bf\u30b0\u306e\u4e0b\u306b\u3053\u3093\u306a\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4e0a\u3067\u8abf\u3079\u305f domain\u3001bus\u3001slot\u3001function \u306f\u3053\u3053\u3067\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"> $ virsh edit YOUR_VM_NAME\r\n&lt;device&gt;\r\n...\r\n &lt;hostdev mode='subsystem' type='pci' managed='yes'&gt;\r\n  &lt;source&gt;\r\n   &lt;address domain='0x0000' bus='0x00' slot='0x1a' function='0x0'\/&gt;\r\n  &lt;\/source&gt;\r\n &lt;\/hostdev&gt;\r\n...\r\n&lt;\/device&gt;<\/pre>\n<li>SE Linux<\/li>\n<p>SE Linux \u3092\u4f7f\u3063\u3066\u308b\u5834\u5408\u306b\u306f\u3053\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3060\u305d\u3046\u3067\u3059\u3002\u50d5\u306f\u4f7f\u3063\u3066\u306a\u3044\u306e\u3067\u3053\u308c\u306f\u3057\u306a\u304f\u3066\u5927\u4e08\u592b\u3067\u3057\u305f\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"> # setsebool -P virt_use_sysfs 1<\/pre>\n<li>VM\u8d77\u52d5<\/li>\n<p>\u30b2\u30b9\u30c8OS\u304c\u8d77\u52d5\u3057\u305f\u3089USB\u30dd\u30fc\u30c8\u306b\u4f55\u304b\u523a\u3057\u3066\u307f\u3066\u3001\u8a8d\u8b58\u3059\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\"> $ virsh start YOUR_VM_NAME<\/pre>\n<\/ol>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>KVM\u306b\u76f4\u63a5USB\u30c7\u30d0\u30a4\u30b9\u3092\u8a8d\u8b58\u3055\u305b\u3088\u3046\u3068\u601d\u3044\u307e\u3057\u3066\u3001\u306f\u3058\u3081\u306bUSB\u30d1\u30b9\u30b9\u30eb\u30fc\u304c\u601d\u3044\u6d6e\u304b\u3073\u307e\u3057\u305f\u3002\u304c\u3001\u8abf\u3079\u3066\u307f\u308b\u3068\u30d5\u30eb\u30b9\u30d4\u30fc\u30c9\u30e2\u30fc\u30c9(12Mbps)\u306a\u3089\u7c21\u5358\u306b\u3067\u304d\u308b\u3051\u3069\u3001\u30cf\u30a4\u30b9\u30d4\u30fc\u30c9\u30e2\u30fc\u30c9(480Mbps\/USB2.0) [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-3773","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3773"}],"version-history":[{"count":56,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3773\/revisions"}],"predecessor-version":[{"id":3829,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=\/wp\/v2\/posts\/3773\/revisions\/3829"}],"wp:attachment":[{"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bitmeister.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}