Skip to content

Commit

Permalink
Revert "KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for…
Browse files Browse the repository at this point in the history
… later checking"

This reverts commits 99101dd and
b80b701.

Linus reports that the sysreg reserved bit checks in KVM have led to
build failures, arising from commit fdd867f ("arm64/sysreg: Add
register fields for ID_AA64DFR1_EL1") giving meaning to fields that were
previously RES0.

Of course, this is a genuine issue, since KVM's sysreg emulation depends
heavily on the definition of reserved fields. But at this point the
build breakage is far more offensive, and the right course of action is
to revert and retry later.

All of these build-time assertions were on by default before
commit 99101dd ("KVM: arm64: Make build-time check of RES0/RES1
bits optional"), so deliberately revert it all atomically to avoid
introducing further breakage of bisection.

Link: https://lore.kernel.org/all/CAHk-=whCvkhc8BbFOUf1ddOsgSGgEjwoKv77=HEY1UiVCydGqw@mail.gmail.com/
Acked-by: Marc Zyngier <[email protected]>
Signed-off-by: Oliver Upton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
oupton authored and torvalds committed Mar 16, 2024
1 parent 277100b commit 82affc9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 139 deletions.
11 changes: 0 additions & 11 deletions arch/arm64/kvm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,4 @@ config PROTECTED_NVHE_STACKTRACE

If unsure, or not using protected nVHE (pKVM), say N.

config KVM_ARM64_RES_BITS_PARANOIA
bool "Build-time check of RES0/RES1 bits"
depends on KVM
default n
help
Say Y here to validate that KVM's knowledge of most system
registers' RES0/RES1 bits matches when the rest of the kernel
defines. Expect the build to fail badly if you enable this.

Just say N.

endif # VIRTUALIZATION
125 changes: 0 additions & 125 deletions arch/arm64/kvm/check-res-bits.h

This file was deleted.

3 changes: 0 additions & 3 deletions arch/arm64/kvm/sys_regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include <trace/events/kvm.h>

#include "check-res-bits.h"
#include "sys_regs.h"

#include "trace.h"
Expand Down Expand Up @@ -4110,8 +4109,6 @@ int __init kvm_sys_reg_table_init(void)
unsigned int i;
int ret = 0;

check_res_bits();

/* Make sure tables are unique and in order. */
valid &= check_sysreg_table(sys_reg_descs, ARRAY_SIZE(sys_reg_descs), false);
valid &= check_sysreg_table(cp14_regs, ARRAY_SIZE(cp14_regs), true);
Expand Down

0 comments on commit 82affc9

Please sign in to comment.