Re: [RFC PATCH] x86/xen: Consider Xen PVH support in CONFIG_XEN_PVHVM

Jürgen Groß
2026-02-24T11:13:32Z

[-- Attachment #1.1.1: Type: text/plain, Size: 1753 bytes --]

On 24.02.26 12:01, Jan Beulich wrote:
> On 24.02.2026 11:51, Teddy Astie wrote:
>> It's currently possible to build Linux with CONFIG_PVH|CONFIG_XEN_PVHVM
>> and no CONFIG_XEN_PVH.
>
> In which case, how can you expect Xen PVH to work?

I agree. Similar to a kernel not working properly on AMD when configured
to support INTEL cpus only.

>
>> That leads to inconsistent kernels that fails with
>> "Missing xen PVH initialization" when booting using PVH boot method or
>> display various errors and fail to initialize Xen PV drivers when booting
>> with PVH-GRUB.
>>
>> platform_pci_unplug: Xen Platform PCI: unrecognised magic value
>> ...
>> # modprobe xen-blkfront
>> modprobe: ERROR: could not insert 'xen_blkfront': No such device
>> # modprobe xen-netfront
>> modprobe: ERROR: could not insert 'xen_netfront': No such device
>>
>> When built without CONFIG_XEN_PVH, PVH-specific logic is disabled, hence when
>> booting with e.g PVH-OVMF, Linux assumes we are a HVM guest, even when we aren't
>> actually one (in the "with HVM emulated devices" sense).
>>
>> As it is actually possible to boot Xen PVH without CONFIG_PVH; and that most
>> Xen-related logic exist within CONFIG_XEN_PVHVM; consider PVH guests support
>> within CONFIG_XEN_PVHVM instead of CONFIG_XEN_PVH.
>
> XEN_PVHVM serves a different purpose though, iirc.

I does.

CONFIG_XEN_PVH depends on CONFIG_XEN_PVHVM exactly because a lot of the
logic required for PVH mode was implemented as a performance tweak of HVM
under the CONFIG_XEN_PVHVM umbrella.

In case you want to boot as a working PVH guest, you need a kernel
configured with CONFIG_XEN_PVH. It is that simple.

Its a NACK from me.

Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]