[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IRQ question
Re: IRQ question
Fri, 12 Feb 2021 07:04:42 +0100
Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:4.7) Goanna/20201222 Interlink/52.9.7661
On 2021-02-07 15:39, Weiss, Howard wrote:
I am running QEMU on Ubuntu. My target system runs Windows 10. I am
writing a simulated device to test the a Windows device driver
If my Windows device driver is at interrupt level when it invokes my
simulated device (eg reads/writes a port) does the code in my
simulated device also run ar interrupt level?
The Windows IRQL is a variable in the Windows per CPU scheduler
code, it controls reentrancy of kernel mode Windows code (inside
the virtual machine). Traditionally, it is not exposed in a
(virtual) hardware register that qemu could easily monitor,
though there might be a HyperV PV interface to expose it.
If a Windows kernel mode device driver issues an I/O to a (virtual)
IO-space or memory-mapped I/O port, the (virtual) hardware would
normally react in the background on its own (virtual) hardware
time, later causing something to happen outside the (virtual) CPU,
which may at any later time cause a (virtual) input change, such
as an I/O port getting a different value, a bus master device
writing to (virtual) RAM or a (virtual) interrupt being sent
through the (virtual) interrupt controller. That in turn would be
picked up by either polling code in the Windows driver, or the
Windows kernel invoking the driver to handle the event.
So in short, a virtual device wouldn't know or care if the Windows
kernel was at any particular IRQL when the virtual I/O port is
signalled to do something, but the Windows driver would be designed
to do certain things to the virtual device at specific IRQL to avoid
certain race conditions against itself.
Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
- IRQ question, Weiss, Howard, 2021/02/07
- Re: IRQ question,
Jakob Bohm <=