Skip to content

fix(mmu): adjusting the timing of non-virt PBMT assignments#988

Merged
Anzooooo merged 1 commit intomasterfrom
0305-nc
Mar 10, 2026
Merged

fix(mmu): adjusting the timing of non-virt PBMT assignments#988
Anzooooo merged 1 commit intomasterfrom
0305-nc

Conversation

@Anzooooo
Copy link
Copy Markdown
Member

@Anzooooo Anzooooo commented Mar 5, 2026

We have already assigned a value to cpu.pbmt at the end of gpa_stage. It should not be reassigned, as this will cause it to be overwritten incorrectly:

}
word_t pg_mask = ((1ull << SVNAPOTSHFT) - 1);
pg_base = (pg_base & ~pg_mask) | (gpaddr & pg_mask & ~PGMASK);
}
cpu.pbmt = pte.pbmt;
return pg_base | (gpaddr & PAGE_MASK);
}
}
raise_guest_excep(gpaddr, vaddr, trap_type, is_support_vs);
return gpaddr;
}
#endif // CONFIG_RVH

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

NEMU Performance Results

Test Instructions Executed Estimated Host Throughput (instr/s) Actual NEMU Throughput (instr/s)
bitmanip.bin 5.147e+07 2.691e+07 2.495e+07
coremark-riscv64-xs-rv64gc-o2.bin 1.731e+08 1.938e+08 1.732e+08
coremark-riscv64-xs-rv64gc-o3.bin 1.726e+08 1.967e+08 1.699e+08
coremark-riscv64-xs-rv64gcb-o3.bin 1.697e+08 1.788e+08 1.555e+08
amtest-riscv64-xs.bin 8.673e+06 1.830e+07 1.164e+07
aliastest-riscv64-xs.bin 7.697e+06 1.788e+06 2.814e+06
softprefetchtest-riscv64-xs.bin 7.744e+06 3.413e+06 5.600e+06
zacas-riscv64-xs.bin 1.212e+07 5.340e+07 1.439e+07
linux-hello 1.854e+10 4.069e+07 4.609e+07
  • Host throughput is estimated based on 4GHz CPU frequency and IPC=2.5.
  • Actual throughput may vary based on the host CPU performance.

Copy link
Copy Markdown
Member

@cebarobot cebarobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Anzooooo Anzooooo merged commit 52beb5d into master Mar 10, 2026
27 of 28 checks passed
@Anzooooo Anzooooo deleted the 0305-nc branch March 10, 2026 08:27
Gs-ygc pushed a commit to Gs-ygc/NEMU that referenced this pull request Mar 17, 2026
…gShan#988)

We have already assigned a value to cpu.pbmt at the end of gpa_stage. It should not be reassigned, as this will cause it to be overwritten incorrectly:
https://github.com/OpenXiangShan/NEMU/blob/112f2fd1e68d1c8978f964f6a2846104dcd928e8/src/isa/riscv64/system/mmu.c#L371-L382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants