From patchwork Sun May 17 01:02:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 48623 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 268C321411 for ; Sun, 17 May 2015 01:06:58 +0000 (UTC) Received: by wiz9 with SMTP id 9sf9918171wiz.3 for ; Sat, 16 May 2015 18:06:57 -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=LjOPiU3GcIlya2VlfOVmHc6Y38YT/V8aIzRkGwV3InA=; b=IAYWYe1RFoVl6veYKfOhPsPBrv1zwI38uooSQv/BtLD4HGe7MmiTf5Tflj03yzwC/D 77hRpoHcF+oMQ9si3UOPpQuD/9n5oRgrleSOL14BxPxqpfihvWjngpTuXh1pj0N0wPP9 Nyu3l8UzVHwc1iK0SWxprvoO5MC2rQh8KyIiTB5IG8MQ5HMx8j5N9wrb59DPHD977eDu K49vG8U5NsGn6gk73R3A5f8ZOjpzy8eN6VdmnK5JXodeYYqIB456oLkxY1t6NPXSyiIF cddvbhBYX1l+0t8SyizUALIyW1G5E4Q3jfr7+5Q4Y+Z/x8/vgQ0WBwEw/podRMjQ1Gkq DUJw== X-Gm-Message-State: ALoCoQnuXCMTlW2MG+h8CmxqUb3jF0emCzMENKpX3kyD0PNEszB0ItXAbL87C+l9O2ckf311koZ2 X-Received: by 10.180.97.9 with SMTP id dw9mr4588373wib.2.1431824817423; Sat, 16 May 2015 18:06:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.66 with SMTP id i2ls675733lah.19.gmail; Sat, 16 May 2015 18:06:57 -0700 (PDT) X-Received: by 10.152.3.161 with SMTP id d1mr12235951lad.70.1431824817223; Sat, 16 May 2015 18:06:57 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id ay16si3913153lab.32.2015.05.16.18.06.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 May 2015 18:06:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by laat2 with SMTP id t2so172402380laa.1 for ; Sat, 16 May 2015 18:06:57 -0700 (PDT) X-Received: by 10.113.10.134 with SMTP id ea6mr12121671lbd.29.1431824817138; Sat, 16 May 2015 18:06:57 -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.108.230 with SMTP id hn6csp3022271lbb; Sat, 16 May 2015 18:06:56 -0700 (PDT) X-Received: by 10.66.119.239 with SMTP id kx15mr11647231pab.156.1431824791308; Sat, 16 May 2015 18:06:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h13si9275368pdm.194.2015.05.16.18.06.30; Sat, 16 May 2015 18:06:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751096AbbEQBGZ (ORCPT + 2 others); Sat, 16 May 2015 21:06:25 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25960 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751035AbbEQBGZ (ORCPT ); Sat, 16 May 2015 21:06:25 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4H16OFV028515 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 17 May 2015 01:06:24 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t4H16OtJ020604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 17 May 2015 01:06:24 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t4H16O3O007985; Sun, 17 May 2015 01:06:24 GMT Received: from lappy.hsd1.nh.comcast.net (/10.159.157.103) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 16 May 2015 18:06:23 -0700 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: sasha.levin@oracle.com Subject: [PATCH 3.18 014/222] KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu Date: Sat, 16 May 2015 21:02:35 -0400 Message-Id: <1431824764-20044-15-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1431824764-20044-1-git-send-email-sasha.levin@oracle.com> References: <1431824764-20044-1-git-send-email-sasha.levin@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] 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: patch@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.215.46 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 Signed-off-by: Sasha Levin --- 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 9a8c183..fc82307 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1807,7 +1807,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