intel / idxd-config

Accel-config / libaccel-config
Other
56 stars 34 forks source link

Why do I unbind the dsa0 cause the machine crash and reboot #7

Closed chen982 closed 2 years ago

chen982 commented 2 years ago

The command as follows : echo 0000:6a:01.0 > /sys/bus/pci/devices/0000:6a:01.0/driver/unbind (The 0000:6a:01.0 is the dsa0)

davejiang commented 2 years ago

Which kernel version are you using? You need this commit that is in 5.14-rc6 Fixes: 7eb25da161be ("dmaengine: idxd: fix sequence for pci driver remove() and shutdown()")

davejiang commented 2 years ago
Are you using the latest accel-config, 3.4.1?

On 9/6/2021 11:16 PM, Tianchen Xiong
  wrote:

  updated to the upstream-fix, 5.14-rc1 , but cant't using the
    accel-config?

  —
    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub, or unsubscribe.
    Triage notifications on the go with GitHub Mobile for iOS or Android.

  [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/intel/idxd-config/issues/7#issuecomment-914022686", "url": "https://github.com/intel/idxd-config/issues/7#issuecomment-914022686", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

chen982 commented 2 years ago

yes, using the latest accel-config, the configs in test 2g2q_user is not suitable . when loading this config, as using the shared wq dsa0.0 , it will cause write mode fail , load config error , but as using the dedicated wq dsa0.1 , it will be ok .

davejiang commented 2 years ago
You are using the 5.14 based kernel. Upstream reverted ENQCMD
  support starting 5.13. We have not been able to get that addressed
  yet. So without ENQCMD, no shared wq support. 

On 9/7/2021 8:18 AM, Tianchen Xiong
  wrote:

  yes, using the latest accel-config, the configs in test
    2g2q_user is not suitable . when loading this config, as using
    the shared wq dsa0.0 , it will cause write mode fail , load
    config error , but as using the dedicated wq dsa0.1 , it will be
    ok .
  —
    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub, or unsubscribe.
    Triage notifications on the go with GitHub Mobile for iOS or Android.

  [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/intel/idxd-config/issues/7#issuecomment-914399058", "url": "https://github.com/intel/idxd-config/issues/7#issuecomment-914399058", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

chen982 commented 2 years ago

using delicate wq 0.1 in qemu, operation command timeout , why does this happen? the same script in host can run normally , but when pass the dsa0 to qemu, it doesn't work (dsa0 and dsa0/wq0.1 have been enabled using accfg).

image
davejiang commented 2 years ago

dsa_test does not support operation outside of SVM. You need vSVM on guest, which is not upstream. To do operation in current guest mode, you'll need to program gPA or gIOVA to the descriptor after pinning the memory for the source, destination, and the completion descriptor.

chen982 commented 2 years ago

So where should I do this ? In kernel ? or dma engine?

davejiang commented 2 years ago

This is all userspace.

chen982 commented 2 years ago

How to program gPA or gIOVA to the descriptor in userspace for dsa_test??

davejiang commented 2 years ago
That is something you need to figure out. It's not an easy thing.
  Not only that, you'll need to find a way to pin the user pages. I
  suggest take a look at SPDK. I think they do something like this
  and they have DSA support now. 

On 9/16/2021 1:29 AM, Tianchen Xiong
  wrote:

  How to program gPA or gIOVA to the descriptor in userspace?
  —
    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub, or unsubscribe.
    Triage notifications on the go with GitHub Mobile for iOS or Android.

  [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/intel/idxd-config/issues/7#issuecomment-920699371", "url": "https://github.com/intel/idxd-config/issues/7#issuecomment-920699371", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]