Re: [PATCH] x86/tdx: Override the tsc calibration for TDX VMs

From: Dave Hansen
Date: Fri Oct 06 2023 - 11:43:06 EST


On 10/6/23 08:27, Vishal Annapurve wrote:
>> Would it be possible to do this by refactoring the existing code and
>> calling it directly instead of copying and pasting so much?
> One option is to call native_calibrate_tsc from tdx_calibrate_tsc and
> undo the lapic_timer_period configuration after the call. Does that
> sound reasonable?

That sounds like a hack.

Why not just refactor the code properly?