Thread (37 messages) flat view 37 messages, 3 authors, 1d ago

Re: [PATCH v20 03/14] KVM: arm64: Manage GCS access and registers for guests

From: Leonardo Bras <hidden>
Date: 2026-09-02 16:44:25
Also in: kvmarm, linux-doc, linux-kselftest, lkml

Hi Mark,

On Tue, Sep 01, 2026 at 10:47:01PM +0100, Mark Brown wrote:
GCS introduces a number of system registers, on systems with GCS we need
to context switch them and expose them to VMMs to allow guests to use
GCS.

In order to allow guests to use GCS we also need to configure
HCRX_EL2.GCSEn, if this is not set GCS instructions will be noops and
CHKFEAT will report GCS as disabled.
Everything you do seems the correct approach, and all the loads/saves 
are symmetrical, except for VEL2, for which the reason was made known 
in v19 discussion.

That being said, I may have missed something as I am still not very much 
used to NV code. So, FWIW:

Reviewed-by: Leonardo Bras <redacted>

Nit:
Reading this patch, it feels like it should have been two different 
patches: one for adding the registers to kvm infra, and the other for 
loading/saving it in the code (with GCSEn). If you later decide to split 
it, feel free to add my R-b in both of them.

Thanks!
Leo



Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help