> - Intel's technical docs will say "if CPUID leaf 0x3aa asserts bit 63 then the CPU is affected". (There is no database for this you can only find it out by actually booting one up).

I’m doing some OS work at the moment and running into this. I’m really surprised there’s no caniuse.com for cpu features. I’m planning on requiring support for all the features that have been in every cpu that shipped in the last 10+ years. But it’s basically impossible to figure that out. Especially across Intel and amd. Can I assume apic? Iommu stuff? Is acpi 2 actually available on all CPUs or do I need to have to have support for the old version as well? It’s very annoying.

Even more fun is that some of those (IOMMU and ACPI version) depend on motherboard/firmware support. Inevitably there is some bargain-bin board for each processor generation that doesn’t support anything that isn’t literally required for the CPU/chipset to POST. For userspace CPU features the new x86_64-v3/v4 profiles that Clang/LLVM support are good Schelling points, but they don’t cover e.g. page table features.

Windows has specific platform requirements they spell out for each version - those are generally your best bet on x86. ARM devs have it way worse so I guess we shouldn’t complain.

At least on ARM you can get trms or data sheets that cover all of the features of a specific processor and also the markings on the chip that differentiate it from models within the same family.

I’m pretty sure the number of people at Intel who can tell you offhandedly the answer to your questions about only Intel processors is approximately zero give or take couple. Digging would be required.

If you were willing to accept only the relatively high power variants it’d be easier.

I'd be happy to support the low power variants as well, but without spending a bunch of money, I have no idea what features they have and what they're missing. Its very annoying.

For anyone not familiar with caniuse, its indispensable for modern web development. Say you want to put images on a web page. You've heard of webp. Can you use it?

https://caniuse.com/webp

At a glance you see the answer. 95% of global web users use a web browser with webp support. Its available in all the major browsers, and has been for several years. You can query basically any browser feature like this to see its support status.

That initial percentage is a little misleading. It includes everything that caniuse isn't sure about. Really it should be something like 97.5±2.5 but the issue's been stalled for years.

Even the absolute most basic features that have been well supported for 30 years, like the HTML "div" element, cap out at 96%. Change the drop-down from "all users" to "all tracked" and you'll get a more representative answer.

> I’m planning on requiring support for all the features that have been in every cpu that shipped in the last 10+ years. But it’s basically impossible to figure that out.

The easiest thing would probably to specify the need for "x86-64-v3":

* https://en.wikipedia.org/wiki/X86-64#Microarchitecture_level...

RHEL9 mandated "x86-64-v2", and v3 is being considered for RHEL10:

> The x86-64-v3 level has been implemented first in Intel’s Haswell CPU generation (2013). AMD implemented x86-64-v3 support with the Excavator microarchitecture (2015). Intel’s Atom product line added x86-64-v3 support with the Gracemont microarchitecture (2021), but Intel has continued to release Atom CPUs without AVX support after that (Parker Ridge in 2022, and an Elkhart Lake variant in 2023).

* https://developers.redhat.com/articles/2024/01/02/exploring-...

> The easiest thing would probably to specify the need for "x86-64-v3"

AFAIK, that only specifies the user-space-visible instruction set extensions, not the presence and version of operating-system-level features like APIC or IOMMU.

RHEL10 has been released and does require x86-64-v3.

https://access.redhat.com/solutions/7066628

Even defining "shipped in the last 10 years" is tricky - because does that mean released or final shipment from the factory or ?

You're often better picking a subset of CPU features you want to use and then sampling to see if it excludes something important.

> then sampling to see if it excludes something important.

But how? That’s the question.

This is unfortunately the same for GPUs. The graphics APIs expose capability bits or extensions indicating what features the hardware and driver supports, but the graphics vendors don't always publish documentation on what generations of their hardware support various features, so your program is expected to dynamically adapt to arbitrary combinations of features. This is no longer as bad as it used to be due to consolidation in the graphics market, but people still have to build ad-hoc crowd sourced databases of GPU caps bits.

It's also not monotonic, on both CPU and GPU sides features can go away later because either due to a hardware bug or the vendor lost interest in supporting it.

CPU Monkey had some neat info like whether a CPU had AV1 hwdec/hwenc, then they redesigned their site and that info is gone for some reason. I think it was a year or less between finding their site and them ruining it.

https://web.archive.org/web/20250616224354/https://www.cpu-m...

https://www.cpu-monkey.com/en/cpu-amd_ryzen_7_pro_8840u

A nice reminder to stick any page you find useful in the wayback machine and/or save a local copy.