From: Olaf Hering <olaf@aepfle.de>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: Patrick Colp <pjcolp@cs.ubc.ca>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry
Date: Wed, 24 Nov 2010 15:41:38 +0100 [thread overview]
Message-ID: <20101124144138.GA25619@aepfle.de> (raw)
In-Reply-To: <20101124102202.GF19638@whitby.uk.xensource.com>
On Wed, Nov 24, Tim Deegan wrote:
> I think that adding the paging types (in particular p2m_ram_paged) to
> P2M_RAM_TYPES is a mistake, unless gfn_to_mfn() guarantees to get the
> pfn into a state where it's backed by an MFN before it returns (which it
> probably can't).
Do you mean p2m_mem_paging_evict() should invalidate the mfn, and
p2m_mem_paging_resume() should update the mfn to the current gfn?
My patches do that.
> Another option would be to audit all callers of p2m_is_ram() and check
> whether they can handle paged-out PFNs (which I though had already been
> done but seems not to be). Keir's VCPU yield patch might be useful in
> some of those places too.
I think most if not all is caught by my changes already.
> > I would guess that if guest_physmap_add_entry() gets a page with type
> > p2m_ram_rw, nothing else can own that page. Is that right?
> > If so, this ASSERT or most of the loop can be removed.
>
> The loop shouldn't be removed without some more thought about aliasing
> PFNs, and I think that removing the ASSERT plasters over a deeper
> problem.
What is supposed to happen when building a guest?
I think at some point all (or most) mfns are passed to dom0 and the
machine_to_phys_mapping array is in a state to reflect that.
Then the first guest is created.
How is memory for this guest freed from dom0 and assigned to the guest?
Why do these mfns are not invalidated in machine_to_phys_mapping[]?
For a guest shutdown p2m_teardown() seems to be the place to do
invalidate the mfns in machine_to_phys_mapping[].
Olaf
next prev parent reply other threads:[~2010-11-24 14:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 21:01 bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry Olaf Hering
2010-11-24 10:22 ` Tim Deegan
2010-11-24 10:26 ` Tim Deegan
2010-11-24 14:41 ` Olaf Hering [this message]
2010-11-24 14:53 ` Tim Deegan
2010-11-24 15:00 ` Olaf Hering
2010-11-25 15:03 ` Olaf Hering
2010-11-25 15:32 ` Tim Deegan
2010-11-25 20:56 ` Olaf Hering
2010-11-25 17:16 ` Keir Fraser
2010-11-25 20:53 ` Olaf Hering
2010-11-25 22:30 ` Keir Fraser
2010-11-26 7:27 ` Olaf Hering
2010-11-24 19:58 ` Olaf Hering
2010-11-24 20:25 ` Patrick Colp
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=20101124144138.GA25619@aepfle.de \
--to=olaf@aepfle.de \
--cc=Tim.Deegan@citrix.com \
--cc=pjcolp@cs.ubc.ca \
--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.