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

Re: [Xen-devel] [PATCH 2/2] passthrough: deliver IRQs even if bsp is hal

To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>, Kouya Shimura <kouya@xxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/2] passthrough: deliver IRQs even if bsp is halted (support kexec/kdump on hvm)
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 30 Jun 2009 11:38:08 +0100
Cc:
Delivery-date: Tue, 30 Jun 2009 03:39:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <EADF0A36011179459010BDF5142A457501C9EE5C2F@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acn5ULxn1tetf5LCQj+7JfDyAdP2QQAEQV4QAANGZNg=
Thread-topic: [Xen-devel] [PATCH 2/2] passthrough: deliver IRQs even if bsp is halted (support kexec/kdump on hvm)
User-agent: Microsoft-Entourage/12.19.0.090515
On 30/06/2009 10:09, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx> wrote:

>> @@ -437,7 +444,7 @@ void hvm_dirq_assist(struct vcpu *v)
>>      struct hvm_irq_dpci *hvm_irq_dpci = d->arch.hvm_domain.irq.dpci;
>>      struct dev_intx_gsi_link *digl;
>>  
>> -    if ( !iommu_enabled || (v->vcpu_id != 0) || (hvm_irq_dpci == NULL) )
>> +    if ( !iommu_enabled || (hvm_irq_dpci == NULL) )
>>          return;
>>  
>>      for ( irq = find_first_bit(hvm_irq_dpci->dirq_mask, d->nr_pirqs);
> 
> With the patch applied, every vcpu of a domain can access the
> hvm_irq_dpci->dirq_mask concurrently!
> I think some usage of spinlock must be introduced if you'd like to do so.

The test_and_clear_bit() at the start of the loop body probably provides the
required mutual exclusion.

 -- Keir



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