On 13/05/2015 01:56, Bandan Das wrote: > I think it's ok just to replace the offset number with a name. > If you are concerned about readability, we could probably wrap the > "for loops" in the math calculations with a more serious sounding macro > eg. "#define foreach_smm_offset(val, start_offset, jump, count)" :) That doesn't help. The problem is that the for loops assume that you know that the offsets are at a constant distance, plus the distance. This is already not trivial for the registers (is RAX at the highest or lowest offset); but it could even be worse than hardcoded offsets for selectors and descriptor caches. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html