kvm_walk_pages did not work at all on amd64. Fixed it so that it correctly accesses the bitmap instead of going past it's length.
submitted by: Bora Ozarslan firstname.lastname@example.org
emaste on Feb 13 2019, 9:21 PM.Authored by
Will should really review this since he added this API.
For the first part of the the hunk, the current code invokes a single callback for each superpage passing in the length of the superpage. The patch just splits this up into 512 4K calls instead. I think the old code there is probably more correct and efficient even though the comment is stale and implies the loop used by the new code. I think the kvm_bitmap_next changes are the actual fixes?
Thanks for the add!
Yes, the comment is obviously stale, from a much earlier version of the implementation. I think the patch should instead fix the comment. Requesting this change.
Yes. I think this part of the change is correct (though I prefer the constant vs bare 8s). *idx and first_invalid were meant to use bits as units. It seems the correctness of the previous version was not properly validated. Thanks!