intel / idxd-config

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

How to use the dsa as a dma engine?Are there some documents or examples to use dsa in kernel? #12

Closed chen982 closed 2 years ago

davejiang commented 2 years ago

https://www.kernel.org/doc/html/latest/driver-api/dmaengine/index.html

It supports the current DMA engine API when scalable mode (sm_on) is not on. We are working on support for scalable mode.

You can also take a look at dma_test.c in drivers/dma/ or drivers/ntb/ntb_transport.c for examples.

chen982 commented 2 years ago

I get this error when modprobe idxd_ktest , does this module removed ?

image

Now I can only see idxd under the driver/dma/ , So is it true that when I modprobe idxd(when sm_on is not on) it will serve as a DMA-Engine and I can then run dmatest ? And What is the fundamental difference between DSA's Scalable Mode and non scalable mode? Can I use the VFIO to pass the scalable mode dsa to the guest kernel and In the guest kernel it is used as a DMAengine using non scalable mode?

davejiang commented 2 years ago

You can run dmatest with IOMMU in off or on mode. As long as scalable mode is not enabled. idxd_ktest is not public. Please email me directly for any discussion on that. Scalable mode allows KVA usage with SVM support.

chen982 commented 2 years ago

How to create the vDSA ? I know there is a supported type "1dwq-v1" , but How can I create it and pass it to qemu (I don't see dsa related things under /sys/devices/virtual/). kernel-5.14 seems having removed the idxd-mdev under vfio, how can I create the idxd-mdev?

davejiang commented 2 years ago

May I ask what kernel you are using? siov vdev support is not upstream. Also this is unrelated to accel-config....

chen982 commented 2 years ago

I now using the kernel 5.14, but it seems has removed vfio-mdev-idxd from 5.12. Should I switch to 5.12 to use the idxd-mdev

davejiang commented 2 years ago

If you are an Intel developer can you email me directly to my @intel address? This is all internal development code and no need to discuss on a public forum since it's not upstream yet. If you are an Intel customer, can you email me at my @intel address and also cc your Intel contact please? Thanks.