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: 4092811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E56809F169 for ; Wed, 30 Apr 2014 11:19:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F6D020270 for ; Wed, 30 Apr 2014 11:19:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28F912026F for ; Wed, 30 Apr 2014 11:19:31 +0000 (UTC) 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8cRYdMInLgdJ8dsd7MXVOngOWDZgZS3VkROz7t3s+Q8=; b=G9dSSCeCyYJ7hnqFRFmtbXeXXl+T/KhQiURdaJdZv7yfgg2KzlUviRrKUHpiw1VJs0 yP1cvsFsKiCJgb0/+xpPTvj6J9oiW6P+pHXjmSEWrquTdCXZb++eOkvDw+tpIQZDzbiJ L4mNSPl/XsLL8g9QPMcbVd8zgwYy06pVa5GS5nToYIZSQjtdkdf7qk1WIR6RhsklMpLf ahqs3GJIm/05OH9pvcKdMoRwA1k0GgRzjcajU+i9I+QCfe6HkhaTBT2YuNCPx5eWvD2w aF4kwONqthdgAGkvrA0Nhno4hzgjjwLu5SdVNmsaQOBJibLvrpcF3aoiVar53T+RvA20 VLkQ== X-Gm-Message-State: ALoCoQlWV6maWO6Z4Q/SiJDdCsTJlWoMeEreQGGKNeHpYGxxTAA8iDz1CxdG6BMvS2ElLwcvk0sc 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 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;