lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2/4] kvm: Add host side support for free memory hints
On Mon, Feb 11, 2019 at 09:41:19AM -0800, Dave Hansen wrote:
> On 2/9/19 4:44 PM, Michael S. Tsirkin wrote:
> > So the policy should not leak into host/guest interface.
> > Instead it is better to just keep the pages pinned and
> > ignore the hint for now.
>
> It does seems a bit silly to have guests forever hinting about freed
> memory when the host never has a hope of doing anything about it.
>
> Is that part fixable?


Yes just not with existing IOMMU APIs.

It's in the paragraph just above that you cut out:
Yes right now assignment is not smart enough but generally
you can protect the unused page in the IOMMU and that's it,
it's safe.

So e.g.
extern int iommu_remap(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot);


I can elaborate if you like but generally we would need an API that
allows you to atomically update a mapping for a specific page without
perturbing the mapping for other pages.

--
MST

\
 
 \ /
  Last update: 2019-02-11 18:49    [W:0.069 / U:0.216 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site