linux/include/asm-i386
Andrea Arcangeli ffaa8bd6c9 [PATCH] seccomp: tsc disable
I believe at least for seccomp it's worth to turn off the tsc, not just for
HT but for the L2 cache too.  So it's up to you, either you turn it off
completely (which isn't very nice IMHO) or I recommend to apply this below
patch.

This has been tested successfully on x86-64 against current cogito
repository (i686 compiles so I didn't bother testing ;).  People selling
the cpu through cpushare may appreciate this bit for a peace of mind.

There's no way to get any timing info anymore with this applied
(gettimeofday is forbidden of course).  The seccomp environment is
completely deterministic so it can't be allowed to get timing info, it has
to be deterministic so in the future I can enable a computing mode that
does a parallel computing for each task with server side transparent
checkpointing and verification that the output is the same from all the 2/3
seller computers for each task, without the buyer even noticing (for now
the verification is left to the buyer client side and there's no
checkpointing, since that would require more kernel changes to track the
dirty bits but it'll be easy to extend once the basic mode is finished).

Eliminating a cold-cache read of the cr4 global variable will save one
cacheline during the tlb flush while making the code per-cpu-safe at the
same time.  Thanks to Mikael Pettersson for noticing the tlb flush wasn't
per-cpu-safe.

The global tlb flush can run from irq (IPI calling do_flush_tlb_all) but
it'll be transparent to the switch_to code since the IPI won't make any
change to the cr4 contents from the point of view of the interrupted code
and since it's now all per-cpu stuff, it will not race.  So no need to
disable irqs in switch_to slow path.

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-27 15:11:44 -07:00
..
mach-bigsmp [PATCH] Do not enforce unique IO_APIC_ID check for xAPIC systems (i386) 2005-06-23 09:45:09 -07:00
mach-default [PATCH] i386: Dont use IPI broadcast when using cpu hotplug. 2005-06-25 16:24:29 -07:00
mach-es7000 [PATCH] Do not enforce unique IO_APIC_ID check for xAPIC systems (i386) 2005-06-23 09:45:09 -07:00
mach-generic [PATCH] Do not enforce unique IO_APIC_ID check for xAPIC systems (i386) 2005-06-23 09:45:09 -07:00
mach-numaq [PATCH] Do not enforce unique IO_APIC_ID check for xAPIC systems (i386) 2005-06-23 09:45:09 -07:00
mach-summit [PATCH] Do not enforce unique IO_APIC_ID check for xAPIC systems (i386) 2005-06-23 09:45:09 -07:00
mach-visws [PATCH] Do not enforce unique IO_APIC_ID check for xAPIC systems (i386) 2005-06-23 09:45:09 -07:00
mach-voyager Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
8253pit.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
a.out.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
acpi.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
agp.h [PATCH] AGP fix for Xen VMM 2005-06-07 12:35:43 -07:00
apic.h [PATCH] kexec: x86: resture apic virtual wire mode on shutdown 2005-06-25 16:24:47 -07:00
apicdef.h [PATCH] kexec: x86: resture apic virtual wire mode on shutdown 2005-06-25 16:24:47 -07:00
arch_hooks.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
atomic.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bitops.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
boot.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bug.h [PATCH] remove all kernel BUGs 2005-05-01 08:59:01 -07:00
bugs.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
byteorder.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cache.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cacheflush.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
checksum.h [PATCH] x86: #include asm/uaccess.h in asm/checksum.h 2005-06-23 09:45:11 -07:00
cpu.h [PATCH] i386 CPU hotplug 2005-06-25 16:24:29 -07:00
cpufeature.h [PATCH] CPUID bug and inconsistency fix 2005-05-01 08:58:49 -07:00
cputime.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
current.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
debugreg.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
delay.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
desc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
div64.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dma-mapping.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dma.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
e820.h [PATCH] Increase number of e820 entries hard limit from 32 to 128 2005-05-01 08:58:51 -07:00
elf.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
errno.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fcntl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fixmap.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
floppy.h [PATCH] make some things static 2005-05-05 16:36:47 -07:00
genapic.h [PATCH] Do not enforce unique IO_APIC_ID check for xAPIC systems (i386) 2005-06-23 09:45:09 -07:00
hardirq.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hdreg.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
highmem.h [PATCH] kdump: Routines for copying dump pages 2005-06-25 16:24:53 -07:00
hpet.h [PATCH] i386: fix hpet for systems that don't support legacy replacement 2005-05-01 08:58:50 -07:00
hw_irq.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i387.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i8259.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ide.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io_apic.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ioctl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ioctls.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipcbuf.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq.h [PATCH] cpu state clean after hot remove 2005-06-25 16:24:30 -07:00
ist.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kdebug.h [PATCH] RCU: clean up a few remaining synchronize_kernel() calls 2005-06-25 16:24:38 -07:00
kexec.h [PATCH] Kdump: Export crash notes section address through sysfs 2005-06-25 16:24:51 -07:00
kmap_types.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kprobes.h [PATCH] kprobes: function-return probes 2005-06-23 09:45:21 -07:00
ldt.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
linkage.h [PATCH] i386: fix prevent_tail_call 2005-05-26 16:16:16 -07:00
local.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
math_emu.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mc146818rtc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mca_dma.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mca.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mman.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmu_context.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmu.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmx.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmzone.h [PATCH] sparsemem memory model for i386 2005-06-23 09:45:05 -07:00
module.h [PATCH] x86: geode support fixes 2005-05-05 16:36:49 -07:00
mpspec_def.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpspec.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
msgbuf.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
msi.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
msr.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mtrr.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
namei.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nmi.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
node.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
numaq.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
numnodes.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
page.h [PATCH] kexec: x86: add CONFIG_PYSICAL_START 2005-06-25 16:24:48 -07:00
param.h [PATCH] i386: Selectable Frequency of the Timer Interrupt 2005-06-23 09:45:10 -07:00
parport.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-direct.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
percpu.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pgalloc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pgtable-2level-defs.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pgtable-2level.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pgtable-3level-defs.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pgtable-3level.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pgtable.h [PATCH] sparsemem memory model for i386 2005-06-23 09:45:05 -07:00
poll.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
posix_types.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
processor.h [PATCH] sep initializing rework 2005-06-25 16:24:29 -07:00
ptrace.h [PATCH] xen: x86: Rename usermode macro 2005-06-23 09:45:14 -07:00
resource.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rtc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rwlock.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rwsem.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
scatterlist.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
seccomp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sections.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
segment.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
semaphore.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sembuf.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
serial.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup.h [PATCH] Increase number of e820 entries hard limit from 32 to 128 2005-05-01 08:58:51 -07:00
shmbuf.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
shmparam.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sigcontext.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
siginfo.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
signal.h [PATCH] asm/signal.h unification 2005-05-04 07:33:15 -07:00
smp.h [PATCH] make smp_prepare_cpu to a weak function 2005-06-25 16:24:30 -07:00
socket.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sockios.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sparsemem.h [PATCH] sparsemem memory model for i386 2005-06-23 09:45:05 -07:00
spinlock.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
srat.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
stat.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
statfs.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
string.h Add "memory" clobbers to the x86 inline asm of strncmp and friends 2005-06-24 10:39:17 -07:00
suspend.h [PATCH] i386: Use loaddebug macro consistently 2005-04-16 15:24:46 -07:00
system.h [PATCH] i386/x86_64 segment register access update 2005-05-01 08:58:48 -07:00
termbits.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
termios.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
thread_info.h [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
timer.h [PATCH] Platform SMIs and their interferance with tsc based delay calibration 2005-06-23 09:45:08 -07:00
timex.h [PATCH] x86: cpu_khz type fix 2005-06-23 09:45:11 -07:00
tlb.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
tlbflush.h [PATCH] seccomp: tsc disable 2005-06-27 15:11:44 -07:00
topology.h [PATCH] sched: sched tuning 2005-06-25 16:24:42 -07:00
types.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
uaccess.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ucontext.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
unaligned.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
unistd.h [PATCH] Update cfq io scheduler to time sliced design 2005-06-27 14:33:29 -07:00
user.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vga.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vic.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vm86.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
voyager.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
xor.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00