diff options
author | Sheng Yang <sheng@linux.intel.com> | 2010-06-13 05:29:39 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 03:46:37 -0400 |
commit | 2d5b5a665508c60577c1088e0405850a965b6795 (patch) | |
tree | 3549325770a39b0c7fd2b7f81aa6fa42295803e2 /Documentation/kvm | |
parent | 69b61833f7ce6e61e196c8a724e4d1278b24ac02 (diff) |
KVM: x86: XSAVE/XRSTOR live migration support
This patch enable save/restore of xsave state.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'Documentation/kvm')
-rw-r--r-- | Documentation/kvm/api.txt | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 159b4efe1b0e..ffba03f55bdf 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt | |||
@@ -922,6 +922,80 @@ Define which vcpu is the Bootstrap Processor (BSP). Values are the same | |||
922 | as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default | 922 | as the vcpu id in KVM_CREATE_VCPU. If this ioctl is not called, the default |
923 | is vcpu 0. | 923 | is vcpu 0. |
924 | 924 | ||
925 | 4.41 KVM_GET_XSAVE | ||
926 | |||
927 | Capability: KVM_CAP_XSAVE | ||
928 | Architectures: x86 | ||
929 | Type: vcpu ioctl | ||
930 | Parameters: struct kvm_xsave (out) | ||
931 | Returns: 0 on success, -1 on error | ||
932 | |||
933 | struct kvm_xsave { | ||
934 | __u32 region[1024]; | ||
935 | }; | ||
936 | |||
937 | This ioctl would copy current vcpu's xsave struct to the userspace. | ||
938 | |||
939 | 4.42 KVM_SET_XSAVE | ||
940 | |||
941 | Capability: KVM_CAP_XSAVE | ||
942 | Architectures: x86 | ||
943 | Type: vcpu ioctl | ||
944 | Parameters: struct kvm_xsave (in) | ||
945 | Returns: 0 on success, -1 on error | ||
946 | |||
947 | struct kvm_xsave { | ||
948 | __u32 region[1024]; | ||
949 | }; | ||
950 | |||
951 | This ioctl would copy userspace's xsave struct to the kernel. | ||
952 | |||
953 | 4.43 KVM_GET_XCRS | ||
954 | |||
955 | Capability: KVM_CAP_XCRS | ||
956 | Architectures: x86 | ||
957 | Type: vcpu ioctl | ||
958 | Parameters: struct kvm_xcrs (out) | ||
959 | Returns: 0 on success, -1 on error | ||
960 | |||
961 | struct kvm_xcr { | ||
962 | __u32 xcr; | ||
963 | __u32 reserved; | ||
964 | __u64 value; | ||
965 | }; | ||
966 | |||
967 | struct kvm_xcrs { | ||
968 | __u32 nr_xcrs; | ||
969 | __u32 flags; | ||
970 | struct kvm_xcr xcrs[KVM_MAX_XCRS]; | ||
971 | __u64 padding[16]; | ||
972 | }; | ||
973 | |||
974 | This ioctl would copy current vcpu's xcrs to the userspace. | ||
975 | |||
976 | 4.44 KVM_SET_XCRS | ||
977 | |||
978 | Capability: KVM_CAP_XCRS | ||
979 | Architectures: x86 | ||
980 | Type: vcpu ioctl | ||
981 | Parameters: struct kvm_xcrs (in) | ||
982 | Returns: 0 on success, -1 on error | ||
983 | |||
984 | struct kvm_xcr { | ||
985 | __u32 xcr; | ||
986 | __u32 reserved; | ||
987 | __u64 value; | ||
988 | }; | ||
989 | |||
990 | struct kvm_xcrs { | ||
991 | __u32 nr_xcrs; | ||
992 | __u32 flags; | ||
993 | struct kvm_xcr xcrs[KVM_MAX_XCRS]; | ||
994 | __u64 padding[16]; | ||
995 | }; | ||
996 | |||
997 | This ioctl would set vcpu's xcr to the value userspace specified. | ||
998 | |||
925 | 5. The kvm_run structure | 999 | 5. The kvm_run structure |
926 | 1000 | ||
927 | Application code obtains a pointer to the kvm_run structure by | 1001 | Application code obtains a pointer to the kvm_run structure by |