From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A20CAC433EF for ; Fri, 10 Jun 2022 09:30:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347117AbiFJJas (ORCPT ); Fri, 10 Jun 2022 05:30:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349171AbiFJJaN (ORCPT ); Fri, 10 Jun 2022 05:30:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D71614B2CE for ; Fri, 10 Jun 2022 02:28:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 90303B83327 for ; Fri, 10 Jun 2022 09:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A3CC341C5; Fri, 10 Jun 2022 09:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654853337; bh=VMmecCnQBGsMYvAuZ5HTUn0NbyxZfCqp9Cto7QAyto4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TXLZJ8ekvp6EELQzaPCvO3grvmCVQiQQYxVFifksfwBiZ+RVfuPiYysFn/rMh12tE BfaZh/Py8Gbms5WLo+rDTVvt+1ErizFGSJGSsnxDIKoIPhvqsovgHIwdSJqMd35QjG +wgqqZixFrZFsIEtKjXxr8GO+4PFDY2KsMUzvtGLkFT6c22Rtrm8hFjcv6rFGOlc8b lu20MUqcKvzd+/BXERK7J62wbJ5U71G6rQRH6dinO7kqQdCPj4t0qVh0MBcyOuSBBP 8DVYu9YY6XHpwRrf7AUkwsSxOgMBvqj2mh2qTmtIJDEhsXYXB56fApBPCTbm8rhNLw VN3OsGq7BFp7A== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nzawp-00H6Dt-5Z; Fri, 10 Jun 2022 10:28:55 +0100 From: Marc Zyngier To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: James Morse , Suzuki K Poulose , Alexandru Elisei , Oliver Upton , Will Deacon , Fuad Tabba , Quentin Perret , Mark Brown , Reiji Watanabe , kernel-team@android.com Subject: [PATCH v2 06/19] KVM: arm64: Add three sets of flags to the vcpu state Date: Fri, 10 Jun 2022 10:28:25 +0100 Message-Id: <20220610092838.1205755-7-maz@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220610092838.1205755-1-maz@kernel.org> References: <20220610092838.1205755-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, oupton@google.com, will@kernel.org, tabba@google.com, qperret@google.com, broonie@kernel.org, reijiw@google.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org It so appears that each of the vcpu flags is really belonging to one of three categories: - a configuration flag, set once and for all - an input flag generated by the kernel for the hypervisor to use - a state flag that is only for the kernel's own bookkeeping As we are going to split all the existing flags into these three sets, introduce all three in one go. No functional change other than a bit of bloat... Reviewed-by: Fuad Tabba Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/kvm_host.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 6d30ac7e3164..af45320f247f 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -335,6 +335,15 @@ struct kvm_vcpu_arch { /* Miscellaneous vcpu state flags */ u64 flags; + /* Configuration flags, set once and for all before the vcpu can run */ + u64 cflags; + + /* Input flags to the hypervisor code, potentially cleared after use */ + u64 iflags; + + /* State flags for kernel bookkeeping, unused by the hypervisor code */ + u64 sflags; + /* * We maintain more than a single set of debug registers to support * debugging the guest from the host and to maintain separate host and -- 2.34.1