Changeset 36647 in vbox
- Timestamp:
- Apr 11, 2011 7:48:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/user_AdvancedTopics.xml
r36450 r36647 537 537 command:<screen>echo 1 > /sys/devices/system/cpu/cpu<id>/online</screen></para> 538 538 </sect1> 539 540 <sect1 id="pcipassthrough"> 541 <title>PCI passthrough</title> 542 543 <para>When running on Linux hosts, with recent enough kernel (at least version 544 <computeroutput>2.6.31</computeroutput>) experimental host PCI devices 545 passthrough is available.<footnote> 546 <para>Experimental support for PCI passthrough was introduced with VirtualBox 547 4.1.</para> 548 </footnote> Essentially this feature allows to use physical PCI devices 549 on host directly by the guest, even if host doesn't have drivers for this 550 particular device.</para> 551 552 <para>To be fully functional, PCI passthrough support in VirtualBox depends upon 553 IOMMU hardware unit, which is not yet too widely available. To be exact, 554 if device uses bus mastering (i.e. performs DMA to the OS memory on its own), then 555 IOMMU hardware is needed (otherwise such DMA transactions may override wrong physical memory address, 556 as device DMA engine is programmed using device-specific protocol to perform memory transactions). 557 IOMMU functions as translation unit, mapping physical memory access requests from the device, 558 using knowledge of guest physical address to host physical addresses translation rules.</para> 559 560 <para>Intel's solution for IOMMU is marketed as "Intel Virtualization Technology for 561 Directed I/O" (VT-d), and AMD's one is called AMD-Vi. So please check if your 562 motherboard datasheet has appropriate technology. 563 Even if your hardware doesn't have IOMMU, certain PCI cards may work 564 (such as serial PCI adapters), but guest will show warning on boot, and 565 VM execution will terminate, if guest driver will attempt to enable card 566 bus mastering.</para> 567 568 <para> 569 It's not uncommon, that BIOS/OS disables IOMMU by default, so before any attempt to use it, 570 please make sure that 571 <orderedlist> 572 <listitem> 573 Your motherboard has IOMMU unit. 574 </listitem> 575 <listitem> 576 Your CPU supports IOMMU. 577 </listitem> 578 <listitem> 579 IOMMU is enabled in the BIOS. 580 </listitem> 581 <listitem> 582 Your Linux kernel compiled with IOMMU support (including DMA remapping, see 583 <computeroutput>CONFIG_DMAR</computeroutput> kernel compilation option). 584 </listitem> 585 <listitem> 586 Your Linux kernel recognizes and uses IOMMU unit (<computeroutput>intel-iommu=on</computeroutput> 587 boot option could be needed). Search for DMAR in kernel boot log. 588 </listitem> 589 </orderedlist> 590 </para> 591 592 <para>Once you made sure that host kernel supports IOMMU, next step is to select 593 PCI card, and attach it to the guest. To figure out list of available PCI devices, 594 use <computeroutput>lspci</computeroutput> command. Output will look like this 595 <screen> 596 01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450] 597 01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series] 598 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03) 599 03:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03) 600 03:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03) 601 06:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8500 GT] (rev a1) 602 </screen> 603 First column here is a PCI address (in format <computeroutput>bus:device.function</computeroutput>). 604 This address could be used to identify device for further operations. 605 For example, to attach PCI network controller on system listed above, 606 to second PCI bus in the guest, as device 5, function 0, use the following command: 607 <screen>VBoxManage modifyvm "VM name" --attachpci 02:00.0@01:05.0</screen> 608 To detach same device, use 609 <screen>VBoxManage modifyvm "VM name" --detachpci 02:00.0</screen> 610 Please note, that both host and guest could freely assign different PCI address to 611 card attached during runtime, so those addresses only apply to address of card at 612 the moment of attachment (host), and during BIOS PCI init (guest). 613 </para> 614 615 <para>If virtual machine has PCI device attached, certain limitations apply. 616 <orderedlist> 617 <listitem> 618 Only PCI cards with non-shared interrupts (such as using MSI on host) can be 619 supported at the moment. 620 </listitem> 621 <listitem> 622 No guest state can be reliably saved/restored (as PCI card internal state could 623 not be retrieved). 624 </listitem> 625 <listitem> 626 Teleportation (live migration) doesn't work (for the same reason). 627 </listitem> 628 <listitem> 629 No lazy physical memory allocation, host preallocates whole RAM on startup 630 (as we cannot catch physical hardware access to physical memory). 631 </listitem> 632 </orderedlist> 633 </para> 634 635 </sect1> 636 539 637 540 638 <sect1>
Note:
See TracChangeset
for help on using the changeset viewer.