]> www.infradead.org Git - nvme.git/commit
LoongArch: KVM: Add PV steal time support in host side
authorBibo Mao <maobibo@loongson.cn>
Tue, 9 Jul 2024 08:25:51 +0000 (16:25 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 9 Jul 2024 08:25:51 +0000 (16:25 +0800)
commitb4ba157044ea433a66126603ad7140e12dbc794b
tree57e1e54b36213e391cea34a7aebc7a9883164b76
parentd7ad41a31d91abd01a4d9b040074d808899636ea
LoongArch: KVM: Add PV steal time support in host side

Add ParaVirt steal time feature in host side, VM can search supported
features provided by KVM hypervisor, a feature KVM_FEATURE_STEAL_TIME
is added here. Like x86, steal time structure is saved in guest memory,
one hypercall function KVM_HCALL_FUNC_NOTIFY is added to notify KVM to
enable this feature.

One CPU attr ioctl command KVM_LOONGARCH_VCPU_PVTIME_CTRL is added to
save and restore the base address of steal time structure when a VM is
migrated.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/kvm_host.h
arch/loongarch/include/asm/kvm_para.h
arch/loongarch/include/asm/kvm_vcpu.h
arch/loongarch/include/asm/loongarch.h
arch/loongarch/include/uapi/asm/kvm.h
arch/loongarch/kvm/Kconfig
arch/loongarch/kvm/exit.c
arch/loongarch/kvm/vcpu.c