From patchwork Wed Mar 19 12:32:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 26569 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4E89120534 for ; Wed, 19 Mar 2014 12:33:45 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j7sf18490716qaq.10 for ; Wed, 19 Mar 2014 05:33:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=U9y7EWzGPFpx4SGi0/lACk+UnmjHaxevdMjeypP4Vn0=; b=MXemWlABFYhnOBEFAOxf3B0N8wRXdvg4h2TSJge7y3WBKQJZf3D5qRSWW4eidgVNJJ ZyYHbLxyCvLxelRZq/7O/iqwuzCn0ndY2TJYVq0E+MCcZ0V3iQ3ZF+H20GKL78Tb7El1 RlskCOtxODISeUc8jyP/JULO9JOCseRmPBs/nLH7WNIt3iAgFqdqEjTOdWmPNsGI0+SC E+/23nNX936dsY9yawPJceHXb3O1rVI9AUgF/qQ8IDHw4SbNTPofFazwDDCvXxKeVGgv zw+s7vr0/s827cG3jnV1/imDgbTS5VSXeSh49BhSFi6NUiJAyuIaM70ofrvP+CWC+/8w FAuQ== X-Gm-Message-State: ALoCoQlHMC/TAIB3G5DkTm9bxtI7OK6VrPwCwJ8b7HmZ29XuOiCu8OWJJSzE8wunDXThf1nRF0fD X-Received: by 10.58.127.66 with SMTP id ne2mr4678410veb.27.1395232424977; Wed, 19 Mar 2014 05:33:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.101 with SMTP id s92ls2519290qgd.82.gmail; Wed, 19 Mar 2014 05:33:44 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr25699144vdc.21.1395232424826; Wed, 19 Mar 2014 05:33:44 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id fi2si3467269vdb.118.2014.03.19.05.33.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Mar 2014 05:33:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id db12so8689725veb.38 for ; Wed, 19 Mar 2014 05:33:44 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr30041262vcm.11.1395232424745; Wed, 19 Mar 2014 05:33:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp295207vck; Wed, 19 Mar 2014 05:33:44 -0700 (PDT) X-Received: by 10.224.160.142 with SMTP id n14mr43389482qax.17.1395232424002; Wed, 19 Mar 2014 05:33:44 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 72si8411921qga.168.2014.03.19.05.33.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 19 Mar 2014 05:33:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WQFfl-0007QX-R2; Wed, 19 Mar 2014 12:32:41 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WQFfj-0007P8-R4 for xen-devel@lists.xensource.com; Wed, 19 Mar 2014 12:32:40 +0000 Received: from [85.158.143.35:58885] by server-3.bemta-4.messagelabs.com id B4/BD-13602-76E89235; Wed, 19 Mar 2014 12:32:39 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1395232356!3212920!2 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18964 invoked from network); 19 Mar 2014 12:32:38 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 19 Mar 2014 12:32:38 -0000 X-IronPort-AV: E=Sophos;i="4.97,685,1389744000"; d="scan'208";a="112829417" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 19 Mar 2014 12:32:36 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Wed, 19 Mar 2014 08:32:35 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WQFfa-0005Tm-K7; Wed, 19 Mar 2014 12:32:30 +0000 From: Stefano Stabellini To: Date: Wed, 19 Mar 2014 12:32:00 +0000 Message-ID: <1395232325-19226-5-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA1 Cc: julien.grall@citrix.com, jtd@galois.com, Ian.Campbell@citrix.com, Stefano Stabellini Subject: [Xen-devel] [PATCH v4 05/10] xen/arm: keep track of the GICH_LR used for the irq in struct pending_irq X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Stefano Stabellini --- xen/arch/arm/gic.c | 6 ++++-- xen/include/asm-arm/domain.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index d445e8b..78e043c 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -644,6 +644,7 @@ static inline void gic_set_lr(int lr, struct pending_irq *p, set_bit(GIC_IRQ_GUEST_VISIBLE, &p->status); clear_bit(GIC_IRQ_GUEST_PENDING, &p->status); + p->lr = lr; } static inline void gic_add_to_lr_pending(struct vcpu *v, struct pending_irq *n) @@ -724,6 +725,7 @@ static void gic_clear_lrs(struct vcpu *v) if ( p->desc != NULL ) p->desc->status &= ~IRQ_INPROGRESS; clear_bit(GIC_IRQ_GUEST_VISIBLE, &p->status); + p->lr = nr_lrs; if ( test_bit(GIC_IRQ_GUEST_PENDING, &p->status) && test_bit(GIC_IRQ_GUEST_ENABLED, &p->status)) { @@ -966,12 +968,12 @@ void gic_dump_info(struct vcpu *v) list_for_each_entry ( p, &v->arch.vgic.inflight_irqs, inflight ) { - printk("Inflight irq=%d\n", p->irq); + printk("Inflight irq=%d lr=%u\n", p->irq, p->lr); } list_for_each_entry( p, &v->arch.vgic.lr_pending, lr_queue ) { - printk("Pending irq=%d\n", p->irq); + printk("Pending irq=%d lr=%u\n", p->irq, p->lr); } } diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index bc20a15..ea89057 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -59,6 +59,7 @@ struct pending_irq #define GIC_IRQ_GUEST_VISIBLE 1 #define GIC_IRQ_GUEST_ENABLED 2 unsigned long status; + uint8_t lr; struct irq_desc *desc; /* only set it the irq corresponds to a physical irq */ uint8_t priority; /* inflight is used to append instances of pending_irq to