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: 5495981 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D94CF9F1D4 for ; Mon, 15 Dec 2014 17:48:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DEAD420A18 for ; Mon, 15 Dec 2014 17:48:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FA5520A15 for ; Mon, 15 Dec 2014 17:48:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y0Zid-00030b-5b; Mon, 15 Dec 2014 17:46:03 +0000 Received: from mail-wi0-f180.google.com ([209.85.212.180]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y0ZiI-0002eN-Gf for linux-arm-kernel@lists.infradead.org; Mon, 15 Dec 2014 17:45:43 +0000 Received: by mail-wi0-f180.google.com with SMTP id n3so9904697wiv.1 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=Nfb5fsqhJRR8Pg1CByEVjc0VsvbwtXHSox4xxX/Z4CZ/To1eyRGjEYru8Suu9MX74r qP9c5K5TuNFkynbgktRfwQIcwEwznplOSOqaiJpYP+15IZIYREyYmU/e5fFUYsGLNY/q 2ISAEqjlR+OpcfI8E6+lcfgmMsmVO3r/Bkyyh6Zh/XGuTmAkIdgcyAU1KXW78gOOeG3O vrLd1AiArTPd/5VwECKHUHTMjn6Us7PnQGD5r0/SVC0fybtuWc06QF6z61ZbaqRBfAiT mRg+39+Tc5xtZV1M29kJ0Na+gZgxPbfXBT3MaLGFc8/04FBvZO80B6p8bTNgP0dQALeT 6ArQ== X-Gm-Message-State: ALoCoQnqNyFCzLlmZU0mgdC3oFyvSBjXCWta6qUq4nl94YirDZ3BoPGpUrddA6fdJl/+z9Om1xJZ 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141215_094542_736366_15B9639C X-CRM114-Status: GOOD ( 11.37 ) X-Spam-Score: -0.7 (/) Cc: linux-kernel@vger.kernel.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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