[PATCH v9 23/30] KVM: arm64: Context switch SME state for guests

Mark Brown broonie at kernel.org
Wed Jan 14 09:27:53 PST 2026


On Tue, Jan 13, 2026 at 02:24:56PM +0000, Fuad Tabba wrote:
> On Tue, 23 Dec 2025 at 01:23, Mark Brown <broonie at kernel.org> wrote:

> > +#define sme_cond_update_smcr_vq(val, reg)                      \
> > +       do {                                                    \
> > +               u64 __smcr = read_sysreg_s((reg));              \
> > +               u64 __new = __smcr & ~SMCR_ELx_LEN_MASK;        \
> > +               __new |= (val) & SMCR_ELx_LEN_MASK;             \

> Similar to what I pointed out in patch 15 [1], I think you need to
> preserve the other bits, since SMCR isn't just about the length.

This does preserve the existing bits?  It reads SMCR, masks out and then
replaces the length.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260114/59937056/attachment.sig>


More information about the linux-arm-kernel mailing list