Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions vmm_core/cpu_profile/profiles/nvidia.n1x.NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# NVIDIA N1X WHP profile

`nvidia.n1x.v1` adds a pinned cold-boot CPU profile for NVIDIA N1X on Windows
ARM64 with Windows Hypervisor Platform (WHP).

## Tested hardware

- Product: **MECHREVO N1X Spark** (owner-reported product model).
- CPU: **NVIDIA N1X**, reported by Windows as `NVIDIA RTX Spark N1X`.
- Host: 20 logical processors, approximately 32 GiB RAM,
Windows build `10.0.28000.3231`.
- Validation date: 2026-11-14.

This records one physical machine's observations, not vendor certification or
qualification of other products using these Arm CPU part numbers. The profile
matches CPU identity and verifies the WHP feature surface; it does not match
the product's SMBIOS name.

## CPU contract

The native WHP MIDRs were `0x410fd851` and `0x410fd871`. A thread-affinity scan
of all 20 logical CPUs observed ten of each. All 15 configured ID registers
matched on every CPU. The model mask ignores variant/revision and part-number
bit 1, admitting exactly parts `0xd85` and `0xd87` with implementer `0x41` and
architecture `0xf`. An exhaustive part-number test rejects the other 4094 parts.
The profile uses the existing 36-bit address contract and existing state policy.
It does not enable snapshot/restore, nested virtualization, PMU, SVE, SME or MTE.

The 15 register values were captured through WHP on 2026-11-14 after applying
feature banks `0x7de1ef07fff03eff`, `0x000000180040dc34` and a 36-bit physical
address width. The existing PFR0 override removes EL2/EL3 descriptions; it was
applied and read back successfully. Native banks were `0x7de1ef07fff33eff`,
`0x00087e780640dc3d`; the native counter capability reported 1,000,000,000 Hz.

Use `auto` or the explicit `nvidia.n1x.v1` selection. Native-host derivation has
not been extended to filter N1X's extra state families and may reject `host`.

The implementation retains the shared WHP feature translation and effective
register checks. It does not rewrite the MIDR, bypass feature checks, or
manufacture unsupported guest feature values.

## Validation

The profile was tested on OpenVMM base
`b09c58843ae310dfff9ae68e9e822f9c5846b914` with the N1X changes and NVX
`24bdced073a24418c1ebbf1d0775bb5ba42266ba`.
The explicit profile booted Alpine 3.24.1 / Linux 6.18.38 with 512 MiB and one
vCPU, executed shell commands, checked synchronized time and powered off with
status zero. Default
`auto` then passed 17 additional executions: 128/256 MiB with one vCPU,
512 MiB with 2/4/8 vCPUs, and simultaneous batches of 4 and 8 guests, each
256 MiB / one vCPU. Each of these 17 runs checked private temporary files,
16 MiB file I/O
and SHA-256, synchronized time status, and guest power-off with status zero.
The concurrent batches held every guest at a barrier before releasing work.

The unit tests cover selection of both observed MIDRs, exclusion of other
part numbers, the existing Qualcomm selection, digest tampering, unsupported
extended state, translation into the measured WHP feature banks, and rejection
when a required feature is unavailable.

These short smoke tests do not qualify maximum capacity, adversarial isolation,
managed sandbox lifecycle, E2B compatibility, or production reliability.
35 changes: 35 additions & 0 deletions vmm_core/cpu_profile/profiles/nvidia.n1x.v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"vendor": "nvidia",
"model_mask": "0x00000000ff0fffd0",
"host_match": {
"mask": "0x00000000ff0fffd0",
"value": "0x00000000410fd850"
},
"sha256": "sha256:5c819de73c40022de50f199a232c264095fd1d9493ef40e65207b73ff028024a",
"profile": {
"cache": "native_informational",
"fields": [
{ "mask": "0xffffffffffffffff", "register": "ID_AA64PFR0_EL1", "value": "0x1100000001110011" },
{ "mask": "0xffffffffff0fffff", "register": "ID_AA64PFR1_EL1", "value": "0x0000000000000020" },
{ "mask": "0x0000000f000fffff", "register": "ID_AA64PFR2_EL1", "value": "0x0000000000000000" },
{ "mask": "0xfffffffffffffff0", "register": "ID_AA64ISAR0_EL1", "value": "0x0221111110212120" },
{ "mask": "0xffffffffffffffff", "register": "ID_AA64ISAR1_EL1", "value": "0x0010111100211002" },
{ "mask": "0xffffffffffffffff", "register": "ID_AA64ISAR2_EL1", "value": "0x0000000000000000" },
{ "mask": "0xff00ffffffffffff", "register": "ID_AA64MMFR0_EL1", "value": "0x0000011100101021" },
{ "mask": "0xffffffffffffffff", "register": "ID_AA64MMFR1_EL1", "value": "0x0000101000201002" },
{ "mask": "0xffff0fffffffffff", "register": "ID_AA64MMFR2_EL1", "value": "0x0000001100101011" },
{ "mask": "0xfff0ffffffffffff", "register": "ID_AA64MMFR3_EL1", "value": "0x0000000000000000" },
{ "mask": "0x0000f0f0ffffffff", "register": "ID_AA64MMFR4_EL1", "value": "0x0000000000000000" },
{ "mask": "0xffffffffffffffff", "register": "ID_AA64DFR0_EL1", "value": "0x000000f010305008" },
{ "mask": "0xffffffffffffffff", "register": "ID_AA64DFR1_EL1", "value": "0x0000000000000000" },
{ "mask": "0x0fffff0f0ffff0ff", "register": "ID_AA64ZFR0_EL1", "value": "0x0000000000000000" },
{ "mask": "0x9ff1ffff73810001", "register": "ID_AA64SMFR0_EL1", "value": "0x0000000000000000" }
],
"guest_model": "0x410fd850",
"id": "nvidia.n1x.v1",
"ownership": "defined_id_fields=cpu_or_policy;reserved=zero;mpidr_gic=VMM;midr_rv_revidr=native;counter_hz=time",
"physical_address_bits": 36,
"schema": "nvx.arm64.cpu.v1",
"state": "native_fp_simd_pac;no_pmu_sve_sme_mte_nested"
}
}
85 changes: 81 additions & 4 deletions vmm_core/cpu_profile/src/aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,13 @@ fn catalog() -> Result<&'static [CatalogEntry], Error> {
static CATALOG: OnceLock<Result<Vec<CatalogEntry>, Error>> = OnceLock::new();
CATALOG
.get_or_init(|| {
[include_str!("../profiles/qualcomm.oryon-x1.v1.json")]
.into_iter()
.map(load_catalog_entry)
.collect()
[
include_str!("../profiles/qualcomm.oryon-x1.v1.json"),
include_str!("../profiles/nvidia.n1x.v1.json"),
]
.into_iter()
.map(load_catalog_entry)
.collect()
})
.as_ref()
.map(Vec::as_slice)
Expand Down Expand Up @@ -664,6 +667,80 @@ mod tests {
);
}

#[test]
fn n1x_pinned_policy_matches_only_the_observed_model_class() {
let mut n = native();
n.midr = 0x410fd851;
let selected = select(crate::AUTO, &n).unwrap();
assert_eq!(selected.id, "nvidia.n1x.v1");
selected.validate().unwrap();
assert_eq!(
crate::canonical::format_digest(&selected.sha256),
"sha256:5c819de73c40022de50f199a232c264095fd1d9493ef40e65207b73ff028024a"
);
assert_eq!(selected.model.mask, 0xff0f_ffd0);
assert_eq!(selected.model.value, 0x410f_d850);
assert_eq!(selected.physical_address_bits, 36);
assert_eq!(select("nvidia.n1x.v1", &n).unwrap(), selected);
n.midr = 0x410fd871;
assert_eq!(select(crate::AUTO, &n).unwrap(), selected);
assert_eq!(select("nvidia.n1x.v1", &n).unwrap(), selected);
// The heterogeneous N1X pair differs only in part-number bit 1.
// Ignoring that bit must not admit any of the other 4094 part numbers.
for part in 0u64..=0xfff {
assert_eq!(
selected.model.matches(0x410f0001 | (part << 4)),
part == 0xd85 || part == 0xd87,
"unexpected model match for part {part:#x}"
);
}
n.midr = 0x410fd861;
assert_eq!(
select(crate::AUTO, &n).unwrap_err().code,
Code::ProfileHostUnknown
);
assert_eq!(
select("nvidia.n1x.v1", &n).unwrap_err().code,
Code::CpuGeneration
);
for midr in [0x510f_d851, 0x410e_d851] {
n.midr = midr;
assert_eq!(
select("nvidia.n1x.v1", &n).unwrap_err().code,
Code::CpuGeneration
);
}
n.midr = 0x511f0011;
assert_eq!(select(crate::AUTO, &n).unwrap().id, "qualcomm.oryon-x1.v1");
}

#[test]
fn n1x_policy_does_not_admit_extended_state_or_digest_tampering() {
let mut n = native();
n.midr = 0x410fd851;
let selected = select(crate::AUTO, &n).unwrap();
for (register, value) in [
(SystemReg::ID_AA64ZFR0_EL1, 1),
(SystemReg::ID_AA64SMFR0_EL1, 1),
] {
let mut changed = selected.clone();
changed
.id_registers
.iter_mut()
.find(|r| r.register == register)
.unwrap()
.value = value;
let changed = changed.identify().unwrap();
assert_eq!(
changed.validate().unwrap_err().code,
Code::ProfileUnsupported
);
}
let mut changed = selected;
changed.sha256[0] ^= 1;
assert_eq!(changed.validate().unwrap_err().code, Code::ProfileDigest);
}

#[test]
fn backend_gpa_limit_is_not_architectural_cpu_identity() {
let mut native = native();
Expand Down
21 changes: 21 additions & 0 deletions vmm_core/virt_whp/src/time_abi_aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,27 @@ mod tests {
assert!(profile_physical_address_bits(&profile).is_err());
}

#[test]
fn n1x_profile_maps_to_the_observed_restricted_whp_surface() {
let native = cpu_profile::aarch64::Fingerprint {
midr: 0x410fd851,
registers: Vec::new(),
counter_hz: 1_000_000_000,
backend_usable_gpa_bits: 39,
};
let profile = cpu_profile::aarch64::select("nvidia.n1x.v1", &native).unwrap();
let available = [0x7de1_ef07_fff3_3eff, 0x0008_7e78_0640_dc3d];
let features =
profile_features(&profile, abi::WHV_PROCESSOR_FEATURES(available[0])).unwrap();
let requested = [features.bank0.0, features.bank1.0];
assert_eq!(requested, [0x7de1_ef07_fff0_3eff, 0x0000_0018_0040_dc34]);
require_supported_features(requested, available).unwrap();
assert_eq!(profile_physical_address_bits(&profile).unwrap(), 36);
let mut unavailable = available;
unavailable[0] &= !abi::WHV_PROCESSOR_FEATURES::Atomic.0;
assert!(require_supported_features(requested, unavailable).is_err());
}

#[test]
fn feature_banks_are_derived_from_architectural_levels_not_generic_bank_bits() {
let mut profile = synthetic_profile();
Expand Down
Loading