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 borako.ozarslan@gmail.com
Differential D19183
libkvm: Fix the kvm_walk_pages in amd64 emaste on Feb 13 2019, 9:21 PM. Authored by Tags None Referenced Files
Details 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 borako.ozarslan@gmail.com
Diff Detail
Event Timeline
Comment Actions 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? Comment Actions 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!
Comment Actions Limit to just the _kvm_bitmap_next changes, restoring use of CHAR_BIT.
|