[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56C4F69B.4020705@oracle.com>
Date: Wed, 17 Feb 2016 17:39:23 -0500
From: Boris Ostrovsky <boris.ostrovsky@...cle.com>
To: Andy Lutomirski <luto@...capital.net>,
Borislav Petkov <bp@...en8.de>
Cc: "Luis R. Rodriguez" <mcgrof@...nel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
David Vrabel <david.vrabel@...rix.com>,
Juergen Gross <jgross@...e.com>,
Michael Brown <mcb30@...e.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Joerg Roedel <joro@...tes.org>,
Robert Moore <robert.moore@...el.com>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Xen Devel <xen-devel@...ts.xensource.com>,
"H. Peter Anvin" <hpa@...or.com>,
Rusty Russell <rusty@...tcorp.com.au>,
Jan Beulich <JBeulich@...e.com>, Lv Zheng <lv.zheng@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
long.wanglong@...wei.com, Fengguang Wu <fengguang.wu@...el.com>,
qiuxishi@...wei.com, Andrey Ryabinin <ryabinin.a.a@...il.com>,
david.e.box@...el.com, X86 ML <x86@...nel.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v2 3/3] paravirt: rename paravirt_enabled to
paravirt_legacy
On 02/17/2016 05:18 PM, Andy Lutomirski wrote:
> On Wed, Feb 17, 2016 at 2:03 PM, Borislav Petkov <bp@...en8.de> wrote:
>> On Wed, Feb 17, 2016 at 04:21:56PM -0500, Boris Ostrovsky wrote:
>>> That's exactly the point: if something is mapped it's an error for a
>>> non-PV kernel.
>> How would something be mapped there? __PAGE_OFFSET is
>> 0xffff880000000000.
>>
>> Or are you thinking about some insanely b0rked kernel code mapping stuff
>> in there?
>>
>>> By removing paravirt_enabled() we may miss those errors. Worse, I think we
>>> may even crash while doing pagetable walk (although it's probably better to
>>> crash here than to use an unexpected translation in real code somewhere)
>> Well, if this is the only site which keeps paravirt_enabled() from being
>> buried, we need to think about a better way to detect a hypervisor.
>> Maybe we should look at x86_hyper, use CPUID(0x4...) or something else.
>>
>> What's your preference?
> I'm confused. Isn't it the other way around? That is, checking for
> the hypervisor range on all systems should be safer, right? Or am I
> missing something?
Hmm. I think you are right --- I was following wrong branch of the 'if'
statement. We are always going straight to note_page().
Then yes, we should be able to remove paravirt_enabled(). Sorry for the
noise.
-boris
Powered by blists - more mailing lists