Petersson, Mats
2007-May-18 11:53 UTC
[Xen-devel] [PATCH][SVM]Replace call to svm_load_cr2 with conditional call to svm_trace_vmentry
The attached patch removes the call to svm_load_cr2 (which doesn''t do anything useful, unless someone can see something useful in setting host CR2 to equal the guest CR2!). The old svm_load_cr2 is now replaced with a svm_trace_vmentry (as a side-effect of svm_load_cr2 was that it traced the "vmentry". A call to this function is done if "tb_init_done" is non-zero, so we don''t call this unless it''s actually being used. I have tested this in x86_64, including tracing and checking that the VMENTRY traces do come out when enabled. The x86_32 code is compile-tested only. Keir: If you prefer to solve this with the "Intel equivalent" and remove the "tb_init_done" check, feel free to do so. I''m sure this doesn''t save that many clock-cycles, but it''s in the frequently used code-path, so even small savings are worth having, I think. As another option, the whole piece of code could be conditional on DO_HVM_TRC_VMENTRY - but that''s probably overkill at the moment. A further step would of course be to use a common hvm_trace_vmentry funtion, as there are now two identical funcitons. Let me know if you want me to take that extra step. Signed off by: Mats Petersson <mats.petersson@amd.com> -- Mats _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel