ia64/xen-unstable
changeset 9060:985879d9d935
Fix SVM vlapic logic.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
Signed-off-by: Tom Woller <thomas.woller@amd.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Tue Feb 28 10:12:29 2006 +0100 (2006-02-28) |
parents | a2dce576313f |
children | 0820df08a996 |
files | xen/arch/x86/hvm/svm/intr.c xen/arch/x86/hvm/svm/svm.c |
line diff
1.1 --- a/xen/arch/x86/hvm/svm/intr.c Tue Feb 28 10:11:33 2006 +0100 1.2 +++ b/xen/arch/x86/hvm/svm/intr.c Tue Feb 28 10:12:29 2006 +0100 1.3 @@ -80,12 +80,7 @@ interrupt_post_injection(struct vcpu * v 1.4 { 1.5 struct hvm_virpit *vpit = &(v->domain->arch.hvm_domain.vpit); 1.6 1.7 - switch(type) 1.8 - { 1.9 - case VLAPIC_DELIV_MODE_EXT: 1.10 - case VLAPIC_DELIV_MODE_FIXED: 1.11 - case VLAPIC_DELIV_MODE_LPRI: 1.12 - if ( is_pit_irq(v, vector, type) ) { 1.13 + if ( is_pit_irq(v, vector, type) ) { 1.14 if ( !vpit->first_injected ) { 1.15 vpit->first_injected = 1; 1.16 vpit->pending_intr_nr = 0; 1.17 @@ -95,12 +90,15 @@ interrupt_post_injection(struct vcpu * v 1.18 } 1.19 vpit->inject_point = NOW(); 1.20 svm_set_tsc_shift (v, vpit); 1.21 - } 1.22 + } 1.23 + 1.24 + switch(type) 1.25 + { 1.26 + case VLAPIC_DELIV_MODE_EXT: 1.27 break; 1.28 1.29 default: 1.30 - printk("Not support interrupt type: %d\n", type); 1.31 - break; 1.32 + vlapic_post_injection(v, vector, type); 1.33 } 1.34 } 1.35
2.1 --- a/xen/arch/x86/hvm/svm/svm.c Tue Feb 28 10:11:33 2006 +0100 2.2 +++ b/xen/arch/x86/hvm/svm/svm.c Tue Feb 28 10:12:29 2006 +0100 2.3 @@ -810,7 +810,8 @@ void svm_relinquish_resources(struct vcp 2.4 vpit = &v->domain->arch.hvm_domain.vpit; 2.5 kill_timer(&vpit->pit_timer); 2.6 kill_timer(&v->arch.hvm_svm.hlt_timer); 2.7 - if ( hvm_apic_support(v->domain) ) { 2.8 + if ( hvm_apic_support(v->domain) && (VLAPIC(v) != NULL) ) 2.9 + { 2.10 kill_timer( &(VLAPIC(v)->vlapic_timer) ); 2.11 xfree( VLAPIC(v) ); 2.12 }