Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: arm64: Account for RESx bits in __compute_fgt()

When computing Fine Grained Traps, it is preferable to account for
the reserved bits. The HW will most probably ignore them, unless the
bits have been repurposed to do something else.

Use caution, and fold our view of the reserved bits in,

Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Fixes: c259d763e6b09 ("KVM: arm64: Account for RES1 bits in DECLARE_FEAT_MAP() and co")
Link: https://sashiko.dev/#/patchset/20260319154937.3619520-1-sascha.bischoff%40arm.com
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260401103611.357092-6-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>

+2 -2
+2 -2
arch/arm64/kvm/config.c
··· 1663 1663 clear |= ~nested & m->nmask; 1664 1664 } 1665 1665 1666 - val |= set; 1667 - val &= ~clear; 1666 + val |= set | m->res1; 1667 + val &= ~(clear | m->res0); 1668 1668 *vcpu_fgt(vcpu, reg) = val; 1669 1669 } 1670 1670