[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 1/3] x86/tlb: introduce a flush HVM ASIDs flag


On 20/03/2020 14:27, Julien Grall wrote:

On 20/03/2020 14:22, Roger Pau Monné wrote:
static inline void filtered_flush_tlb_mask(uint32_t tlbflush_timestamp)
     cpumask_t mask;

     cpumask_copy(&mask, &cpu_online_map);
     tlbflush_filter(&mask, tlbflush_timestamp);
     if ( !cpumask_empty(&mask) )
#if CONFIG_X86
          * filtered_flush_tlb_mask is used after modifying the p2m in
          * populate_physmap, Xen needs to trigger an ASID tickle as this is a
          * requirement on AMD hardware.

I don't think this comment is correct. populate_physmap() is only going to add entry in the P2M and therefore flush should not be needed.

I should have probably said "in most of the cases..." and ...

The only reason the flush would happen in populate_physmap() is because we allocated a page that was required to be flush (see free.need_tbflush).

... extend this comment a bit more. The flush will happen when the page used to have an owner. So if there is no owner, there is no flush.

Therefore we can't rely on it if we really wanted to trigger an ASID tickle after a P2M update.


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.