Subject: Re: RFC: top level compatibles for virtual platforms

From: Timur Tabi <[email-masked]>
Date: Mon, 11 Jul 2011 10:45:47 -0500

Yoder Stuart-B08248 wrote:

> We're talking about what would be meaningful to Linux as a guest on
> this platform here--  Corenet-based SoCs are similar 
> in various ways, like using msgsnd for IPIs, having external proxy
> support, etc.
> 
> A corenet platform created by a QEMU/KVM looks similar
> to other corenet SoCs.   So, I'm trying to find some generic
> compatible string that describes this platform.

Is there a list of these features that are 100% guaranteed to belong to a
corenet platform?

I'm just not comfortable using "corenet" as a basis for a feature set that has
nothing to do with coherency.

>> Also, if these are KVM creations, shouldn't there be a "kvm" in the compatible string
>> somewhere?
> 
> There is nothing KVM specific about these platforms.  Any hypervisor
> could create a similar virtual machine.

True, but I think we're on a slippery slope, here.  Virtualization allows us to
create "virtual platforms" that are not well defined.  Linux requires a unique
compatible string for each platform.  That's easy when we ship a reference board
that has a unique name and a fixed, well-defined set of features.  But with
these virtual platforms, what does the name mean?

I guess my point is back to the name "corenet".  That just doesn't mean anything
to me, and I don't think it means much to anyone else, either.  That's why I
think that maybe "kvm" should be in the string, to at least indicate that it's a
virtualized environment.

> A guest OS can determine specific info about the hypervisor it is
> running on by looking at the /hypervisor node on the device
> tree.
> 
> We could put a generic -hv extension to indicate that this is
> a virtual platform.
> 
>  "mpc85xx-hv"
>  "corenet-32-hv"
>  "corenet-64-hv"

That's an improvement, but I wonder if we should just keep doing what we do with
Topaz: take the actual hardware platform and add -hv to it.  Of course, that
conflicts with Topaz at the moment.

-- 
Timur Tabi
Linux kernel developer at Freescale

-- 
Timur Tabi
Linux kernel developer at Freescale