qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH RESEND v2] target/riscv: Set mstatus_hs.[SD|FS] bits if Clean


From: Richard Henderson
Subject: Re: [PATCH RESEND v2] target/riscv: Set mstatus_hs.[SD|FS] bits if Clean and V=1 in mark_fs_dirty()
Date: Sun, 19 Sep 2021 09:32:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/18/21 7:54 PM, Frank Chang wrote:
Do you mean it's better to change to code sequence to something like:

static void mark_fs_dirty(DisasContext *ctx)
{
     .....

     if (ctx->virt_enabled && ctx->mstatus_hs_fs != MSTATUS_FS) {
         /* Remember the stage change for the rest of the TB. */
         ctx->mstatus_hs_fs = MSTATUS_FS;
         .....
     }

     if (ctx->mstatus_fs != MSTATUS_FS) {
          /* Remember the state change for the rest of the TB.  */
         ctx->mstatus_fs = MSTATUS_FS;
         .....
      }
}

If so, I can update and send out the v3 patch.

Yes, something like that.

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]