[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFwAESoVcldwpaCR@google.com>
Date: Wed, 25 Jun 2025 06:56:33 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Neeraj Upadhyay <Neeraj.Upadhyay@....com>
Cc: linux-kernel@...r.kernel.org, bp@...en8.de, tglx@...utronix.de,
mingo@...hat.com, dave.hansen@...ux.intel.com, Thomas.Lendacky@....com,
nikunj@....com, Santosh.Shukla@....com, Vasant.Hegde@....com,
Suravee.Suthikulpanit@....com, David.Kaplan@....com, x86@...nel.org,
hpa@...or.com, peterz@...radead.org, pbonzini@...hat.com, kvm@...r.kernel.org,
kirill.shutemov@...ux.intel.com, huibo.wang@....com, naveen.rao@....com,
francescolavra.fl@...il.com, tiala@...rosoft.com
Subject: Re: [RFC PATCH v7 07/37] KVM: lapic: Rename lapic get/set_reg() helpers
On Tue, Jun 10, 2025, Neeraj Upadhyay wrote:
> In preparation for moving kvm-internal __kvm_lapic_set_reg(),
> __kvm_lapic_get_reg() to apic.h for use in Secure AVIC apic driver,
> rename them to signify that they are part of apic api.
>
> While at it, fix line wrap in kvm_apic_get_state().
Nit, please don't bill this as a "fix". There is absolutely nothing wrong with
the existing code. I have no objection to the new code, I just don't want to
give KVM developers the impression that wrapping at ~80 chars when they feel it
makes the code more readable is somehow bad/wrong.
I'd just drop this line. The function name is being shortened; adjusting the
wrapping to account for that is completely natural and doesn't need to be called
out.
> @@ -3099,8 +3099,7 @@ int kvm_apic_get_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s)
> * Get calculated timer current count for remaining timer period (if
> * any) and store it in the returned register set.
> */
> - __kvm_lapic_set_reg(s->regs, APIC_TMCCT,
> - __apic_read(vcpu->arch.apic, APIC_TMCCT));
> + apic_set_reg(s->regs, APIC_TMCCT, __apic_read(vcpu->arch.apic, APIC_TMCCT));
>
> return kvm_apic_state_fixup(vcpu, s, false);
> }
Powered by blists - more mailing lists