cca: Instruction Abort and testing#3731
Conversation
Flgodd67
commented
Jun 12, 2026
- unit test added that causes an Instruction Abort by fetching from an address outside the PAR
- unit test added that causes an Instruction Abort by fetching from an address with state RIPAS_EMPTY
- unit test added that causes an Instruction Abort by fetching from an address with no permissions
- added a HpfarEl2 structure in order to retrieve the fipa more conveniently. Added the getter function in CcaExit.
- added ioctl in openVMM and kernel to get ipa state - hcl_rsi_ipa_state_read
- adding a new location where the AArch64 tests can be placed: tmk/simple_tmk/src/aarch64. Keeping architecture specific code and tests grouped together
- adding Instruction abort handling, displaying to the user the error reason with additional useful information about the plane exit
- implementation for #[tmk_test(expected_failure)] macro. Tests marked as expected failures now pass when they fail or fault. Allows representation of intentional failure cases.
- unit test added that causes an Instruction Abort by fetching from an address outside the PAR - unit test added that causes an Instruction Abort by fetching from an address with state RIPAS_EMPTY - unit test added that causes an Instruction Abort by fetching from an address with no permissions - added a HpfarEl2 structure in order to retrieve the fipa more conveniently. Added the getter function in CcaExit. - added ioctl in openVMM and kernel to get ipa state - hcl_rsi_ipa_state_read - adding a new location where the AArch64 tests can be placed: tmk/simple_tmk/src/aarch64. Keeping architecture specific code and tests grouped together - adding Instruction abort handling, displaying to the user the error reason with additional useful information about the plane exit - implementation for #[tmk_test(expected_failure)] macro. Tests marked as expected failures now pass when they fail or fault. Allows representation of intentional failure cases.
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for “expected failure” tests in TMK and improves AArch64/CCA fault reporting by capturing instruction abort context (including IPA RIPAS state), while also extending AArch64 register definitions.
Changes:
- Add a protocol/test-metadata flag (
expected_failure) plumbed from TMK macros/core → protocol → VMM loader → VMM runner output. - Add CCA instruction-abort handling that computes FIPA, queries RIPAS state, and emits a structured fatal error.
- Extend AArch64 definitions (HPFAR_EL2 bitfield; fix FaultStatusCode typo) and add AArch64 “expected failure” sample tests.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| vm/aarch64/aarch64defs/src/lib.rs | Adds HPFAR_EL2 bitfield; fixes a FaultStatusCode typo. |
| tmk/tmk_vmm/src/run.rs | Treats failing tests as success when marked expected_failure, and flags unexpected passes. |
| tmk/tmk_vmm/src/load.rs | Loads expected_failure from protocol flags into TestInfo. |
| tmk/tmk_protocol/src/lib.rs | Introduces flags in test descriptors and defines expected-failure flag constant. |
| tmk/tmk_macros/src/lib.rs | Extends #[tmk_test] to accept expected_failure and forwards flags to core macro. |
| tmk/tmk_core/src/lib.rs | Extends test descriptor and define_tmk_test! to carry flags. |
| tmk/simple_tmk/src/main.rs | Adds AArch64 test module. |
| tmk/simple_tmk/src/aarch64/mod.rs | Adds AArch64 tests marked expected_failure using global_asm fault triggers. |
| openhcl/virt_mshv_vtl/src/processor/cca/mod.rs | Implements CCA InstructionAbort handling incl. FIPA + RIPAS state query and richer fatal errors. |
| openhcl/hcl/src/ioctl/cca.rs | Adds RSI IPA-state-read ioctl wrapper and data struct. |
| openhcl/hcl/src/ioctl.rs | Adds ioctl number and binding for “get IPA state”. |
| flowey/flowey_lib_hvlite/src/_jobs/local_install_cca_emu.rs | Changes the Linux repo branch used for local CCA emu install. |
Comments suppressed due to low confidence (1)
tmk/tmk_protocol/src/lib.rs:1
- Adding a field to a
#[repr(C)]protocol struct is an ABI/layout change. If older TMK binaries or VMMs might interact with newer counterparts, this needs explicit versioning/backward compatibility (e.g., a version field, usingdescriptor_lengthto gate readingflags, or placing future-proof reserved fields). As-is, mixed-version components can misinterpret layout and read incorrect data.
// Copyright (c) Microsoft Corporation.
|
@microsoft-github-policy-service agree [company="Microsoft"] |
|
@microsoft-github-policy-service agree company="Microsoft" |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
tmk/tmk_protocol/src/lib.rs:1
- Adding
flagschanges the wire/ABI size ofTestDescriptor64. If any existing TMK binaries or loaders assume the prior struct size, this can break enumeration/parsing. To maintain compatibility, consider introducing a versioned descriptor/header, or keeping the old descriptor and adding a new descriptor type (or a size field) so old/new producers and consumers can interoperate safely.
// Copyright (c) Microsoft Corporation.
| let mut plane_state = mshv_rsi_get_ipa_state { | ||
| fipa, | ||
| state: u64::MAX, | ||
| }; | ||
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); | ||
|
|
||
| let reason = InstructionAbortReason::from(iss.ifsc()); |
| GRANULE_PROTECTION_FAULT_LEVEL2 = 0b100110, | ||
| /// Valid only for instruction fault. | ||
| GRANULE_PROTECTION_FAULT_LEVE3 = 0b100111, | ||
| GRANULE_PROTECTION_FAULT_LEVEL3 = 0b100111, |
| /// CCA: | ||
| #[repr(C)] | ||
| #[derive(Clone, Copy, Default)] | ||
| #[expect(missing_docs)] | ||
| pub struct mshv_rsi_get_ipa_state { |
| pub fn cca_ipa_state_read( | ||
| &self, | ||
| vtl: GuestVtl, | ||
| state: &mut mshv_rsi_get_ipa_state, | ||
| ) -> Result<(), Error> { | ||
| self.hcl | ||
| .rsi_get_ipa_state(vtl, state) | ||
| .map_err(|_| Error::InvalidRegisterValue) | ||
| } |
| let name = item.sig.ident.to_string(); | ||
| let func = &item.sig.ident; | ||
|
|
||
| let flags = match attr.to_string().as_str() { |
There was a problem hiding this comment.
We'll probably want this to be comma separated or something in the future to deal with multiple flags, but I think this is fine for now.
| const AARCH64_ZERO_REGISTER_INDEX: u8 = 31; | ||
|
|
||
| #[derive(Debug, Clone, Copy)] | ||
| enum InstructionAbortReason { |
There was a problem hiding this comment.
This should probably live in aarch64defs
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
tmk/tmk_protocol/src/lib.rs:1
- The PR introduces
TestFlags64, butTestDescriptor64storesflagsas a rawu64. That makes downstream usage error-prone (and already causes a compile issue inenumerate_tests). Prefer storingpub flags: TestFlags64if it is layout-compatible for your wire format; otherwise, consider renaming toflags_bits: u64and adding a dedicated accessor (e.g.,fn flags(&self) -> TestFlags64) to centralize bit decoding.
// Copyright (c) Microsoft Corporation.
| pub struct TestInfo { | ||
| pub name: String, | ||
| pub index: u64, | ||
| pub expected_failure: bool, | ||
| } |
| index: i as u64, | ||
| expected_failure: t.flags.expected_failure(), | ||
| }); |
| let flags = match attr.to_string().as_str() { | ||
| "" => quote! { ::tmk_protocol::TestFlags64::new() }, | ||
| "expected_failure" => quote! { ::tmk_protocol::TestFlags64::new().with_expected_failure(true) }, | ||
| attr => { | ||
| let msg = format!("unsupported tmk_test option: {attr}"); | ||
| return quote! { | ||
| compile_error!(#msg); | ||
| #item | ||
| } | ||
| .into_token_stream() | ||
| .into(); | ||
| } | ||
| }; | ||
|
|
||
| quote! { | ||
| ::tmk_core::define_tmk_test!(#name, #func); | ||
| ::tmk_core::define_tmk_test!(#name, #func, #flags); |
| let mut plane_state = mshv_rsi_get_ipa_state { | ||
| fipa, | ||
| state: u64::MAX, | ||
| }; | ||
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); | ||
|
|
||
| let reason = InstructionAbortReason::from(iss.ifsc()); |
| if iss.fnv() { | ||
| tracing::warn!("CCA InstructionAbort: FAR_EL2 is not valid"); | ||
| return Err( | ||
| dev.fatal_error(CcaUnsupportedExit::ExitReason(0).into()) | ||
| ); | ||
| } |
| // The guest Linux kernel (with cca/plane driver) hasn't been upstreamed yet, fetch it from our private repo | ||
| const PLANE0_LINUX_REPO: &str = "https://github.com/jiong-microsoft/OHCL-Linux-Kernel.git"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev-ben"; |
ca81903 to
e7990bc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
tmk/tmk_core/src/lib.rs:1
- The 2-arg
define_tmk_test!arm forwards$flagsas the integer literal0, butTestDescriptor.flagsis aTestFlags64. This is likely a type mismatch and will fail to compile (or silently pick an unintended conversion if one exists). Use a proper default value of the flag type (e.g.,TestFlags64::new()or an explicitfrom_bits(0)constructor) when forwarding.
// Copyright (c) Microsoft Corporation.
|
|
||
| mod prelude; | ||
|
|
||
| mod aarch64; |
| // CCA: Get the RIPAS state of an ipa | ||
| ioctl_read!( | ||
| hcl_rsi_ipa_state_read, | ||
| MSHV_IOCTL, | ||
| MSHV_VTL_RSI_GET_IPA_STATE, | ||
| cca::mshv_rsi_get_ipa_state | ||
| ); |
| let mut plane_state = mshv_rsi_get_ipa_state { | ||
| fipa, | ||
| state: u64::MAX, | ||
| }; | ||
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); |
| if iss.fnv() { | ||
| tracing::warn!("CCA InstructionAbort: FAR_EL2 is not valid"); | ||
| return Err( | ||
| dev.fatal_error(CcaUnsupportedExit::ExitReason(0).into()) | ||
| ); | ||
| } |
| let flags = match attr.to_string().as_str() { | ||
| "" => quote! { ::tmk_protocol::TestFlags64::new() }, | ||
| "expected_failure" => quote! { ::tmk_protocol::TestFlags64::new().with_expected_failure(true) }, | ||
| attr => { | ||
| let msg = format!("unsupported tmk_test option: {attr}"); | ||
| return quote! { | ||
| compile_error!(#msg); | ||
| #item | ||
| } | ||
| .into_token_stream() | ||
| .into(); | ||
| } | ||
| }; |
| (TestResult::Failed, true) => { | ||
| tracing::info!( | ||
| target: "test", | ||
| name = test.name, | ||
| expected_failure = true, | ||
| reason = "explicit failure", | ||
| "test passed" | ||
| ); | ||
| } |
| let _plane = match vtl { | ||
| GuestVtl::Vtl0 => 1, | ||
| _ => return Err(HvError::InvalidVtlState), | ||
| }; |
| macro_rules! define_tmk_test { | ||
| ($name:expr, $func:ident) => { | ||
| $crate::define_tmk_test!($name, $func, 0); | ||
| }; | ||
| ($name:expr, $func:ident, $flags:expr) => { |
| pub fn tmk_test(attr: TokenStream, item: TokenStream) -> TokenStream { | ||
| let item = syn::parse_macro_input!(item as syn::ItemFn); | ||
| let name = item.sig.ident.to_string(); | ||
| let func = &item.sig.ident; | ||
|
|
||
| let flags = match attr.to_string().as_str() { | ||
| "" => quote! { ::tmk_protocol::TestFlags64::new() }, | ||
| "expected_failure" => quote! { ::tmk_protocol::TestFlags64::new().with_expected_failure(true) }, | ||
| attr => { | ||
| let msg = format!("unsupported tmk_test option: {attr}"); |
| (TestResult::Failed, true) => { | ||
| tracing::info!( | ||
| target: "test", | ||
| name = test.name, | ||
| expected_failure = true, | ||
| reason = "explicit failure", | ||
| "test passed" | ||
| ); | ||
| } |
| if iss.fnv() { | ||
| tracing::warn!("CCA InstructionAbort: FAR_EL2 is not valid"); | ||
| return Err( | ||
| dev.fatal_error(CcaUnsupportedExit::ExitReason(0).into()) | ||
| ); | ||
| } | ||
|
|
||
| let far = cca_exit.far_el2(); | ||
| let hpfar = cca_exit.hpfar_el2(); | ||
| let fipa = (hpfar.fipa() << 12) | (far & 0xfff); | ||
| let mut plane_state = mshv_rsi_get_ipa_state { | ||
| fipa, | ||
| state: u64::MAX, | ||
| }; | ||
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); | ||
|
|
||
| let reason = InstructionAbortReason::from(iss.ifsc()); |
| /// Get the ipa ripas state from the RMM | ||
| pub fn cca_ipa_state_read( | ||
| &self, | ||
| vtl: GuestVtl, | ||
| state: &mut mshv_rsi_get_ipa_state, | ||
| ) -> Result<(), Error> { | ||
| self.hcl | ||
| .rsi_get_ipa_state(vtl, state) | ||
| .map_err(|_| Error::InvalidRegisterValue) | ||
| } |
| let _plane = match vtl { | ||
| GuestVtl::Vtl0 => 1, | ||
| _ => return Err(HvError::InvalidVtlState), | ||
| }; |
| // The guest Linux kernel (with cca/plane driver) hasn't been upstreamed yet, fetch it from our private repo | ||
| const PLANE0_LINUX_REPO: &str = "https://github.com/jiong-microsoft/OHCL-Linux-Kernel.git"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev-ben"; |
| macro_rules! define_tmk_test { | ||
| ($name:expr, $func:ident) => { | ||
| $crate::define_tmk_test!($name, $func, 0); | ||
| }; | ||
| ($name:expr, $func:ident, $flags:expr) => { |
| pub fn tmk_test(attr: TokenStream, item: TokenStream) -> TokenStream { | ||
| let item = syn::parse_macro_input!(item as syn::ItemFn); | ||
| let name = item.sig.ident.to_string(); | ||
| let func = &item.sig.ident; | ||
|
|
||
| let flags = match attr.to_string().as_str() { | ||
| "" => quote! { ::tmk_protocol::TestFlags64::new() }, | ||
| "expected_failure" => { | ||
| quote! { ::tmk_protocol::TestFlags64::new().with_expected_failure(true) } | ||
| } | ||
| attr => { | ||
| let msg = format!("unsupported tmk_test option: {attr}"); | ||
| return quote! { | ||
| compile_error!(#msg); | ||
| #item | ||
| } | ||
| .into_token_stream() | ||
| .into(); | ||
| } | ||
| }; |
| let mut plane_state = mshv_rsi_get_ipa_state { | ||
| fipa, | ||
| state: u64::MAX, | ||
| }; | ||
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); | ||
|
|
| if iss.fnv() { | ||
| tracing::warn!("CCA InstructionAbort: FAR_EL2 is not valid"); | ||
| return Err( | ||
| dev.fatal_error(CcaUnsupportedExit::ExitReason(0).into()) | ||
| ); | ||
| } | ||
|
|
||
| let far = cca_exit.far_el2(); | ||
| let hpfar = cca_exit.hpfar_el2(); | ||
| let fipa = (hpfar.fipa() << 12) | (far & 0xfff); |
| /// Get the ipa ripas state from the RMM | ||
| pub fn cca_ipa_state_read( | ||
| &self, | ||
| vtl: GuestVtl, | ||
| state: &mut mshv_rsi_get_ipa_state, | ||
| ) -> Result<(), Error> { | ||
| self.hcl | ||
| .rsi_get_ipa_state(vtl, state) | ||
| .map_err(|_| Error::InvalidRegisterValue) | ||
| } |
| (TestResult::Failed, true) => { | ||
| tracing::info!( | ||
| target: "test", | ||
| name = test.name, | ||
| expected_failure = true, | ||
| reason = "explicit failure", | ||
| "test passed" | ||
| ); | ||
| } |
| ( | ||
| TestResult::Faulted { | ||
| vp_index, | ||
| reason, | ||
| regs, | ||
| }, | ||
| true, | ||
| ) => { | ||
| tracing::info!( | ||
| target: "test", | ||
| name = test.name, | ||
| expected_failure = true, | ||
| vp_index = vp_index.index(), | ||
| reason, | ||
| regs = format_args!("{:#x?}", regs), | ||
| "test passed" | ||
| ); | ||
| } |
| } | ||
|
|
||
| #[derive(Debug, Clone, Copy)] | ||
| enum InstructionAbortReason { |
| FaultStatusCode::GRANULE_PROTECTION_FAULT_LEVEL_NEG => { | ||
| Self::GranuleProtectionFaultLevelNeg1 | ||
| } |
| pub struct HpfarEl2 { | ||
| #[bits(4)] | ||
| pub res0: u8, | ||
| #[bits(44)] | ||
| pub fipa: u64, | ||
| #[bits(15)] | ||
| pub res1: u32, | ||
| pub ns: bool, | ||
| } |
| macro_rules! define_tmk_test { | ||
| ($name:expr, $func:ident) => { | ||
| $crate::define_tmk_test!($name, $func, 0); | ||
| }; | ||
| ($name:expr, $func:ident, $flags:expr) => { |
| let flags = match attr.to_string().as_str() { | ||
| "" => quote! { ::tmk_protocol::TestFlags64::new() }, | ||
| "expected_failure" => { | ||
| quote! { ::tmk_protocol::TestFlags64::new().with_expected_failure(true) } | ||
| } | ||
| attr => { |
| if iss.fnv() { | ||
| tracing::warn!("CCA InstructionAbort: FAR_EL2 is not valid"); | ||
| return Err( | ||
| dev.fatal_error(CcaUnsupportedExit::ExitReason(0).into()) | ||
| ); | ||
| } |
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); |
| elr_el2: u64, | ||
| far_el2: u64, | ||
| fipa: u64, | ||
| fipa_state: u8, |
| // The guest Linux kernel (with cca/plane driver) hasn't been upstreamed yet, fetch it from our private repo | ||
| const PLANE0_LINUX_REPO: &str = "https://github.com/jiong-microsoft/OHCL-Linux-Kernel.git"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev-ben"; |
removing warning and going straight to err in InstructionAbort match in run_vp
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
tmk/tmk_core/src/lib.rs:1
- The 2-arg
define_tmk_test!arm forwards$flagsas0, butTestDescriptor::flagsisTestFlags64, so this is very likely a type mismatch at compile time (unless an explicit conversion exists). Use aTestFlags64value as the default (e.g.,TestFlags64::new()or an explicitfrom_bits(0)constructor) so legacy invocations compile correctly.
// Copyright (c) Microsoft Corporation.
| pub fn tmk_test(attr: TokenStream, item: TokenStream) -> TokenStream { | ||
| let item = syn::parse_macro_input!(item as syn::ItemFn); | ||
| let name = item.sig.ident.to_string(); | ||
| let func = &item.sig.ident; | ||
|
|
||
| let flags = match attr.to_string().as_str() { | ||
| "" => quote! { ::tmk_protocol::TestFlags64::new() }, | ||
| "expected_failure" => { | ||
| quote! { ::tmk_protocol::TestFlags64::new().with_expected_failure(true) } | ||
| } | ||
| attr => { | ||
| let msg = format!("unsupported tmk_test option: {attr}"); | ||
| return quote! { | ||
| compile_error!(#msg); | ||
| #item | ||
| } | ||
| .into_token_stream() | ||
| .into(); | ||
| } | ||
| }; |
| let iss = IssInstructionAbort::from_bits(esr_el2.iss()); | ||
|
|
||
| if iss.fnv() { | ||
| tracing::warn!("CCA InstructionAbort: FAR_EL2 is not valid"); | ||
| return Err( | ||
| dev.fatal_error(CcaUnsupportedExit::ExitReason(0).into()) | ||
| ); | ||
| } | ||
|
|
||
| let far = cca_exit.far_el2(); | ||
| let hpfar = cca_exit.hpfar_el2(); | ||
| let fipa = (hpfar.fipa() << 12) | (far & 0xfff); | ||
| let mut plane_state = mshv_rsi_get_ipa_state { | ||
| fipa, | ||
| state: u64::MAX, | ||
| }; | ||
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); | ||
|
|
||
| let reason = InstructionAbortReason::from(iss.ifsc()); | ||
| tracing::warn!( | ||
| esr_el2 = cca_exit.0.esr_el2, | ||
| elr_el2 = cca_exit.elr_el2(), | ||
| far_el2 = cca_exit.far_el2(), | ||
| fipa = fipa, | ||
| fipa_state = plane_state.state as u8, | ||
| ifsc = iss.ifsc().0, | ||
| ?reason, | ||
| far_not_valid = iss.fnv(), | ||
| "CCA instruction abort" | ||
| ); | ||
| return Err(dev.fatal_error( | ||
| CcaUnsupportedExit::InstructionAbort { | ||
| esr_el2: cca_exit.0.esr_el2, |
| // CCA: Get the RIPAS state of an ipa | ||
| ioctl_read!( | ||
| hcl_rsi_ipa_state_read, | ||
| MSHV_IOCTL, | ||
| MSHV_VTL_RSI_GET_IPA_STATE, | ||
| cca::mshv_rsi_get_ipa_state | ||
| ); |
| /// Get the ipa ripas state from the RMM | ||
| pub fn cca_ipa_state_read( | ||
| &self, | ||
| vtl: GuestVtl, | ||
| state: &mut mshv_rsi_get_ipa_state, | ||
| ) -> Result<(), Error> { | ||
| self.hcl | ||
| .rsi_get_ipa_state(vtl, state) | ||
| .map_err(|_| Error::InvalidRegisterValue) | ||
| } |
| // The guest Linux kernel (with cca/plane driver) hasn't been upstreamed yet, fetch it from our private repo | ||
| const PLANE0_LINUX_REPO: &str = "https://github.com/jiong-microsoft/OHCL-Linux-Kernel.git"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev"; | ||
| const PLANE0_LINUX_BRANCH: &str = "cca-dev-ben"; |
|
Looks like the test is failing, and copilot has a lot of good feedback. |
| let mut plane_state = mshv_rsi_get_ipa_state { | ||
| fipa, | ||
| state: u64::MAX, | ||
| }; | ||
| let _ = this | ||
| .ipa_state_read(GuestVtl::Vtl0, &mut plane_state) | ||
| .map_err(|_| Error::Hcl); |
…sts can be compiled or not making the aarch64 specific tests linux only using a cfg for now changes to tmk_vmm test macros parsing changes to error reporting in Instruction Abort handling changing hcl_rsi_ipa_state_read from ioctl_read to ioctl_readwrite
| fipa: 0, | ||
| fipa_state: u8::MAX, | ||
| ifsc: iss.ifsc().0, | ||
| reason: InstructionAbortReason::Unknown, | ||
| far_not_valid: iss.fnv(), |
| name = test.name, | ||
| expected_failure = true, | ||
| reason = "explicit failure", | ||
| "test passed" |
| vp_index = vp_index.index(), | ||
| reason, | ||
| regs = format_args!("{:#x?}", regs), | ||
| "test passed" |
| #[bits(4)] | ||
| pub res0: u8, | ||
| #[bits(44)] | ||
| pub fipa: u64, |
| #[bits(15)] | ||
| pub res1: u32, | ||
| pub ns: bool, |
| /// Get the ipa ripas state from the RMM | ||
| pub fn cca_ipa_state_read( | ||
| &self, | ||
| vtl: GuestVtl, | ||
| state: &mut mshv_rsi_get_ipa_state, | ||
| ) -> Result<(), Error> { | ||
| self.hcl | ||
| .rsi_get_ipa_state(vtl, state) | ||
| .map_err(|_| Error::InvalidRegisterValue) | ||
| } |