From patchwork Mon May 4 01:25:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47930 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 828CD20553 for ; Mon, 4 May 2015 01:27:59 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf40351821wgi.3 for ; Sun, 03 May 2015 18:27:58 -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=7wVQaSK/Jxr96Tm/tDPySdGr1Wv9fgRpWmKjlEn9P/w=; b=STwHTx4Aw/04NEJj3KlpdMQ2qti4DzhYEI25qBiQHSwEHClEHChJuUdW53KriIKMJs NFmJYKSeMlFD+u9weB4I+kNT3oDUw9KrbvfmQVeHtMlUl3vrt/l/p4F+Qq+MUH9JMhth ucAjwLaMMPQWlBR3suMLGSUxbFQvChPIieg/mJCcJfFI0Ykk5U0HoIl+jSyfs3KUnlit wzvAs5TA307/NXz37TPqvQvX3FcKj4WK9k3DWN7JMPYsXHv5euNkMIwmF6K+K7X3tbWO 1G0+lBJ7sgKpeKtns+4a09gXr3pqPNuOxjFQoMapSJjzpETo2H24iCv92snMxoj6a7/9 s+Yg== X-Gm-Message-State: ALoCoQloiEawP+Stv8qWDkmMsXAtE+jhMoPhAAJG2qLH+38rg+ugpnzDR4z/iJFsLGd31U4KzRzE X-Received: by 10.180.106.10 with SMTP id gq10mr6838552wib.0.1430702878864; Sun, 03 May 2015 18:27:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.198.229 with SMTP id jf5ls649225lac.56.gmail; Sun, 03 May 2015 18:27:58 -0700 (PDT) X-Received: by 10.112.142.232 with SMTP id rz8mr17013176lbb.74.1430702878631; Sun, 03 May 2015 18:27:58 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id lf3si9042824lbc.136.2015.05.03.18.27.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:27:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbzk7 with SMTP id zk7so95531597lbb.0 for ; Sun, 03 May 2015 18:27:58 -0700 (PDT) X-Received: by 10.153.8.167 with SMTP id dl7mr17602479lad.86.1430702878543; Sun, 03 May 2015 18:27:58 -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 l1csp1406063lbt; Sun, 3 May 2015 18:27:57 -0700 (PDT) X-Received: by 10.68.69.105 with SMTP id d9mr37686614pbu.144.1430702876688; Sun, 03 May 2015 18:27:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id es7si17680936pbd.123.2015.05.03.18.27.55; Sun, 03 May 2015 18:27:56 -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 S1751823AbbEDB1z (ORCPT + 2 others); Sun, 3 May 2015 21:27:55 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:32909 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbbEDB1y (ORCPT ); Sun, 3 May 2015 21:27:54 -0400 Received: by pdbnk13 with SMTP id nk13so149563227pdb.0 for ; Sun, 03 May 2015 18:27:54 -0700 (PDT) X-Received: by 10.66.188.107 with SMTP id fz11mr38122044pac.85.1430702874250; Sun, 03 May 2015 18:27:54 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id e6sm9616718pat.38.2015.05.03.18.27.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:27:53 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: sasha.levin@oracle.com, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Eric Auger Subject: [PATCH for 3.18.y stable 14/22] KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu Date: Mon, 4 May 2015 09:25:18 +0800 Message-Id: <1430702726-2056-15-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430702726-2056-1-git-send-email-shannon.zhao@linaro.org> References: <1430702726-2056-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.176 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 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