- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do I mis-understand the purpose of this exit condition? Am I barking up the wrong tree with detecting RFLAGS.IF transitions? Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yourunderstanding about interrupt-window exiting is correct, but the exit would only happen when its eligible to deliver an interrupt in the guest context. RFLAGS.IF is one condition, but there may be other conditions which block interrupts, thus preventingan exit. You should take a look at section 21.4.2 Guest Non-Register State and related knowledge in the Intel 64 and IA-32 Architectures Developer's Manual: Vol. 3B at
http://www.intel.com/products/processor/manuals/
Another point is thatyou need to check what the current guest context is. Since youare implementing yourown APIC model, one of the first things tocheck is whether the guest is actually progressing in the early boot stage. If the guest already blocks or crashesin theAPIC initialization phase, its possible that interrupt-window exiting has no way to take effect.
David Ott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On a related topic, the 'acknowledge interrupt on exit' exit control (3b 27.7.1) does not imply that an EOI is issued to the local APIC (presuming it is enabled) when an external interrupt exit occurs? It is still necissary for the vmm or guest if the interrupt is injected to a guest context that has 'ownership' of the local APIC to issue an EOI to clear the ISR?
It seems logical that that the EOI would need to be explititly sent by the programmer, but if that is true, I'm having a hard time understanding what purpose this exit control exists for? The documentation appears to state that an external interrupt exit would occur, but the exit information would be invalid if the control set not set. I'm just not sure why one would ever want that particular behavior, so I'm wondering again if I understand this exit control correctly.
Thank you again,
t.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do I have this anywhere correct? Sorry, the documentation is precise, but does not exactly provide explainitory background detail and ends up being something of a 'choose your own adventure' story....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Commentsbelow.
On a related topic, the 'acknowledge interrupt on exit' exit control (3b 27.7.1) does not imply that an EOI is issued to the local APIC (presuming it is enabled) when an external interrupt exit occurs?
Correct.
It is still necissary for the vmm or guest if the interrupt is injected to a guest context that has 'ownership' of the local APIC to issue an EOI to clear the ISR?
If the guest has ownership of the local APIC, itcan do EOI as normal at the end of the interrupt service routine. Keep in mind, until the EOI happens (which is when the ISR gets cleared in the local APIC), other lower priority interrupts (even if they are destined to VMM) will be blocked by the local APIC.
It seems logical that that the EOI would need to be explititly sent by the programmer, but if that is true, I'm having a hard time understanding what purpose this exit control exists for? The documentation appears to state that an external interrupt exit would occur, but the exit information would be invalid if the control set not set. I'm just not sure why one would ever want that particular behavior, so I'm wondering again if I understand this exit control correctly.
I assume that this exit control means 'acknowledge interrupt on exit'.If software doesnt enable 'acknowledge interrupt on exit'when an external interrupt comes, you would not get the interrupt vector as part of the VM exit. (The CPU would not acknowledge the interrupt and get it from the Local APIC, which means the interrupt is still held in the IRR of local APIC.) Instead, after a VM-exit, software would have to explicitly unblock interrupts to take the interrupt as normal through the IDT. This control has nothing to do with EOI.
David Ott

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page