intel / idxd-config

Accel-config / libaccel-config
Other
59 stars 35 forks source link

How could I change the sys/bus/dsa/device/dsa0/pasid_enable to 1? #5

Closed chen982 closed 3 years ago

chen982 commented 3 years ago

I have the config_pci_pasid = y, but it doesn't works

davejiang commented 3 years ago

Hi Tianchen, you need to turn VTd on in your BIOS and then pass in intel_iommu=on,sm_on for kernel boot parameter.

chen982 commented 3 years ago

It works, thank you very much

davejiang commented 3 years ago

Issue resolved.

chen982 commented 3 years ago

The same problem in qemu virtual machine In the virtual machine I have the same kernel and the configs and vtd, but it seems that /dsa/pasid_enable = 0 (I use the vfio to pass the dsa0 to Virtual machine) How can I deal with it?

davejiang commented 3 years ago

Well, unless your qemu and your kernel supports vIOMMU with scalable mode support then you won't get pasid on the guest. I don't think those support are upstream yet.

chen982 commented 3 years ago

So how can I use the DSA device in the QEMU? Is there another way to use it? Now I use it in host only with the help of accel_config , and pass dsa0 using vfio to QEMU, and want to use it with the accel_config,but this occurs

davejiang commented 3 years ago

You can only use it without vIOMMU support on guest right now. There's significant rework upstream on vIOMMU (/dev/iommu) right now and that support is pending the fallout of that. So I don't think you'll get that support any time soon.

chen982 commented 3 years ago

use it without vIOMMU support ? Is there some examples or codes to use the DSA in that way ? In the spec doc it seems to abstract ,so I use the dsa with the help of accel_config

davejiang commented 3 years ago

It's no different than using DSA with intel_iommu=off or intel_iommu=on on the host. It essentially makes you run legacy mode. Which also means your user memory must be pinned (since you don't have SVM support) and the descriptors must be programmed with PA or IOVA.

I'm not sure what you mean by with the help of accel-config. accel-config gives you a front end to configure the device. It has nothing to do with the operation of the device.

chen982 commented 3 years ago

Thanks very much for you reply, I get it and will have a try