ia64/xen-unstable
changeset 11269:1612675ca4cf
[IA64] All vcpus can sync interrupts from qemu
Previously only vcpu0 can sync interrupt from qemu.
Now all vcpus can sync.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Previously only vcpu0 can sync interrupt from qemu.
Now all vcpus can sync.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author | awilliam@xenbuild.aw |
---|---|
date | Thu Aug 24 11:52:23 2006 -0600 (2006-08-24) |
parents | 65042393b3e9 |
children | 0ae5ba4585c9 |
files | xen/arch/ia64/vmx/vmx_init.c xen/arch/ia64/vmx/vmx_support.c xen/include/asm-ia64/domain.h xen/include/asm-ia64/vmx_vpd.h |
line diff
1.1 --- a/xen/arch/ia64/vmx/vmx_init.c Thu Aug 24 11:48:35 2006 -0600 1.2 +++ b/xen/arch/ia64/vmx/vmx_init.c Thu Aug 24 11:52:23 2006 -0600 1.3 @@ -445,6 +445,9 @@ void vmx_setup_platform(struct domain *d 1.4 memset(&d->shared_info->evtchn_mask[0], 0xff, 1.5 sizeof(d->shared_info->evtchn_mask)); 1.6 1.7 + /* initiate spinlock for pass virq */ 1.8 + spin_lock_init(&d->arch.arch_vmx.virq_assist_lock); 1.9 + 1.10 /* Initialize the virtual interrupt lines */ 1.11 vmx_virq_line_init(d); 1.12
2.1 --- a/xen/arch/ia64/vmx/vmx_support.c Thu Aug 24 11:48:35 2006 -0600 2.2 +++ b/xen/arch/ia64/vmx/vmx_support.c Thu Aug 24 11:52:23 2006 -0600 2.3 @@ -73,8 +73,10 @@ void vmx_intr_assist(struct vcpu *v) 2.4 { 2.5 #ifdef V_IOSAPIC_READY 2.6 /* Confirm virtual interrupt line signals, and set pending bits in vpd */ 2.7 - if(v->vcpu_id==0) 2.8 + if (spin_trylock(&v->domain->arch.arch_vmx.virq_assist_lock)) { 2.9 vmx_virq_line_assist(v); 2.10 + spin_unlock(&v->domain->arch.arch_vmx.virq_assist_lock); 2.11 + } 2.12 #endif 2.13 return; 2.14 }
3.1 --- a/xen/include/asm-ia64/domain.h Thu Aug 24 11:48:35 2006 -0600 3.2 +++ b/xen/include/asm-ia64/domain.h Thu Aug 24 11:52:23 2006 -0600 3.3 @@ -137,6 +137,8 @@ struct arch_domain { 3.4 atomic64_t shadow_fault_count; 3.5 3.6 struct last_vcpu last_vcpu[NR_CPUS]; 3.7 + 3.8 + struct arch_vmx_domain arch_vmx; /* Virtual Machine Extensions */ 3.9 }; 3.10 #define INT_ENABLE_OFFSET(v) \ 3.11 (sizeof(vcpu_info_t) * (v)->vcpu_id + \
4.1 --- a/xen/include/asm-ia64/vmx_vpd.h Thu Aug 24 11:48:35 2006 -0600 4.2 +++ b/xen/include/asm-ia64/vmx_vpd.h Thu Aug 24 11:52:23 2006 -0600 4.3 @@ -27,6 +27,7 @@ 4.4 #include <asm/vtm.h> 4.5 #include <asm/vmx_platform.h> 4.6 #include <public/xen.h> 4.7 +#include <xen/spinlock.h> 4.8 4.9 #define VPD_SHIFT 17 /* 128K requirement */ 4.10 #define VPD_SIZE (1 << VPD_SHIFT) 4.11 @@ -72,6 +73,11 @@ struct ivt_debug{ 4.12 }; 4.13 #define IVT_DEBUG_MAX 128 4.14 #endif 4.15 + 4.16 +struct arch_vmx_domain { 4.17 + spinlock_t virq_assist_lock; /* spinlock for pass virq */ 4.18 +}; 4.19 + 4.20 struct arch_vmx_struct { 4.21 // vpd_t *vpd; 4.22 vtime_t vtm;