Closed PandaZ3D closed 1 month ago
LGTM. Do you think the test you describe could be implemented as a test that could be run by the test harnesses? Doesn't have to be for this PR, but it'd be nice to have a basic "does upcall still work" test.
Yes, maybe? I would have to check this to make sure it does not interfere with other tests. The test is architecture specific since it modifies the upcall frame, so I would have to think a little more on how to make this test a little more generic. I can follow this up with another PR.
This PR implements basic queue and restore upcall operations for aarch64. The implementation largely follows the x86 version, only with differences due to the exception/interrupt handling paths.
Functionality was tested with a "simple" unmapped page test. The test writes to some region of memory that is not mapped, an exception is triggered in the kernel which is sent as an upcall, the upcall handler patches that address to some valid mapped region of memory, and the test then checks if the correct value was written and if the upcall handler modified some register state.
Now the ARM kernel can handle basic upcalls sent to user space. Switching to a supervisor stack is left for future work.