Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2270490rda; Tue, 24 Oct 2023 19:11:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkI3i/kyHIVBUhw+QVUYs+PHomAjIbjTU3yxsqZLYvCKhhaNyWoQJ96WCsamA61YV8ns3s X-Received: by 2002:a81:6d07:0:b0:5ae:15bb:466a with SMTP id i7-20020a816d07000000b005ae15bb466amr722545ywc.14.1698199870929; Tue, 24 Oct 2023 19:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698199870; cv=none; d=google.com; s=arc-20160816; b=kWvA7V/bOkUMrOZkbuuS1PwyXP01yfyNbHCiq7jRKAo8aBkeIFgItFqzAVRcjgXJqY q9oFKJSVV2oCxQnGDsQt8DgnHhH2M5PV2rOJkj3AWj8v9PEp/PksFbR/aKVuqvZPFxv4 VaMg8aEJ8k5waNCqo7pg2F9j0YdkwJ4KEyqyX+j2zZsgSyMPDIV/cHTpMqN/0m3E2Shu 4AN+ajakgq/N2GQuE4rd0NYkg+J4dp5XkbhsgpyfwrfCAxN+qaRcjONU+Dmdh5KzOXlP Ws8mrDwVGPqEe70WHxkwdacHtqABz7n79zj4wRm5MNmbgHRe2nj5hsfq1S4iqhSs4qTT Hsyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZA5fiH4peG6+uDxYXbaF5pTIh1KbAk4zl4oFHk/Y5CQ=; fh=eLR0glhk5e0MlEzjTiC+mmLUNExCmzeEGW3lAC/n0GI=; b=EOPtdWNCB2K18uZFnRvOFqeaxPwMPePAqAGIStGBPSCNMZQBo+TMym0uAcvjZd80aX pvxPFqUpIiVWbqgpCChW8OmpVi8+YbACKrL1M3c03aXsV1qBN2d2lbZImROznm5kZki5 lWypO0l6ZLPbZZySj85tZA5nrguOm7WQJDwWMn87PdMuyEerTmX5AsucUXGsqMlS5Tgh EObYE0aKIhNZEzPlOVvTogQR73/C/X8XJUr7MytEGkwVg5Wu1Ifp6d3vcmMksTL4Gm8G YKLdTTSmBmBN6KxxB/hRXKbbkdunpDjL6UUzqsGviVHVKBYqAMMU5wsiKYZOUCaU4Dva xMnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uH4cNl8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id m125-20020a0dfc83000000b005a1d57d9878si9706728ywf.457.2023.10.24.19.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 19:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uH4cNl8K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A5731801BFD7; Tue, 24 Oct 2023 19:11:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231537AbjJYCKn (ORCPT + 99 others); Tue, 24 Oct 2023 22:10:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbjJYCKm (ORCPT ); Tue, 24 Oct 2023 22:10:42 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28EAA10C6; Tue, 24 Oct 2023 19:10:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4CE8C433CB; Wed, 25 Oct 2023 02:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698199839; bh=MEW/6MGCX1XZaqEbTH7Tu3kHTVovAqY5DrZ29wr8Xew=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uH4cNl8Kw4fsOajNr7Apq3a9x7Mz4PRem/rdu9LNOqEbIOgzfW2BbLbVuGy/biovl QRhz06szqJD04u3hqsYEnp7iItdAGSvtwhGCCFROSiDp9vZBz62wo3804WG83PwSNj hpH1IM/EOjB0SGjKkN8EXLm93CXok2rEzDQ7FHf6SLHoDbFocR0gdmeMIgkAydLzBu dXdneNdkizIdig7DPIz2AWdn8tRnmMafpJqSmobTzYbq+v37jcwL9PskYhXox/rg8L 9hA7MvauTgLNdBfQfyoDW9cbADe0ZtFaqed519bCR4dA71RFCIwg8OGRDOhGM2i6c6 etw1dYIIEbelQ== Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-53e70b0a218so7764079a12.2; Tue, 24 Oct 2023 19:10:39 -0700 (PDT) X-Gm-Message-State: AOJu0YyhFr2K17bcaMxdFMvzO69hLPmQvZqd1SdWELH1ljZGCDsYLsUb jNLujRlrBqthSpzD7rS12BC9dwT4Cm7lY4jadMs= X-Received: by 2002:a17:906:fe4c:b0:9ba:a38:f2b2 with SMTP id wz12-20020a170906fe4c00b009ba0a38f2b2mr11705086ejb.41.1698199838119; Tue, 24 Oct 2023 19:10:38 -0700 (PDT) MIME-Version: 1.0 References: <20231005091825.3207300-1-chenhuacai@loongson.cn> In-Reply-To: <20231005091825.3207300-1-chenhuacai@loongson.cn> From: Huacai Chen Date: Wed, 25 Oct 2023 10:10:26 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] LoongArch KVM changes for v6.7 To: Huacai Chen Cc: Paolo Bonzini , kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xuerui Wang , Jiaxun Yang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 19:11:02 -0700 (PDT) Hi, Paolo, Excuse me, but this is just a gentle reminder. The 6.7 merge window is coming soon, have you missed this PR mail? Or should I rebase to 6.6-rc7 to send a new PR (a randconfig build error is fixed in 6.6-rc7)? Huacai On Thu, Oct 5, 2023 at 5:18=E2=80=AFPM Huacai Chen = wrote: > > The following changes since commit 8a749fd1a8720d4619c91c8b6e7528c0a355c0= aa: > > Linux 6.6-rc4 (2023-10-01 14:15:13 -0700) > > are available in the Git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson= .git tags/loongarch-kvm-6.7 > > for you to fetch changes up to 2c10cda4b777be4be9d9e69e4f70c818dbb15e21: > > LoongArch: KVM: Add maintainers for LoongArch KVM (2023-10-02 10:01:29 = +0800) > > ---------------------------------------------------------------- > LoongArch KVM changes for v6.7 > > Add LoongArch's KVM support. Loongson 3A5000/3A6000 supports hardware > assisted virtualization. With cpu virtualization, there are separate > hw-supported user mode and kernel mode in guest mode. With memory > virtualization, there are two-level hw mmu table for guest mode and host > mode. Also there is separate hw cpu timer with consant frequency in > guest mode, so that vm can migrate between hosts with different freq. > Currently, we are able to boot LoongArch Linux guests. > > Few key aspects of KVM LoongArch added by this series are: > 1. Enable kvm hardware features when kvm module is loaded. > 2. Implement VM and vcpu related ioctl interface such as vcpu create, > vcpu run etc. GET_ONE_REG/SET_ONE_REG ioctl commands are use to > get general registers one by one. > 3. Hardware access about MMU, timer and csr are emulated in kernel. > 4. Hardwares such as mmio and iocsr device are emulated in user space > such as IPI, irqchips, pci devices etc. > > ---------------------------------------------------------------- > Tianrui Zhao (25): > LoongArch: KVM: Add kvm related header files > LoongArch: KVM: Implement kvm module related interface > LoongArch: KVM: Implement kvm hardware enable, disable interface > LoongArch: KVM: Implement VM related functions > LoongArch: KVM: Add vcpu related header files > LoongArch: KVM: Implement basic vcpu interfaces > LoongArch: KVM: Implement basic vcpu ioctl interfaces > LoongArch: KVM: Implement fpu operations for vcpu > LoongArch: KVM: Implement vcpu interrupt operations > LoongArch: KVM: Implement vcpu load and vcpu put operations > LoongArch: KVM: Implement misc vcpu related interfaces > LoongArch: KVM: Implement vcpu timer operations > LoongArch: KVM: Implement virtual machine tlb operations > LoongArch: KVM: Implement kvm mmu operations > LoongArch: KVM: Implement handle csr exception > LoongArch: KVM: Implement handle iocsr exception > LoongArch: KVM: Implement handle idle exception > LoongArch: KVM: Implement handle gspr exception > LoongArch: KVM: Implement handle mmio exception > LoongArch: KVM: Implement handle fpu exception > LoongArch: KVM: Implement kvm exception vectors > LoongArch: KVM: Implement vcpu world switch > LoongArch: KVM: Enable kvm config and add the makefile > LoongArch: KVM: Supplement kvm document about LoongArch-specific pa= rt > LoongArch: KVM: Add maintainers for LoongArch KVM > > Documentation/virt/kvm/api.rst | 70 ++- > MAINTAINERS | 12 + > arch/loongarch/Kbuild | 2 + > arch/loongarch/Kconfig | 6 + > arch/loongarch/configs/loongson3_defconfig | 2 + > arch/loongarch/include/asm/inst.h | 16 + > arch/loongarch/include/asm/kvm_csr.h | 211 +++++++ > arch/loongarch/include/asm/kvm_host.h | 237 ++++++++ > arch/loongarch/include/asm/kvm_mmu.h | 139 +++++ > arch/loongarch/include/asm/kvm_types.h | 11 + > arch/loongarch/include/asm/kvm_vcpu.h | 93 +++ > arch/loongarch/include/asm/loongarch.h | 19 +- > arch/loongarch/include/uapi/asm/kvm.h | 108 ++++ > arch/loongarch/kernel/asm-offsets.c | 32 + > arch/loongarch/kvm/Kconfig | 40 ++ > arch/loongarch/kvm/Makefile | 22 + > arch/loongarch/kvm/exit.c | 696 +++++++++++++++++++++ > arch/loongarch/kvm/interrupt.c | 183 ++++++ > arch/loongarch/kvm/main.c | 420 +++++++++++++ > arch/loongarch/kvm/mmu.c | 914 +++++++++++++++++++++++= +++++ > arch/loongarch/kvm/switch.S | 250 ++++++++ > arch/loongarch/kvm/timer.c | 197 ++++++ > arch/loongarch/kvm/tlb.c | 32 + > arch/loongarch/kvm/trace.h | 162 +++++ > arch/loongarch/kvm/vcpu.c | 939 +++++++++++++++++++++++= ++++++ > arch/loongarch/kvm/vm.c | 94 +++ > include/uapi/linux/kvm.h | 9 + > 27 files changed, 4902 insertions(+), 14 deletions(-) > create mode 100644 arch/loongarch/include/asm/kvm_csr.h > create mode 100644 arch/loongarch/include/asm/kvm_host.h > create mode 100644 arch/loongarch/include/asm/kvm_mmu.h > create mode 100644 arch/loongarch/include/asm/kvm_types.h > create mode 100644 arch/loongarch/include/asm/kvm_vcpu.h > create mode 100644 arch/loongarch/include/uapi/asm/kvm.h > create mode 100644 arch/loongarch/kvm/Kconfig > create mode 100644 arch/loongarch/kvm/Makefile > create mode 100644 arch/loongarch/kvm/exit.c > create mode 100644 arch/loongarch/kvm/interrupt.c > create mode 100644 arch/loongarch/kvm/main.c > create mode 100644 arch/loongarch/kvm/mmu.c > create mode 100644 arch/loongarch/kvm/switch.S > create mode 100644 arch/loongarch/kvm/timer.c > create mode 100644 arch/loongarch/kvm/tlb.c > create mode 100644 arch/loongarch/kvm/trace.h > create mode 100644 arch/loongarch/kvm/vcpu.c > create mode 100644 arch/loongarch/kvm/vm.c