All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "mukesh.rathor@oracle.com" <mukesh.rathor@oracle.com>,
	xen-devel <xen-devel@lists.xensource.com>
Subject: Re: 32bit PAE PV guest on 64bit hypervisor
Date: Tue, 14 Apr 2009 07:28:53 +0100	[thread overview]
Message-ID: <C609EBB5.8831%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <49E40563.4010505@oracle.com>

On 14/04/2009 04:39, "Mukesh Rathor" <mukesh.rathor@oracle.com> wrote:

> During the clear fixmap, the pte high write results in clearing upper
> 32bits portion of pte/mfn, as a result the pte low write results in
> hypervisor getting wrong mfn, 7f36a instead of 1f7f36a.
> 
> I understand writeable page tables allow guest to do this, but I assume
> they are for mapping user and not kernel pages, in which case we should
> be doing a hypercall here? Or, would switching the order, first set low pte
> then high pte work?

Implementing clear_fixmap() with set_pte() is not correct, even on native.
Since it clears high then low, it temporarily leaves you with a possibly
invalid present PTE -- even on native this can cause problems if e.g., the
invalid PTE maps uncacheable I/O memory.

In our kernel we simply solved this by implementing __set_fixmap() with a
hypercall that could update all 64 bits at once. An alternative is indeed to
clear low then high. Basically, clearing a pte has to be done the opposite
way round to setting a pte.

 -- Keir

  reply	other threads:[~2009-04-14  6:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14  3:39 32bit PAE PV guest on 64bit hypervisor Mukesh Rathor
2009-04-14  6:28 ` Keir Fraser [this message]
2009-04-23  1:57   ` Mukesh Rathor
2009-04-14 15:59 ` Jeremy Fitzhardinge
2009-04-14 18:06   ` 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=C609EBB5.8831%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=mukesh.rathor@oracle.com \
    --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.