diff mbox series

[for-next,5/7] x86: use running_on_hypervisor to gate hypervisor_setup

Message ID 20191025091618.10153-6-liuwe@microsoft.com (mailing list archive)
State Superseded
Headers show
Series Implement Hyper-V reference TSC based clock source | expand

Commit Message

Wei Liu Oct. 25, 2019, 9:16 a.m. UTC
The hypervisor_setup method is not unique to Xen guest.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
---
 xen/arch/x86/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Beulich Dec. 10, 2019, 4:17 p.m. UTC | #1
On 25.10.2019 11:16, Wei Liu wrote:
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -1577,7 +1577,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>              max_cpus = nr_cpu_ids;
>      }
>  
> -    if ( xen_guest )
> +    if ( running_on_hypervisor )
>          hypervisor_setup();

This code is using hypervisor_name already, so I guess the patch
has become unnecessary?

Jan
Wei Liu Dec. 11, 2019, 11:34 a.m. UTC | #2
On Tue, Dec 10, 2019 at 05:17:28PM +0100, Jan Beulich wrote:
> On 25.10.2019 11:16, Wei Liu wrote:
> > --- a/xen/arch/x86/setup.c
> > +++ b/xen/arch/x86/setup.c
> > @@ -1577,7 +1577,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
> >              max_cpus = nr_cpu_ids;
> >      }
> >  
> > -    if ( xen_guest )
> > +    if ( running_on_hypervisor )
> >          hypervisor_setup();
> 
> This code is using hypervisor_name already, so I guess the patch
> has become unnecessary?

Yes. I basically squashed this patch into my previous series while
reworking that.

This patch here is not needed anymore.

Wei.

> 
> Jan
diff mbox series

Patch

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 4aa0af5a12..044c45be36 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1577,7 +1577,7 @@  void __init noreturn __start_xen(unsigned long mbi_p)
             max_cpus = nr_cpu_ids;
     }
 
-    if ( xen_guest )
+    if ( running_on_hypervisor )
         hypervisor_setup();
 
     /* Low mappings were only needed for some BIOS table parsing. */