From patchwork Wed Apr 30 11:15:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 29409 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 43001202FE for ; Wed, 30 Apr 2014 11:18:46 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id kq14sf7406277pab.1 for ; Wed, 30 Apr 2014 04:18: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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=d7YN2o6XvKnpQW6zBG1qyMFBexHsMoBSjud2HUMbjAQ=; b=KWeI5hWGueqOmiSY5wfo4jO1Xtdj255aH7MRFFCzDWc9++o9GKqe7q9O8olgeIe7GY 68UQGeSP9MTRXOQ2U4GWnVgZWU4vQRNVOgSjzyX0QS6+4GNxAL+zP7BAEZL9aKV3nIp1 K8Ur/zxu+cO3x9H4I8O3ynrMg1HK/wLNBiRqryL+FUNFBvRamsV5exCZig+ra5qgei93 p+AevlrtKLb0aVzhDqLB/mYZO1h4BlDZC2kOnN6JHeciFTZjY8o4csVW++sJYo0LD//Q qYYmjfbs8e8gPdmAvkfHdvyH9kEaq6fVSK6+6eFngZ01XUZQuwvV9HcBbpJMgLXeoqcc tepg== X-Gm-Message-State: ALoCoQlaKFjDCI2mizelRRjAnYnHK5a/Yqdg+rkc+LyWerSVw1kda7MM5UDIiPglNWJRTBVqaTUg X-Received: by 10.66.197.131 with SMTP id iu3mr1937165pac.15.1398856725160; Wed, 30 Apr 2014 04:18:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.145 with SMTP id h17ls570199qgd.31.gmail; Wed, 30 Apr 2014 04:18:45 -0700 (PDT) X-Received: by 10.52.65.132 with SMTP id x4mr1044684vds.36.1398856725036; Wed, 30 Apr 2014 04:18:45 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id z4si5245919vcp.24.2014.04.30.04.18.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Apr 2014 04:18:45 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id hq16so1913860vcb.25 for ; Wed, 30 Apr 2014 04:18:45 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr1013355vcb.32.1398856724961; Wed, 30 Apr 2014 04:18: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.221.72 with SMTP id ib8csp270298vcb; Wed, 30 Apr 2014 04:18:44 -0700 (PDT) X-Received: by 10.224.67.195 with SMTP id s3mr4215716qai.96.1398856724615; Wed, 30 Apr 2014 04:18:44 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id s6si10904834qaj.39.2014.04.30.04.18.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Apr 2014 04:18:44 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WfSVd-0004rj-1n; Wed, 30 Apr 2014 11:17:05 +0000 Received: from mail-la0-f54.google.com ([209.85.215.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WfSVI-0004fv-Ob for linux-arm-kernel@lists.infradead.org; Wed, 30 Apr 2014 11:16:46 +0000 Received: by mail-la0-f54.google.com with SMTP id e16so1140758lan.27 for ; Wed, 30 Apr 2014 04:16:22 -0700 (PDT) X-Received: by 10.112.164.98 with SMTP id yp2mr2493504lbb.29.1398856582109; Wed, 30 Apr 2014 04:16:22 -0700 (PDT) Received: from localhost.localdomain (87-51-169-189-static.dk.customer.tdc.net. [87.51.169.189]) by mx.google.com with ESMTPSA id rd5sm25972812lbb.0.2014.04.30.04.16.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Apr 2014 04:16:21 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , Gleb Natapov Subject: [PATCH 3/5] KVM: ARM: vgic: Fix sgi dispatch problem Date: Wed, 30 Apr 2014 04:15:54 -0700 Message-Id: <1398856556-13199-4-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1398856556-13199-1-git-send-email-christoffer.dall@linaro.org> References: <1398856556-13199-1-git-send-email-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140430_041644_977103_1601CDB4 X-CRM114-Status: GOOD ( 10.10 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.54 listed in list.dnswl.org] Cc: kvm@vger.kernel.org, Marc Zyngier , stable@vger.kernel.org, Christoffer Dall , Haibin Wang , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 From: Haibin Wang When dispatch SGI(mode == 0), that is the vcpu of VM should send sgi to the cpu which the target_cpus list. So, there must add the "break" to branch of case 0. Cc: # 3.10+ Signed-off-by: Haibin Wang Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 47b2983..7e8b44e 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -916,6 +916,7 @@ static void vgic_dispatch_sgi(struct kvm_vcpu *vcpu, u32 reg) case 0: if (!target_cpus) return; + break; case 1: target_cpus = ((1 << nrcpus) - 1) & ~(1 << vcpu_id) & 0xff;