mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-11 21:59:26 +00:00
HV: [v2] bugfix in 'hv_access_memory_region_update()'
- bugfix:the actual 'size' of memory region that to be updated is incorrect. - replace CONFIG_UEFI_STUB with DMAR_PARSE_ENABLED when update memory pages for ACPI_RECLAIM region, as DMAR_PARSE_ENABLED may be enabled on non-EFI platform. V2 update: wrap roundup to 2M and rounddown to 2M inline functions. Tracked-On: #2056 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
|
||||
#include <cpu.h>
|
||||
#include <page.h>
|
||||
#include <pgtable.h>
|
||||
|
||||
/* Define cache line size (in bytes) */
|
||||
#define CACHE_LINE_SIZE 64U
|
||||
@@ -65,6 +66,16 @@ static inline uint64_t round_page_down(uint64_t addr)
|
||||
return (addr & PAGE_MASK);
|
||||
}
|
||||
|
||||
static inline uint64_t round_pde_up(uint64_t val)
|
||||
{
|
||||
return (((val + (uint64_t)PDE_SIZE) - 1UL) & PDE_MASK);
|
||||
}
|
||||
|
||||
static inline uint64_t round_pde_down(uint64_t val)
|
||||
{
|
||||
return (val & PDE_MASK);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Page tables level in IA32 paging mode
|
||||
*/
|
||||
|
Reference in New Issue
Block a user