github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/include/vmm_globals.h (about)

     1  /*
     2   * Copyright (c) 2013 Intel Corporation
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *     http://www.apache.org/licenses/LICENSE-2.0
     8   * Unless required by applicable law or agreed to in writing, software
     9   * distributed under the License is distributed on an "AS IS" BASIS,
    10   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11   * See the License for the specific language governing permissions and
    12   * limitations under the License.
    13   */
    14  
    15  #ifndef _VMM_GLOBALS_H_
    16  #define _VMM_GLOBALS_H_
    17  
    18  #include "vmm_defs.h"
    19  
    20  // Set of global variables
    21  
    22  // VMM running state
    23  typedef enum _VMM_STATE {
    24      VMM_STATE_UNINITIALIZED = 0,
    25      VMM_STATE_BOOT,         // initial boot state - only BSP is active and is in VMM
    26      VMM_STATE_WAIT_FOR_APs, // BSP waits for APs to finish initialization
    27      VMM_STATE_RUN           // All CPUs finished init and are in normal running state or
    28                              // in Wait-For-SIPI state on behalf of guest
    29  } VMM_STATE;
    30  
    31  extern VMM_STATE g_vmm_state;
    32  
    33  INLINE VMM_STATE vmm_get_state( void )
    34  {
    35      return g_vmm_state;
    36  }
    37  
    38  INLINE void vmm_set_state( VMM_STATE new_state )
    39  {
    40      g_vmm_state = new_state;
    41  }
    42  
    43  void vmm_version_print( void );
    44  
    45  extern CPU_ID g_num_of_cpus;
    46  
    47  #endif // _VMM_GLOBALS_H_