xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 17/18 V2]: PVH xen: PVH dom0 creation...
Date: Thu, 28 Mar 2013 17:32:05 -0700	[thread overview]
Message-ID: <20130328173205.49fe631d@mantra.us.oracle.com> (raw)
In-Reply-To: <51471E3302000078000C65FD@nat28.tlf.novell.com>

On Mon, 18 Mar 2013 13:01:23 +0000
"Jan Beulich" <JBeulich@suse.com> wrote:

>  >>> On 16.03.13 at 02:06, Mukesh Rathor <mukesh.rathor@oracle.com>
>  >>> wrote:
> > @@ -307,6 +309,65 @@ static void __init
> > process_dom0_ioports_disable(void) }
> >  }
> >  
> > +/* 
> > + * Set the 1:1 map for all non-RAM regions for dom 0. Thus, dom0
> > will have
> > + * the entire io region mapped in the EPT/NPT.
> > + */
> > +static __init void  pvh_map_all_iomem(struct domain *d)
> > +{
> > +    unsigned long start = 0;
> > +    const struct e820entry *entry;
> > +    int rc, i, nump;
> > +
> > +    for (i = 0, entry = e820.map; i < e820.nr_map; i++, entry++) {
> > +        unsigned long end = entry->addr + entry->size;
> > +
> > +        if (entry->type == E820_RAM || i == e820.nr_map - 1) {
> > +            unsigned long start_pfn = PFN_DOWN(start);
> > +            unsigned long end_pfn = PFN_UP(end);
> > +
> > +            if (entry->type == E820_RAM)
> > +                end_pfn = PFN_UP(entry->addr);
> > +
> > +            if (start_pfn < end_pfn) {
> > +                nump = end_pfn - start_pfn + 1;
> > +                rc = domctl_memory_mapping(d, start_pfn,
> > start_pfn, nump, 1);
> > +                BUG_ON(rc);
> > +            }
> > +            start = end;
> > +        }
> > +    }
> 
> At least E820_UNUSABLE must be excluded here.
> 
> And as you're mapping the holes only - how do you deal with
> the MMIO range past end of RAM? And perhaps even more
> important - how do you deal with the split between RAM and
> MMIO not being at the end of currently populated RAM, but
> at the end of possible hotpluggable regions.

Right now, phase I, no support for hotplug. Are there any other cases
of this, can you please give an example if yes?

  parent reply	other threads:[~2013-03-29  0:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16  1:06 [PATCH 17/18 V2]: PVH xen: PVH dom0 creation Mukesh Rathor
2013-03-18 13:01 ` Jan Beulich
2013-03-27  0:34   ` Mukesh Rathor
2013-03-29  0:32   ` Mukesh Rathor [this message]
2013-04-02  7:03     ` Jan Beulich
2013-03-18 20:06 ` Konrad Rzeszutek Wilk
2013-03-26 23:25   ` Mukesh Rathor
2013-03-19  9:27 ` Jan Beulich
2013-03-19 13:32   ` Konrad Rzeszutek Wilk
2013-03-26 23:42   ` Mukesh Rathor

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=20130328173205.49fe631d@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.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).