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

[Xen-devel] [HVM] Fix interrupt routing

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [HVM] Fix interrupt routing
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Wed, 12 Dec 2007 00:55:36 +0800
Delivery-date: Tue, 11 Dec 2007 08:57:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <FE7BBCFBB500984A9A7922EBC95F516E70F5CF@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <FE7BBCFBB500984A9A7922EBC95F516E70F5CF@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acg3PEyAIo2inm4VSGuup7EBw1kwsAE1W1gAAADUU9A=
Thread-topic: [HVM] Fix interrupt routing
If HVM guest Fedora 7 uses PIT and lapic timer, it can't boot or
install.

The cause is: 
At some point, Fedora 7 disables PIT interrupt by
"vioapic.redirtbl[2].mask = 1, vpic.imr.bit0 = 0 (unmasked),
vlapic.lvt[LINT0].mask = 1", and enables vlapic timer interrupt
generating;
In vmx_intr_assist() -> pt_update_irq(), we always choose IRQ0 rather
than vlapic timer interrupt, because: 1) is_isa_irq_masked(v, 0) returns
false due to vpic.imr.bit0 = 0;  2) the PIT's pt->last_plt_gtime is less
than vlapic timer's -- at least I can see this on my hosts;
However, in pt_update_irq() -> hvm_isa_irq_assert() ->
vioapic_irq_positive_edge(), we do nothing but return at once because
vioapic.redirtbl[2].mask = 1; 
Next, in vmx_intr_assist() -> hvm_vcpu_has_pending_irq(), we can't
inject vPIT interrupt because vlapic_accept_pic_intr() return false
(because vlapic.lvt[LINT0].mask=1, and vlapic_hw_disabled() returns
false), so vlapic_has_pending_irq() returns -1.
Eventually, the pending PIT interrupts prevent the injection of lapic
timer interrupts! 

The patch fixes the issue by rectifying is_isa_irq_masked().

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>

Attachment: fix_intr_routing.patch
Description: fix_intr_routing.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [HVM] Fix interrupt routing, Cui, Dexuan <=