From patchwork Thu Dec 4 09:48:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 5436571 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 5D727BEEA8 for ; Thu, 4 Dec 2014 09:51:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98B8220357 for ; Thu, 4 Dec 2014 09:51:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B7D5A20272 for ; Thu, 4 Dec 2014 09:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753412AbaLDJtv (ORCPT ); Thu, 4 Dec 2014 04:49:51 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:39200 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753018AbaLDJtt (ORCPT ); Thu, 4 Dec 2014 04:49:49 -0500 Received: by mail-wi0-f179.google.com with SMTP id ex7so27298283wid.0 for ; Thu, 04 Dec 2014 01:49:48 -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=xyBSKqYkq5Swu0OPyZzhCgXxsFoSvYnF83TEuonF3sE=; b=jKvlAU+9fZlC6Om/fYjazjTwcKF6ENcJsfB+04NlphuEaFcM4D4yEzr4qJ4uCDfymv 9bQtPgUGrTyrpGAmD4DO2WrB5dhZe5v7Sck5u5/0N5u3s4DQhe/7rcQCubqtz9eyKjT9 Z/DBOI54m3avrhBmehdXOEBVnnjjOfn1xe7Wp8NJ11ulVOC5Ah1r6PeCt3f19KZHrchy TP8ys8ZIvb068EjDOuAmQda49veY/KQ198p0mgbUu7H146oFgXGzMbxUyyxc2NBhLUS9 bL37JwXnEUSlOjB21wdxo9Xu6fwWhdW2P0TOzlJGd62HP+l8IVkL7rVa3jM+jKYsjrWF naeA== X-Gm-Message-State: ALoCoQl+J3WKr8ZauSEDQADulU067TFLo5DDkV6kAVCbEdRrRCHk6s+BTdMerT96djUij+Lya/LN X-Received: by 10.194.24.103 with SMTP id t7mr14327353wjf.15.1417686588144; Thu, 04 Dec 2014 01:49:48 -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 wz5sm39765342wjc.29.2014.12.04.01.49.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 01:49:47 -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, alex.williamson@redhat.com, agraf@suse.de, gleb@kernel.org, pbonzini@redhat.com Cc: linux-kernel@vger.kernel.org, patches@linaro.org, will.deacon@arm.com, a.motakis@virtualopensystems.com Subject: [PATCH v2 1/4] KVM: arm/arm64: vgic: vgic_init_maps returns -ENODEV when no online vcpu Date: Thu, 4 Dec 2014 10:48:01 +0100 Message-Id: <1417686484-20828-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417686484-20828-1-git-send-email-eric.auger@linaro.org> References: <1417686484-20828-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 upon vgic initialization failure, -ENODEV is returned by vgic_init_maps when no online vcpus can be found at init. Signed-off-by: Eric Auger --- 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 b76c38c..907ba0e 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1991,7 +1991,7 @@ static int vgic_init_maps(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