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

Re: [PATCH v2 5/6] x86/hvm: limit memory type cache flush to running domains



On Sun, May 18, 2025 at 01:38:02PM +0200, Jan Beulich wrote:
> On 16.05.2025 11:45, Roger Pau Monne wrote:
> > Avoid the cache flush if the domain is not yet running.  There shouldn't be
> > any cached data resulting from domain accesses that need flushing, as the
> > domain hasn't run yet.
> 
> This again plays into what we started discussing already: There may still be
> data in caches due to Xen or toolsstack behavior. Imo to compensate we'd need
> to do one flush right before unleashing the domain. Yet of course this makes
> sense only when we make sure to not have (cachable) mapping in Xen for any of
> the affected ranges. Hence, with that not presently being the case, ...
> 
> > No change in domain observable behavior intended.
> 
> ... I agree here, thus ...
> 
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> The situation may want discussing a bit more in the description, though,
> which would make me feel less uneasy about that R-b.

I've added:

"There can be data in the caches as a result of Xen and/or toolstack
behavior.  Ideally we would do a cache flush strictly before starting the
domain, however doing so only makes sense once we can guarantee there are
no leftover mappings of the affected ranges with cacheable attributes,
otherwise the CPU can speculatively populate the cache with data from those
ranges."

Thanks, Roger.



 


Rackspace

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