<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.openanolis.cn/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.openanolis.cn/"
          
          maintainer="service@openanolis.org"
>

    <bug>
          <bug_id>3711</bug_id>
          
          <creation_ts>2023-01-11 18:05:19 +0000</creation_ts>
          <short_desc>DSA - Page request service is blocked by improper block_on_fault flag setting</short_desc>
          <delta_ts>2023-01-17 15:31:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>ANCK</classification>
          <product>ANCK 5.10 Dev</product>
          <component>drivers</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3-Medium</priority>
          <bug_severity>S3-normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="AubreyLi">aubrey.li</reporter>
          <assigned_to name="GuixinLiu">kanie</assigned_to>
          <cc>mqaio</cc>
    
    
    <cc>xlpang</cc>
          
          <qa_contact name="shuming">qingming.su</qa_contact>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>12465</commentid>
    <comment_count>0</comment_count>
    <who name="AubreyLi">aubrey.li</who>
    <bug_when>2023-01-11 18:05:19 +0000</bug_when>
    <thetext>The device may encounter a page fault on one of:
1) a Completion Record Address; 
2) the Descriptor ListAddress in a Batch descriptor; 
3) Readback address in a Drain descriptor;
4) a source buffer or destination buffer address. 

For the first three cases, the device blocks until the page fault is resolved, if PRS is enabled; otherwise it is reported as an error.

For the fourth case, the device can either block until the page fault is resolved or prematurely complete the descriptor and return a partial completion to the client, as specified by software.

The issue is caused by a nasty bug about block_on_fault flag.
 
Although block_on_fault flag is not needed on the host DMAtest as the host kernel page table won&apos;t be swapped out. But this flag is still needed for the guest DMAtest as the guest kernel page table could be. The current block_on_fault is set properly in DSA’s WQ config, but not in descriptor flag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12469</commentid>
    <comment_count>1</comment_count>
    <who name="AubreyLi">aubrey.li</who>
    <bug_when>2023-01-11 18:42:11 +0000</bug_when>
    <thetext>*** Bug 3712 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12472</commentid>
    <comment_count>2</comment_count>
    <who name="AubreyLi">aubrey.li</who>
    <bug_when>2023-01-11 18:44:23 +0000</bug_when>
    <thetext>*** Bug 3713 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12900</commentid>
    <comment_count>3</comment_count>
    <who name="maqiao">mqaio</who>
    <bug_when>2023-01-17 15:31:05 +0000</bug_when>
    <thetext>merged: https://gitee.com/anolis/cloud-kernel/pulls/1068</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>