Skip to content

mshv-ioctls: check capability before using extended property - #337

Merged
russell-islam merged 2 commits into
mainfrom
muislam/caps-check-syn
Aug 27, 2026
Merged

mshv-ioctls: check capability before using extended property#337
russell-islam merged 2 commits into
mainfrom
muislam/caps-check-syn

Conversation

@russell-islam

@russell-islam russell-islam commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

With new addressable synthetic feature check fails to boot the VM on older MSHV where the property is not available. This PR checks capability before checking such feature.

Comment thread mshv-ioctls/src/ioctls/system.rs Outdated
@russell-islam
russell-islam force-pushed the muislam/caps-check-syn branch from b3dd4ac to d36dce1 Compare August 26, 2026 19:21
Comment thread mshv-ioctls/src/ioctls/system.rs
Comment thread mshv-ioctls/src/ioctls/system.rs
Comment thread mshv-ioctls/src/ioctls/system.rs
The VMM capabilities extended property may return UnknownProperty on
older MSHV versions that don't recognize the property code, in addition
to AccessDenied. Handle both by returning a zeroed capabilities struct
so callers can treat the query as unsupported.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
Recent hypervisor versions introduced a new class of hypercalls,
HvGetPartitionPropertyEx / HvSetPartitionPropertyEx, that expose
so-called "extended" partition properties which do not fit the fixed
64-bit layout of the classic HvGetPartitionProperty. One such property
is AssignableSyntheticProcessorFeatures, which advertises the set of
synthetic processor feature bits the hypervisor is willing to let the
VMM configure on a guest partition.

Whether the running hypervisor supports these extended properties (and
the AssignableSyntheticProcessorFeatures property in particular) is
itself surfaced through the VmmCapabilities partition property. Query
that capability first and only fetch the extended property and set the
matching synthetic feature bit when the hypervisor advertises support
for it; otherwise fall back to the classic default mask.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
@russell-islam
russell-islam force-pushed the muislam/caps-check-syn branch from d36dce1 to a4c3599 Compare August 26, 2026 22:23
@russell-islam
russell-islam enabled auto-merge (rebase) August 27, 2026 01:35
@russell-islam
russell-islam merged commit eac1839 into main Aug 27, 2026
9 of 10 checks passed
@russell-islam
russell-islam deleted the muislam/caps-check-syn branch August 27, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants