> We'd like to remove the assert_hvf_ok() calls, so adding more isn't > really helping. Anyhow, > > Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> > Tested-by: Philippe Mathieu-Daudé <phi...@linaro.org>
What is the preferred method going forward? Apple designed the HV API to be able to fail at every function, and it's rarely something that can be recovered from. In [PATCH v4 04/15] of this series, we saw an issue that was hidden because the return code was not properly checked (not calling from the owning thread). Previously, I submitted a patch (d5bd8d8267) for the same issue, because Apple had changed a function's behavior. This was caught by an assert_hvf_ok. I agree with you, that generally adding asserts is a bad design, but at the same time, HV is designed in a way, that the code would be littered with checks otherwise.