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

Re: [Xen-devel] [PATCH 6/9] x86: move memory_type_changed to mm.c



On Tue, Aug 07, 2018 at 05:33:35AM -0600, Jan Beulich wrote:
> >>> On 07.08.18 at 12:00, <wei.liu2@xxxxxxxxxx> wrote:
> > This function is common to both PV and HVM. Move it to x86 common
> > code.
> 
> I'm afraid that's the wrong way round: p2m_memory_type_changed()
> is HVM (in fact EPT) specific. The only uses of the function that aren't
> already HVM-specific are from domctl.c and from iommu_construct(),
> yet I doubt the flush_all(FLUSH_CACHE) has any relevance there in
> the PV case.

Yeah, I got the impression that flushing is relevant to PV from reading
existing code.

If it is HVM only I suggest we add hvm prefix to it and only call it
when the domain in question is hvm. This follows what we already do in
other places.

   if ( is_hvm_domain(d) )
       hvm_memory_type_change(...)

Wei.

> 
> Jan
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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