On 11/07/18 14:29, Jan Beulich wrote: > This isn't as much of an optimization than to avoid triggering a gcc bug > affecting 5.x ... 7.x, triggered by any asm() put inside the ad hoc > "rewalk" loop and taking as an (output?) operand a register variable > tied to %rdx (an "rdx" clobber is fine). The issue is due to an apparent > collision in register use with the modulo operation in vtlb_hash(), > which (with optimization enabled) involves a multiplication of two > 64-bit values with the upper half (in %rdx) of the 128-bit result being > of interest. > > Such an asm() was originally meant to be implicitly introduced into the > code when converting most indirect calls through the hvm_funcs table to > direct calls (via alternative instruction patching); that model was > switched to clobbers due to further compiler problems, but I think the > change here is worthwhile nevertheless. > > Signed-off-by: Jan Beulich <jbeul...@suse.com>
It scares me how many compiler bugs get found with work like this. As for the change itself, I agree that it is worthwhile irrespective of toolchain issues. Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel