[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKPOu+9sbWwZhbexQHwqZ6nMfg6dau7oYEzzgQ5qx+JiEcdmXQ@mail.gmail.com>
Date: Sat, 17 Feb 2024 00:00:17 +0100
From: Max Kellermann <max.kellermann@...os.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Xin Li <xin@...or.com>,
Sean Christopherson <seanjc@...gle.com>, hpa@...or.com, x86@...nel.org,
linux-kernel@...r.kernel.org, Stephen Rothwell <sfr@...b.auug.org.au>, kvm@...r.kernel.org
Subject: Re: [PATCH] arch/x86/entry_fred: don't set up KVM IRQs if KVM is disabled
On Fri, Feb 16, 2024 at 10:45 PM Thomas Gleixner <tglx@...utronix.de> wrote:
> #ifdeffing out the vector numbers is silly to begin with because these
> vector numbers stay assigned to KVM whether KVM is enabled or not.
There could be one non-silly use of this: if the macros are not
defined in absence of the feature, any use of it will lead to a
compiler error, which is good, because it may reveal certain kinds of
bugs.
(Though I agree that this isn't worth the code ugliness. I prefer to
avoid the preprocessor whenever possible. I hate how much the kernel
uses macros instead of inline functions.)
Powered by blists - more mailing lists