All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] x86/cpuid: Headers cleanup
@ 2025-05-15 20:21 Ahmed S. Darwish
  2025-05-15 20:21 ` [PATCH v2 1/2] x86/cpuid: Fix CPUID(0x2) iterator kernel-doc Ahmed S. Darwish
  2025-05-15 20:21 ` [PATCH v2 2/2] x86/cpuid: Rename hypervisor_cpuid_base() to cpuid_hypervisor_base() Ahmed S. Darwish
  0 siblings, 2 replies; 6+ messages in thread
From: Ahmed S. Darwish @ 2025-05-15 20:21 UTC (permalink / raw)
  To: Ingo Molnar, Borislav Petkov, Dave Hansen
  Cc: Thomas Gleixner, Andrew Cooper, H. Peter Anvin, John Ogness, x86,
	x86-cpuid, LKML, Ahmed S. Darwish

Hi,

Most of the patch queue's v1 is now merged at tip:x86/core.

On top of that, introduce a kernel-doc fixup (Sorry, missed that).

Then, do the renames:

    hypervisor_cpuid_base()         ➤    cpuid_base_hypervisor()
    for_…_hypervisor_cpuid_base()   ➤    for_…_cpuid_base_hypervisor()

instead of:

    hypervisor_cpuid_base()         ➤    cpuid_hypervisor_base()
    for_…_hypervisor_cpuid_base()   ➤    for_…_cpuid_hypervisor_base()

to keep "cpuid_base" in one peace:

  https://lore.kernel.org/x86-cpuid/aCYY7CE57Al9ydWa@gmail.com

Thanks!

Cover v1
--------

( [PATCH v1 0/9] x86/cpuid: Headers cleanup
  https://lore.kernel.org/lkml/20250508150240.172915-1-darwi@linutronix.de )

This is a CPUID headers cleanup series, on top of tip:x86/cpu.  It is a
precursor for the upcoming v2 of the CPUID parser:

    [PATCH v1 00/26] x86: Introduce centralized CPUID model
    https://lore.kernel.org/lkml/20250506050437.10264-1-darwi@linutronix.de

as suggested by Ingo here:

    https://lore.kernel.org/lkml/aBnSgu_JyEi8fvog@gmail.com

* Summary:

The current CPUID header structure is:

    include/asm/
    ├── cpuid
    │   ├── api.h
    │   ├── leaf_0x2_api.h
    │   └── types.h
    └── cpuid.h

Simplify it into:

    include/asm/cpuid/
    ├── api.h
    └── types.h

Standardize the CPUID header namespace by enforcing a "cpuid_" prefix for
all exported symbols.  That is:

    have_cpuid_p()		➤	cpuid_feature()
    hypervisor_cpuid_base()	➤	cpuid_hypervisor_base()
    native_cpuid()		➤	cpuid_native()
    native_cpuid_REG()		➤	cpuid_REG_native()

Also rename:

    cpuid_get_leaf_0x2_regs()	➤	cpuid_leaf_0x2()

for consistency with the other <asm/cpuid/api.h> accessors that return
full CPUID register output; i.e., cpuid_leaf() and cpuid_subleaf().

Finally, rename:

    for_each_leaf_0x2_entry()   ➤	for_each_cpuid_0x2_desc()

to include "cpuid" in the iterator name, and since what is being iterated
upon is CPUID(0x2) cache and TLB "descriptos", not "entries".

* Testing:

- Basic one-by-one allyesconfig compilation

- Comparison of a before/after of below files:

  - /proc/cpuinfo
  - /sys/devices/system/cpu/
  - /sys/kernel/debug/x86/topo/
  - dmesg --notime | grep 'Last level [id]TLB entries'

Thanks,

8<-----

Ahmed S. Darwish (2):
  x86/cpuid: Fix CPUID(0x2) iterator kernel-doc
  x86/cpuid: Rename hypervisor_cpuid_base() to cpuid_hypervisor_base()

 arch/x86/include/asm/acrn.h           |  2 +-
 arch/x86/include/asm/cpuid/api.h      | 18 +++++++++---------
 arch/x86/include/asm/xen/hypervisor.h |  2 +-
 arch/x86/kernel/jailhouse.c           |  2 +-
 arch/x86/kernel/kvm.c                 |  2 +-
 arch/x86/kvm/cpuid.c                  |  2 +-
 6 files changed, 14 insertions(+), 14 deletions(-)

base-commit: 234792ea4421499f123e73b2e6411469a561a123
-- 
2.49.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-05-16  9:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 20:21 [PATCH v2 0/2] x86/cpuid: Headers cleanup Ahmed S. Darwish
2025-05-15 20:21 ` [PATCH v2 1/2] x86/cpuid: Fix CPUID(0x2) iterator kernel-doc Ahmed S. Darwish
2025-05-16  8:50   ` Ingo Molnar
2025-05-15 20:21 ` [PATCH v2 2/2] x86/cpuid: Rename hypervisor_cpuid_base() to cpuid_hypervisor_base() Ahmed S. Darwish
2025-05-15 20:28   ` [PATCH v3] x86/cpuid: Rename hypervisor_cpuid_base() to cpuid_base_hypervisor() Ahmed S. Darwish
2025-05-16  9:19     ` [tip: x86/core] x86/cpuid: Rename hypervisor_cpuid_base()/for_each_possible_hypervisor_cpuid_base() to cpuid_base_hypervisor()/for_each_possible_cpuid_base_hypervisor() tip-bot2 for Ahmed S. Darwish

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.