diff mbox

[v2,09/11] xen/hvmlite: Use x86's default timer init for HVMlite guests

Message ID 1454341137-14110-10-git-send-email-boris.ostrovsky@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boris Ostrovsky Feb. 1, 2016, 3:38 p.m. UTC
xen_timer_init() will be called from apic_bsp_setup().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 arch/x86/xen/time.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Comments

David Vrabel Feb. 2, 2016, 4:27 p.m. UTC | #1
On 01/02/16 15:38, Boris Ostrovsky wrote:
> xen_timer_init() will be called from apic_bsp_setup().

I must be missing something because xen_init_time_ops() is only called
from the PV-only xen_start_kernel()?

David

> --- a/arch/x86/xen/time.c
> +++ b/arch/x86/xen/time.c
> @@ -492,7 +492,10 @@ void __init xen_init_time_ops(void)
>  {
>  	pv_time_ops = xen_time_ops;
>  
> -	x86_init.timers.timer_init = xen_time_init;
> +	if (!xen_hvmlite)
> +		x86_init.timers.timer_init = xen_time_init;
> +	else
> +		x86_init.timers.timer_init = x86_init_noop;
>  	x86_init.timers.setup_percpu_clockev = x86_init_noop;
>  	x86_cpuinit.setup_percpu_clockev = x86_init_noop;
>  
>
Boris Ostrovsky Feb. 2, 2016, 5:01 p.m. UTC | #2
On 02/02/2016 11:27 AM, David Vrabel wrote:
> On 01/02/16 15:38, Boris Ostrovsky wrote:
>> xen_timer_init() will be called from apic_bsp_setup().
> I must be missing something because xen_init_time_ops() is only called
> from the PV-only xen_start_kernel()?

This is leftover from the earlier series where common code called 
xen_init_time_ops() (which, of course, it could easily not have done for 
HVMlite guests).

So it's not needed anymore, I'll drop this patch.

-boris
diff mbox

Patch

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index f1ba6a0..d77b398 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -492,7 +492,10 @@  void __init xen_init_time_ops(void)
 {
 	pv_time_ops = xen_time_ops;
 
-	x86_init.timers.timer_init = xen_time_init;
+	if (!xen_hvmlite)
+		x86_init.timers.timer_init = xen_time_init;
+	else
+		x86_init.timers.timer_init = x86_init_noop;
 	x86_init.timers.setup_percpu_clockev = x86_init_noop;
 	x86_cpuinit.setup_percpu_clockev = x86_init_noop;