Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • uapi
  • linux
  • kvm.h
Find file BlameHistoryPermalink
  • Guang Zeng's avatar
    kvm: x86: Add support for getting/setting expanded xstate buffer · be50b206
    Guang Zeng authored Jan 05, 2022
    With KVM_CAP_XSAVE, userspace uses a hardcoded 4KB buffer to get/set
    xstate data from/to KVM. This doesn't work when dynamic xfeatures
    (e.g. AMX) are exposed to the guest as they require a larger buffer
    size.
    
    Introduce a new capability (KVM_CAP_XSAVE2). Userspace VMM gets the
    required xstate buffer size via KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2).
    KVM_SET_XSAVE is extended to work with both legacy and new capabilities
    by doing properly-sized memdup_user() based on the guest fpu container.
    KVM_GET_XSAVE is kept for backward-compatible reason. Instead,
    KVM_GET_XSAVE2 is introduced under KVM_CAP_XSAVE2 as the preferred
    interface for getting xstate buffer (4KB or larger size) from KVM
    (Link: https://lkml.org/lkml/2021/12/15/510
    
    )
    
    Also, update the api doc with the new KVM_GET_XSAVE2 ioctl.
    
    Signed-off-by: default avatarGuang Zeng <guang.zeng@intel.com>
    Signed-off-by: default avatarWei Wang <wei.w.wang@intel.com>
    Signed-off-by: default avatarJing Liu <jing2.liu@intel.com>
    Signed-off-by: default avatarKevin Tian <kevin.tian@intel.com>
    Signed-off-by: default avatarYang Zhong <yang.zhong@intel.com>
    Message-Id: <20220105123532.12586-19-yang.zhong@intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    be50b206
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7