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

Re: [Xen-devel] [PATCH v4 7/8] x86: be more verbose when running on a hypervisor



On 29.11.2019 15:31, Jan Beulich wrote:
> On 21.11.2019 19:50, Wei Liu wrote:
>> @@ -763,7 +764,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>>       * allocing any xenheap structures wanted in lower memory. */
>>      kexec_early_calculations();
>>  
>> -    hypervisor_probe();
>> +    running_on_hypervisor = !!hypervisor_probe();
> 
> No need for !! I think?
> 
>> @@ -788,6 +789,8 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>>      printk("Command line: %s\n", cmdline);
>>  
>>      printk("Xen image load base address: %#lx\n", xen_phys_start);
>> +    if ( running_on_hypervisor )
>> +        printk("Running on %s\n", hypervisor_probe()->name);
> 
> Invoking hypervisor_probe() twice seems odd to me. I realize
> the function copes, but why do everything a 2nd time when
> not running on any hypervisor? Furthermore if this use is
> the only reason why struct hypervisor_ops can't be local to
> xen/arch/x86/guest/hypervisor.c, then I think once again
> that the name should be return from hypervisor_probe().

"Local to xen/arch/x86/guest/hypervisor.c" was rubbish of
course; local to xen/arch/x86/guest/ would be more correct.

Jan

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

 


Rackspace

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