mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-11 21:59:26 +00:00
hv: coding style: refine page related
1) Fix procedure has more than one exit point. 2) Add some brackets to make logical conjunctions more readable. Tracked-On: #861 Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef E820_H
|
||||
#define E820_H
|
||||
|
||||
struct e820_mem_params {
|
||||
uint64_t mem_bottom;
|
||||
uint64_t mem_top;
|
||||
@@ -43,3 +46,5 @@ const struct e820_mem_params *get_e820_mem_info(void);
|
||||
#define NUM_E820_ENTRIES 5U
|
||||
extern const struct e820_entry e820_default_entries[NUM_E820_ENTRIES];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#define PT_PAGE_NUM(size) (((size) + PDE_SIZE - 1UL) >> PDE_SHIFT)
|
||||
|
||||
/* The size of the guest physical address space, covered by the EPT page table of a VM */
|
||||
#define EPT_ADDRESS_SPACE(size) ((size != 0UL) ? (size + PLATFORM_LO_MMIO_SIZE) : 0UL)
|
||||
#define EPT_ADDRESS_SPACE(size) (((size) != 0UL) ? ((size) + PLATFORM_LO_MMIO_SIZE) : 0UL)
|
||||
|
||||
#define TRUSTY_PML4_PAGE_NUM(size) (1UL)
|
||||
#define TRUSTY_PDPT_PAGE_NUM(size) (1UL)
|
||||
|
Reference in New Issue
Block a user