Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbab4f3b authored by Zachary Amsden's avatar Zachary Amsden Committed by Andi Kleen
Browse files

[PATCH] i386: vMI timer patches



VMI timer code.  It works by taking over the local APIC clock when APIC is
configured, which requires a couple hooks into the APIC code.  The backend
timer code could be commonized into the timer infrastructure, but there are
some pieces missing (stolen time, in particular), and the exact semantics of
when to do accounting for NO_IDLE need to be shared between different
hypervisors as well.  So for now, VMI timer is a separate module.

[Adrian Bunk: cleanups]

Subject: VMI timer patches
Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 7ce0bcfd
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -1272,3 +1272,12 @@ config X86_TRAMPOLINE
config KTIME_SCALAR
config KTIME_SCALAR
	bool
	bool
	default y
	default y

config NO_IDLE_HZ
	bool
	depends on PARAVIRT
	default y
	help
	  Switches the regular HZ timer off when the system is going idle.
	  This helps a hypervisor detect that the Linux system is idle,
	  reducing the overhead of idle systems.
+1 −1
Original line number Original line Diff line number Diff line
@@ -40,7 +40,7 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
obj-$(CONFIG_K8_NB)		+= k8.o
obj-$(CONFIG_K8_NB)		+= k8.o


obj-$(CONFIG_VMI)		+= vmi.o
obj-$(CONFIG_VMI)		+= vmi.o vmitime.o


# Make sure this is linked after any other paravirt_ops structs: see head.S
# Make sure this is linked after any other paravirt_ops structs: see head.S
obj-$(CONFIG_PARAVIRT)		+= paravirt.o
obj-$(CONFIG_PARAVIRT)		+= paravirt.o
+1 −1
Original line number Original line Diff line number Diff line
@@ -1395,7 +1395,7 @@ int __init APIC_init_uniprocessor (void)
		if (!skip_ioapic_setup && nr_ioapics)
		if (!skip_ioapic_setup && nr_ioapics)
			setup_IO_APIC();
			setup_IO_APIC();
#endif
#endif
	setup_boot_APIC_clock();
	setup_boot_clock();


	return 0;
	return 0;
}
}
+5 −0
Original line number Original line Diff line number Diff line
@@ -626,6 +626,11 @@ ENTRY(name) \
/* The include is where all of the SMP etc. interrupts come from */
/* The include is where all of the SMP etc. interrupts come from */
#include "entry_arch.h"
#include "entry_arch.h"


/* This alternate entry is needed because we hijack the apic LVTT */
#if defined(CONFIG_VMI) && defined(CONFIG_X86_LOCAL_APIC)
BUILD_INTERRUPT(apic_vmi_timer_interrupt,LOCAL_TIMER_VECTOR)
#endif

KPROBE_ENTRY(page_fault)
KPROBE_ENTRY(page_fault)
	RING0_EC_FRAME
	RING0_EC_FRAME
	pushl $do_page_fault
	pushl $do_page_fault
+2 −0
Original line number Original line Diff line number Diff line
@@ -544,6 +544,8 @@ struct paravirt_ops paravirt_ops = {
	.apic_write = native_apic_write,
	.apic_write = native_apic_write,
	.apic_write_atomic = native_apic_write_atomic,
	.apic_write_atomic = native_apic_write_atomic,
	.apic_read = native_apic_read,
	.apic_read = native_apic_read,
	.setup_boot_clock = setup_boot_APIC_clock,
	.setup_secondary_clock = setup_secondary_APIC_clock,
#endif
#endif
	.set_lazy_mode = (void *)native_nop,
	.set_lazy_mode = (void *)native_nop,


Loading