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

FEXCore: Fixes the difference between CPL-0 and undefined instructions #3625

Merged
merged 2 commits into from
May 14, 2024

Conversation

Sonicadvance1
Copy link
Member

undefined instructions are expected to return SIGILL, while implemented
instructions that aren't available in CPL-3 are expected to SIGSEGV.

Noticed this while testing out CPU-Z, it installs a kernel module and
does a bunch of RDMSR and OUTS instructions. Decided to walk through
the rest of the instructions in the System Instruction Reference
section.

Turns out there's a bunch of oddities in there that we don't support.
First step is to go through all the explicitl SIGILL and SIGSEGV and
implement a test for them.

Next step will be implementing the remaining operations that are
considered "System" operations but are still available in CPL-3.
This list includes:

  • lar
  • lgdt
  • lsl
  • sidt
  • sldt
  • stac
  • clac
  • verr
  • verw

@Sonicadvance1 Sonicadvance1 force-pushed the restricted_inst branch 2 times, most recently from 358cfa0 to ad92d77 Compare May 12, 2024 19:44
@Sonicadvance1
Copy link
Member Author

@pmatos The clang-formatting github action isn't following the ignore patterns as expected for some reason. Looks like this path wasn't fully tested.

@pmatos
Copy link
Collaborator

pmatos commented May 12, 2024

@pmatos The clang-formatting github action isn't following the ignore patterns as expected for some reason. Looks like this path wasn't fully tested.

Hummm... Not great. My apologies. Let me look at it first thing in the morning.

@pmatos
Copy link
Collaborator

pmatos commented May 13, 2024

@pmatos The clang-formatting github action isn't following the ignore patterns as expected for some reason. Looks like this path wasn't fully tested.

Hummm... Not great. My apologies. Let me look at it first thing in the morning.

Fixing this now.

@pmatos
Copy link
Collaborator

pmatos commented May 13, 2024

@pmatos The clang-formatting github action isn't following the ignore patterns as expected for some reason. Looks like this path wasn't fully tested.

Hummm... Not great. My apologies. Let me look at it first thing in the morning.

Fixing this now.

See #3626 .

@Sonicadvance1 Sonicadvance1 force-pushed the restricted_inst branch 2 times, most recently from 3ff6b1f to 496f73a Compare May 13, 2024 18:08
undefined instructions are expected to return SIGILL, while implemented
instructions that aren't available in CPL-3 are expected to SIGSEGV.

Noticed this while testing out CPU-Z, it installs a kernel module and
does a bunch of `RDMSR` and `OUTS` instructions. Decided to walk through
the rest of the instructions in the `System Instruction Reference`
section.

Turns out there's a bunch of oddities in there that we don't support.
First step is to go through all the explicitl SIGILL and SIGSEGV and
implement a test for them.

Next step will be implementing the remaining operations that are
considered "System" operations but are still available in CPL-3.
This list includes:
- lar
- lgdt
- lsl
- sidt
- sldt
- stac
- clac
- verr
- verw
@Sonicadvance1 Sonicadvance1 merged commit efe7c54 into FEX-Emu:main May 14, 2024
11 checks passed
@Sonicadvance1 Sonicadvance1 deleted the restricted_inst branch May 14, 2024 14:11
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.

3 participants