I'm very sorry that I didn't descript it more clearly in previous mail.
I will try to use following scenario to descript the purpose of the
patch and how it fix the issue.
An IDE DMA interrupt is injected into guest, through setting the
VM_ENTRY_INTR_INFO_FIELD field on VMCS.
When vmentry to vmx guest, vmx will try to inject this event to guest.
However, in this process, a page fault occurred because the page for IDT is
not set on shadow page table, maybe because of cr3 switch. This will cause a
immediately vmexit again. On this situation, because the vmexit is occurred
because of the event delivery, so the original VM_ENTRY_INTR_INFO_FIELD
information is kept in IDT_VECTORING_INFO_FIELD.
If we copy the information from IDT_VECTORING_INFO_FIELD to
VM_ENTRY_INTR_INFO_FIELD, then this interrupt will be injected again on next
However, on original code, there is a corner case. If before the next
vmresume, a timer interrupt happened, then vmx_intr_assist may overwrite the
information on VM_ENTRY_INTR_INFO_FIELD, that will cause the IDE DMA interrupt
This patch checkes the IDT_VECTORING_INFO_FIELD on vmx_intr_assist, and
if it is set, then copy it to VM_ENTRY_INTR_INFO_FIELD and return. Though this
method, we can avoid interrupt lost.
More information for IDT_VECTORING_INFO_FIELD can be seen on "Information for
VM Exits That Occur During Event Delivery" section on vmx specification.
Hope I explained the issue clearly.
>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: 2006年4月20日 0:31
>To: Jiang, Yunhong
>Subject: Re: [Xen-devel] [PATCH] Fix "hda lost interrupt issue" on PAE host
>On 20 Apr 2006, at 02:23, Jiang, Yunhong wrote:
>> Hi, Keir
>> This patch fix the “hda lost interrupt” issue when create vmx guest on
>> PAE host.
>> Signed-off-by: Yunhong Jiang Yunhong.jiang@xxxxxxxxx
>> Signed-off-by: Eddie Dong eddie.dong@xxxxxxxxx
>It'd be nice to have some description of *how* the patch fixes the bug.
>I'd like to have some idea what the purpose of the piece of code you
>move around is: what's the difference between IDT-vectoring exception
>info and ordinary VM-exit exception info? Why is reflecting the info
>back into VM-entry fields always the right thing to do? etc. In
>general, patches that appear to simply shuffle code around worry me.
> -- Keir
Xen-devel mailing list