Skip to content

Commit 4c6f11f

Browse files
binbinwu1jren1
authored andcommitted
mmu: add cflush api
Signed-off-by: Binbin Wu <binbin.wu@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
1 parent a0b7fb8 commit 4c6f11f

File tree

1 file changed

+5
-0
lines changed
  • hypervisor/include/arch/x86

1 file changed

+5
-0
lines changed

hypervisor/include/arch/x86/mmu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,11 @@ static inline void *mmu_pt_for_pde(uint32_t *pd, uint32_t vaddr)
376376
asm volatile (" wbinvd\n" : : : "memory"); \
377377
}
378378

379+
static inline void clflush(volatile void *p)
380+
{
381+
asm volatile ("clflush (%0)" :: "r"(p));
382+
}
383+
379384
/* External variable declarations */
380385
extern uint8_t CPU_Boot_Page_Tables_Start_VM[];
381386

0 commit comments

Comments
 (0)