[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 09/18] xen/riscv: implement function to map memory in guest p2m
On 17.09.2025 23:55, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/p2m.c > +++ b/xen/arch/riscv/p2m.c > @@ -96,6 +96,41 @@ void __init gstage_mode_detect(void) > local_hfence_gvma_all(); > } > > +/* > + * Force a synchronous P2M TLB flush. > + * > + * Must be called with the p2m lock held. > + */ > +static void p2m_tlb_flush(struct p2m_domain *p2m) > +{ > + const struct domain *d = p2m->domain; > + > + ASSERT(p2m_is_write_locked(p2m)); > + > + sbi_remote_hfence_gvma(d->dirty_cpumask, 0, 0); > + > + p2m->need_flush = false; While with the p2m lock held it shouldn't matter, purely for doc purposes I would recommend to clear the flag before doing the flush. > +/* Unlock the flush and do a P2M TLB flush if necessary */ Don't you mean "P2M" in place of the first "flush"? Ideally with both adjustments: Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |