Re: [PATCH v3] xen: share start flags between PV and PVH

From: Roger Pau MonnÃ
Date: Fri Jun 08 2018 - 12:17:38 EST

On Fri, Jun 08, 2018 at 09:12:25AM -0700, Stefano Stabellini wrote:
> On Fri, 8 Jun 2018, Roger Pau Monne wrote:
> > Use a global variable to store the start flags for both PV and PVH.
> > This allows the xen_initial_domain macro to work properly on PVH.
> >
> > Note that ARM is also switched to use the new variable.
> >
> > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> As I already mentioned, the ARM part is OK. However, is the issue that
> xen_start_info is not available on PVH? We had the same problem on ARM
> and solved it by faking a xen_start_info page, see the top of
> arch/arm/xen/enlighten.c.
> I would love to get rid of that, but to do that, we also need to remove
> the xen_start_info referece at drivers/tty/hvc/hvc_xen.c:255:
> if (!xen_start_info->console.domU.evtchn)
> return -ENODEV;

We could likely guard xen_pv_console_init (and other PV related
console functions) with CONFIG_PV. HVM/PVH use xen_hvm_console_init.