mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
HV: Add CLFLUSHOPT instruction.
CLFLUSHOPT is used to invalidate from every level of the cache hierarchy in the cache coherence domain the cache line that contains the linear address specified with memory operand. If that cache line contains modified date at any level of the cache hierarchy, that data is written back to memory. If the platform does not support CLFLUSHOPT instruction, boot will fail. Signed-off-by: Jack Ren <jack.ren@intel.com> Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
d0e0871283
commit
6fd397e82b
@@ -76,6 +76,7 @@
|
||||
#define X86_FEATURE_INVPCID ((FEAT_7_0_EBX << 5U) + 10U)
|
||||
#define X86_FEATURE_CAT ((FEAT_7_0_EBX << 5U) + 15U)
|
||||
#define X86_FEATURE_SMAP ((FEAT_7_0_EBX << 5U) + 20U)
|
||||
#define X86_FEATURE_CLFLUSHOPT ((FEAT_7_0_EBX << 5U) + 23U)
|
||||
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007 (EDX)*/
|
||||
#define X86_FEATURE_IBRS_IBPB ((FEAT_7_0_EDX << 5U) + 26U)
|
||||
|
@@ -169,6 +169,11 @@ static inline void clflush(volatile void *p)
|
||||
asm volatile ("clflush (%0)" :: "r"(p));
|
||||
}
|
||||
|
||||
static inline void clflushopt(volatile void *p)
|
||||
{
|
||||
asm volatile ("clflushopt (%0)" :: "r"(p));
|
||||
}
|
||||
|
||||
/* get PDPT address from CR3 vaule in PAE mode */
|
||||
static inline uint64_t get_pae_pdpt_addr(uint64_t cr3)
|
||||
{
|
||||
|
Reference in New Issue
Block a user