All of lore.kernel.org
 help / color / mirror / Atom feed
* Recommended way access KVM data structures from other kernel subsystems ?
@ 2012-08-23  7:49 Pandarathil, Vijaymohan R
  2012-09-03  9:26 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Pandarathil, Vijaymohan R @ 2012-08-23  7:49 UTC (permalink / raw)
  To: kvm@vger.kernel.org

Hi,

I am looking for the recommended approach for accessing KVM driver data from other kernel components. In my case, I need to set some global variable/state in KVM driver from one of the NMI handlers.  I see that using kvm_x86_ops is one option. I can define a new function as part of kvm_x86_ops and invoke that function from the NMI handler as below.

nmi_handler() {

...
       If (kvm_x86_ops) {
		kvm_x86_ops->new_fn();

}

after adding new_func() to struct kvm_x86_ops.

Is this the right approach ? Or is there some other existing mechanism ? Is KVM driver always loaded ?
I am fairly new to KVM and so any guidance is very much appreciated.

Thanks

Vijay

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-03  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23  7:49 Recommended way access KVM data structures from other kernel subsystems ? Pandarathil, Vijaymohan R
2012-09-03  9:26 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.