Re: [PATCH v3 27/40] KVM: x86: Move register helper declarations from kvm_host.h => regs.h

From: Sean Christopherson

Date: Fri Jun 05 2026 - 15:15:04 EST


On Thu, Jun 04, 2026, Kai Huang wrote:
> On Fri, 2026-05-29 at 15:22 -0700, Sean Christopherson wrote:
> > void __kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags);
> > +void kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags);
> >
>
> :-)
>
> Seems a candidate of making kvm_set_rflags() a 'static inline' ?

I actually don't want to, even though it seems like a no-brainer at first glance,
because it would require exporting __kvm_set_rflags() to vendor code. Which
wouldn't be terrible, but it seems like an unnecessary "risk", e.g. of folks
trying to micro-optimize vendor flows to avoid the KVM_REQ_EVENT.