Comments (4)
If all the emitted code is messed around by the optimizer, it's difficult to do accurate signal handling -- how do we know the exact x86 register status in the guest sighandler when a signal is delivered?
But to my understanding, a peephole optimizer with accurate signal handling in mind is possible.
from box64.
If all the emitted code is messed around by the optimizer, it's difficult to do accurate signal handling -- how do we know the exact x86 register status in the guest sighandler when a signal is delivered?
But to my understanding, a peephole optimizer with accurate signal handling in mind is possible.
I think there is a trade-off for this situation, for some cases which doesn't care signal handling precision, user could get a performance improvement due to compiler optimization; otherwise one can disable the optimizations.
from box64.
The x86 cache behavior is another tricky thing. Box64 is designed to handle JIT inside Box64 JIT correctly. The x86 hardware automatically invalidates (instruction) cache line when corresponding memory location is written to without an explicit flush or fence instruction, which Box64 is trying to emulate. Therefore, Box64 protects the x86 code memory pages when generating its JIT code, so a SIGSEGV would be triggered when the x86 code mutates. This signal would be intercepted by Box64, and the JIT cache of the entire memory page where the signal emits will be marked as dirty. Current practice of generating one JIT code block for one continuous x86 code block leads to simpler integrity check.
from box64.
The x86 cache behavior is another tricky thing. Box64 is designed to handle JIT inside Box64 JIT correctly. The x86 hardware automatically invalidates (instruction) cache line when corresponding memory location is written to without an explicit flush or fence instruction, which Box64 is trying to emulate. Therefore, Box64 protects the x86 code memory pages when generating its JIT code, so a SIGSEGV would be triggered when the x86 code mutates. This signal would be intercepted by Box64, and the JIT cache of the entire memory page where the signal emits will be marked as dirty. Current practice of generating one JIT code block for one continuous x86 code block leads to simpler integrity check.
I think it's a common technique for SMC, in most DBT solutions, they also take it to handle SMC unless the hardware provides some supports, e.g. mmu could notify the BT when data cache changes to instr cache.
from box64.
Related Issues (20)
- A Snake's Tale - Unimplemented Opcode (48 0F 6E C0) HOT 2
- Slow NosTale performance on Mobox (Wine + box64 bundled for Android) HOT 5
- MangoHUD HOT 3
- Palworld Dedicated Server stopped loading HOT 3
- Minecraft bedrock server not lan-discoverable HOT 3
- Unimplemented 32bits Opcode (00 00 EB 09) 64 67 8F 06 00 00 83 C4 24 EB 1B 01 48 60 2C HOT 7
- Unimplemented 32bits Opcode (00 00 EB 09) 64 67 8F 06 00 00 83 C4 24 EB 1B 01 48 F0 1C HOT 1
- Unimplemented Opcode (B0 FF FF FF) 64 66 0F 6F 24 25 80 FF FF FF 64 66 0F 6F 1C HOT 4
- Stardew Valley not working on RPi 5 HOT 2
- starbound_server SIGSERV on a rk3588 arm64 HOT 3
- I cant run a java project
- Sniper elite 4 wont launch at all HOT 3
- Feature request: Support for binfmt-misc F flag
- Box64 with Dynarec v0.2.7 2f68df2b built on Mar 14 2024 06:33:20 is broken on dark soul 2 HOT 1
- Box64 new version bugs HOT 6
- Didn't detect 48bits of address space, considering it's 39bits HOT 3
- Graphic glitches in Warcraft 3 1.26 HOT 8
- Error running Beyond All Reason thru flatpak on m1 HOT 8
- allocatestack.c:472: allocate_stack: Assertion `size != 0' failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box64.