]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/loongarch/kvm: Implement LoongArch PMU extension
authorBibo Mao <maobibo@loongson.cn>
Wed, 18 Sep 2024 08:23:15 +0000 (16:23 +0800)
committerSong Gao <gaosong@loongson.cn>
Sat, 2 Nov 2024 07:20:41 +0000 (15:20 +0800)
commit6edd2a9bec902bf8c4f7a7a819bf5a9a7ae0948b
tree57e84b137a3db38ebc2f84f15fa5375728b15c33
parenta45df286013270868e6d6e94c287dff19339a4b4
target/loongarch/kvm: Implement LoongArch PMU extension

Implement PMU extension for LoongArch kvm mode. Use OnOffAuto type
variable pmu to check the PMU feature. If the PMU Feature is not supported
with KVM host, it reports error if there is pmu=on command line.

If there is no any command line about pmu parameter, it checks whether
KVM host supports the PMU Feature and set the corresponding value in cpucfg.

This patch is based on lbt patch located at
  https://lore.kernel.org/qemu-devel/20240904061859.86615-1-maobibo@loongson.cn

Co-developed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20240918082315.2345034-1-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
target/loongarch/cpu.c
target/loongarch/cpu.h
target/loongarch/kvm/kvm.c
target/loongarch/loongarch-qmp-cmds.c