android_kernel_xiaomi_sm8350/include/asm-i386
Jeremy Fitzhardinge b239fb2501 [PATCH] i386: PARAVIRT: Hooks to set up initial pagetable
This patch introduces paravirt_ops hooks to control how the kernel's
initial pagetable is set up.

In the case of a native boot, the very early bootstrap code creates a
simple non-PAE pagetable to map the kernel and physical memory.  When
the VM subsystem is initialized, it creates a proper pagetable which
respects the PAE mode, large pages, etc.

When booting under a hypervisor, there are many possibilities for what
paging environment the hypervisor establishes for the guest kernel, so
the constructon of the kernel's pagetable depends on the hypervisor.

In the case of Xen, the hypervisor boots the kernel with a fully
constructed pagetable, which is already using PAE if necessary.  Also,
Xen requires particular care when constructing pagetables to make sure
all pagetables are always mapped read-only.

In order to make this easier, kernel's initial pagetable construction
has been changed to only allocate and initialize a pagetable page if
there's no page already present in the pagetable.  This allows the Xen
paravirt backend to make a copy of the hypervisor-provided pagetable,
allowing the kernel to establish any more mappings it needs while
keeping the existing ones.

A slightly subtle point which is worth highlighting here is that Xen
requires all kernel mappings to share the same pte_t pages between all
pagetables, so that updating a kernel page's mapping in one pagetable
is reflected in all other pagetables.  This makes it possible to
allocate a page and attach it to a pagetable without having to
explicitly enumerate that page's mapping in all pagetables.

And:

+From: "Eric W. Biederman" <ebiederm@xmission.com>

If we don't set the leaf page table entries it is quite possible that
will inherit and incorrect page table entry from the initial boot
page table setup in head.S.  So we need to redo the effort here,
so we pick up PSE, PGE and the like.

Hypervisors like Xen require that their page tables be read-only,
which is slightly incompatible with our low identity mappings, however
I discussed this with Jeremy he has modified the Xen early set_pte
function to avoid problems in this area.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: William Irwin <bill.irwin@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
2007-05-02 19:27:13 +02:00
..
mach-bigsmp [PATCH] x86: default to physical mode on hotplug CPU kernels 2007-05-02 19:27:04 +02:00
mach-default [PATCH] x86: default to physical mode on hotplug CPU kernels 2007-05-02 19:27:04 +02:00
mach-es7000 [PATCH] i386: modpost apic related warning fixes 2007-05-02 19:27:08 +02:00
mach-generic [PATCH] x86: default to physical mode on hotplug CPU kernels 2007-05-02 19:27:04 +02:00
mach-numaq [PATCH] x86: default to physical mode on hotplug CPU kernels 2007-05-02 19:27:04 +02:00
mach-summit [PATCH] x86: Log reason why TSC was marked unstable 2007-05-02 19:27:08 +02:00
mach-visws [PATCH] x86: default to physical mode on hotplug CPU kernels 2007-05-02 19:27:04 +02:00
mach-voyager
8253pit.h
a.out.h
acpi.h
agp.h
alternative-asm.i
alternative.h [PATCH] i386: Remove smp_alt_instructions 2007-05-02 19:27:13 +02:00
apic.h [PATCH] i386: add command line option "local_apic_timer_c2_ok" 2007-03-23 10:21:02 -07:00
apicdef.h
arch_hooks.h
atomic.h
auxvec.h
bitops.h
boot.h
bug.h
bugs.h [PATCH] i386: Clean up asm-i386/bugs.h 2007-05-02 19:27:12 +02:00
byteorder.h
cache.h
cacheflush.h
checksum.h
cpu.h
cpufeature.h [PATCH] x86-64: Disable local APIC timer use on AMD systems with C1E 2007-04-02 12:14:12 +02:00
cputime.h
current.h
debugreg.h
delay.h
desc.h [PATCH] i386: cleanup GDT Access 2007-05-02 19:27:11 +02:00
device.h
div64.h [NET]: div64_64 consolidate (rev3) 2007-04-25 22:23:33 -07:00
dma-mapping.h
dma.h
dmi.h
dwarf2.h
e820.h [PATCH] x86: fix amd64-agp aperture validation 2007-05-02 19:27:11 +02:00
edac.h
elf.h [PATCH] i386: Relocate VDSO ELF headers to match mapped location with COMPAT_VDSO 2007-05-02 19:27:12 +02:00
emergency-restart.h
errno.h
fcntl.h
fixmap.h [PATCH] i386: Relocate VDSO ELF headers to match mapped location with COMPAT_VDSO 2007-05-02 19:27:12 +02:00
floppy.h
frame.i
futex.h
genapic.h [PATCH] x86: default to physical mode on hotplug CPU kernels 2007-05-02 19:27:04 +02:00
hardirq.h
highmem.h
hpet.h [PATCH] x86: adjust inclusion of asm/fixmap.h 2007-05-02 19:27:04 +02:00
hw_irq.h
hypertransport.h
i387.h
i8253.h
i8259.h
ide.h
intel_arch_perfmon.h
io_apic.h
io.h [PATCH] i386: rationalize paravirt wrappers 2007-05-02 19:27:10 +02:00
ioctl.h
ioctls.h
ipc.h
ipcbuf.h
irq_regs.h
irq.h [PATCH] x86: revert x86_64-mm-fix-the-irqbalance-quirk-for-e7320-e7520-e7525 2007-05-02 19:27:04 +02:00
irqflags.h [PATCH] i386: Use X86_EFLAGS_IF in irqflags.h. 2007-05-02 19:27:10 +02:00
ist.h
k8.h
Kbuild [PATCH] x86: Clean up x86 control register and MSR macros (corrected) 2007-05-02 19:27:12 +02:00
kdebug.h
kexec.h [PATCH] i386: Allow i386 crash kernels to handle x86_64 dumps 2007-05-02 19:27:09 +02:00
kmap_types.h
kprobes.h
ldt.h
linkage.h
local.h
math_emu.h
mc146818rtc.h
mca_dma.h
mca.h
mce.h
mman.h
mmu_context.h
mmu.h
mmx.h
mmzone.h
module.h [PATCH] i386: Add an option for the VIA C7 which sets appropriate L1 cache 2007-05-02 19:27:05 +02:00
mpspec_def.h
mpspec.h
msgbuf.h
msidef.h
msr-index.h [PATCH] x86: Clean up x86 control register and MSR macros (corrected) 2007-05-02 19:27:12 +02:00
msr.h [PATCH] x86: Clean up x86 control register and MSR macros (corrected) 2007-05-02 19:27:12 +02:00
mtrr.h
mutex.h
namei.h
nmi.h Disable NMI watchdog by default properly 2007-03-14 17:53:43 -07:00
numa.h
numaq.h
page.h [PATCH] i386: PARAVIRT: Add pagetable accessors to pack and unpack pagetable entries 2007-05-02 19:27:13 +02:00
param.h
paravirt.h [PATCH] i386: PARAVIRT: Hooks to set up initial pagetable 2007-05-02 19:27:13 +02:00
parport.h
pci-direct.h
pci.h
pda.h [PATCH] i386: Use per-cpu variables for GDT, PDA 2007-05-02 19:27:10 +02:00
percpu.h [PATCH] i386: No need to use -traditional for processing asm in i386/kernel/ 2007-05-02 19:27:05 +02:00
pgalloc.h [PATCH] x86: adjust inclusion of asm/fixmap.h 2007-05-02 19:27:04 +02:00
pgtable-2level-defs.h
pgtable-2level.h [PATCH] i386: PARAVIRT: Add pagetable accessors to pack and unpack pagetable entries 2007-05-02 19:27:13 +02:00
pgtable-3level-defs.h
pgtable-3level.h [PATCH] i386: PARAVIRT: Add pagetable accessors to pack and unpack pagetable entries 2007-05-02 19:27:13 +02:00
pgtable.h [PATCH] i386: PARAVIRT: Hooks to set up initial pagetable 2007-05-02 19:27:13 +02:00
poll.h
posix_types.h
processor-flags.h [PATCH] x86: Clean up x86 control register and MSR macros (corrected) 2007-05-02 19:27:12 +02:00
processor.h [PATCH] i386: i386 separate hardware-defined TSS from Linux additions 2007-05-02 19:27:13 +02:00
ptrace-abi.h
ptrace.h
reboot_fixups.h [PATCH] i386: clean up mach_reboot_fixups 2007-05-02 19:27:06 +02:00
reboot.h [PATCH] i386: Add machine_ops interface to abstract halting and rebooting 2007-05-02 19:27:11 +02:00
resource.h
rtc.h
rwlock.h
rwsem.h
scatterlist.h
seccomp.h
sections.h
segment.h
semaphore.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h [PATCH] i386: Add smp_ops interface 2007-05-02 19:27:11 +02:00
socket.h [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
sockios.h [NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution 2007-04-25 22:24:04 -07:00
sparsemem.h
spinlock_types.h
spinlock.h
srat.h
stacktrace.h
stat.h
statfs.h
string.h
suspend.h
sync_bitops.h [PATCH] i386: fix typo in sync_constant_test_bit()'s name 2007-03-16 19:25:07 -07:00
system.h [PATCH] i386: rationalize paravirt wrappers 2007-05-02 19:27:10 +02:00
termbits.h [PATCH] tty: minor merge correction 2007-03-27 09:05:15 -07:00
termios.h
therm_throt.h
thread_info.h
time.h
timer.h [PATCH] i386: pit_latch_buggy has no effect 2007-05-02 19:27:05 +02:00
timex.h
tlb.h
tlbflush.h
topology.h
tsc.h [PATCH] x86: Log reason why TSC was marked unstable 2007-05-02 19:27:08 +02:00
types.h
uaccess.h [PATCH] i386: Update __copy_to_user_inatomic linuxdoc description 2007-05-02 19:27:06 +02:00
ucontext.h
unaligned.h
unistd.h
unwind.h
user.h
vga.h
vic.h
vm86.h
vmi_time.h [PATCH] Fix vmi time header bug 2007-03-12 16:36:16 -07:00
vmi.h
voyager.h
xor.h