On 7/19/21 2:39 AM, Peter Maydell wrote:
This cast is OK, but it took me a while to verify that:
* we check that 'addr' is 8-aligned further up in this function
* we check that guest_base is at least page-aligned in
probe_guest_base(), and there's no way to avoid that function
getting called if you specify a guest-base value on the command line
Yep.
Is it worth asserting that the value we get back from g2h() really
is 8-aligned before casting ?
No, I don't think so. I think the check on the guest address is sufficient, and Just Know
that guest_base is not going to misalign anything.
r~