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

Function gs_initialize

example/default_rust/src/x64/intel/gs_initialize.rs:35–49  ·  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: &mut crate::GsT,
    sys: &syscall::BfSyscallT,
    intrinsic: &crate::IntrinsicT,
)

Source from the content-addressed store, hash-verified

33/// and friends otherwise
34///
35pub fn gs_initialize(
36 gs: &mut crate::GsT,
37 sys: &syscall::BfSyscallT,
38 intrinsic: &crate::IntrinsicT,
39) -> bsl::ErrcType {
40 bsl::discard(intrinsic);
41
42 gs.msr_bitmap = sys.bf_mem_op_alloc_page::<u8>(&mut gs.msr_bitmap_phys);
43 if core::ptr::null_mut() == gs.msr_bitmap {
44 print_v!("{}", bsl::here());
45 return bsl::errc_failure;
46 }
47
48 return bsl::errc_success;
49}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected