From 9184f5be6d77b323603b575afa3b1d7c4fc295f9 Mon Sep 17 00:00:00 2001 From: Gu Zitao Date: Tue, 22 Feb 2022 22:12:46 +0800 Subject: [PATCH] sw64: kvm: add definitions for kvm Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SPZD CVE: NA ------------------------------- Add KVM_SW64_VCPU_INIT definition for SW64 vcpu init. Introduce KVM_SW64_GET_VCB and KVM_SW64_SET_VCB definitions to save and restore vcpu's context for hot-snapshot. Signed-off-by: Gu Zitao #openEuler_contributor Signed-off-by: Laibin Qiu Reviewed-by: Hanjun Guo Signed-off-by: Zheng Zengkai --- include/uapi/linux/kvm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 3c0dcfed4835..3af8b0164f1e 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -1415,6 +1415,11 @@ struct kvm_s390_ucas_mapping { #define KVM_SET_PMU_EVENT_FILTER _IOW(KVMIO, 0xb2, struct kvm_pmu_event_filter) #define KVM_PPC_SVM_OFF _IO(KVMIO, 0xb3) +/* ioctl for SW vcpu init */ +#define KVM_SW64_VCPU_INIT _IO(KVMIO, 0xba) +#define KVM_SW64_GET_VCB _IO(KVMIO, 0xbc) +#define KVM_SW64_SET_VCB _IO(KVMIO, 0xbd) + /* ioctl for vm fd */ #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) -- GitLab