Thread (15 messages) read the whole thread 15 messages, 4 authors, 2020-01-15

Re: [PATCH 7/7] KVM: arm/arm64: Elide CMOs when unmapping a range

From: James Morse <james.morse@arm.com>
Date: 2019-12-18 15:08:01
Also in: kvm, kvmarm, linux-mips

Hi Marc,

On 13/12/2019 18:25, Marc Zyngier wrote:
If userspace issues a munmap() on a set of pages, there is no
expectation that the pages are cleaned to the PoC.
(Pedantry: Clean and invalidate. If the guest wrote through a device mapping, we ditch any
clean+stale lines with this path, meaning swapout saves the correct values)

So let's
not do more work than strictly necessary, and set the magic
flag that avoids CMOs in this case.
I think this assumes the pages went from anonymous->free, so no-one cares about the contents.

If the pages are backed by a file, won't dirty pages will still get written back before
the page is free? (e.g. EFI flash 'file' mmap()ed in)

What if this isn't the only mapping of the page? Can't it be swapped out from another VMA?
(tenuous example, poor man's memory mirroring?)


Thanks,

James

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help