Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparation plan for increasing minimum requirements to require FEAT_FLAGM/ARMv8.4-a #4120

Open
Sonicadvance1 opened this issue Oct 15, 2024 · 2 comments

Comments

@Sonicadvance1
Copy link
Member

Sonicadvance1 commented Oct 15, 2024

  • Note: This is will likely happen in the middle of 2025.

Currently FEX supports back to ARMv8.0-a, which has been a maintenance burden that can be both frustrating and slow to support. Once we increase minspec to FEAT_FLAGM, this effectively increases our minspec to ARMv8.4-a. So choosing ARMv8.4-a is actually the sane option. This would basically increase FEX's minimum CPU requirements to support hardware released in 2019-2021, so at least four year old hardware by time this change actually ends up in FEX.

Unique codepaths in FEX for things below v8.4:

  • Flags handling
    • FEAT_FLAGM adds support for accelerating x86 flags emulation
  • FEAT_LSE - Atomic memory operations
    • Everything uses load-exclusive, store-exclusive on v8.0.
    • Complicates our unaligned atomic handling
  • FEAT_LRCPC and FEAT_LRCPC2
    • Accelerates x86 memory model (even if it isn't very good)
    • Changes load/store atomic in to equivalent LRCPC instructions
  • FEAT_LSE2
    • Supports unaligned atomics inside a 16-byte granularity
    • Just like FEAT_LSE improved atomics, this improves unaligned atomics
    • Can reduce complications in FEX's unaligned atomic handlers
  • A few misc things.

Performance wise, without these extensions x86 emulation is either slow (atomics) or buggy (TSO emulation disabled) so supporting things older aren't fundamentally interesting and causes us maintenance and financial (CI) burden.

Performance considerations show that while some of this deprecated hardware can play lighter games, the performance for anything remotely heavily isn't very interesting.

What hardware would this change cause FEX to no longer support?

  • CPUs:

    • ARM: Cortex-A57 through Cortex-A78
  • SoCs:

    • Apple: Nothing (FEX only supports devices with M1 or newer, which is v8.4-a or newer)
    • Qualcomm mobile: Snapdragon 888 and older
    • Qualcomm Compute: 8cx Gen 3 (Latest generation before Oryon/X1E)
    • Samsung: Exynos 2100 and older
    • NVIDIA: Orin and older (Thor in 2025 will be first Jetson. Grace is fine)
    • Rockchip: Everything
    • Raspberry Pi: Everything
    • Amlogic: Everything
    • Ampere: Altra

What hardware will still be available to use FEX with after this change?

  • Apple: All "Apple Silicon" M series
  • Ampere: AmpereOne
  • NVIDIA: Thor (2025), and Grace
  • Snapdragon mobile: Snapdragon 8 Gen 1 and newer
  • Snapdragon Compute: X Elite
  • Samsung: Exynos 2200 and newer
  • Rockchip: RK3688 (Will be shipping a Cortex-A7xx CPU in likely 2025)
  • Amlogic: Nothing today
  • Pi: Nothing today
@CalcProgrammer1
Copy link

Will old FEX remain available for use? This cuts off almost all consumer ARM devices that people would be running Linux on except for Apple Silicon. I've been experimenting with FEX on postmarketOS devices and quite a few games are playable on it (SDM845, SM8250). I think I got some of the pmOS developers interested in putting together some sort of official FEX install method to make it easier to bring Steam and other games to phones and tablets. I get that there are issues that the newer architecture resolves, but this seems like it would cut off the majority of current devices. Therefore I would at least like to see a legacy branch that can still be kept around. Have you considered accepting donations to help with the financial burden here? I know I've looked in the past to donate but wasn't able to find a means to do so.

@Sonicadvance1
Copy link
Member Author

Old FEX will always remain available. We're an open source project after all.
We don't accept donations, the financial note is mostly a funny joke about how much my electricity bill is each month.

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

No branches or pull requests

2 participants