LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-24-2017, 09:56 AM   #1
ciraci.nicolo
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


Hi,

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.

Code:
static int handle_rdtsc(struct kvm_vcpu *vcpu) {
 	skip_emulated_instruction(vcpu);
        return 1;
}
 
  


Reply


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 2.6.8.53 bshan85 Linux - Newbie 7 06-03-2009 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:52 AM.

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