From: Richard Henderson <richard.henderson@linaro.org>
To: kvmarm@lists.linux.dev, qemu-devel <qemu-devel@nongnu.org>
Cc: "Marc Zyngier" <maz@kernel.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Oliver Upton" <oliver.upton@linux.dev>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: KVM sysreg ids for FEAT_SYSREG128
Date: Thu, 14 Aug 2025 09:27:25 +1000 [thread overview]
Message-ID: <1c6b4f19-6cb2-4da0-9acc-d63307880de1@linaro.org> (raw)
Hiya,
QEMU (ab)uses the kvm encoding of system register ids in the migration stream. As we
implement support for FEAT_D128, it would be good to agree on an encoding for the 128-bit
registers so that we can avoid complications with migration later.
I don't think this is terribly complicated. Simply adjust the value in the
KVM_REG_SIZE_MASK field from U64 to U128. E.g.
PAR_EL1 (64-bit) (__ARM64_SYS_REG(3, 0, 7, 4, 0) | KVM_REG_SIZE_U64)
PAR_EL1 (128-bit) (__ARM64_SYS_REG(3, 0, 7, 4, 0) | KVM_REG_SIZE_U128)
This will currently be cleanly rejected by index_to_params, resulting in ENOENT for the
ioctl. When KVM grows support for D128 guests, kvm_sys_reg_{get,set}_user can select the
read/write code path based on reg->id & KVM_REG_SIZE_MASK.
Comments?
r~
next reply other threads:[~2025-08-13 23:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 23:27 Richard Henderson [this message]
2025-08-14 8:11 ` KVM sysreg ids for FEAT_SYSREG128 Marc Zyngier
2025-08-14 9:48 ` Richard Henderson
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=1c6b4f19-6cb2-4da0-9acc-d63307880de1@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).