WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] amd iommu: Do not adjust paging mode for dom0 de

To: Wei Wang2 <wei.wang2@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] amd iommu: Do not adjust paging mode for dom0 devices
From: Keir Fraser <keir@xxxxxxx>
Date: Mon, 07 Feb 2011 15:00:04 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 07 Feb 2011 07:01:37 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=hur/VjfU6QlJSXywa3RYeP7mLx3F6KIXZO8Rr2zRF+Y=; b=lqZPIG40e2IhN+S9OtjzVMg24pkVLxYDDt7ZP84GXrcUp90pqFKje7ve0aO1GsSvM3 I3qo+vw40/UJMExg9noWGfsO4Q+4d6lfaqMNIvRj3KHp4fEiis8+e/GvCOmDbwh4H00i MscAJyXd3ABqD3TJrN4oRLQcreMPyl7cW0YWA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=NtQ5gG81ygO8gR6TPcpa24QfLMq4qzrWj79Ip2nLaow36zkaAevImqmxVxM1eK8SWt pyyVHC3J/z8RRVk5Rdp5w3pRdCZJFC2WwEZ+JnMCEXx5xDaDxwya8OqxzaYjwBFcLzhX pY7NQJxJoC5C+uZCyAn30Tvs9QLfa5PPEyqBM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201102071430.37941.wei.wang2@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvG17NhHiqbZS+msEK59N4aXUKmIA==
Thread-topic: [Xen-devel] [PATCH] amd iommu: Do not adjust paging mode for dom0 devices
User-agent: Microsoft-Entourage/12.28.0.101117
On 07/02/2011 13:30, "Wei Wang2" <wei.wang2@xxxxxxx> wrote:

> On Monday 07 February 2011 11:47:32 Keir Fraser wrote:
>> On 07/02/2011 10:33, "Wei Wang2" <wei.wang2@xxxxxxx> wrote:
> 
>> Personally I would suggest starting with small 2-level tables and
>> dynamically increase their height as bigger mappings are added to them.
>> Else stick with 4-level tables, or size tables according to global variable
>> max_page. I think basing anything on d->max_pages is not a good idea.
>> 
>>  -- Keir
> How does the attached patch look like? It uses global variable max_page for pv
> and dom0 and calculate maxpfn for hvm guest. This should cover gfn holes on
> hvm guests.

The p2m code already tracks the largest gfn for HVM guests. Try using
p2m_get_hostp2m(d)->max_mapped_pfn for HVM guests. Note that this could
increase after you sample it, however. Hence why you really need to have a
statically deep-enough table, or the ability to grow the table depth
dynamically.

Your change for PV guests would definitely be correct, however.

 -- Keir

> Thanks,
> Wei
> Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
> 
>>> I was assuming max_pdx is the index number... Or are
>>> you referring memory hot plug? If so, we might also need 4 level for
>>> dom0.
> 
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel