aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2010-05-14 07:48:19 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-07-27 02:13:25 -0400
commit409771d258e9dd71c30f3c9520fd2b796ffc40f0 (patch)
tree68678275563114e9d381ae587fc80bd4d34a7e90 /arch/x86/xen/enlighten.c
parent99ad198c4978036bb9f7ebd11618b225b77046da (diff)
x86: Use xen_vcpuop_clockevent, xen_clocksource and xen wallclock.
Use xen_vcpuop_clockevent instead of hpet and APIC timers as main clockevent device on all vcpus, use the xen wallclock time as wallclock instead of rtc and use xen_clocksource as clocksource. The pv clock algorithm needs to work correctly for the xen_clocksource and xen wallclock to be usable, only modern Xen versions offer a reliable pv clock in HVM guests (XENFEAT_hvm_safe_pvclock). Using the hpet as clocksource means a VMEXIT every time we read/write to the hpet mmio addresses, pvclock give us a better rating without VMEXITs. Same goes for the xen wallclock and xen_vcpuop_clockevent Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Don Dutile <ddutile@redhat.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 127c95c8d15e..a90172963884 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -935,10 +935,6 @@ static const struct pv_init_ops xen_init_ops __initdata = {
935 .patch = xen_patch, 935 .patch = xen_patch,
936}; 936};
937 937
938static const struct pv_time_ops xen_time_ops __initdata = {
939 .sched_clock = xen_sched_clock,
940};
941
942static const struct pv_cpu_ops xen_cpu_ops __initdata = { 938static const struct pv_cpu_ops xen_cpu_ops __initdata = {
943 .cpuid = xen_cpuid, 939 .cpuid = xen_cpuid,
944 940
@@ -1076,7 +1072,6 @@ asmlinkage void __init xen_start_kernel(void)
1076 /* Install Xen paravirt ops */ 1072 /* Install Xen paravirt ops */
1077 pv_info = xen_info; 1073 pv_info = xen_info;
1078 pv_init_ops = xen_init_ops; 1074 pv_init_ops = xen_init_ops;
1079 pv_time_ops = xen_time_ops;
1080 pv_cpu_ops = xen_cpu_ops; 1075 pv_cpu_ops = xen_cpu_ops;
1081 pv_apic_ops = xen_apic_ops; 1076 pv_apic_ops = xen_apic_ops;
1082 1077
@@ -1084,13 +1079,7 @@ asmlinkage void __init xen_start_kernel(void)
1084 x86_init.oem.arch_setup = xen_arch_setup; 1079 x86_init.oem.arch_setup = xen_arch_setup;
1085 x86_init.oem.banner = xen_banner; 1080 x86_init.oem.banner = xen_banner;
1086 1081
1087 x86_init.timers.timer_init = xen_time_init; 1082 xen_init_time_ops();
1088 x86_init.timers.setup_percpu_clockev = x86_init_noop;
1089 x86_cpuinit.setup_percpu_clockev = x86_init_noop;
1090
1091 x86_platform.calibrate_tsc = xen_tsc_khz;
1092 x86_platform.get_wallclock = xen_get_wallclock;
1093 x86_platform.set_wallclock = xen_set_wallclock;
1094 1083
1095 /* 1084 /*
1096 * Set up some pagetable state before starting to set any ptes. 1085 * Set up some pagetable state before starting to set any ptes.
@@ -1327,6 +1316,7 @@ static void __init xen_hvm_guest_init(void)
1327 register_cpu_notifier(&xen_hvm_cpu_notifier); 1316 register_cpu_notifier(&xen_hvm_cpu_notifier);
1328 have_vcpu_info_placement = 0; 1317 have_vcpu_info_placement = 0;
1329 x86_init.irqs.intr_init = xen_init_IRQ; 1318 x86_init.irqs.intr_init = xen_init_IRQ;
1319 xen_hvm_init_time_ops();
1330} 1320}
1331 1321
1332static bool __init xen_hvm_platform(void) 1322static bool __init xen_hvm_platform(void)