James Jacobsson wrote:
> I've started writing a simulation environment based on KVM, and so far
> everything is working as expected.
> However, I've reached a point where I need to start simulating the
> 8259A PIC, and I can't really seem to grasp how the interrupts are to
> be simulated in KVM.
>
> kvm_inject_irq() takes a vector-number as an input. I'm assuming this
> is a reference to the IDT, i.e, if I kvm_inject_irq(kvm,0,63), IDT
> entry #63 will be called.
>   

Yes.

> So, is it safe to assume that kvm_inject_irq(kvm,0,63) will call IDT
> entry #63 immediately (assuming IF is set correctly), 

In general yes.  The processor will go through the steps described in 
the Intel manual for the 'int' instruction.  Note that interrupt 
injection may fail for a number of reasons (for example, a fault during 
reading the idt entry).

> and that the IRQ
> should be considered serviced when the CPU executes "outb 0x20,0x20"
> to IAK the PIC ?
>   

Yes.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to