kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* KVM Irq injection
@ 2009-07-21 15:57 Saksena, Abhishek
  2009-07-21 17:16 ` Gleb Natapov
  0 siblings, 1 reply; 2+ messages in thread
From: Saksena, Abhishek @ 2009-07-21 15:57 UTC (permalink / raw)
  To: kvm@vger.kernel.org




Hi,
I am building some device models around the KVM and am intersted in injecting IRQs.

The current LibKVM.h provides following function

int kvm_inject_irq      (       kvm_context_t<file:///C:/Documents%20and%20Settings/asaksena/Desktop/march_onwards/kvmsocket/doc/htmlkvm/structkvm__context.html>       kvm,
                int     vcpu,
                unsigned        irq
        )

Simulate an external vectored interrupt.

This allows you to simulate an external vectored interrupt.

Parameters:
        kvm     Pointer to the current kvm_context<file:///C:/Documents%20and%20Settings/asaksena/Desktop/march_onwards/kvmsocket/doc/htmlkvm/structkvm__context.html>
        vcpu    Which virtual CPU should get dumped
        irq     Vector number

Returns:
0 on success

My question is if I am say Injecting IRQ on pin 0 on PIC how do I get croosponding vector? I am using KVM's interrupt controllers.



I also see another function



int kvm_set_irq_level ( kvm_context_t<file:///C:/Documents%20and%20Settings/asaksena/Desktop/march_onwards/kvmsocket/doc/htmlkvm/structkvm__context.html>  kvm, int  irq, int  level  )



Can this be used safely to inject IRQ- I am gusseing irq refers to the pin and Level the value of that pin. How do I tell with this function which CPU I want to inject interrupt?



-Abhishek

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

end of thread, other threads:[~2009-07-21 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 15:57 KVM Irq injection Saksena, Abhishek
2009-07-21 17:16 ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).