On Fri, Nov 29, 2019 at 06:15:52PM +0000, Andrew Cooper wrote:
> On 21/11/2019 18:50, Wei Liu wrote:
> > Also replace xen_guest with running_on_hypervisor boolean.
> 
> I agree with dropping xen_guest, but...
> 
> >
> > Signed-off-by: Wei Liu <li...@microsoft.com>
> > ---
> > Changes in v4:
> > 1. Access ->name directly.
> > 2. Drop Roger's review tag.
> > ---
> >  xen/arch/x86/setup.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> > index 19606d909b..123436b35a 100644
> > --- a/xen/arch/x86/setup.c
> > +++ b/xen/arch/x86/setup.c
> > @@ -689,6 +689,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
> >      int i, j, e820_warn = 0, bytes = 0;
> >      bool acpi_boot_table_init_done = false, relocated = false;
> >      int ret;
> > +    bool running_on_hypervisor;
> 
> ... this is semantically ambiguous with cpu_has_hypervisor.
> 
> Where they differ is whether Xen has managed to recognise the hypervisor
> it is running under, or not.
> 
> Given that the hypervisor_*() hooks are nops by default, I'd suggest
> just making blind calls.

Well Jan asked to drop the hypervisor_name hook. I can't make blind
calls here. He's unhappy with calling hypervisor_probe twice either.

I can, however, do the following:

 1. Change hypervisor_probe to return NULL or a string
 2. Cache and use that return value inside this function

This should make both of you happy.

Wei.

> 
> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to