Re: [PATCH v7 5/5] x86/xen: Add "nopv" support for HVM guest

From: Boris Ostrovsky
Date: Mon Jul 15 2019 - 11:17:55 EST


On 7/11/19 8:02 AM, Zhenzhong Duan wrote:
> PVH guest needs PV extentions to work, so "nopv" parameter should be
> ignored for PVH but not for HVM guest.
>
> If PVH guest boots up via the Xen-PVH boot entry, xen_pvh is set early,
> we know it's PVH guest and ignore "nopv" parameter directly.
>
> If PVH guest boots up via the normal boot entry same as HVM guest, it's
> hard to distinguish PVH and HVM guest at that time. In this case, we
> have to panic early if PVH is detected and nopv is enabled to avoid a
> worse situation later.
>
> Move xen_platform_hvm() after xen_hvm_guest_late_init() to avoid compile
> error.
>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@xxxxxxxxxx>
> Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Cc: Juergen Gross <jgross@xxxxxxxx>
> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxxxx>


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>