Skip to content

Commit 21c9db7

Browse files
author
CKI KWF Bot
committed
Merge: KVM: arm64: Restore PIRE0_EL1, PIR_EL1 and TCR2_EL1 registers unconditional visibility to userspace
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1005 Upstream Status: RHEL only JIRA: https://issues.redhat.com/browse/RHEL-89567 Test: successful migration between 10.0 and 10.1 Latest 10.1 rebase broke the migration from older rhel kernels. This regression was introduced by the following downstream commits: f1ca81f ("[PATCH v2 2/3] KVM: arm64: Hide TCR2_EL1 from userspace when disabled for guests") 7e64e0b ("[PATCH v2 3/3] KVM: arm64: Hide S1PIE registers from userspace") which suddently hid three registers, PIRE0_EL1, PIR_EL1 and TCR2_EL1 when the associated features are not supported by the guest, which is our case. So when doing a migration from older kernel we try to migrate those 3 regs to a host that does not expose them through KVM_GET_REG_LIST and qemu fails to migrate. As this issue breaks all migration testing, we restore the unconditional visibility to userspace until finding a more elegant solution to this problem that can occur again. Identifying a clean fix for this will take time and we cannot afford breaking tests until we get a proper solution upstreamed. Signed-off-by: Eric Auger <eric.auger@redhat.com> Approved-by: Sebastian Ott <sebott@redhat.com> Approved-by: Gavin Shan <gshan@redhat.com> Approved-by: Cornelia Huck <cohuck@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 88fc10b + 610aba7 commit 21c9db7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

arch/arm64/kvm/sys_regs.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,8 +2695,7 @@ static const struct sys_reg_desc sys_reg_descs[] = {
26952695
{ SYS_DESC(SYS_TTBR0_EL1), access_vm_reg, reset_unknown, TTBR0_EL1 },
26962696
{ SYS_DESC(SYS_TTBR1_EL1), access_vm_reg, reset_unknown, TTBR1_EL1 },
26972697
{ SYS_DESC(SYS_TCR_EL1), access_vm_reg, reset_val, TCR_EL1, 0 },
2698-
{ SYS_DESC(SYS_TCR2_EL1), access_vm_reg, reset_val, TCR2_EL1, 0,
2699-
.visibility = tcr2_visibility },
2698+
{ SYS_DESC(SYS_TCR2_EL1), access_vm_reg, reset_val, TCR2_EL1, 0 },
27002699

27012700
PTRAUTH_KEY(APIA),
27022701
PTRAUTH_KEY(APIB),
@@ -2750,10 +2749,8 @@ static const struct sys_reg_desc sys_reg_descs[] = {
27502749
{ SYS_DESC(SYS_PMMIR_EL1), trap_raz_wi },
27512750

27522751
{ SYS_DESC(SYS_MAIR_EL1), access_vm_reg, reset_unknown, MAIR_EL1 },
2753-
{ SYS_DESC(SYS_PIRE0_EL1), NULL, reset_unknown, PIRE0_EL1,
2754-
.visibility = s1pie_visibility },
2755-
{ SYS_DESC(SYS_PIR_EL1), NULL, reset_unknown, PIR_EL1,
2756-
.visibility = s1pie_visibility },
2752+
{ SYS_DESC(SYS_PIRE0_EL1), NULL, reset_unknown, PIRE0_EL1 },
2753+
{ SYS_DESC(SYS_PIR_EL1), NULL, reset_unknown, PIR_EL1 },
27572754
{ SYS_DESC(SYS_POR_EL1), NULL, reset_unknown, POR_EL1,
27582755
.visibility = s1poe_visibility },
27592756
{ SYS_DESC(SYS_AMAIR_EL1), access_vm_reg, reset_amair_el1, AMAIR_EL1 },

0 commit comments

Comments
 (0)