From: zhaotianrui <zhaotianrui@loongson.cn>
To: WANG Xuerui <kernel@xen0n.name>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Huacai Chen <chenhuacai@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
loongarch@lists.linux.dev, Jens Axboe <axboe@kernel.dk>,
Mark Brown <broonie@kernel.org>,
Alex Deucher <alexander.deucher@amd.com>,
Oliver Upton <oliver.upton@linux.dev>,
maobibo@loongson.cn, Xi Ruoyao <xry111@xry111.site>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v20 28/30] LoongArch: KVM: Enable kvm config and add the makefile
Date: Tue, 12 Sep 2023 17:47:51 +0800 [thread overview]
Message-ID: <f4fd2d6c-400b-1f26-7872-d9a286c03a8f@loongson.cn> (raw)
In-Reply-To: <925522e9-9be6-2545-4c4e-1608eaab523a@xen0n.name>
在 2023/9/8 上午4:10, WANG Xuerui 写道:
>
> On 8/31/23 16:30, Tianrui Zhao wrote:
>> Enable LoongArch kvm config and add the makefile to support build kvm
>> module.
>>
>> Reviewed-by: Bibo Mao <maobibo@loongson.cn>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Link:
>> https://lore.kernel.org/oe-kbuild-all/202304131526.iXfLaVZc-lkp@intel.com/
>> Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
>> ---
>> arch/loongarch/Kbuild | 1 +
>> arch/loongarch/Kconfig | 3 ++
>> arch/loongarch/configs/loongson3_defconfig | 2 +
>> arch/loongarch/kvm/Kconfig | 45 ++++++++++++++++++++++
>> arch/loongarch/kvm/Makefile | 22 +++++++++++
>> 5 files changed, 73 insertions(+)
>> create mode 100644 arch/loongarch/kvm/Kconfig
>> create mode 100644 arch/loongarch/kvm/Makefile
>>
>> diff --git a/arch/loongarch/Kbuild b/arch/loongarch/Kbuild
>> index b01f5cdb27..40be8a1696 100644
>> --- a/arch/loongarch/Kbuild
>> +++ b/arch/loongarch/Kbuild
>> @@ -2,6 +2,7 @@ obj-y += kernel/
>> obj-y += mm/
>> obj-y += net/
>> obj-y += vdso/
>> +obj-y += kvm/
> Do we want to keep the list alphabetically sorted here?
It could be resorted by alphabetical.
>> # for cleaning
>> subdir- += boot
>> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
>> index ecf282dee5..7f2f7ccc76 100644
>> --- a/arch/loongarch/Kconfig
>> +++ b/arch/loongarch/Kconfig
>> @@ -123,6 +123,7 @@ config LOONGARCH
>> select HAVE_KPROBES
>> select HAVE_KPROBES_ON_FTRACE
>> select HAVE_KRETPROBES
>> + select HAVE_KVM
>> select HAVE_MOD_ARCH_SPECIFIC
>> select HAVE_NMI
>> select HAVE_PCI
>> @@ -650,3 +651,5 @@ source "kernel/power/Kconfig"
>> source "drivers/acpi/Kconfig"
>> endmenu
>> +
>> +source "arch/loongarch/kvm/Kconfig"
>> diff --git a/arch/loongarch/configs/loongson3_defconfig
>> b/arch/loongarch/configs/loongson3_defconfig
>> index d64849b4cb..7acb4ae7af 100644
>> --- a/arch/loongarch/configs/loongson3_defconfig
>> +++ b/arch/loongarch/configs/loongson3_defconfig
>> @@ -63,6 +63,8 @@ CONFIG_EFI_ZBOOT=y
>> CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
>> CONFIG_EFI_CAPSULE_LOADER=m
>> CONFIG_EFI_TEST=m
>> +CONFIG_VIRTUALIZATION=y
>> +CONFIG_KVM=m
>> CONFIG_MODULES=y
>> CONFIG_MODULE_FORCE_LOAD=y
>> CONFIG_MODULE_UNLOAD=y
>> diff --git a/arch/loongarch/kvm/Kconfig b/arch/loongarch/kvm/Kconfig
>> new file mode 100644
>> index 0000000000..bf7d6e7cde
>> --- /dev/null
>> +++ b/arch/loongarch/kvm/Kconfig
>> @@ -0,0 +1,45 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +#
>> +# KVM configuration
>> +#
>> +
>> +source "virt/kvm/Kconfig"
>> +
>> +menuconfig VIRTUALIZATION
>> + bool "Virtualization"
>> + help
>> + Say Y here to get to see options for using your Linux host to run
>> + other operating systems inside virtual machines (guests).
>> + This option alone does not add any kernel code.
>> +
>> + If you say N, all options in this submenu will be skipped and
>> + disabled.
>> +
>> +if VIRTUALIZATION
>> +
>> +config AS_HAS_LVZ_EXTENSION
>> + def_bool $(as-instr,hvcl 0)
>> +
>> +config KVM
>> + tristate "Kernel-based Virtual Machine (KVM) support"
>> + depends on HAVE_KVM
>> + depends on AS_HAS_LVZ_EXTENSION
>> + select MMU_NOTIFIER
>> + select ANON_INODES
>> + select PREEMPT_NOTIFIERS
>> + select KVM_MMIO
>> + select KVM_GENERIC_DIRTYLOG_READ_PROTECT
>> + select KVM_GENERIC_HARDWARE_ENABLING
>> + select KVM_XFER_TO_GUEST_WORK
>> + select HAVE_KVM_DIRTY_RING_ACQ_REL
>> + select HAVE_KVM_VCPU_ASYNC_IOCTL
>> + select HAVE_KVM_EVENTFD
>> + select SRCU
> Make the list of selects also alphabetically sorted?
It also could be resorted by alphabetical.
>> + help
>> + Support hosting virtualized guest machines using hardware
>> + virtualization extensions. You will need a fairly processor
>> + equipped with virtualization extensions.
>
> The word "fairly" seems extraneous here, and can be simply dropped.
Thanks, I will remove this "fairly" word.
>
> (I suppose you forgot to delete it after tweaking the original
> sentence, that came from arch/x86/kvm: "You will need a fairly recent
> processor ..." -- all LoongArch processors are recent!)
>
>> +
>> + If unsure, say N.
>> +
>> +endif # VIRTUALIZATION
>> diff --git a/arch/loongarch/kvm/Makefile b/arch/loongarch/kvm/Makefile
>> new file mode 100644
>> index 0000000000..2335e873a6
>> --- /dev/null
>> +++ b/arch/loongarch/kvm/Makefile
>> @@ -0,0 +1,22 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +#
>> +# Makefile for LOONGARCH KVM support
> "LoongArch" -- you may want to check the entire patch series for such
> ALL-CAPS references to LoongArch in natural language paragraphs, they
> all want to be spelled "LoongArch".
Thanks, I will fix it.
>> +#
>> +
>> +ccflags-y += -I $(srctree)/$(src)
>> +
>> +include $(srctree)/virt/kvm/Makefile.kvm
>> +
>> +obj-$(CONFIG_KVM) += kvm.o
>> +
>> +kvm-y += main.o
>> +kvm-y += vm.o
>> +kvm-y += vmid.o
>> +kvm-y += tlb.o
>> +kvm-y += mmu.o
>> +kvm-y += vcpu.o
>> +kvm-y += exit.o
>> +kvm-y += interrupt.o
>> +kvm-y += timer.o
>> +kvm-y += switch.o
>> +kvm-y += csr_ops.o
> I'd suggest sorting this list too to better avoid editing conflicts in
> the future.
I will also resort them by alphabetical.
Thanks
Tianrui Zhao
next prev parent reply other threads:[~2023-09-12 9:48 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 8:29 [PATCH v20 00/30] Add KVM LoongArch support Tianrui Zhao
2023-08-31 8:29 ` [PATCH v20 01/30] LoongArch: KVM: Add kvm related header files Tianrui Zhao
2023-09-11 4:59 ` Huacai Chen
2023-09-11 9:41 ` zhaotianrui
2023-08-31 8:29 ` [PATCH v20 02/30] LoongArch: KVM: Implement kvm module related interface Tianrui Zhao
2023-08-31 8:29 ` [PATCH v20 03/30] LoongArch: KVM: Implement kvm hardware enable, disable interface Tianrui Zhao
2023-08-31 8:29 ` [PATCH v20 04/30] LoongArch: KVM: Implement VM related functions Tianrui Zhao
2023-08-31 8:29 ` [PATCH v20 05/30] LoongArch: KVM: Add vcpu related header files Tianrui Zhao
2023-09-11 8:07 ` Huacai Chen
2023-09-12 8:26 ` zhaotianrui
2023-08-31 8:29 ` [PATCH v20 06/30] LoongArch: KVM: Implement vcpu create and destroy interface Tianrui Zhao
2023-08-31 8:29 ` [PATCH v20 07/30] LoongArch: KVM: Implement vcpu run interface Tianrui Zhao
2023-08-31 8:29 ` [PATCH v20 08/30] LoongArch: KVM: Implement vcpu handle exit interface Tianrui Zhao
2023-08-31 8:29 ` [PATCH v20 09/30] LoongArch: KVM: Implement vcpu get, vcpu set registers Tianrui Zhao
2023-09-11 9:03 ` Huacai Chen
2023-09-11 10:03 ` zhaotianrui
2023-09-11 10:13 ` zhaotianrui
2023-09-11 11:49 ` Huacai Chen
2023-09-12 2:41 ` bibo mao
2023-08-31 8:30 ` [PATCH v20 10/30] LoongArch: KVM: Implement vcpu ENABLE_CAP ioctl interface Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 11/30] LoongArch: KVM: Implement fpu related operations for vcpu Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 12/30] LoongArch: KVM: Implement vcpu interrupt operations Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 13/30] LoongArch: KVM: Implement misc vcpu related interfaces Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 14/30] LoongArch: KVM: Implement vcpu load and vcpu put operations Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 15/30] LoongArch: KVM: Implement vcpu status description Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 16/30] LoongArch: KVM: Implement update VM id function Tianrui Zhao
2023-09-11 10:00 ` Huacai Chen
2023-09-11 10:23 ` bibo mao
2023-09-12 3:51 ` Huacai Chen
2023-08-31 8:30 ` [PATCH v20 17/30] LoongArch: KVM: Implement virtual machine tlb operations Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 18/30] LoongArch: KVM: Implement vcpu timer operations Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 19/30] LoongArch: KVM: Implement kvm mmu operations Tianrui Zhao
2023-09-07 19:57 ` WANG Xuerui
2023-09-12 9:42 ` zhaotianrui
2023-08-31 8:30 ` [PATCH v20 20/30] LoongArch: KVM: Implement handle csr excption Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 21/30] LoongArch: KVM: Implement handle iocsr exception Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 22/30] LoongArch: KVM: Implement handle idle exception Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 23/30] LoongArch: KVM: Implement handle gspr exception Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 24/30] LoongArch: KVM: Implement handle mmio exception Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 25/30] LoongArch: KVM: Implement handle fpu exception Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 26/30] LoongArch: KVM: Implement kvm exception vector Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 27/30] LoongArch: KVM: Implement vcpu world switch Tianrui Zhao
2023-09-07 20:04 ` WANG Xuerui
2023-09-12 9:55 ` zhaotianrui
2023-08-31 8:30 ` [PATCH v20 28/30] LoongArch: KVM: Enable kvm config and add the makefile Tianrui Zhao
2023-09-07 20:10 ` WANG Xuerui
2023-09-08 1:40 ` Huacai Chen
2023-09-08 1:49 ` bibo mao
2023-09-08 1:54 ` Huacai Chen
2023-09-12 9:47 ` zhaotianrui [this message]
2023-09-11 7:30 ` WANG Xuerui
2023-09-12 1:57 ` zhaotianrui
2023-08-31 8:30 ` [PATCH v20 29/30] LoongArch: KVM: Supplement kvm document about LoongArch-specific part Tianrui Zhao
2023-08-31 8:30 ` [PATCH v20 30/30] LoongArch: KVM: Add maintainers for LoongArch KVM Tianrui Zhao
2023-09-11 4:02 ` [PATCH v20 00/30] Add KVM LoongArch support Huacai Chen
2023-09-11 9:34 ` zhaotianrui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f4fd2d6c-400b-1f26-7872-d9a286c03a8f@loongson.cn \
--to=zhaotianrui@loongson.cn \
--cc=alexander.deucher@amd.com \
--cc=axboe@kernel.dk \
--cc=broonie@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@xen0n.name \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=loongarch@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=xry111@xry111.site \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®