From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] x86/mm changes for v3.9-rc1
Date: Sat, 23 Feb 2013 13:42:00 -0800 [thread overview]
Message-ID: <512937A8.9050906@zytor.com> (raw)
In-Reply-To: <CAE9FiQVPwD14j2FGyW9NZqXqo1MyaP0M9mGcirAWo=hM8fP_Lg@mail.gmail.com>
On 02/23/2013 01:37 PM, Yinghai Lu wrote:
> On Sat, Feb 23, 2013 at 11:43 AM, Konrad Rzeszutek Wilk
> <konrad@kernel.org> wrote:
>>>>> Also you should check condition about calling xen_get_user_pgd().
>>>>
>>>> Could you elaborate please?
>>>
>>> only call xen_get_user_pgd() when it should be called.
>>
>> I should have been more explicit. When I was saying "elaborate" I was
>> soliciting for advice on the 'check condition' and how to make it robust.
>
> your 64bit xen_write_cr3_init, is just xen_write_cr3 without
> xen_get_user_pgd calling.
> plus set xen_write_cr3 to ops.write_cr3.
>
> so if you could have way to find out when xen_get_user_pgd could be used,
> new xen_write_cr3_init need to check that, then set ops.write_cr3 and
> call ops.write_cr3
> otherwise will still call slim version without update ops.write_cr3
> and bail out early.
>
Yes, and that's the right thing to do, *or* you can make the init
version ask "do we have userspace yet" and if so switch the pointer and
chain the other function. The latter will save you from having to do a
test every time.
However, the assumption that we will only set cr3 once before userspace
is still too fragile. It makes sense for a quick fix because 32 bits
already had the same assumption, but this needs to be cleaned up in the
future.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
prev parent reply other threads:[~2013-02-23 21:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAE9FiQX5r02Prsw-f0HsgLVJ0FZeYL9aggXebwWR-E5oYsj6cw@mail.gmail.com>
[not found] ` <5127C620.2040605@linux.intel.com>
[not found] ` <alpine.DEB.2.02.1302221929040.22997@kaball.uk.xensource.com>
[not found] ` <5127CE65.5010703@linux.intel.com>
[not found] ` <CAE9FiQXHHFb0W+aJCsefRNj4p+X1+m8JOLUDz74w-nAjnhym+A@mail.gmail.com>
[not found] ` <5127DDB3.2010309@zytor.com>
[not found] ` <CAE9FiQWctM60VwXJYtOXwPBNLUoz966Fr1g6MPsPoJBiye88YQ@mail.gmail.com>
[not found] ` <5127FBA4.1040506@zytor.com>
[not found] ` <20130223003738.GA23545@phenom.dumpdata.com>
[not found] ` <CAE9FiQVTbDkvU8KQGVoYv3kn6UeCTcdiPA2hvw21OKtNbM=XKg@mail.gmail.com>
[not found] ` <20130223012716.GA28377@phenom.dumpdata.com>
2013-02-23 1:39 ` [GIT PULL] x86/mm changes for v3.9-rc1 Yinghai Lu
2013-02-23 19:43 ` Konrad Rzeszutek Wilk
2013-02-23 21:37 ` Yinghai Lu
2013-02-23 21:42 ` H. Peter Anvin [this message]
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=512937A8.9050906@zytor.com \
--to=hpa@zytor.com \
--cc=hpa@linux.intel.com \
--cc=konrad.wilk@oracle.com \
--cc=konrad@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@kernel.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).