xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Konrad Rzeszutek Wilk <konrad@darnok.org>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: [Ques]:xen_ident_map_ISA ant it's mfns...
Date: Mon, 23 Jan 2012 18:14:47 -0800	[thread overview]
Message-ID: <20120123181447.40ef747c@mantra.us.oracle.com> (raw)
In-Reply-To: <20120123164316.GA22488@andromeda.dapyr.net>

On Mon, 23 Jan 2012 12:43:17 -0400
Konrad Rzeszutek Wilk <konrad@darnok.org> wrote:

> On Fri, Jan 20, 2012 at 05:29:32PM -0800, Mukesh Rathor wrote:
> > Hi,
> > 
> > I am bit confused about the do_update_va_mapping call that dom0
> > makes in xen_ident_map_ISA() to map ffff8800000a0000 to mfn a0. The
> > mfn belongs to DOMID_IO. Before the mfn is mapped, the l1 entry is
> > not empty:
> > 
> > 0000000139d08500:  00100001380a0027
> > 
> > After the mapping:
> > 
> > 0000000139d08500:  00100000000a0467  as expected.
> > 
> > However, the mfn 1380a0 still seems to belong to dom0. Shouldn't
> > that have been returned back to the xen heap? 
> 
> It should if dom0 had returned it back. The setup.c code you where
> it returns the swatches of memory has a check where it decides to
> return only memory above 1M. The <1MB is left unused.
> 
> In other words, we make all the PTE's to the look as if PFN are
> 1:1 to MFN. But if you do a MFN lookup to PFN (mfn_to_pfn) for the
> regions below 1MB, you end up getting PFNs that are _not_ in the 1MB
> region. Instead they are just normal memory.
> 
> There is a good reason for this, which if I remeber right is to allow
> fixmap to work correctly, but if you are using ioremap it would return
> empty RAM so that most of the PnP devices (like RTC) would not load.
> 
> hmm, I think so . I remember thinking to remove that once (so allow
> the <1MB region to be freed), and I hit some pretty big problems.
> 
> Is there a particular reason you want to "Free" that memory?

I am not trying to "free" it. It just occured to me the old frames are
never used, 1380a0 in the above case.

thanks,
Mukesh

      reply	other threads:[~2012-01-24  2:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-21  1:29 [Ques]:xen_ident_map_ISA ant it's mfns Mukesh Rathor
2012-01-23 16:43 ` Konrad Rzeszutek Wilk
2012-01-24  2:14   ` Mukesh Rathor [this message]

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=20120123181447.40ef747c@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=konrad@darnok.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).