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

Re: [Xen-devel] Xen PVH support in grub2



On 03/11/17 19:37, Roger Pau Monné wrote:
> On Fri, Nov 03, 2017 at 07:23:50PM +0100, Juergen Gross wrote:
>> On 03/11/17 19:19, Boris Ostrovsky wrote:
>>> On 11/03/2017 02:05 PM, Juergen Gross wrote:
>>>>
>>>> So again the question: how to tell whether we are PVH or HVM in
>>>> init_hypervisor_platform()? ACPi tables are scanned way later...
>>>
>>> Can we make grub/OVMF append a boot option?
>>>
>>> Or set setup_header.hardware_subarch to something? We already have
>>> X86_SUBARCH_XEN but it is only used by PV.  Or we might be able to use
>>> hardware_subarch_data (will need to get a buy-in from x86 maintainers, I
>>> think).
>>
>> But wouldn't this break the idea to reuse the native boot paths in
>> grub/OVMF without further modifications?
>>
>> I'd rather have a way to ask the hypervisor whether we are in PVH mode
>> (e.g. via CPUID or a hypercall to test for a devicemodel having itself
>> registered).
> 
> Keep in mind that from Xen's PoV PVH is just a HVM guest. Xen
> currently keeps a bitmap of the emulated devices that are available to
> a guest, but that's so far an internal field. We could consider
> exporting this on a cpuid leaf, but then we need to make it a fixed
> ABI.
> 
> Maybe we can make a list of platform devices that are not available on
> PVH and that Linux assumes to be present?

The main problem in Linux is that we have to know whether we are a HVM
or a PVH guest. Okay, we could scan for the Xen PCI-device to make the
distinction, but this is again rather late in the boot process.

Using implicit assumptions is normally a bad way to make such a
decision. I'd rather be either told by the boot loader I'm running as
PVH guest (and the boot loader does know it), or I want to ask the
hypervisor (which right now doesn't know), or I need another clear
distinction like the existence of the Xen PCI-device (which might be
a problem in the future for a PVH dom0 in a nested Xen environment).


Juergen

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

 


Rackspace

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