Re: [PATCH v2 01/16] KVM: x86: Rename register accessors to be GPR-specific

From: Sean Christopherson

Date: Wed Mar 04 2026 - 20:35:53 EST


On Mon, Jan 12, 2026, Chang S. Bae wrote:
> Refactor the VCPU register state accessors to make them explicitly
> GPR-only.

I like "register" though.

> The existing register accessors operate on the cached VCPU register
> state. That cache holds GPRs and RIP. RIP has its own interface already.

Isn't it possible that e.g. get_vmx_mem_address() will do kvm_register_read()
for a RIP-relative address? One could RIP isn't a pure GPR, but it's also not
something entirely different either.

> This renaming clarifies GPR access only.

But then later patches use for Extended GPRs, so the name becomes a lie. I also
don't like unnecessary use of acronyms, even though GPR is ubiquitous in x86.
Everyone looking at KVM knows what a register is, but only x86 folks will know
what GPR is.