From patchwork Fri Dec 12 14:43:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 42184 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7341B26C99 for ; Fri, 12 Dec 2014 14:45:51 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf1290286wiw.0 for ; Fri, 12 Dec 2014 06:45:50 -0800 (PST) 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:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=L4ZNnI8lwaAP/1TchZX2yVdWAuDgeoV3hoXIBemI78o=; b=kweB4FivdWuLS8RYwvOTX1icAYEBYTer/XbnXy8H8dV2Im63Ks0H9/Gl2HqZV1YQLF eg7K9PGWs1eBxqZ5Uv6W2Qz5l7gxeRXErSwSo+A/njIdGPCMzhJpmcJK2c1SzgY7qkB7 rKw68b6eaVXXKjW4HNgDZbPZnox8p8s4cmCblL9Q6XIfuZpco/NybXVkXeCh5OIpgQGh 0qzb4cdXWYFgGogz9645aUEUpj8UbBy6r5rhycxhd7IPuLC4jUc1p/KlFShHDMOk/3Lq 03KzZ8OjIdL8yG9bngLySBaw3mBekKJdFUhTbnS90VHKKJkKn/CxUPKVcriBEmuTqbE6 HJvg== X-Gm-Message-State: ALoCoQnghcB+lXWOuJC1q4WwkJM9nXfM7isHlUFn+lyhc+2QWJJ6/p+aK3KbuhUsuyy83KVbr01h X-Received: by 10.180.94.3 with SMTP id cy3mr779851wib.7.1418395550750; Fri, 12 Dec 2014 06:45:50 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.66 with SMTP id le2ls423413lac.90.gmail; Fri, 12 Dec 2014 06:45:50 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr15915947lal.29.1418395550462; Fri, 12 Dec 2014 06:45:50 -0800 (PST) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id vy6si1589808lbb.88.2014.12.12.06.45.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Dec 2014 06:45:50 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id p9so6130000lbv.35 for ; Fri, 12 Dec 2014 06:45:50 -0800 (PST) X-Received: by 10.152.234.35 with SMTP id ub3mr16018459lac.70.1418395550197; Fri, 12 Dec 2014 06:45:50 -0800 (PST) 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.112.142.69 with SMTP id ru5csp873553lbb; Fri, 12 Dec 2014 06:45:49 -0800 (PST) X-Received: by 10.52.29.172 with SMTP id l12mr8963076vdh.33.1418395548805; Fri, 12 Dec 2014 06:45:48 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id n4si483508vca.77.2014.12.12.06.45.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Dec 2014 06:45:48 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) 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 1XzRRJ-0002wv-0g; Fri, 12 Dec 2014 14:43:29 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XzRRH-0002wX-Mn for xen-devel@lists.xenproject.org; Fri, 12 Dec 2014 14:43:27 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 43/CC-29352-F0FFA845; Fri, 12 Dec 2014 14:43:27 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-13.tower-206.messagelabs.com!1418395406!13073476!1 X-Originating-IP: [74.125.82.44] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30111 invoked from network); 12 Dec 2014 14:43:26 -0000 Received: from mail-wg0-f44.google.com (HELO mail-wg0-f44.google.com) (74.125.82.44) by server-13.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 12 Dec 2014 14:43:26 -0000 Received: by mail-wg0-f44.google.com with SMTP id b13so9325932wgh.31 for ; Fri, 12 Dec 2014 06:43:26 -0800 (PST) X-Received: by 10.195.12.76 with SMTP id eo12mr28002630wjd.22.1418395406474; Fri, 12 Dec 2014 06:43:26 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id cq4sm2066234wjc.35.2014.12.12.06.43.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Dec 2014 06:43:25 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Fri, 12 Dec 2014 14:43:11 +0000 Message-Id: <1418395392-30460-4-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418395392-30460-1-git-send-email-julien.grall@linaro.org> References: <1418395392-30460-1-git-send-email-julien.grall@linaro.org> Cc: ian.campbell@citrix.com, Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, parth.dixit@linaro.org, christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH for-4.6 3/4] xen/arm: vgic: notice if the vIRQ is not allocated when the guest enable it 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: , MIME-Version: 1.0 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: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) 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: This help for guest interrupts debugging. If the vIRQ is not allocate, this means that nothing is wired to it. Signed-off-by: Julien Grall --- xen/arch/arm/vgic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index dbfc259..719cb9f 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -282,6 +282,10 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) if ( !list_empty(&p->inflight) && !test_bit(GIC_IRQ_GUEST_VISIBLE, &p->status) ) gic_raise_guest_irq(v_target, irq, p->priority); spin_unlock_irqrestore(&v_target->arch.vgic.lock, flags); + + if ( !test_bit(irq, d->arch.vgic.allocated_irqs) ) + gdprintk(XENLOG_DEBUG, "vIRQ %u is not allocated\n", irq); + if ( p->desc != NULL ) { irq_set_affinity(p->desc, cpumask_of(v_target->processor));