Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1134999rdg; Fri, 11 Aug 2023 10:47:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH55Z4HYsYNFlWvRI3ko5zMPxP3oubUisbkhCk6/aZGt7bbQBkEFO8peS1PVd0Gxjf/+EYb X-Received: by 2002:a05:6a21:7783:b0:13a:ccb9:d5ad with SMTP id bd3-20020a056a21778300b0013accb9d5admr3091771pzc.44.1691776038591; Fri, 11 Aug 2023 10:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691776038; cv=none; d=google.com; s=arc-20160816; b=SoRQ8QGf2nNonyfTkpM+R5p4TmDmX5GsjH40zGeT7wvlTVhOhcjXRQlvZ9Zynq8CfP iwl/2DKFglu2EVMAateNRONPcvzVz25PnuKl1uji+MZqghqmFkwu4TFuvD8at0Xk3Z6c gaN+PzI117WbASC89DSFqp4lpgb14sAKUDmcIU8WhKjT6Um+h0Rq0QHYTcvDWezTRF3x W5cbg5bI3XqOungPv3FpLaBZ8FvrnZZYNkdLAyK04x5W5G853m1kKP/rgooSiEBa43W1 eBeYrT1xf4M4WH+EVAOuhiwbCFGYhetZwO/kp9Ir9OvEdDPL5OI5DK64GiRHZfSQ8nR2 D+Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GZ1Pp/AxMIei8gpVJQZ9B5qABDHFvr6KOwAo55sZhB8=; fh=O+vtIgRUex7gJNsQ/u4QpnBuk4dLchjT+fLLFZguUjU=; b=TA1G/8r1bOLNS9YkmAhx1i7PkJXyNIcAHVF6W4vKZApboRBm2u1Hcir8lbfsAK1cC4 QVY+L35lC+vwkLpcJ93gcUwBpGK9HsaKRK4E0dVOp5cnWuXiMltDQcvnrB3dM6dpdQFy eKg2KS7LMmavf2ypOMhhjJw+7kOG2KFwtpnLAhzsuSmjy9JOwZQqY6OKwcLBDfTJsSBy +l69DXdIlSQaeE8Q9v+9V3OdQpyLlLuiocGJ9+bumZ8AIcNpa351NTd5h5DMFTCaTUnT i07sEJWtjAbGCYrCsMNpFRQb2NCs1OMKrsGMY4yfSuznihgcj3RrCX+/TELaqjOWV4Dd SIvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bIZh4+l2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 80-20020a630253000000b00563de9d4edasi3786860pgc.366.2023.08.11.10.47.06; Fri, 11 Aug 2023 10:47:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bIZh4+l2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236072AbjHKRBD (ORCPT + 99 others); Fri, 11 Aug 2023 13:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235977AbjHKRA6 (ORCPT ); Fri, 11 Aug 2023 13:00:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7484B30C1; Fri, 11 Aug 2023 10:00:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 09EC160B79; Fri, 11 Aug 2023 17:00:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 691AFC433C9; Fri, 11 Aug 2023 17:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691773257; bh=l1aOISgHLyF1tS0E6wyiBR8uld1+gi5jofN8WS08bZI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bIZh4+l26+bumdjG+bZVToiZ3djsVl+GVTghFsSnjne6ExjsxrYrltO5Q9rsFIMfd YeEVvJjZ7VWTWcFvjz5ZWsXfWmyZwO9/S2Cos7G1qdSmXXfUXr4ezYXmclymHemksB 5RFlZYC17AaJ2AokgHCtO+4iWICrLv85UxAsiDY+VMnBlMn7JdtD8KyceES26UHWtB 3rycLa8T0et++fte67RueG4SLZA1Sy7pwfaRsRPopgKwSgl9vdhlKBP+mh+LoGmPNR 0Ng37vhFG53uXvjrDeO0XHuxojFC+5AOpF4IWCoOJU6YnkDHvmVCN7s8T4TeaCiaFz UEc566dSW2TyQ== Received: (nullmailer pid 3606791 invoked by uid 1000); Fri, 11 Aug 2023 17:00:54 -0000 Date: Fri, 11 Aug 2023 11:00:54 -0600 From: Rob Herring To: Yi-De Wu Cc: Yingshiuan Pan , Ze-Yu Wang , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Catalin Marinas , Will Deacon , Arnd Bergmann , Matthias Brugger , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-mediatek@lists.infradead.org, David Bradil , Trilok Soni , Ivan Tseng , Jade Shih , My Chuang , Shawn Hsiao , PeiLun Suei , Liju Chen , Willix Yeh Subject: Re: [PATCH v5 04/12] virt: geniezone: Add vcpu support Message-ID: <20230811170054.GB3593414-robh@kernel.org> References: <20230727080005.14474-1-yi-de.wu@mediatek.com> <20230727080005.14474-5-yi-de.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230727080005.14474-5-yi-de.wu@mediatek.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 27, 2023 at 03:59:57PM +0800, Yi-De Wu wrote: > From: "Yingshiuan Pan" > > VMM use this interface to create vcpu instance which is a fd, and this > fd will be for any vcpu operations, such as setting vcpu registers and > accepts the most important ioctl GZVM_VCPU_RUN which requests GenieZone > hypervisor to do context switch to execute VM's vcpu context. > > Signed-off-by: Yingshiuan Pan > Signed-off-by: Jerry Wang > Signed-off-by: Liju Chen > Signed-off-by: Yi-De Wu > --- > arch/arm64/geniezone/Makefile | 2 +- > arch/arm64/geniezone/gzvm_arch_common.h | 20 ++ > arch/arm64/geniezone/vcpu.c | 88 +++++++++ > arch/arm64/geniezone/vm.c | 11 ++ > arch/arm64/include/uapi/asm/gzvm_arch.h | 30 +++ I'm almost certain that the arm64 maintainers will reject putting this here. What is the purpose of the split with drivers/virt/? Do you plan to support another arch in the near future? Yes, there's KVM stuff in arch/arm64, but that is multi-arch. > drivers/virt/geniezone/Makefile | 3 +- > drivers/virt/geniezone/gzvm_vcpu.c | 250 ++++++++++++++++++++++++ > drivers/virt/geniezone/gzvm_vm.c | 5 + > include/linux/gzvm_drv.h | 21 ++ > include/uapi/linux/gzvm.h | 136 +++++++++++++ > 10 files changed, 564 insertions(+), 2 deletions(-) > create mode 100644 arch/arm64/geniezone/vcpu.c > create mode 100644 drivers/virt/geniezone/gzvm_vcpu.c