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-changelog

[Xen-changelog] SVM patch to fix problem with evtchn/lost interrupts and

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] SVM patch to fix problem with evtchn/lost interrupts and re-enable hvm_safe_block().
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Mar 2006 10:54:08 +0000
Delivery-date: Wed, 22 Mar 2006 10:55:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b4769816a409247d5178bc6d631993e6198e8ef3
# Parent  e995d090bba912d26579538130c8fdfc525e5902
SVM patch to fix problem with evtchn/lost interrupts and re-enable 
hvm_safe_block().

Signed-off-by: Tom Woller <thomas.woller@xxxxxxx>

diff -r e995d090bba9 -r b4769816a409 xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c       Wed Mar 22 09:35:35 2006
+++ b/xen/arch/x86/hvm/svm/intr.c       Wed Mar 22 09:36:02 2006
@@ -58,6 +58,7 @@
     intr.fields.intr_masking = 1;
     intr.fields.vector = trap;
     intr.fields.prio = 0xF;
+    intr.fields.ign_tpr = 1;
     vmcb->vintr = intr;
 //  printf( "IRQ = %d\n", trap );
     return 0;
@@ -160,18 +161,21 @@
     }
     /* Now let's check for newer interrrupts  */
     else {
-        /* Interrput pending at the PIC? */
-        hvm_pic_assist(v);
-
-        if (vpit->pending_intr_nr) {
-            pic_set_irq(pic, 0, 0);
-            pic_set_irq(pic, 0, 1);
-        }
-
-        if (plat->interrupt_request) {
-            intr_vector = cpu_get_interrupt(v, &intr_type);
-            plat->interrupt_request = 0;
-        }
+
+      if ( v->vcpu_id == 0 )
+         hvm_pic_assist(v);
+
+      /* Before we deal with PIT interrupts, let's check
+         for interrupts set by the device model.
+      */
+      if ( cpu_has_pending_irq(v) ) {
+           intr_vector = cpu_get_interrupt(v, &intr_type);
+      }
+      else  if ( (v->vcpu_id == 0) && vpit->pending_intr_nr ) {
+          pic_set_irq(pic, 0, 0);
+          pic_set_irq(pic, 0, 1);
+          intr_vector = cpu_get_interrupt(v, &intr_type);
+      }
     }
 
     /* have we got an interrupt to inject? */
diff -r e995d090bba9 -r b4769816a409 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Wed Mar 22 09:35:35 2006
+++ b/xen/arch/x86/hvm/svm/svm.c        Wed Mar 22 09:36:02 2006
@@ -1777,6 +1777,10 @@
 
     __update_guest_eip(vmcb, 1);
 
+    /* check for interrupt not handled or new interrupt */
+    if ( vmcb->vintr.fields.irq || cpu_has_pending_irq(v) )
+       return; 
+
     if ( !v->vcpu_id )
         next_pit = get_pit_scheduled(v, vpit);
     next_wakeup = get_apictime_scheduled(v);
@@ -1784,9 +1788,7 @@
         next_wakeup = next_pit;
     if ( next_wakeup != - 1 )
         set_timer(&current->arch.hvm_svm.hlt_timer, next_wakeup);
-/* temporary workaround for 8828/8822 evtchn patches causing SVM failure.
     hvm_safe_block();
-*/
 }
 
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] SVM patch to fix problem with evtchn/lost interrupts and re-enable hvm_safe_block()., Xen patchbot -unstable <=