[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <39ca9998-e936-8a5b-4cd8-596d907f4d8f@redhat.com>
Date: Mon, 20 Dec 2021 10:04:00 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Jing Liu <jing2.liu@...el.com>, x86@...nel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com
Cc: seanjc@...gle.com, jun.nakajima@...el.com, kevin.tian@...el.com,
jing2.liu@...ux.intel.com, guang.zeng@...el.com,
wei.w.wang@...el.com, yang.zhong@...el.com
Subject: Re: [PATCH v2 20/23] docs: kvm: Add KVM_GET_XSAVE2
On 12/17/21 16:30, Jing Liu wrote:
> From: Wei Wang <wei.w.wang@...el.com>
>
> Update the api doc with the new KVM_GET_XSAVE2 ioctl, which is used
> when KVM_CAP_XSAVE2 is negotiated with the userspace. KVM_SET_XSAVE
> ioctl is re-used when KVM_CAP_XSAVE2 is used. The kvm_xsave struct
> is updated to support data size larger that the legacy hardcoded 4KB.
This commit message is incorrect, since KVM_ENABLE_CAP(KVM_CAP_XSAVE2)
was removed from the API. You can squash this patch in patch 18, and
also add to the documentation the same notes that I made in the reply.
Thanks,
Paolo
> Signed-off-by: Wei Wang <wei.w.wang@...el.com>
> Signed-off-by: Zeng Guang <guang.zeng@...el.com>
> Signed-off-by: Jing Liu <jing2.liu@...el.com>
> ---
> Documentation/virt/kvm/api.rst | 29 ++++++++++++++++++++++++++++-
> 1 file changed, 28 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index eb5671ca2dba..0f4ed2d4aea6 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -1566,15 +1566,18 @@ otherwise it will return EBUSY error.
>
> struct kvm_xsave {
> __u32 region[1024];
> + __u32 extra[0];
> };
>
> This ioctl would copy current vcpu's xsave struct to the userspace.
> +Application should use KVM_GET_XSAVE2 if xsave states are larger than
> +4KB.
>
>
> 4.43 KVM_SET_XSAVE
> ------------------
>
> -:Capability: KVM_CAP_XSAVE
> +:Capability: KVM_CAP_XSAVE and KVM_CAP_XSAVE2
> :Architectures: x86
> :Type: vcpu ioctl
> :Parameters: struct kvm_xsave (in)
> @@ -1585,9 +1588,12 @@ This ioctl would copy current vcpu's xsave struct to the userspace.
>
> struct kvm_xsave {
> __u32 region[1024];
> + __u32 extra[0];
> };
>
> This ioctl would copy userspace's xsave struct to the kernel.
> +Application can use this ioctl for xstate buffer in any size
> +returned from KVM_CHECK_EXTENSION(KVM_CAP_XSAV2).
Typo, s/XSAV2/XSAVE2/
>
> 4.44 KVM_GET_XCRS
> @@ -5507,6 +5513,27 @@ the trailing ``'\0'``, is indicated by ``name_size`` in the header.
> The Stats Data block contains an array of 64-bit values in the same order
> as the descriptors in Descriptors block.
>
> +4.42 KVM_GET_XSAVE2
> +------------------
> +
> +:Capability: KVM_CAP_XSAVE2
> +:Architectures: x86
> +:Type: vcpu ioctl
> +:Parameters: struct kvm_xsave (out)
> +:Returns: 0 on success, -1 on error
> +
> +
> +::
> +
> + struct kvm_xsave {
> + __u32 region[1024];
> + __u32 extra[0];
> + };
> +
> +This ioctl would copy current vcpu's xsave struct to the userspace.
> +Application can use this ioctl for xstate buffer in any size
> +returned from KVM_CHECK_EXTENSION(KVM_CAP_XSAV2).
Typo, s/XSAV2/XSAVE2/
> +
> 5. The kvm_run structure
> ========================
>
>
Powered by blists - more mailing lists