All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Wei Wang2 <wei.wang2@amd.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] amd iommu: Do not adjust paging mode for dom0 devices
Date: Mon, 07 Feb 2011 15:00:04 +0000	[thread overview]
Message-ID: <C975B974.2ACE1%keir@xen.org> (raw)
In-Reply-To: <201102071430.37941.wei.wang2@amd.com>

On 07/02/2011 13:30, "Wei Wang2" <wei.wang2@amd.com> wrote:

> On Monday 07 February 2011 11:47:32 Keir Fraser wrote:
>> On 07/02/2011 10:33, "Wei Wang2" <wei.wang2@amd.com> 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@amd.com>
> 
>>> 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.
> 
> 

  reply	other threads:[~2011-02-07 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 17:34 [PATCH] amd iommu: Do not adjust paging mode for dom0 devices Wei Wang2
2011-02-06 16:58 ` Keir Fraser
2011-02-07  9:58   ` Wei Wang2
2011-02-07 10:10     ` Keir Fraser
2011-02-07 10:33       ` Wei Wang2
2011-02-07 10:47         ` Keir Fraser
2011-02-07 13:30           ` Wei Wang2
2011-02-07 15:00             ` Keir Fraser [this message]
2011-02-08 18:02               ` Wei Wang2

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C975B974.2ACE1%keir@xen.org \
    --to=keir@xen.org \
    --cc=wei.wang2@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.