From patchwork Mon Dec 15 17:43:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 5495941 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 79BEBBEEA8 for ; Mon, 15 Dec 2014 17:45:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A82B920A18 for ; Mon, 15 Dec 2014 17:45:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89DCA20A15 for ; Mon, 15 Dec 2014 17:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750882AbaLORpY (ORCPT ); Mon, 15 Dec 2014 12:45:24 -0500 Received: from mail-wg0-f45.google.com ([74.125.82.45]:61969 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbaLORpV (ORCPT ); Mon, 15 Dec 2014 12:45:21 -0500 Received: by mail-wg0-f45.google.com with SMTP id b13so15246936wgh.32 for ; Mon, 15 Dec 2014 09:45:20 -0800 (PST) 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=SOaFdk+evmc+nuvBi85Xzj+h7PnV22vTLJlzCaSNlbE=; b=NyqtBS5pLo8BlHoliOe88ziUf3gdn/AfkyaF7+KnToYUQDrOsroc5Ibtsufnk03gPQ zvaeF7fWUHTtWMeRc3O6tHzJWmtS0ZuLOut8kA90f3dd29B9yllpYd4hyCm5waGzuPOm L27QmL0q1EHCpHl3QNh2fAWnYatq/xKhxpf2lIDm0iIatZ7oOV/pkjK2HbaCVW/yyqrF W4EtMidkbYJf+OSZiET6K+TEZ5miGi22kFaB3F3KA/Yw2Wk1MsD/V8S2TQAVS/qT/eMx vrYoJ29UDygUpn7VQCnoLiZ9p+iVifw2u2etIgzfJFT8BUeAd/6pHGdo1B06ZJS44Fjy z0qQ== X-Gm-Message-State: ALoCoQkMcibN842F7DTYGjAU0CrktY/teDWYxqEyxD0gFcAWu9fMbJ+zXr1Y2CUbYf4h10Uf5Gvt X-Received: by 10.180.75.237 with SMTP id f13mr32733118wiw.69.1418665519442; Mon, 15 Dec 2014 09:45:19 -0800 (PST) Received: from gnx2579.gnb.st.com (LCaen-156-56-7-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by mx.google.com with ESMTPSA id rx8sm13838581wjb.30.2014.12.15.09.45.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 09:45:18 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, andre.przywara@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, gleb@kernel.org, pbonzini@redhat.com Cc: linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH v3 1/2] KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu Date: Mon, 15 Dec 2014 18:43:32 +0100 Message-Id: <1418665413-31521-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418665413-31521-1-git-send-email-eric.auger@linaro.org> References: <1418665413-31521-1-git-send-email-eric.auger@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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 Acked-by: Christoffer Dall --- v2 -> v3: vgic_init_maps was renamed into vgic_init --- 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 e373b76..d61a61f 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