> Add a host_zeroes_pages flag to page_reporting_dev_info, allowing > page reporting devices to declare that their host zeros reported pages > on reclaim. > > On successful reporting by such a device that guarantees zero contents, set > PG_zeroed. > > Note, that hosts zero the pages for guests, safely, even on > architectures with aliasing data caches, and even without knowing the > guest user virtual addresses. > > Specifically, ARM64 data caches behave as PIPT; KVM handles cache maintenance > around stage-2 mappings and invalidates the whole I-cache when it aliases. > On aliasing MIPS, host unmapping flushes the whole D-cache, and slow GUP > flushes the host aliases of replacement backing pages before KVM maps > them. > > Any host that can't handle this, will simply not set the flag in its > page reporting device. > > No driver sets host_zeroes_pages yet. > > Signed-off-by: Michael S. Tsirkin <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2
