On 25/05/2016 01:35, yunhong jiang wrote: >> > Does this interact correctly with TSC scaling? IIUC this programs the >> > VMX preemption timer with a delay in guest cycles, rather than host >> > cycles. > Aha, good point, thanks! > > But I re-checked the lapic.c and seems this issue has never been considered? > Check http://lxr.free-electrons.com/source/arch/x86/kvm/lapic.c#L1335 This is a bug indeed. The simplest fix would be to ignore lapic_timer_advance_ns when TSC scaling is in use. > and lxr.free-electrons.com/source/arch/x86/kvm/lapic.c#L1335 You copied the wrong URL, but at least lines 1383-1410 seem okay to me. > for example. Also I > tried to find a function to translate guest tsc to host tsc and didn't find > such function at all. See my other reply. Thanks, 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