While measuring the number of exits to OpenSBI on the Premier P550 we found out the page faults are not delegated to S-mode.
This incurs a huge performance penalty for us (as we virtualize OpenSBI) which is why we started investigating, but it also slows down standard deployments especially workloads that induces frequent page faults.
It seems this is caused by the missing default feature SBI_PLATFORM_DEFAULT_FEATURES here:
https://github.com/sifive/meta-sifive/blob/b954d91f654a53068d1c846dffd800bfe6bd37d0/recipes-bsp/opensbi/opensbi-sifive-hf-prem/0001-platform-Add-ESWIN-EIC770x-platform.patch#L373
Which in turns makes sbi_platform_has_mfaults_delegation evaluate to false and thus OpenSBI to not delegate page faults.
The Premier P550 can delegate page faults, so that seems like simple oversight.
Summary
While measuring the number of exits to OpenSBI on the Premier P550 we found out the page faults are not delegated to S-mode.
This incurs a huge performance penalty for us (as we virtualize OpenSBI) which is why we started investigating, but it also slows down standard deployments especially workloads that induces frequent page faults.
It seems this is caused by the missing default feature
SBI_PLATFORM_DEFAULT_FEATUREShere:https://github.com/sifive/meta-sifive/blob/b954d91f654a53068d1c846dffd800bfe6bd37d0/recipes-bsp/opensbi/opensbi-sifive-hf-prem/0001-platform-Add-ESWIN-EIC770x-platform.patch#L373
Which in turns makes
sbi_platform_has_mfaults_delegationevaluate to false and thus OpenSBI to not delegate page faults.The Premier P550 can delegate page faults, so that seems like simple oversight.
Summary
rel/meta-sifive/hifive-premier-p550Replace https://github.com/sifive/meta-sifive/blob/b954d91f654a53068d1c846dffd800bfe6bd37d0/recipes-bsp/opensbi/opensbi-sifive-hf-prem/0001-platform-Add-ESWIN-EIC770x-platform.patch#L373
With:
+ .features = SBI_PLATFORM_DEFAULT_FEATURES,