qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] question about irq update
@ 2012-06-15  8:42 Zhi Hui Li
  2012-06-15  9:04 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Zhi Hui Li @ 2012-06-15  8:42 UTC (permalink / raw)
  To: QEMU-devel, Kevin Wolf



In the code of libqtest.c have a function :



bool qtest_get_irq(QTestState *s, int num)
{
     /* dummy operation in order to make sure irq is up to date */
     qtest_inb(s, 0);

     return s->irq_level[num];
}

but I don't know how it can make the irq up to date
and why we will read from the address of 0 ?


can anybody explain for me?
Thank you very much!

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

* Re: [Qemu-devel] question about irq update
  2012-06-15  8:42 [Qemu-devel] question about irq update Zhi Hui Li
@ 2012-06-15  9:04 ` Paolo Bonzini
  2012-06-15  9:11   ` Zhi Hui Li
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2012-06-15  9:04 UTC (permalink / raw)
  To: Zhi Hui Li; +Cc: Kevin Wolf, QEMU-devel

Il 15/06/2012 10:42, Zhi Hui Li ha scritto:
> 
> bool qtest_get_irq(QTestState *s, int num)
> {
>     /* dummy operation in order to make sure irq is up to date */
>     qtest_inb(s, 0);
> 
>     return s->irq_level[num];
> }
> 
> but I don't know how it can make the irq up to date
> and why we will read from the address of 0 ?

It just forces libqtest to read any pending events.

Paolo

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

* Re: [Qemu-devel] question about irq update
  2012-06-15  9:04 ` Paolo Bonzini
@ 2012-06-15  9:11   ` Zhi Hui Li
  0 siblings, 0 replies; 3+ messages in thread
From: Zhi Hui Li @ 2012-06-15  9:11 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Kevin Wolf, zhihuili, QEMU-devel

On 2012年06月15日 17:04, Paolo Bonzini wrote:
> It just forces libqtest to read any pending events.

Ok, Thank you very much!  :)

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

end of thread, other threads:[~2012-06-15  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-15  8:42 [Qemu-devel] question about irq update Zhi Hui Li
2012-06-15  9:04 ` Paolo Bonzini
2012-06-15  9:11   ` Zhi Hui Li

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).