From: "Stephen C. Tweedie" Subject: Re: Illegal PV kernel pfm/pfn translations on PROT_NONE ioremaps Date: Wed, 19 Mar 2008 17:12:45 +0000 Message-ID: <1205946765.7277.40.camel@sisko.scot.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org Hi, On Wed, 2008-03-19 at 16:42 +0000, Keir Fraser wrote: > > It might be easier to do this at the pte_machine_to_phys level instead, > > where we can potentially take advantage of other bits of the pte to > > encode the special casing. > > Oh yes, the PAGE_IO type of trick I mentioned in my other email just now. Yep. There are a number of bits that could be used: for example, I don't think PROT_WRITE is ever going to be set on a PROT_NONE page, either. But... > SIF_PRIVILEGED is no longer used. It's still set for dom0, but not for > hardware-capable domUs. It's tricky anyway, since a domU can be given > hardware capabilities after it has booted through mechanisms like > pciback-pcifront PCI hotplug. Right; but I still think it's reasonable to expect this sort of thing to be declared in advance for a domain. We clearly cannot enter a non- translating mode dynamically, because of the risk of already having untranslated PROT_NONE ptes in the page tables. But becoming unable to save or migrate a guest is a Big Thing, and it would seem not unreasonable to ask for a startup flag such as SIF_PRIVILEGED to be declared in advance before we permit that. I'll probably do a quick patch based in SIF_INITDOMAIN for now, simply to be able to test whether it does in fact fix the symptoms we're seeing; but that might not be the best solution to merge long term. Cheers, Stephen