x86 IOMMU support (DMAR)

Konstantin Belousov kostikbel at gmail.com
Mon May 27 16:15:22 UTC 2013


On Mon, May 27, 2013 at 02:27:00PM +0200, Jeremie Le Hen wrote:
> Hi kib,
> 
> On Mon, May 27, 2013 at 01:58:44PM +0300, Konstantin Belousov wrote:
> > For the several months, I worked (and continue the work now) on the
> > driver for the Intel VT-d for FreeBSD.  The VT-d is sold as the I/O
> > Virtualization technology, but in essence it is a DMA addresses
> > remapping engine, i.e. it is advanced and improved I/O MMU, as also
> > found on other big-iron machines, e.g. PowerPC or Sparc.  See the
> > Intel document titled 'Intel Virtualization Technology for Directed
> > I/O Architecture Specification' and chipsets datasheets for the
> > description of the facility.
> > 
> > [...]
> > 
> > http://people.freebsd.org/~kib/misc/DMAR.1.patch
> 
> Which CPU flag is needed to be able to test this?
> 
> My -CURRENT machine has:
> 
> CPU: Intel(R) Core(TM)2 CPU          6320  @ 1.86GHz (1869.90-MHz K8-class CPU)
>   Origin = "GenuineIntel"  Id = 0x6f6  Family = 0x6  Model = 0xf  Stepping = 6
>   Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>   Features2=0xe3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
>   AMD Features=0x20100800<SYSCALL,NX,LM>
>   AMD Features2=0x1<LAHF>

The feature is announced by the ACPI table.  You should use recent HEAD,
and do acpidump -t | grep DMAR.  If the DMAR table is present, you have
VT-d enabled.

Presence of VT-d is determined by:
- north bridge.  In other words, for older machines with Core2 and earlier
  CPUs, north bridge chip of the chipset should support VT-d, for newer
  Core iX, the north bridge inside the CPU.
- motherboard manufacturer, by the way of BIOS properly configuring the
  DMARs and filling the right table.  Some motherboard vendors offer the
  knob in the BIOS setup, which enables VT-d.

One note: KMS-enabled Intel GPU driver is completely incompatible with
VT-d right now.  Besides the fact the GPU MMU does not make the calls
to configure remapper, there are many erratas regarding interaction
between IOMMU and GPU, for all generations of chipsets, except possible
Ivy Bridge.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-amd64/attachments/20130527/4385c9c3/attachment.sig>


More information about the freebsd-amd64 mailing list