| 275 | | = passthrough = |
| 276 | | * [http://mzyy94.com/blog/2014/12/12/kvm-intel-hd-graphics-passthrough/ KVMでQSVするためIntel HD Graphicsパススルーするー - 犬アイコンのみっきー] |
| 277 | | * [http://www.slideshare.net/takumanakajima90/csstudy15 もしCloudStackのKVMホストでPCIパススルーできるようになったら] |
| 278 | | * [http://ubuntuforums.org/showthread.php?t=2262280 (ubuntu) Ubuntu 14.04 KVM VGA Passthrough Nvidia GTX "How To"] |
| 279 | | * [http://www.firewing1.com/howtos/fedora-20/create-gaming-virtual-machine-using-vfio-pci-passthrough-kvm Create a gaming virtual machine using VFIO PCI passthrough for KVM | Fedora 20 | How-to guide | firewing1] |
| 280 | | * [http://www.nexia.jp/server/1802/ KVM PCIパススルー (PCI PassThrough) | nexia inc] |
| 281 | | * [http://blog.livedoor.jp/karamine/archives/1726234.html GPUパススルー : karamineのブログ] [http://blog.livedoor.jp/karamine/archives/cat_50039.html 一連の続き]がある |
| 282 | | * [http://www.goodnai.com/blog/2013/04/08/win7-on-centos6-4kvm%E3%81%A7radeon-hd-6670%E3%81%AB%E3%82%88%E3%82%8Bgpu%E3%82%A8%E3%83%B3%E3%82%B3%E3%83%BC%E3%83%89%EF%BC%88ati-stream%EF%BC%89/ Win7 on CentOS6.4+KVMでRadeon HD 6670によるGPUエンコード(ATI Stream) | Kung Noi Blog] |
| 283 | | * [http://yujilow1220.github.io/blog/Cloud/vga-passthrough-on-kvm-on-fedora-20/ Fedora 20上のKVMでVGAパススルーをやってみた - Yujilow's Note] |
| 284 | | * [http://seesaawiki.jp/w/kou1okada/d/Linux%20-%20PCI-PassThrough Linux - PCI-PassThrough - PIB] |
| 285 | | * [https://bbs.archlinux.org/viewtopic.php?id=162768 KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9 / Community Contributions / Arch Linux Forums] |
| 286 | | |
| 287 | | * QEMUの引数に追加されるものの例 |
| 288 | | {{{ |
| 289 | | 01:00.0 Multimedia controller [0480]: Altera Corporation Device [1172:4c15] (rev 01) |
| 290 | | }}} |
| 291 | | {{{ |
| 292 | | -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x9 |
| 293 | | }}} |
| 294 | | |
| 295 | | == Marvell controller == |
| 296 | | * [https://bbs.archlinux.org/viewtopic.php?id=185182 Intel IOMMU not working for Marvell SSD Controller / Kernel & Hardware / Arch Linux Forums] |
| 297 | | * [https://bugzilla.kernel.org/show_bug.cgi?id=42679 Bug 42679 – DMA Read on Marvell 88SE9128 fails when Intel's IOMMU is on] |
| 298 | | * https://bugzilla.kernel.org/show_bug.cgi?id=42679#c94 {{{Note, for google: this is the controller embedded in the Plextor m6e M.2 SSD}}} |
| 299 | | * http://lxr.free-electrons.com/source/drivers/pci/quirks.c#L3570 |
| 300 | | |
| 301 | | === Plextor M6e === |
| 302 | | |
| 303 | | * [https://bbs.archlinux.org/viewtopic.php?id=185182 Intel IOMMU not working for Marvell SSD Controller / Kernel & Hardware / Arch Linux Forums] |
| 304 | | |
| 305 | | * PX-G128M6e |
| 306 | | * lspci -nnv |
| 307 | | {{{ |
| 308 | | 02:00.0 SATA controller [0106]: Lite-On IT Corp. / Plextor M6e PCI Express SSD [Marvell 88SS9183] [1c28:0122] (rev 14) (prog-if 01 [AHCI 1.0]) |
| 309 | | Subsystem: Marvell Technology Group Ltd. Device [1b4b:9183] |
| 310 | | }}} |
| 311 | | |
| 312 | | * root@archiso ~ # uname -a |
| 313 | | {{{ |
| 314 | | Linux archiso 4.0.4-2-ARCH #1 SMP PREEMPT Fri May 22 03:05:23 UTC 2015 x86_64 GNU/Linux |
| 315 | | }}} |
| 316 | | * root@archiso ~ # cat /proc/cmdline |
| 317 | | {{{ |
| 318 | | BOOT_IMAGE=boot/x86_64/vmlinuz archisobasedir=arch archisolabel=ARCH_201506 initrd=boot/intel_ucode.img,boot/x86_64/archiso.img intel_iommu=on |
| 319 | | }}} |
| 320 | | * root@archiso ~ # dmesg|grep -i -e DMAR -e IOMMU |
| 321 | | {{{ |
| 322 | | [ 0.000000] Command line: BOOT_IMAGE=boot/x86_64/vmlinuz archisobasedir=arch archisolabel=ARCH_201506 initrd=boot/intel_ucode.img,boot/x86_64/archiso.img intel_iommu=on |
| 323 | | [ 0.000000] ACPI: DMAR 0x00000000DAC6CED0 0000B8 (v01 INTEL BDW 00000001 INTL 00000001) |
| 324 | | [ 0.000000] Kernel command line: BOOT_IMAGE=boot/x86_64/vmlinuz archisobasedir=arch archisolabel=ARCH_201506 initrd=boot/intel_ucode.img,boot/x86_64/archiso.img intel_iommu=on |
| 325 | | [ 0.000000] Intel-IOMMU: enabled |
| 326 | | [ 0.086964] dmar: Host address width 39 |
| 327 | | [ 0.086969] dmar: DRHD base: 0x000000fed90000 flags: 0x0 |
| 328 | | [ 0.086987] dmar: IOMMU 0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a |
| 329 | | [ 0.086990] dmar: DRHD base: 0x000000fed91000 flags: 0x1 |
| 330 | | [ 0.087000] dmar: IOMMU 1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da |
| 331 | | [ 0.087003] dmar: RMRR base: 0x000000dbe7b000 end: 0x000000dbe89fff |
| 332 | | [ 0.087006] dmar: RMRR base: 0x000000dd000000 end: 0x000000df1fffff |
| 333 | | [ 0.087011] IOAPIC id 8 under DRHD base 0xfed91000 IOMMU 1 |
| 334 | | [ 7.370829] DMAR: No ATSR found |
| 335 | | [ 7.371048] IOMMU: dmar0 using Queued invalidation |
| 336 | | [ 7.371051] IOMMU: dmar1 using Queued invalidation |
| 337 | | [ 7.371056] IOMMU: Setting RMRR: |
| 338 | | [ 7.371083] IOMMU: Setting identity map for device 0000:00:02.0 [0xdd000000 - 0xdf1fffff] |
| 339 | | [ 7.371527] IOMMU: Setting identity map for device 0000:00:14.0 [0xdbe7b000 - 0xdbe89fff] |
| 340 | | [ 7.371577] IOMMU: Setting identity map for device 0000:00:1a.0 [0xdbe7b000 - 0xdbe89fff] |
| 341 | | [ 7.371616] IOMMU: Setting identity map for device 0000:00:1d.0 [0xdbe7b000 - 0xdbe89fff] |
| 342 | | [ 7.371644] IOMMU: Prepare 0-16MiB unity mapping for LPC |
| 343 | | [ 7.371661] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff] |
| 344 | | [ 7.673577] [drm] DMAR active, disabling use of stolen memory |
| 345 | | [ 7.673740] dmar: DRHD: handling fault status reg 2 |
| 346 | | [ 7.673744] dmar: DMAR:[DMA Write] Request device [02:00.1] fault addr fffe0000 |
| 347 | | DMAR:[fault reason 02] Present bit in context entry is clear |
| 348 | | [ 7.986473] dmar: DRHD: handling fault status reg 3 |
| 349 | | [ 7.986493] dmar: DMAR:[DMA Write] Request device [02:00.1] fault addr fffe0000 |
| 350 | | DMAR:[fault reason 02] Present bit in context entry is clear |
| 351 | | [ 9.337664] dmar: DRHD: handling fault status reg 2 |
| 352 | | [ 9.337683] dmar: DMAR:[DMA Write] Request device [00:02.0] fault addr 74ff240000 |
| 353 | | DMAR:[fault reason 05] PTE Write access is not set |
| 354 | | [ 12.985456] dmar: DRHD: handling fault status reg 2 |
| 355 | | [ 12.985519] dmar: DMAR:[DMA Write] Request device [02:00.1] fault addr fffe0000 |
| 356 | | DMAR:[fault reason 02] Present bit in context entry is clear |
| 357 | | [ 13.298243] dmar: DRHD: handling fault status reg 3 |
| 358 | | [ 13.298307] dmar: DMAR:[DMA Write] Request device [02:00.1] fault addr fffe0000 |
| 359 | | DMAR:[fault reason 02] Present bit in context entry is clear |
| 360 | | [ 18.297124] dmar: DRHD: handling fault status reg 2 |
| 361 | | [ 18.297152] dmar: DMAR:[DMA Write] Request device [02:00.1] fault addr fffe0000 |
| 362 | | DMAR:[fault reason 02] Present bit in context entry is clear |
| 363 | | [ 18.609924] dmar: DRHD: handling fault status reg 3 |
| 364 | | [ 18.609971] dmar: DMAR:[DMA Write] Request device [02:00.1] fault addr fffe0000 |
| 365 | | DMAR:[fault reason 02] Present bit in context entry is clear |
| 366 | | [ 23.608862] dmar: DRHD: handling fault status reg 2 |
| 367 | | [ 23.608924] dmar: DMAR:[DMA Write] Request device [02:00.1] fault addr fffe0000 |
| 368 | | DMAR:[fault reason 02] Present bit in context entry is clear |
| 369 | | }}} |
| 370 | | |
| 371 | | * PX-G128M6eを取り外すと以下のようになる |
| 372 | | {{{ |
| 373 | | [ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=0f566cb2-aec8-4122-a80a-f2e5f48e4426 rw intel_iommu=on |
| 374 | | [ 0.000000] ACPI: DMAR 0x00000000DAC6CED0 0000B8 (v01 INTEL BDW 00000001 INTL 00000001) |
| 375 | | [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=0f566cb2-aec8-4122-a80a-f2e5f48e4426 rw intel_iommu=on |
| 376 | | [ 0.000000] Intel-IOMMU: enabled |
| 377 | | [ 0.107383] dmar: Host address width 39 |
| 378 | | [ 0.107388] dmar: DRHD base: 0x000000fed90000 flags: 0x0 |
| 379 | | [ 0.107406] dmar: IOMMU 0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a |
| 380 | | [ 0.107409] dmar: DRHD base: 0x000000fed91000 flags: 0x1 |
| 381 | | [ 0.107419] dmar: IOMMU 1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da |
| 382 | | [ 0.107422] dmar: RMRR base: 0x000000dbe7b000 end: 0x000000dbe89fff |
| 383 | | [ 0.107425] dmar: RMRR base: 0x000000dd000000 end: 0x000000df1fffff |
| 384 | | [ 0.107430] IOAPIC id 8 under DRHD base 0xfed91000 IOMMU 1 |
| 385 | | [ 0.677861] DMAR: No ATSR found |
| 386 | | [ 0.678093] IOMMU: dmar0 using Queued invalidation |
| 387 | | [ 0.678096] IOMMU: dmar1 using Queued invalidation |
| 388 | | [ 0.678100] IOMMU: Setting RMRR: |
| 389 | | [ 0.678127] IOMMU: Setting identity map for device 0000:00:02.0 [0xdd000000 - 0xdf1fffff] |
| 390 | | [ 0.678608] IOMMU: Setting identity map for device 0000:00:14.0 [0xdbe7b000 - 0xdbe89fff] |
| 391 | | [ 0.678655] IOMMU: Setting identity map for device 0000:00:1a.0 [0xdbe7b000 - 0xdbe89fff] |
| 392 | | [ 0.678697] IOMMU: Setting identity map for device 0000:00:1d.0 [0xdbe7b000 - 0xdbe89fff] |
| 393 | | [ 0.678725] IOMMU: Prepare 0-16MiB unity mapping for LPC |
| 394 | | [ 0.678743] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff] |
| 395 | | [ 4.326005] [drm] DMAR active, disabling use of stolen memory |
| 396 | | }}} |
| 397 | | |
| 398 | | === patch === |
| 399 | | * [https://lkml.org/lkml/2015/2/2/226 LKML: Tim Sander: (PATCH) 3.19-rc7: add quirk for 1c28:0122 (rev 14) SATA controller] |
| 400 | | * linux-stable-v4.0.5.patch |
| 401 | | {{{ |
| 402 | | diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c |
| 403 | | index 85f247e..a78b225 100644 |
| 404 | | --- a/drivers/pci/quirks.c |
| 405 | | +++ b/drivers/pci/quirks.c |
| 406 | | @@ -3595,6 +3595,10 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TTI, 0x0642, |
| 407 | | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_JMICRON, |
| 408 | | PCI_DEVICE_ID_JMICRON_JMB388_ESD, |
| 409 | | quirk_dma_func1_alias); |
| 410 | | +/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c94 */ |
| 411 | | +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_LITE_ON, |
| 412 | | + PCI_DEVICE_ID_PLEXTOR_M6E, |
| 413 | | + quirk_dma_func1_alias); |
| 414 | | |
| 415 | | /* |
| 416 | | * Some devices DMA with the wrong devfn, not just the wrong function. |
| 417 | | diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h |
| 418 | | index e63c02a..1607b20 100644 |
| 419 | | --- a/include/linux/pci_ids.h |
| 420 | | +++ b/include/linux/pci_ids.h |
| 421 | | @@ -2487,6 +2487,9 @@ |
| 422 | | |
| 423 | | #define PCI_VENDOR_ID_ASMEDIA 0x1b21 |
| 424 | | |
| 425 | | +#define PCI_VENDOR_ID_LITE_ON 0x1c28 |
| 426 | | +#define PCI_DEVICE_ID_PLEXTOR_M6E 0x0122 |
| 427 | | + |
| 428 | | #define PCI_VENDOR_ID_CIRCUITCO 0x1cc8 |
| 429 | | #define PCI_SUBSYSTEM_ID_CIRCUITCO_MINNOWBOARD 0x0001 |
| 430 | | |
| 431 | | }}} |
| 432 | | * 4.0.xでも正常に動作することを確認 |
| 433 | | * twitter:mittyorz/status/608644911533936642 |
| 434 | | * https://bugzilla.kernel.org/show_bug.cgi?id=42679#c114 |
| | 275 | = passthrough = |
| | 276 | => [./passthrough] |