Enable DMA in Xen Virualization

Posted on 9:19 PM by Bharathvn

Enabling DMA on your disk


First, you need to be sure that DMA is disabled. You can check this with the following command:

# hdparm /dev/hda

If your harddisk is not hda, for example if you are using a SATA drive, or this is not your first harddisk, then substitute the appropriate device. You should get output similar to:

# hdparm /dev/hda

multcount = 0 (off)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 240121728, start = 0

If using_dma is on (as above) then you are all set. DMA is enabled, and the drive should be operating pretty much as fast as it can go. If this is not the case, then you can read on...

What to do to enable DMA

First, you can hope that your chipset is supported, and try doing:

# hdparm -d 1 /dev/hda

setting using_dma to 1 (on)
using_dma = 1 (on)

With luck, this will enable DMA on your disk for you. If so, you are now set, it is possible that your distribution will have some way of setting this on bootup.

If this did not work... don't panic yet. Basically it means that your dom0 kernel is not able to set DMA on your chipset. Try loading the appropriate kernel module, you may have to reboot and disable the "generic" module to ensure that the "generic" module does not claim your chipset.