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

Implement SPU page faults, Synchronization fixes #5668

Merged
merged 1 commit into from Mar 12, 2019

Conversation

Projects
None yet
8 participants
@elad335
Copy link
Contributor

elad335 commented Feb 17, 2019

  • Implement SPU page fault notifications
  • Fixes related to page faults are described in the commit.

Fixes saving issues in Grand Turismo 5 and Grand Turismo 6.
Allows Gran Turismo 6 to go ingame.
Fixes #5350

@elad335 elad335 force-pushed the elad335:master branch from a31e53e to 567c6cc Feb 17, 2019

@elad335 elad335 changed the title Implement spu page faults, synchronization fixes Implement spu page faults, synchronization fixes [WIP] Feb 17, 2019

@elad335 elad335 force-pushed the elad335:master branch from 567c6cc to 19f72df Feb 17, 2019

@elad335 elad335 changed the title Implement spu page faults, synchronization fixes [WIP] Implement spu page faults, synchronization fixes Feb 17, 2019

@elad335 elad335 force-pushed the elad335:master branch 2 times, most recently from fe941b5 to 5b8d7c3 Feb 17, 2019

@jenci8888

This comment has been minimized.

Copy link

jenci8888 commented Feb 17, 2019

GT5 with save
image
RPCS3-GT5.log.gz
(this can go ingame in any tracks or cars, but some tracks spams RSX log)

GT6 with save
image
RPCS3-GT6.log.gz
(This can't go ingame due to entire broken render or couldn't load from track or car)

@uaqlover

This comment has been minimized.

Copy link

uaqlover commented Feb 17, 2019

could it fix #5458 ?

and nice work elad335

@Kravickas

This comment has been minimized.

Copy link
Contributor

Kravickas commented Feb 17, 2019

Elad how it can fix skyrim, is it about race conditions since i had no problem with saves ?

@elad335 elad335 force-pushed the elad335:master branch 2 times, most recently from 73c55e9 to 8db6ed0 Feb 18, 2019

@elad335

This comment has been minimized.

Copy link
Contributor Author

elad335 commented Feb 18, 2019

@uaqlover No, the issue there is caused by something else.
@Kravickas It could be, the race fixes is what fixed GT5 saves.

@elad335 elad335 force-pushed the elad335:master branch 7 times, most recently from 63a328b to 230bfa5 Feb 18, 2019

@jenci8888

This comment has been minimized.

Copy link

jenci8888 commented Feb 18, 2019

Good job, Elad! GT6 goes ingame further!
image

@elad335 elad335 force-pushed the elad335:master branch from 230bfa5 to 23a4791 Feb 18, 2019

@ruthan

This comment has been minimized.

Copy link

ruthan commented Feb 18, 2019

Elad how it can fix skyrim, is it about race conditions since i had no problem with saves ?

With which version of emulator is Skyrim Save/Load working for you? Im testing it continually from time to time and not sucess, so far.
I always create new save with new emulator version, to be sure that not old saves are corrupted. Which version of Skyrim, do you have? I have BLUS31202

@Kravickas

This comment has been minimized.

Copy link
Contributor

Kravickas commented Feb 19, 2019

BLUS30778, we talked somewhere about it. I think in skyrim it was never broken for me.

@ruthan

This comment has been minimized.

Copy link

ruthan commented Feb 19, 2019

BLUS30778, we talked somewhere about it. I think in skyrim it was never broken for me.

Its standard vs. Legendary edition (Legendary is broken).

@elad335

This comment has been minimized.

Copy link
Contributor Author

elad335 commented Feb 19, 2019

@ruthan @Kravickas Please move this discussion to the issue itself unless its related to the PR's effects on it.

@kd-11 kd-11 requested a review from Nekotekina Feb 20, 2019

@micaelis72

This comment has been minimized.

Copy link

micaelis72 commented Feb 22, 2019

Elad,

This PR makes Star Ocean The Last Hope [MRTC00001] to start and play the intro movie.
It doesn't go ingame yet.

Follow the logs. I hope it helps improve the PR further and turn this game ingame.

Cheers!

RPCS3.log.gz

@elad335

This comment has been minimized.

Copy link
Contributor Author

elad335 commented Feb 22, 2019

@micaelis72 Your log is corrupt, I cant open it.

@micaelis72

This comment has been minimized.

Copy link

micaelis72 commented Feb 22, 2019

Elad,

I'm sending the *.log directly. It's small, so not a big concern.

I hope it helps,

Cheers

RPCS3 .log

@elad335

This comment has been minimized.

Copy link
Contributor Author

elad335 commented Feb 22, 2019

@micaelis72 I'm not seeing any page fault related messages in log, is it working on latest master? could have been fixed very recently.

@frymezim

This comment has been minimized.

Copy link

frymezim commented Feb 22, 2019

@elad335
Intro was working for 2 months now, but it never get to ingame. not even related to this pr.

@micaelis72

This comment has been minimized.

Copy link

micaelis72 commented Feb 23, 2019

In my test on Linux (Fedora), master wasn't allowing go intro with Star Ocean. This PR, yes.
I'm mainly testing RPCS3 in Linux, so maybe some games works on Windows and not in Linux.

I'll look if some game that doesn't work on Linux works in Windows next time.

@elad335 elad335 changed the title Implement spu page faults, synchronization fixes Implement SPU page faults, Synchronization fixes Mar 5, 2019

@elad335 elad335 force-pushed the elad335:master branch 8 times, most recently from cf34eb9 to 5a1df6f Mar 6, 2019

@elad335 elad335 force-pushed the elad335:master branch 2 times, most recently from 66e831f to 7be6b1a Mar 10, 2019

Implement SPU page faults notifications
* Implement both RawSPU and threaded SPU page fault recovery
* Guard page_fault_notification_entries access with a mutex
* Add missing lock in sys_ppu_thread_recover_page_fault/get_page_fault_context
* Fix EINVAL check in sys_ppu_thread_recover_page_fault, previously when the event was not found begin() was erased and
CELL_OK was returned.
* Fixed page fault recovery waiting logic:
- Do not rely on a single thread_ctrl notification (unsafe)
- Avoided a race where ::awake(ppu) can be called before ::sleep(ppu) therefore nop-ing out the notification
* Avoid inconsistencies with vm flags on page fault cause detection
* Fix sys_mmapper_enable_page_fault_notification EBUSY check
from RE it's allowed to register the same queue twice (on a different area) but not to enable page fault notifications twice

@elad335 elad335 force-pushed the elad335:master branch from 7be6b1a to 17566db Mar 11, 2019

@Nekotekina Nekotekina merged commit 4a28319 into RPCS3:master Mar 12, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.