Re: [tip: x86/cpu] x86/cpu: Clear SVM feature if disabled by BIOS
From: Paolo Bonzini
Date: Fri Sep 22 2023 - 07:19:16 EST
On Fri, Sep 22, 2023 at 12:26 PM Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> It's a bit sad that we are duplicating identical code.
> We are doing it in other cases as well: for example nearby_node() is
> duplicated between arch/x86/kernel/cpu/amd.c and
> arch/x86/kernel/cpu/hygon.c too.
It is sad, and yeah I looked at nearby_node() to see if that was nevertheless
expected.
AMD and Hygon pretend that they are different, and use different families
for what is effectively the same processor, and that's silly. In fact back in
2018 (https://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg1741155.html)
I complained that if AMD and Hygon are organizing the family numbers so
that there's never going to be a conflict, it makes no sense to have a
separate vendor at all.
Yes it's not a lot of code but sooner or later some change will be applied
only to amd.c, because honestly who even thinks of Hygon...
Paolo