WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH] Fix "hda lost interrupt issue" on PAE host

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Fix "hda lost interrupt issue" on PAE host
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Fri, 21 Apr 2006 04:41:45 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 20 Apr 2006 13:42:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZkTOm6yi0kCzR0Sbe42RORloxfvgAbAMnQ
Thread-topic: [Xen-devel] [PATCH] Fix "hda lost interrupt issue" on PAE host
Hi,Keir
        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 
vmresume.

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

        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.

Thanks
Yunhong Jiang

>-----Original Message-----
>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: 2006年4月20日 0:31
>To: Jiang, Yunhong
>Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel