Re: [PATCH] xen-swiotlb: exchange memory with Xen only when pages are contiguous

From: Joe Jin
Date: Fri Oct 26 2018 - 10:48:19 EST


On 10/26/18 1:54 AM, Dongli Zhang wrote:
> If dom0 (or any domain) is happy, although it could try to exchange all its
> continuous dma pages back to xen hypervisor. From the perspective of each
> domain, they always would like to keep as much continuous dma page as possible.
>
> I am thinking something different. If there is malicious domU keep exchanging
> memory and allocating continuous pages from xen hypervisor, will the
> continuously dma pages be used up (sort of DoS attack)?

This is a problem.

>
> I am not sure if there is anything in xen hypervisor to prevent such behavior?

I'm not sure but I guess it hard to prevent it, xen hypervisor could not identify
if the requirement is reasonable or no.

Maybe Xen reserve some low memory for guest start?

Thanks,
Joe