From patchwork Mon Apr 27 01:41:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47591 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 482682121F for ; Mon, 27 Apr 2015 01:42:00 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf21791915wgi.3 for ; Sun, 26 Apr 2015 18:41:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=8qIZvd/+rsYOh/I/WhxYf9Mclxd60kbYabfFJQvK3FQ=; b=blVqbrWJGiCZEoerqHyhhsb2gEDF8WI45xcvQQgb1KnYd/8YXaE4rIZ1uUdjGmzLQ7 iyDPzd0b50wX7WIh5vF5XxZOHYffus3pQTM4N5L3yycGTyDkzFImgZWoD0fGjRCJlv+P 2/gUFoxs3TwQlMR3ws9HPXcKY2HYvf2n/fDmpdbYYgUoL236P7oKPy0DmUA59tEq9Qg1 rgIN62ttmGZ4ybye4juZjgPcd7l6G03I6AC8NQi2sdMe+YJQsNDnftHw7Xk4i3wKwgkv /zYIthP4FK9EQssklUqWVyfkzoBF9i+bIcZRb2xfmyYEsniVwxHRrDEakgYdhI9yH785 shvA== X-Gm-Message-State: ALoCoQk/FcGb19MGr1h8umsmFOkSLPvFeAwQpFBkRya0tnGxstvVRO9Y766C30WehHA4nHqEQugz X-Received: by 10.112.13.200 with SMTP id j8mr5857613lbc.14.1430098919554; Sun, 26 Apr 2015 18:41:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.194 with SMTP id v2ls775463lag.59.gmail; Sun, 26 Apr 2015 18:41:59 -0700 (PDT) X-Received: by 10.112.162.167 with SMTP id yb7mr8040766lbb.121.1430098919337; Sun, 26 Apr 2015 18:41:59 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id rb8si13705754lbb.34.2015.04.26.18.41.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 18:41:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbuc2 with SMTP id uc2so71311159lbb.2 for ; Sun, 26 Apr 2015 18:41:59 -0700 (PDT) X-Received: by 10.152.36.2 with SMTP id m2mr7947230laj.72.1430098919218; Sun, 26 Apr 2015 18:41:59 -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.112.67.65 with SMTP id l1csp1008139lbt; Sun, 26 Apr 2015 18:41:58 -0700 (PDT) X-Received: by 10.66.193.130 with SMTP id ho2mr1223600pac.125.1430098917472; Sun, 26 Apr 2015 18:41:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ro6si27582230pab.194.2015.04.26.18.41.56; Sun, 26 Apr 2015 18:41:57 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751925AbbD0Bl4 (ORCPT + 2 others); Sun, 26 Apr 2015 21:41:56 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:35611 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbbD0Blz (ORCPT ); Sun, 26 Apr 2015 21:41:55 -0400 Received: by pdbqd1 with SMTP id qd1so111592214pdb.2 for ; Sun, 26 Apr 2015 18:41:55 -0700 (PDT) X-Received: by 10.68.229.136 with SMTP id sq8mr17855944pbc.160.1430098915269; Sun, 26 Apr 2015 18:41:55 -0700 (PDT) Received: from localhost ([167.160.116.64]) by mx.google.com with ESMTPSA id ez1sm17471312pbd.0.2015.04.26.18.41.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 26 Apr 2015 18:41:54 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Eric Auger Subject: [PATCH for 3.19.y stable 1/5] KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu Date: Mon, 27 Apr 2015 09:41:15 +0800 Message-Id: <1430098879-5980-2-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430098879-5980-1-git-send-email-shannon.zhao@linaro.org> References: <1430098879-5980-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@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.178 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-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Eric Auger commit 66b030e48af68fd4c22d343908bc057207a0a31e upstream. To be more explicit on vgic initialization failure, -ENODEV is returned by vgic_init when no online vcpus can be found at init. Signed-off-by: Eric Auger Signed-off-by: Christoffer Dall Signed-off-by: Shannon Zhao --- virt/kvm/arm/vgic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 03affc7..b8d57e8 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1809,7 +1809,7 @@ static int vgic_init(struct kvm *kvm) nr_cpus = dist->nr_cpus = atomic_read(&kvm->online_vcpus); if (!nr_cpus) /* No vcpus? Can't be good... */ - return -EINVAL; + return -ENODEV; /* * If nobody configured the number of interrupts, use the