blob: 45aa257573b7d15f3eb78253dfa7b90ab7e4e638 [file] [log] [blame]
/*
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
/* Define the standard types for the platform. */
#if defined(__linux__) && defined(__KERNEL__)
#include <linux/types.h>
typedef phys_addr_t hf_ipaddr_t;
#else
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
typedef uintptr_t hf_ipaddr_t;
#endif
/** The ID of the primary VM which is responsible for scheduling. */
#define HF_PRIMARY_VM_ID 0
/* Invalid values for fields to indicate absence or errors. */
#define HF_INVALID_VM_ID 0xffffffff
#define HF_INVALID_VCPU 0xffff