[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 3/3] paravirt: rename paravirt_enabled to paravirt_legacy



On 02/17/2016 05:03 PM, Borislav Petkov 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?

The latter. This is to detect things that clearly shouldn't be happening.


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...)

Can't use CPUID 0x40000000 because it will return hypervisor (Xen or otherwise) for non-PV guests as well. In Xen's case, you can't determine guest type from hypervisor leaves.


or something else.

We could say xen_pv_domain(). But this means using Xen-specific code in x86-generic file to detect things specified by ABI. I don't know if I'd like that.

-boris


What's your preference?



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.