VT-x and Performance counter interrupt in KVM mode
I am trying to capture in vmx.c the hardware performance counter(PMU) interrupt of a i386 Linux kernel running with perfmon on a Core 2 Duo machine running with kvm-15. host is running kvm with VT-x in x86-64 mode.
The PMU interrupt is programmed in the APIC LVT entry (set to 0xee)by the guest OS. Similarly, an IDT entry connects the interrupt vector to the interrupt handler.
I am not able to catch, in kvm, the PMU interrupt happening in VMX non-root mode. It does not seem to appear in the VM-exit interruption information nor in the IDT-vectoring information. It does not seem to be caught by any of the exit handlers yet the host PMU interrupt handler catches it which is not what we want.
Any idea on what is going on with this interrupt?
Thanks
shobha
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 8 lines · Shobha Ranganathan
I am trying to capture in
vmx.cthe hardware performance counter(PMU) interrupt of a i386 Linux kernel running with perfmon on a Core 2 Duo machine running with kvm-15. host is running kvm with VT-x in x86-64 mode.The PMU interrupt is programmed in the APIC LVT entry (set to 0xee)by the guest OS.
On stock kvm, the guest os programs a virtual apic that lives in qemu, not the real apic, so it would never cause any interrupt. Are you running with a modified kvm that allows the guest to touch the real apic?
Quoted 11 lines
Similarly, an IDT entry
connects the interrupt vector to the interrupt handler.
I am not able to catch, in kvm, the PMU interrupt happening in VMX non-root mode. It does not seem to appear in the VM-exit interruption information nor in the IDT-vectoring information. It does not seem to be caught by any of the exit handlers yet the host PMU interrupt handler catches it which is not what we want.
Quoted 2 lines
Any idea on what is going on with this interrupt?
It looks completely normal, assuming the host also programmed the timer to the same vector. Look in qemu/hw/apic.c to find your missing interrupt.
Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 18 lines
I am trying to capture in
vmx.cthe hardware performance counter(PMU) interrupt of a i386 Linux kernel running with perfmon on a Core 2 Duo machine running with kvm-15. host is running kvm with VT-x in x86-64 mode.The PMU interrupt is programmed in the APIC LVT entry (set to 0xee)by the guest OS. Similarly, an IDT entry connects the interrupt vector to the interrupt handler.
I am not able to catch, in kvm, the PMU interrupt happening in VMX non-root mode. It does not seem to appear in the VM-exit interruption information nor in the IDT-vectoring information. It does not seem to be caught by any of the exit handlers yet the host PMU interrupt handler catches it which is not what we want.
Quoted 1 line
Any idea on what is going on with this interrupt?
It cannot just work by itself. You need to virtualize it. You need to handle the RDPMC action in the guest and virtualize it on the host. When the host will get interrupted (running in non-vmx root mode) you'll need to inject the irq back to the guest. Also note that you'll need to save the PMC state for each guest on the host side.
Quoted 8 lines
Thanks
shobha_______________________________________________________________________
____
Quoted 6 lines
_________
Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html-----------------------------------------------------------------------
--
Quoted 5 lines
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
EV
Quoted 4 lines
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV