From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: question about memory allocation for driver domain Date: Tue, 10 Feb 2015 09:31:51 +0800 Message-ID: <54D95F87.2020206@linaro.org> References: <1423141944.24924.118.camel@citrix.com> <54D38B3D.5080805@linaro.org> <54D8706C.6020105@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Oleksandr Tyshchenko Cc: Ian Campbell , Andrii Anisov , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 09/02/2015 20:02, Oleksandr Tyshchenko wrote: > On Mon, Feb 9, 2015 at 10:31 AM, Julien Grall wrote: >> On 07/02/2015 01:15, Oleksandr Tyshchenko wrote: > Hi Julien Hi Oleksandr, >>> On Thu, Feb 5, 2015 at 6:36 PM, Oleksandr Tyshchenko >> >> The next problem is ballooning. When the guest balloon out memory, the page >> will be freed by Xen and can be re-used by another domain. >> >> When guest balloon in, Xen will allocate a page (randomly) and therefore the >> mapping won't be anymore IPA (guest physical address) == PA (physical >> address). Any DMA request using this address will read/write data from wrong >> memory. > Is it possible to disable ballon driver for domd? I think updating is_domain_direct_mapped is enough here. We won't support memory hotplug for this kind of domain. >> >> The last problem but not the least is, depending on which backend you are >> running in the 1:1 domain (such blkback), grant won't be mapped 1:1 to the >> guest, so you will have to use swiotlb in order to use the right DMA >> address. For instance, without swiotlb, guest won't be able to use a disk >> partition via blkfront. This because the backend is giving directly the >> grant address to the block driver. To solve this, we have to use swiotlb and >> set specific DMA callback. For now, there are only used for DOM0. > We are using SWIOTLB for domd too. Good :). Regards, -- Julien Grall