Hi Peter, Many thanks for the pointer. I came across this post yesterday, which is also useful: http://www.mail-archive.com/kvm@xxxxxxxxxxxxxxx/msg23659.html Thanks again, On 18 October 2011 19:02, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote: > Part of the emulation are done in arch/x86/kvm/emulate.c: em_rdtsc(), > and part of it are done in the arch/x86/kvm/vmx.c where u have to do > VMX transition between guest and host, as RDTSC is one of those > special instruction which will trigger a hardware VMX exit condition. > To see all other VMX exiting condiiton just grep for _EXITING in > vmx.c. > > Perhaps u want to refer to this: > > http://www.mail-archive.com/kvm@xxxxxxxxxxxxxxx/msg40047.html > > On Wed, Oct 19, 2011 at 9:01 AM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote: >> >> Part of the emulation are done in arch/x86/kvm/emulate.c: em_rdtsc(), and part of it are done in the arch/x86/kvm/vmx.c where u have to do VMX transition between guest and host, as RDTSC is one of those special instruction which will trigger a hardware VMX exit condition. To see all other VMX exiting condiiton just grep for _EXITING in vmx.c. >> Perhaps u want to refer to this: >> http://www.mail-archive.com/kvm@xxxxxxxxxxxxxxx/msg40047.html >> >> On Tue, Oct 18, 2011 at 1:22 AM, Vimal <j.vimal@xxxxxxxxx> wrote: >>> >>> Hi, >>> >>> I am using qemu+kvm to run Linux guests. I would like to >>> programmatically modify the behaviour of rdtsc instruction for the >>> guest by trapping and emulating it. Is there any documentation / >>> pointers on how I can proceed? I tried searching for it but in vain. >>> >>> Thanks, >>> -- >>> Vimal >>> -- >>> 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 >> >> >> >> -- >> Regards, >> Peter Teoh > > > > -- > Regards, > Peter Teoh > -- Vimal -- 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