[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86: FLUSH_CACHE -> FLUSH_CACHE_EVICT
commit 73c7f19946db86d1018fdfa72f2d824230c11a84 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Jun 12 14:46:23 2025 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Jun 12 14:46:23 2025 +0200 x86: FLUSH_CACHE -> FLUSH_CACHE_EVICT This is to make the difference to FLUSH_CACHE_WRITEBACK more explicit. Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx> --- xen/arch/x86/flushtlb.c | 8 ++++---- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/hvm/mtrr.c | 6 +++--- xen/arch/x86/hvm/svm/svm.c | 2 +- xen/arch/x86/hvm/vmx/vmcs.c | 2 +- xen/arch/x86/hvm/vmx/vmx.c | 2 +- xen/arch/x86/include/asm/flushtlb.h | 2 +- xen/arch/x86/mm.c | 4 ++-- xen/arch/x86/pv/emul-priv-op.c | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/xen/arch/x86/flushtlb.c b/xen/arch/x86/flushtlb.c index 796b25dad6..94b2a30e8d 100644 --- a/xen/arch/x86/flushtlb.c +++ b/xen/arch/x86/flushtlb.c @@ -232,7 +232,7 @@ unsigned int flush_area_local(const void *va, unsigned int flags) if ( flags & FLUSH_HVM_ASID_CORE ) hvm_flush_guest_tlbs(); - if ( flags & (FLUSH_CACHE | FLUSH_CACHE_WRITEBACK) ) + if ( flags & (FLUSH_CACHE_EVICT | FLUSH_CACHE_WRITEBACK) ) { const struct cpuinfo_x86 *c = ¤t_cpu_data; unsigned long sz = 0; @@ -245,13 +245,13 @@ unsigned int flush_area_local(const void *va, unsigned int flags) c->x86_clflush_size && c->x86_cache_size && sz && ((sz >> 10) < c->x86_cache_size) ) { - if ( flags & FLUSH_CACHE ) + if ( flags & FLUSH_CACHE_EVICT ) cache_flush(va, sz); else cache_writeback(va, sz); - flags &= ~(FLUSH_CACHE | FLUSH_CACHE_WRITEBACK); + flags &= ~(FLUSH_CACHE_EVICT | FLUSH_CACHE_WRITEBACK); } - else if ( flags & FLUSH_CACHE ) + else if ( flags & FLUSH_CACHE_EVICT ) wbinvd(); else wbnoinvd(); diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 4cb2e13046..056360d5fe 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2277,7 +2277,7 @@ void hvm_shadow_handle_cd(struct vcpu *v, unsigned long value) domain_pause_nosync(v->domain); /* Flush physical caches. */ - flush_all(FLUSH_CACHE); + flush_all(FLUSH_CACHE_EVICT); hvm_set_uc_mode(v, 1); domain_unpause(v->domain); diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index 4b8afad2c5..99e3b4062b 100644 --- a/xen/arch/x86/hvm/mtrr.c +++ b/xen/arch/x86/hvm/mtrr.c @@ -618,7 +618,7 @@ int hvm_set_mem_pinned_cacheattr(struct domain *d, uint64_t gfn_start, break; /* fall through */ default: - flush_all(FLUSH_CACHE); + flush_all(FLUSH_CACHE_EVICT); break; } return 0; @@ -684,7 +684,7 @@ int hvm_set_mem_pinned_cacheattr(struct domain *d, uint64_t gfn_start, p2m_memory_type_changed(d); if ( type != X86_MT_WB ) - flush_all(FLUSH_CACHE); + flush_all(FLUSH_CACHE_EVICT); return rc; } @@ -799,7 +799,7 @@ void memory_type_changed(struct domain *d) (!boot_cpu_has(X86_FEATURE_XEN_SELFSNOOP) || (is_iommu_enabled(d) && !iommu_snoop)) ) { - flush_all(FLUSH_CACHE); + flush_all(FLUSH_CACHE_EVICT); } } diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index e33a38c1e4..db1799bb43 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2316,7 +2316,7 @@ static void svm_vmexit_mce_intercept( static void cf_check svm_wbinvd_intercept(void) { if ( cache_flush_permitted(current->domain) ) - flush_all(FLUSH_CACHE); + flush_all(FLUSH_CACHE_EVICT); } static void svm_vmexit_do_invalidate_cache(struct cpu_user_regs *regs, diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 57d49364db..c86f73f6d1 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -1929,7 +1929,7 @@ void cf_check vmx_do_resume(void) { int cpu = v->arch.hvm.vmx.active_cpu; if ( cpu != -1 ) - flush_mask(cpumask_of(cpu), FLUSH_CACHE); + flush_mask(cpumask_of(cpu), FLUSH_CACHE_EVICT); } vmx_clear_vmcs(v); diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index d8879c304e..218cb2c1af 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -3844,7 +3844,7 @@ static void cf_check vmx_wbinvd_intercept(void) return; if ( cpu_has_wbinvd_exiting ) - flush_all(FLUSH_CACHE); + flush_all(FLUSH_CACHE_EVICT); else wbinvd(); } diff --git a/xen/arch/x86/include/asm/flushtlb.h b/xen/arch/x86/include/asm/flushtlb.h index cd625f9114..019d886f2b 100644 --- a/xen/arch/x86/include/asm/flushtlb.h +++ b/xen/arch/x86/include/asm/flushtlb.h @@ -113,7 +113,7 @@ void switch_cr3_cr4(unsigned long cr3, unsigned long cr4); /* Flush TLBs (or parts thereof) including global mappings */ #define FLUSH_TLB_GLOBAL 0x200 /* Flush data caches */ -#define FLUSH_CACHE 0x400 +#define FLUSH_CACHE_EVICT 0x400 /* VA for the flush has a valid mapping */ #define FLUSH_VA_VALID 0x800 /* Flush CPU state */ diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 657623336c..e7fd56c7ce 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3821,7 +3821,7 @@ long do_mmuext_op( if ( !cpumask_intersects(mask, per_cpu(cpu_sibling_mask, cpu)) ) __cpumask_set_cpu(cpu, mask); - flush_mask(mask, FLUSH_CACHE); + flush_mask(mask, FLUSH_CACHE_EVICT); } else rc = -EACCES; @@ -5395,7 +5395,7 @@ int map_pages_to_xen( if ( (flags & _PAGE_PRESENT) && \ (((o_) ^ flags) & PAGE_CACHE_ATTRS) ) \ { \ - flush_flags |= FLUSH_CACHE; \ + flush_flags |= FLUSH_CACHE_EVICT; \ if ( virt >= DIRECTMAP_VIRT_START && \ virt < HYPERVISOR_VIRT_END ) \ flush_flags |= FLUSH_VA_VALID; \ diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c index 463befe043..f3f012f8fb 100644 --- a/xen/arch/x86/pv/emul-priv-op.c +++ b/xen/arch/x86/pv/emul-priv-op.c @@ -1205,7 +1205,7 @@ static int cf_check cache_op( else if ( op == x86emul_wbnoinvd /* && cpu_has_wbnoinvd */ ) flush_all(FLUSH_CACHE_WRITEBACK); else - flush_all(FLUSH_CACHE); + flush_all(FLUSH_CACHE_EVICT); return X86EMUL_OKAY; } -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |