Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 10-24-2017, 09:56 AM   #1
LQ Newbie
Registered: Oct 2017
Posts: 1

Rep: Reputation: Disabled
Extending KVM handling for RDTSC instruction on Debian Linux 9.2, kernel version 4.9


I'm working to add RDTSC VMExit handler to KVM, for academic purposes. I'm able to edit VM Execution structures and handling (code below) unfortunately my VM machine get stuck after grub. I think there is something wrong about how I increment the RIP to get over the VMExit in protected mode. Do you have some info about VMExit handlers?

From Intel SDM you can learn that "If the VM exit occurs due to by an attempt to execute an instruction that causes VM exits unconditionally or that has been configured to cause a VM exit via the VM-execution controls, the value saved references that instruction." so, if I don't edit the RIP we'll get in a VMExit loop.

static int handle_rdtsc(struct kvm_vcpu *vcpu) {
        return 1;


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Signal handling in QEMU with KVM Jaehyuklee Linux - Virtualization and Cloud 1 11-15-2014 03:20 PM
[SOLVED] Debian KVM kernel panic khronosschoty Linux - Virtualization and Cloud 1 06-27-2013 04:53 PM
About Intel CPU rdtsc instruction lonelygoat Programming 5 01-29-2010 12:47 AM
interrupt handling problem in kernel version bshan85 Linux - Newbie 7 06-03-2009 10:21 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration