Skip to content

Conversation

@olivereanderson
Copy link
Contributor

The Intel Granite Rapids processors include more AMX related features that are advertised in leaf 0x7 subleaf 0x1. If the VM is not configured to support AMX (the default) then these feature bits need to be masked out.

Furthermore Tile information and TMUL information in leaves 0x1d and 0x1e respectively are also purely related to AMX and should also be zeroed whenever AMX support is disabled.

This PR addresses all of the aforementioned issues.

@rbradford
Copy link
Member

rbradford commented Nov 25, 2025

Maybe we can remove the AMX build flag?

It was removed in 2022 - whoops.

Does it still make sense to have as an option? It kinda looks more complex than most of the CPU extensions (from a virtualisation perspective), so maybe it does.

@rbradford rbradford added this pull request to the merge queue Nov 25, 2025
@rbradford rbradford removed this pull request from the merge queue due to a manual request Nov 25, 2025
const AMX_TILE: u8 = 24; // AMX tile load/store instructions
const AMX_INT8: u8 = 25; // AMX tile computation on 8-bit integers

const AMX_FP16: u8 = 21; // AMX tile computation on fp16 numbers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Your commit message says:

This PR addresses all of the aforementioned issues.

I don't think that's necessary in the commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@tpressure
Copy link
Member

tpressure commented Nov 26, 2025

It was removed in 2022 - whoops.

Does it still make sense to have as an option? It kinda looks more complex than most of the CPU extensions (from a virtualisation perspective), so maybe it does.

I think it is still a good idea to have amx behind a runtime flag. When amx is enabled, the FPU state size for the task is increased significantly, thus, context switches will be slower.

The Intel Granite Rapids processors include more AMX related features
that are advertised in leaf 0x7 subleaf 0x1. If the VM is not
configured to support AMX (the default) then these feature bits need
to be masked out.

Furthermore Tile information and TMUL information
in leaves 0x1d and 0x1e respectively are also purely related to AMX
and should also be zeroed whenever AMX support is disabled.

Signed-off-by: Oliver Anderson <[email protected]>
On-behalf-of: SAP <[email protected]>
@olivereanderson olivereanderson force-pushed the extended-amx-feature-masking branch from 848d712 to 390e062 Compare November 26, 2025 16:50
@rbradford rbradford added this pull request to the merge queue Nov 27, 2025
Merged via the queue into cloud-hypervisor:main with commit 0d884d3 Nov 27, 2025
40 of 43 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Cloud Hypervisor Roadmap Dec 11, 2025
@likebreath likebreath added the bug-fix Bug fix to include in release notes label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Bug fix to include in release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants