From patchwork Wed Feb 26 18:39:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 25403 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D2B79203C4 for ; Wed, 26 Feb 2014 18:42:10 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id q200sf6902733ykb.3 for ; Wed, 26 Feb 2014 10:42:10 -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: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=wTWLEn0/6z7Aq4jC3SX2jomzPh9ECq4HlL+rFjMppKc=; b=atnaAJXjdZXw8PyW3L9T4r3sg7DbJP+j7gNCWZwRqe/jsmop3CFnc3gWBPVRKVNLyY ojebHFfg8QbinR3lxFMxoOouKarvPNTapKzjQhgD1YCk0x2Bf2dFJnb9eFRYg3nOVf5g gmXPOLoUio9rVJ4QAJUZwnF7B6Fww1p9imyDWixKazazkANhFqs6ql7TUPeDFGNKjKCi /St4YhApYGREmMGB+sT08Kl2+HkBfKkZD3tQNu2cTdWGVSEXJ7OoEon4UF+YB4OECawD CDchB69uk09eqduAQ0IWpSnARN27IznQTf2J5RTEYWveV29fWdZ2Yy9zY9mcWfRkeivs a7vA== X-Gm-Message-State: ALoCoQmyZ0vCmnfXFw/tt7hJRiQwmF/AAS+Yqoqk8r0AbX3kXTvf4F2KOZU/1FyEGEw3FOhusg+H X-Received: by 10.58.169.5 with SMTP id aa5mr3616220vec.37.1393440130609; Wed, 26 Feb 2014 10:42:10 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.169 with SMTP id o38ls362972qge.37.gmail; Wed, 26 Feb 2014 10:42:10 -0800 (PST) X-Received: by 10.220.53.66 with SMTP id l2mr1770266vcg.33.1393440130362; Wed, 26 Feb 2014 10:42:10 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id uw4si459246vdc.40.2014.02.26.10.42.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:42:10 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so1390103vcb.9 for ; Wed, 26 Feb 2014 10:42:10 -0800 (PST) X-Received: by 10.52.74.5 with SMTP id p5mr81027vdv.71.1393440130259; Wed, 26 Feb 2014 10:42:10 -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.220.174.196 with SMTP id u4csp46882vcz; Wed, 26 Feb 2014 10:42:10 -0800 (PST) X-Received: by 10.52.248.138 with SMTP id ym10mr5891322vdc.18.1393440129942; Wed, 26 Feb 2014 10:42:09 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id vf1si456125vcb.92.2014.02.26.10.42.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:42:09 -0800 (PST) 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 1WIjP4-0007vD-U1; Wed, 26 Feb 2014 18:40:22 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WIjOw-0007tb-Nu for xen-devel@lists.xensource.com; Wed, 26 Feb 2014 18:40:14 +0000 Received: from [85.158.143.35:14777] by server-3.bemta-4.messagelabs.com id 55/DE-11539-E053E035; Wed, 26 Feb 2014 18:40:14 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-6.tower-21.messagelabs.com!1393440011!8519574!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28571 invoked from network); 26 Feb 2014 18:40:13 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-6.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 26 Feb 2014 18:40:13 -0000 X-IronPort-AV: E=Sophos;i="4.97,549,1389744000"; d="scan'208";a="104388718" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 26 Feb 2014 18:40:10 +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, 26 Feb 2014 13:40:10 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WIjOm-0004S3-38; Wed, 26 Feb 2014 18:40:04 +0000 From: Stefano Stabellini To: Date: Wed, 26 Feb 2014 18:39:46 +0000 Message-ID: <1393439997-26936-1-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-4.5 v3 01/12] xen/arm: no need to set HCR_VI when using the vgic to inject irqs 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.220.178 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: It can actually cause spurious interrupt injections into the guest. Signed-off-by: Stefano Stabellini --- xen/arch/arm/gic.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 1484e1f..f860194 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -725,22 +725,6 @@ void gic_clear_pending_irqs(struct vcpu *v) spin_unlock_irqrestore(&gic.lock, flags); } -static void gic_inject_irq_start(void) -{ - register_t hcr = READ_SYSREG(HCR_EL2); - WRITE_SYSREG(hcr | HCR_VI, HCR_EL2); - isb(); -} - -static void gic_inject_irq_stop(void) -{ - register_t hcr = READ_SYSREG(HCR_EL2); - if (hcr & HCR_VI) { - WRITE_SYSREG(hcr & ~HCR_VI, HCR_EL2); - isb(); - } -} - int gic_events_need_delivery(void) { return (!list_empty(¤t->arch.vgic.lr_pending) || @@ -753,10 +737,6 @@ void gic_inject(void) vgic_vcpu_inject_irq(current, current->domain->arch.evtchn_irq, 1); gic_restore_pending_irqs(current); - if (!gic_events_need_delivery()) - gic_inject_irq_stop(); - else - gic_inject_irq_start(); } int gic_route_irq_to_guest(struct domain *d, const struct dt_irq *irq,