From patchwork Tue May 9 10:44:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9717565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2BEFE60237 for ; Tue, 9 May 2017 10:46:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E71C2833C for ; Tue, 9 May 2017 10:46:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1362F283F2; Tue, 9 May 2017 10:46:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F2C2282E8 for ; Tue, 9 May 2017 10:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ANKIM64LVw2PZLSyb1y7IpISWctdEjBE9VHdr20AM7w=; b=MyYrBn4E4sY4zrbImc1G+HNtU2 FTeMhT52vuke0CkP7qyjtF3uXM+QLkHjBSte7Is2flJVtGwYG5JZPXQ9GglxyVmpKW+kHimsuJPW0 P/TrD9dUPl2ETSPvo2vF2AllLsNRdSS4YU/WnMJRktQsK8ierdVN9RPaoiaCiuejH79t2MNgbBYfl IwCUO19difG5KJgNoUpkDOQ0H5DqmVFhRIb53vXs5RdEoMJWM/hztNXaJTPvVRHkx82xFn24uuNDy ym0TbpZ+hGcVpZKqwsBMNJEdF+1NaXUrmSJL9KwlzLeNVSgOUB60+9bG50NVvdW7RQZQiGW4ostUz e2ws79sQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d82fF-0004IE-JI; Tue, 09 May 2017 10:46:45 +0000 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d82e9-0002qU-DE for linux-arm-kernel@lists.infradead.org; Tue, 09 May 2017 10:45:39 +0000 Received: by mail-qk0-x232.google.com with SMTP id u75so75010418qka.3 for ; Tue, 09 May 2017 03:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0eXdmcBNLaO2hVBgS1BbXUXVnj5oAf+7fxABR74V46E=; b=iLibYO3pIYr+sVm4d7ESkwQwkpQrg21bbIBmVov0Gxxc3M1iVeVhnZgG24DtjpidAp GUu/ZeQqYeJUZv5VVRL2ZOqGnRc/vzLFxtQ85QfmwvfD0jLpIoNk3/NLaMpWptDYMyTM 4ui1vp0lyj+h4Vp32PcGtn7fannGMl5uJlH9M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0eXdmcBNLaO2hVBgS1BbXUXVnj5oAf+7fxABR74V46E=; b=kzvbYrGCqN+4ICzSiGjhjUaVs+YmzFpGvjlZSf5ZGpMe95rO8GgcWUyGZU0t2OkDCE CCGjduR5jDrWEzoc0sQ+HCnStr26Bf00M6/VX/5x+pa3bSyUEpQPv66fIYDMTeoGg7mQ PzXn7+rUEbdorouRPy7591MPIui1Qh5ZRefsD2dS//BRCJJms7wJdBjiPlagr2ULuz9N Xta4Ipw0uaTZeb0N+/9GV2Rf9wNxJESDsTg3e2l5osnfCVPgEhREWL2Ov0oHtla3T/Ng U9VxpaOY5EyK2IrhIi6cziCBxbDkichJmxgB7uIZgavWEMJktNov2Qy3GxFxNbAmMB7+ aXMQ== X-Gm-Message-State: AODbwcC7+YErsGkrWpktjXDX5lmed5388ZuT2TNktLxKIscJqBoNKeD2 jn0IYoK3wh953yFJwVGAKA== X-Received: by 10.80.131.67 with SMTP id 61mr10547366edh.21.1494326720701; Tue, 09 May 2017 03:45:20 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id o30sm2331510edc.42.2017.05.09.03.45.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 May 2017 03:45:20 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 08/37] KVM: arm/arm64: vgic: expose (un)lock_all_vcpus Date: Tue, 9 May 2017 12:44:37 +0200 Message-Id: <20170509104506.30929-9-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170509104506.30929-1-cdall@linaro.org> References: <20170509104506.30929-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170509_034537_542181_622A8B53 X-CRM114-Status: GOOD ( 10.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Eric Auger , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Auger We need to use those helpers in vgic-its.c so let's expose them in the private vgic header. Signed-off-by: Eric Auger Acked-by: Marc Zyngier Acked-by: Christoffer Dall --- virt/kvm/arm/vgic/vgic-kvm-device.c | 4 ++-- virt/kvm/arm/vgic/vgic.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-kvm-device.c b/virt/kvm/arm/vgic/vgic-kvm-device.c index d181d2b..859bfa8 100644 --- a/virt/kvm/arm/vgic/vgic-kvm-device.c +++ b/virt/kvm/arm/vgic/vgic-kvm-device.c @@ -259,13 +259,13 @@ static void unlock_vcpus(struct kvm *kvm, int vcpu_lock_idx) } } -static void unlock_all_vcpus(struct kvm *kvm) +void unlock_all_vcpus(struct kvm *kvm) { unlock_vcpus(kvm, atomic_read(&kvm->online_vcpus) - 1); } /* Returns true if all vcpus were locked, false otherwise */ -static bool lock_all_vcpus(struct kvm *kvm) +bool lock_all_vcpus(struct kvm *kvm) { struct kvm_vcpu *tmp_vcpu; int c; diff --git a/virt/kvm/arm/vgic/vgic.h b/virt/kvm/arm/vgic/vgic.h index 44445da..a48f33b 100644 --- a/virt/kvm/arm/vgic/vgic.h +++ b/virt/kvm/arm/vgic/vgic.h @@ -179,4 +179,7 @@ int vgic_init(struct kvm *kvm); int vgic_debug_init(struct kvm *kvm); int vgic_debug_destroy(struct kvm *kvm); +bool lock_all_vcpus(struct kvm *kvm); +void unlock_all_vcpus(struct kvm *kvm); + #endif