Skip to contentSkip to conversation

svm vlapic

PATCH New Woller, Thomas 1 participant 1 message Feb 27, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 svm vlapic

Svm patch to fix vlapic logic.
Applies cleanly to 8990.
Please apply.

# HG changeset patch
# User [email protected]
# Node ID 5b743dd9b23133e84965e148e26f4946fe3dd563 # Parent 6060937db0fe568d34b83d015ebe22b86194faa9 sync up SVM VLAPIC code.

xen/arch/x86/hvm/svm/intr.c +7 -9
diff -r 6060937db0fe -r 5b743dd9b231 xen/arch/x86/hvm/svm/intr.c
@@ -80,12 +80,7 @@
 {
     struct hvm_virpit *vpit = &(v->domain->arch.hvm_domain.vpit);
 
-    switch(type)
-    {
-    case VLAPIC_DELIV_MODE_EXT:
-    case VLAPIC_DELIV_MODE_FIXED:
-    case VLAPIC_DELIV_MODE_LPRI:
-        if ( is_pit_irq(v, vector, type) ) {
+    if ( is_pit_irq(v, vector, type) ) {
             if ( !vpit->first_injected ) {
                 vpit->first_injected = 1;
                 vpit->pending_intr_nr = 0;
@@ -95,12 +90,15 @@
             }
             vpit->inject_point = NOW();
             svm_set_tsc_shift (v, vpit);
-        }
+    }
+
+    switch(type)
+    {
+    case VLAPIC_DELIV_MODE_EXT:
         break;
 
     default:
-        printk("Not support interrupt type: %d\n", type);
-        break;
+        vlapic_post_injection(v, vector, type);
     }
 }
 
xen/arch/x86/hvm/svm/svm.c +2 -1
diff -r 6060937db0fe -r 5b743dd9b231 xen/arch/x86/hvm/svm/svm.c
@@ -810,7 +810,8 @@
     vpit = &v->domain->arch.hvm_domain.vpit;
     kill_timer(&vpit->pit_timer);
     kill_timer(&v->arch.hvm_svm.hlt_timer);
-    if ( hvm_apic_support(v->domain) ) {
+    if ( hvm_apic_support(v->domain) && (VLAPIC(v) != NULL) ) 
+    {
         kill_timer( &(VLAPIC(v)->vlapic_timer) );
         xfree( VLAPIC(v) );
     }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel