MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / dispatch_fail

Function dispatch_fail

example/default_rust/src/dispatch_fail.rs:46–83  ·  view source on GitHub ↗

@copyright Copyright (C) 2020 Assured Information Security, Inc. @copyright Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Sof

(
    gs: &crate::GsT,
    tls: &crate::TlsT,
    sys: &syscall::BfSyscallT,
    intrinsic: &crate::IntrinsicT,
    vp_pool: &crate::VpPoolT,
    vs_pool: &crate::VsPoolT,
    errc: bsl::SafeU64,
    

Source from the content-addressed store, hash-verified

44/// and friends otherwise
45///
46pub fn dispatch_fail(
47 gs: &crate::GsT,
48 tls: &crate::TlsT,
49 sys: &syscall::BfSyscallT,
50 intrinsic: &crate::IntrinsicT,
51 vp_pool: &crate::VpPoolT,
52 vs_pool: &crate::VsPoolT,
53 errc: bsl::SafeU64,
54 addr: bsl::SafeU64,
55) -> bsl::ErrcType {
56 bsl::expects(errc.is_valid_and_checked());
57 bsl::expects(addr.is_valid_and_checked());
58
59 bsl::discard(gs);
60 bsl::discard(tls);
61 bsl::discard(sys);
62 bsl::discard(intrinsic);
63 bsl::discard(vp_pool);
64 bsl::discard(vs_pool);
65
66 // NOTE:
67 // - Tells the microkernel that we didn't handle the fast fail.
68 // When this occurs, the microkernel will halt this PP. In most
69 // cases, there are only two options for how to handle a fail:
70 // - Do the following, and report an error and halt.
71 // - Return to a parent VS and continue execution from there,
72 // which is typically only possible if you are implementing
73 // more than one VP/VS per PP (e.g., when implementing guest
74 // support, VSM support or nested virtualization support).
75 //
76 // - Another use case is integration testing. We can also use this
77 // to generate faults that we can recover from to ensure the
78 // fault system works properly during testing.
79 //
80
81 alert!("this extension does not support handling fast fail events\n");
82 return bsl::errc_failure;
83}

Callers 1

fail_entryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected