[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Query regarding Iotrhead
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] Query regarding Iotrhead |
Date: |
Mon, 3 Feb 2014 15:49:21 +0100 |
On Mon, Feb 3, 2014 at 1:57 PM, Ayaz Akram <address@hidden> wrote:
> While debugging using gdb, I found that the interrupt related flow is not
> handled in io thread i.e. on using info thread, I found: Thread 2(iothread)
> is at __lll_lock_wait() while Thread 1 is at qemu_set_irq(in irq.c)..
> Initially I thought that this interrupt related
> code(kbd_update_irq--->qemu_Set_irq......) should be handled through
> iothread(event loop).. Can u help me regarding this
When guest code accesses a hardware register, the currently executing
vcpu thread looks up the device and calls the function to emulate I/O
access for the device. If this function calls qemu_set_irq() then the
interrupt will be raised from the vcpu thread.
Here are some examples where this can happen:
hw/input/pckbd.c:kbd_write_command()
hw/input/pckbd.c:kbd_write_data()
In other words, the guest is accessing the keyboard controller and the
emulation code raises a interrupt when a particular register is being
accessed.
PS: If you want to ask questions in real-time, please use #qemu on
irc.oftc.net. Don't send private emails begging for help.
Stefan