Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C Ch Linux Perf
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • Ch Linux Perf
  • Repository
Switch branch/tag
  • ch-linux-perf
  • arch
  • arm64
  • kvm
  • hyp
  • exception.c
Find file BlameHistoryPermalink
  • Marc Zyngier's avatar
    KVM: arm64: Commit pending PC adjustemnts before returning to userspace · 26778aaa
    Marc Zyngier authored May 06, 2021
    
    
    KVM currently updates PC (and the corresponding exception state)
    using a two phase approach: first by setting a set of flags,
    then by converting these flags into a state update when the vcpu
    is about to enter the guest.
    
    However, this creates a disconnect with userspace if the vcpu thread
    returns there with any exception/PC flag set. In this case, the exposed
    context is wrong, as userspace doesn't have access to these flags
    (they aren't architectural). It also means that these flags are
    preserved across a reset, which isn't expected.
    
    To solve this problem, force an explicit synchronisation of the
    exception state on vcpu exit to userspace. As an optimisation
    for nVHE systems, only perform this when there is something pending.
    Reported-by: default avatarZenghui Yu <yuzenghui@huawei.com>
    Reviewed-by: Alexandru Elisei's avatarAlexandru Elisei <alexandru.elisei@arm.com>
    Reviewed-by: default avatarZenghui Yu <yuzenghui@huawei.com>
    Tested-by: default avatarZenghui Yu <yuzenghui@huawei.com>
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Cc: stable@vger.kernel.org # 5.11
    26778aaa

Replace exception.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.