Stephane Eranian wrote: > Avi, > > A couple of months back, we had a discussion about PMU virtualization > and the difficulty I encountered trying to catch the PMU interrupt > vector in kvm on VM-exit. KVM does not set ack_intr_on_intr. Would > you mind reminding me of the reason for this? > >
If we ack the interrupt, we have to dispatch it ourselves, most likely by faking an 'int $xx' instruction. By not acking the interrupt, we allow it do be delivered through the host IDT whether we are in guest mode or not. > On the topic of scheduler hooks for use by KVM, I think this > would help me also because it means I would not have to save > and restore the PMU registers on all VM-exit/VM-entry. At least > that is what I understood based on the discussion. Those registers > only need to be saved/restore when the KVM process is context switched. > If you want to monitor the guest, then I think you need to switch immediately on exit/entry, using the hardware msr switching mechanism. Otherwise, host events will be counted against the guest counters. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel