From: Zachary Amsden <zach@vmware.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
virtualization@lists.osdl.org,
Stefan Richter <stefanr@s5r6.in-berlin.de>,
"Robert P. J. Day" <rpjday@mindspring.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Carsten Otte <cotte@de.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] VMI: remove CONFIG_DEBUG_PAGE_TYPE and associated bitrotted code
Date: Fri, 06 Jul 2007 14:17:22 -0700 [thread overview]
Message-ID: <468EB162.5080006@vmware.com> (raw)
In-Reply-To: <468EADB9.9050802@goop.org>
Jeremy Fitzhardinge wrote:
> Zachary Amsden wrote:
>> I though about it, but it gets really ugly. You need wrappers for
>> all the MMU ops in pvops generic code, which means either another
>> layer of wrappers or a bunch of CONFIG_DEBUG_PARAVIRT
>
> Oh, yes, more wrappers please! We could do it at the paravirt_ops
> level: set up your pv_ops, then call paravirt_debug_mmuops(), which
> would save away your ops and replace them with wrappers. That basic
> structure would lend itself to all kinds of paravirt-level debugging
> tools.
>
> It would be a bit more elegant if we had mmu_ops. Maybe we should do
> that splitup before 64bit?
zamsden strongly agrees jsgf.
>> only things that are easy to break because they also depend on PAE
>> vs. non-PAE.
>
> Hm, would they? Would they need to inspect the content of the pte_t
> (etc), or just look at the struct page for the page being updated?
> (pmd operations being a bit more awkward, of course.)
No, but there are different sets of operations and different sets of
validation rules (for example, multiple PGDs per page for PAE, depending
on pgd allocation size).
> Well, I have to say that keeping the hypervisor hints in sync with the
> actual kernel-level page state worries me, so any debug tools which
> could help there would be good. This seems like it should be the
> right place to do it, but I can't say I've thought about it in any
> detail.
Yes, these things are subtle and easy to break. In fact, still broken
(although in a different way) - check out this naked write to a pte:
arch/i386/mm/init.c: pte->pte_high &= ~(1 << (_PAGE_BIT_NX -
32));
arch/i386/mm/init.c: pte->pte_high |= 1 << (_PAGE_BIT_NX - 32);
Not only has page typing created a dependence on the guest accurately
representing page state to the hypervisor, it also requires the guest to
use proper APIs for access to those pages. That is much harder to
enforce - perhaps static checking can get some of the way there.
The page type debugging is certainly a start in a good direction.
> Of course, if it *is* helpful to the page hinting patches, then it
> suggests that it's a facility with wider scope than pv-ops.
I certainly think it's not wide enough to justify a new struct page
field, but perhaps a debug-only field is commonly useful; those pg bits
are getting quite crammed.
Zach
next prev parent reply other threads:[~2007-07-06 21:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.64.0707060847470.23786@localhost.localdomain>
2007-07-06 18:25 ` [PATCH] I386: Deactivate the test for the dead CONFIG_DEBUG_PAGE_TYPE variable Stefan Richter
2007-07-06 19:54 ` Zachary Amsden
2007-07-06 20:16 ` [PATCH] VMI: remove CONFIG_DEBUG_PAGE_TYPE and associated bitrotted code Chris Wright
2007-07-06 20:13 ` Zachary Amsden
2007-07-06 20:28 ` Jeremy Fitzhardinge
2007-07-06 20:34 ` Zachary Amsden
2007-07-06 21:01 ` Jeremy Fitzhardinge
2007-07-06 21:17 ` Zachary Amsden [this message]
2007-07-06 20:40 ` Chris Wright
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=468EB162.5080006@vmware.com \
--to=zach@vmware.com \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=cotte@de.ibm.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpjday@mindspring.com \
--cc=rusty@rustcorp.com.au \
--cc=schwidefsky@de.ibm.com \
--cc=stefanr@s5r6.in-berlin.de \
--cc=virtualization@lists.osdl.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).