From patchwork Fri Jun 6 17:48:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 31501 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9FCCC202DA for ; Fri, 6 Jun 2014 17:50:07 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id mc6sf3685492lab.2 for ; Fri, 06 Jun 2014 10:50:06 -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=rPr+mfwsJr5xcIlhkZPui8bVaeqfTTPEB7MHzss1sng=; b=bdqOvvecVqWdC7EZFdkBMwiIzNY81wmMjwzl8S/lV4ypxQLQL7ueEhQTrZcQAkzePE lNdUppgIxitsBWOj0wtKG8tsQiqz+JwXoBaGy+PhBN8H7Tb3kinnJGlcCyNbBxeTciQi Nug0CmcQhGL8wz0KhFACEHcnYRyw/3qmLyuuw1KcV15VoqKuF/ItWS8w8KuonStCHAlo KT1jTuEQNEKaiKkBaZp2l+UZeXjvYClZ74VZkLQkrR9KltEPazI+fwP4+g/4i1aTAnbm 9vCKjsB5yBsuLedPobOIScMukDqBHew5WtNFLArawaZDvrXeCParG+8N9K2f+ChF16lW cR7w== X-Gm-Message-State: ALoCoQn1jldkqaQvEoac0zO7F3cuxrS3bqjpacGQECoTZygfop5Qtf6T6eckf3WlCTqFTnU3GJaH X-Received: by 10.152.42.141 with SMTP id o13mr1866368lal.7.1402077006273; Fri, 06 Jun 2014 10:50:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.51 with SMTP id 48ls803850qgu.23.gmail; Fri, 06 Jun 2014 10:50:06 -0700 (PDT) X-Received: by 10.58.46.141 with SMTP id v13mr7595173vem.18.1402077006106; Fri, 06 Jun 2014 10:50:06 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id bo13si6981198vdb.31.2014.06.06.10.50.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Jun 2014 10:50:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lc6so3484239vcb.1 for ; Fri, 06 Jun 2014 10:50:06 -0700 (PDT) X-Received: by 10.52.145.114 with SMTP id st18mr5102879vdb.8.1402077006002; Fri, 06 Jun 2014 10:50:06 -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.221.54.6 with SMTP id vs6csp123097vcb; Fri, 6 Jun 2014 10:50:05 -0700 (PDT) X-Received: by 10.52.110.105 with SMTP id hz9mr6364100vdb.9.1402077005434; Fri, 06 Jun 2014 10:50:05 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id v16si3353783vek.107.2014.06.06.10.50.04 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 06 Jun 2014 10:50:05 -0700 (PDT) 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 1WsyG6-0000jt-4d; Fri, 06 Jun 2014 17:48:54 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WsyG4-0000ie-Sg for xen-devel@lists.xensource.com; Fri, 06 Jun 2014 17:48:53 +0000 Received: from [85.158.139.211:59497] by server-17.bemta-5.messagelabs.com id D2/02-09046-30FF1935; Fri, 06 Jun 2014 17:48:51 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1402076928!8574987!1 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.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19250 invoked from network); 6 Jun 2014 17:48:50 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 6 Jun 2014 17:48:50 -0000 X-IronPort-AV: E=Sophos;i="4.98,990,1392163200"; d="scan'208";a="140457349" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 06 Jun 2014 17:48:48 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Fri, 6 Jun 2014 13:48:47 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WsyFu-00015p-Nt; Fri, 06 Jun 2014 18:48:42 +0100 From: Stefano Stabellini To: Date: Fri, 6 Jun 2014 18:48:27 +0100 Message-ID: <1402076908-26740-3-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: MIA2 Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com, Stefano Stabellini Subject: [Xen-devel] [PATCH v4 3/4] xen/arm: support irq delivery to vcpu > 0 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 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: Use vgic_get_target_vcpu to retrieve the target vcpu from do_IRQ. Remove in-code comments about missing implementation of SGI delivery to vcpus other than 0. Signed-off-by: Stefano Stabellini --- Changes in v4: - the mask in gic_route_irq_to_guest is a physical cpu mask, treat it as such; - export vgic_get_target_vcpu in a previous patch. --- xen/arch/arm/gic.c | 1 - xen/arch/arm/irq.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 92391b4..6f24b14 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -287,7 +287,6 @@ void gic_route_irq_to_guest(struct domain *d, struct irq_desc *desc, gic_set_irq_properties(desc->irq, level, cpumask_of(smp_processor_id()), GIC_PRI_IRQ); - /* TODO: do not assume delivery to vcpu0 */ p = irq_to_pending(d->vcpu[0], desc->irq); p->desc = desc; } diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index a33c797..0fad647 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -175,8 +175,7 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq) desc->status |= IRQ_INPROGRESS; desc->arch.eoi_cpu = smp_processor_id(); - /* XXX: inject irq into all guest vcpus */ - vgic_vcpu_inject_irq(d->vcpu[0], irq); + vgic_vcpu_inject_irq(vgic_get_target_vcpu(d->vcpu[0], irq), irq); goto out_no_end; }