All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: kvmarm@lists.cs.columbia.edu
Cc: maz@kernel.org, xu910121@sina.com, Dave.Martin@arm.com
Subject: [PATCH v3 0/4] KVM: arm64: Fix get-reg-list regression
Date: Thu,  5 Nov 2020 10:10:18 +0100	[thread overview]
Message-ID: <20201105091022.15373-1-drjones@redhat.com> (raw)

张东旭 <xu910121@sina.com> reported a regression seen with CentOS
when migrating from an old kernel to a new one. The problem was
that QEMU rejected the migration since KVM_GET_REG_LIST reported
a register was missing on the destination. Extra registers are OK
on the destination, but not missing ones. The regression reproduces
with upstream kernels when migrating from a 4.15 or later kernel,
up to one with commit 73433762fcae ("KVM: arm64/sve: System register
context switch and access support"), to a kernel that includes that
commit, e.g. the latest mainline (5.10-rc2).

The first patch of this series is the fix. The next two patches,
which don't have any intended functional changes, allow ID_SANITISED
to be used for registers that flip between exposing features and
being RAZ, which allows some code to be removed.

v3:
 - Improve commit messages [Dave]
 - Add new patch to consolidate REG_HIDDEN* flags [Dave]

v2:
 - CC stable [Marc]
 - Only one RAZ flag is enough [Marc]
 - Move id_visibility() up by read_id_reg() since they'll likely
   be maintained together [drew]


Andrew Jones (4):
  KVM: arm64: Don't hide ID registers from userspace
  KVM: arm64: Consolidate REG_HIDDEN_GUEST/USER
  KVM: arm64: Check RAZ visibility in ID register accessors
  KVM: arm64: Remove AA64ZFR0_EL1 accessors

 arch/arm64/kvm/sys_regs.c | 108 ++++++++++++--------------------------
 arch/arm64/kvm/sys_regs.h |  16 +++---
 2 files changed, 41 insertions(+), 83 deletions(-)

-- 
2.26.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

             reply	other threads:[~2020-11-05  9:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05  9:10 Andrew Jones [this message]
2020-11-05  9:10 ` [PATCH v3 1/4] KVM: arm64: Don't hide ID registers from userspace Andrew Jones
2020-11-05  9:10   ` Andrew Jones
2020-11-05  9:10 ` [PATCH v3 2/4] KVM: arm64: Consolidate REG_HIDDEN_GUEST/USER Andrew Jones
2020-11-05  9:10 ` [PATCH v3 3/4] KVM: arm64: Check RAZ visibility in ID register accessors Andrew Jones
2020-11-05  9:10 ` [PATCH v3 4/4] KVM: arm64: Remove AA64ZFR0_EL1 accessors Andrew Jones
2020-11-06 16:35 ` [PATCH v3 0/4] KVM: arm64: Fix get-reg-list regression Marc Zyngier
2020-11-10 11:13 ` Dave Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201105091022.15373-1-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=Dave.Martin@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=maz@kernel.org \
    --cc=xu910121@sina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.