aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/xen/setup.c
AgeCommit message (Collapse)AuthorFilesLines
2010-08-27x86, memblock: Replace e820_/_early string with memblock_Yinghai Lu1-1/+2
1.include linux/memblock.h directly. so later could reduce e820.h reference. 2 this patch is done by sed scripts mainly -v2: use MEMBLOCK_ERROR instead of -1ULL or -1UL Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2010-08-04Xen: register panic notifier to take crashes of xen guests on panicDonald Dutile1-0/+2
Register a panic notifier so that when the guest crashes it can shut down the domain and indicate it was a crash to the host. Signed-off-by: Donald Dutile <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-07-20xen: make sure pages are really part of domain before freeingJeremy Fitzhardinge1-21/+38
Scan the set of pages we're freeing and make sure they're actually owned by the domain before freeing. This generally won't happen on a domU (since Xen gives us contigious memory), but it could happen if there are some hardware mappings passed through. We only bother going up to the highest page Xen actually claimed to give us, since there's definitely nothing of ours above that. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-07-20xen: release unused free memoryMiroslav Rezanina1-0/+53
Scan an e820 table and release any memory which lies between e820 entries, as it won't be used and would just be wasted. At present this is just to release any memory beyond the end of the e820 map, but it will also deal with holes being punched in the map. Derived from patch by Miroslav Rezanina <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2009-05-08xen: reserve Xen start_info rather than e820 reservingJeremy Fitzhardinge1-3/+3
Use reserve_early rather than e820 reservations for Xen start info and mfn->pfn table, so that the memory use is a bit more self-documenting. [ Impact: cleanup ] Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Xen-devel <[email protected]> Cc: Linus Torvalds <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-12-16xen: whitespace/checkpatch cleanupTej1-4/+5
Impact: cleanup Signed-off-by: Tej <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-09-14xen: fix for xen guest with mem > 3.7GJeremy Fitzhardinge1-1/+1
PFN_PHYS() can truncate large addresses unless its passed a suitable large type. This is fixed more generally in the patch series introducing phys_addr_t, but we need a short-term fix to solve a Xen regression reported by Roberto De Ioris. Reported-by: Roberto De Ioris <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-07-16x86: xen: no need to disable vdso32Jeremy Fitzhardinge1-7/+2
Now that the vdso32 code can cope with both syscall and sysenter missing for 32-bit compat processes, just disable the features without disabling vdso altogether. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-07-16x86_64: further cleanup of 32-bit compat syscall mechanismsJeremy Fitzhardinge1-3/+7
AMD only supports "syscall" from 32-bit compat usermode. Intel and Centaur(?) only support "sysenter" from 32-bit compat usermode. Set the X86 feature bits accordingly, and set up the vdso in accordance with those bits. On the offchance we run on in a 64-bit environment which supports neither syscall nor sysenter from 32-bit mode, then fall back to the int $0x80 vdso. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-07-16x86, xen, vdso: fix build errorIngo Molnar1-0/+2
fix: arch/x86/xen/built-in.o: In function `xen_enable_syscall': (.cpuinit.text+0xdb): undefined reference to `sysctl_vsyscall32' Signed-off-by: Ingo Molnar <[email protected]>
2008-07-16xen64: disable 32-bit syscall/sysenter if not supported.Jeremy Fitzhardinge1-19/+19
Old versions of Xen (3.1 and before) don't support sysenter or syscall from 32-bit compat userspaces. If we can't set the appropriate syscall callback, then disable the corresponding feature bit, which will cause the vdso32 setup to fall back appropriately. Linux assumes that syscall is always available to 32-bit userspace, and installs it by default if sysenter isn't available. In that case, we just disable vdso altogether, forcing userspace libc to fall back to int $0x80. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-07-16xen64: set up syscall and sysenter entrypoints for 64-bitJeremy Fitzhardinge1-3/+39
We set up entrypoints for syscall and sysenter. sysenter is only used for 32-bit compat processes, whereas syscall can be used in by both 32 and 64-bit processes. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Stephen Tweedie <[email protected]> Cc: Eduardo Habkost <[email protected]> Cc: Mark McLoughlin <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-07-16xen64: register callbacks in arch-independent wayJeremy Fitzhardinge1-10/+17
Use callback_op hypercall to register callbacks in a 32/64-bit independent way (64-bit doesn't need a code segment, but that detail is hidden in XEN_CALLBACK). Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Stephen Tweedie <[email protected]> Cc: Eduardo Habkost <[email protected]> Cc: Mark McLoughlin <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-07-16xen64: smp.c compile hackingJeremy Fitzhardinge1-6/+1
A number of random changes to make xen/smp.c compile in 64-bit mode. Signed-off-by: Jeremy Fitzhardinge <[email protected]>a Cc: Stephen Tweedie <[email protected]> Cc: Eduardo Habkost <[email protected]> Cc: Mark McLoughlin <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-07-08xen: reserve ISA space in e820 mapJeremy Fitzhardinge1-2/+10
[ TODO: release the underlying memory back to Xen. ] Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: the arch/x86 maintainers <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Ian Campbell <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-07-08xen: reserve Xen-specific memory in e820 mapJeremy Fitzhardinge1-0/+13
Signed-off-by: Jeremy Fitzhardinge <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: the arch/x86 maintainers <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Yinghai Lu <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-07-08Merge branch 'x86/mpparse' into x86/develIngo Molnar1-2/+2
Conflicts: arch/x86/Kconfig arch/x86/kernel/io_apic_32.c arch/x86/kernel/setup_64.c arch/x86/mm/init_32.c Signed-off-by: Ingo Molnar <[email protected]>
2008-07-08x86: rename two e820 related functionsYinghai Lu1-2/+2
rename update_memory_range to e820_update_range rename add_memory_region to e820_add_region to make it more clear that they are about e820 map operations. Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2008-05-27xen: add configurable max domain sizeJeremy Fitzhardinge1-0/+3
Add a config option to set the max size of a Xen domain. This is used to scale the size of the physical-to-machine array; it ends up using around 1 page/GByte, so there's no reason to be very restrictive. For a 32-bit guest, the default value of 8GB is probably sufficient; there's not much point in giving a 32-bit machine much more memory than that. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2008-05-27xen: make phys_to_machine structure dynamicJeremy Fitzhardinge1-2/+0
We now support the use of memory hotplug, so the physical to machine page mapping structure must be dynamic. This is implemented as a two-level radix tree structure, which allows us to efficiently incrementally allocate memory for the p2m table as new pages are added. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2008-04-24xen: support sysenter/sysexit if hypervisor doesJeremy Fitzhardinge1-0/+21
64-bit Xen supports sysenter for 32-bit guests, so support its use. (sysenter is faster than int $0x80 in 32-on-64.) sysexit is still not supported, so we fake it up using iret. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2008-03-04x86/xen: fix DomU boot problemIan Campbell1-1/+2
Construct Xen guest e820 map with a hole between 640K-1M. It's pure luck that Xen kernels have gotten away with it in the past. The patch below seems like the right thing to do. It certainly boots in a domU without the DMI problem (without any of the other related patches such as Alexander's). Signed-off-by: Ian Campbell <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Tested-by: Mark McLoughlin <[email protected]> Acked-by: Mark McLoughlin <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Thomas Gleixner <[email protected]>
2008-01-30xen: fix section usage in xen-head.S and setup.cSam Ravnborg1-1/+1
additional section for .init.text appending a number. A side effect of this was a section mismatch warning because modpost did not recognize a .init.text section named .init.text.1: WARNING: vmlinux.o(.text.head+0x247): Section mismatch: reference to .init.text.1:start_kernel (between 'is386' and 'check_x87') Fix this by hardcoding the "ax" in the pushsection. Thanks to Torlaf for reporting this. Alan Modra provided the hint that made me able to locate the root cause of this warning. And Mike Frysinger told me how to properly fix it using __INIT/__FINIT. Fix following Section mismatch warning in addition: WARNING: vmlinux.o(.text+0x14c8): Section mismatch: reference to .init.data:vsyscall_int80_start (between 'fiddle_vdso' and 'xen_setup_features') fiddle_vdso was only used from a __init function - so declare it __init. Signed-off-by: Sam Ravnborg <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: Chris Wright <[email protected]> Cc: WANG Cong <[email protected]> Cc: Toralf Förster <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2008-01-30x86 vDSO: consolidate vdso32Roland McGrath1-2/+2
This makes x86_64's ia32 emulation support share the sources used in the 32-bit kernel for the 32-bit vDSO and much of its setup code. The 32-bit vDSO mapping now behaves the same on x86_64 as on native 32-bit. The abi.syscall32 sysctl on x86_64 now takes the same values that vm.vdso_enabled takes on the 32-bit kernel. That is, 1 means a randomized vDSO location, 2 means the fixed old address. The CONFIG_COMPAT_VDSO option is now available to make this the default setting, the same meaning it has for the 32-bit kernel. (This does not affect the 64-bit vDSO.) The argument vdso32=[012] can be used on both 32-bit and 64-bit kernels to set this paramter at boot time. The vdso=[012] argument still does this same thing on the 32-bit kernel. Signed-off-by: Roland McGrath <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2008-01-30x86 vDSO: i386 vdso32Roland McGrath1-3/+2
This makes the i386 kernel use the new vDSO build in arch/x86/vdso/vdso32/ to replace the old one from arch/x86/kernel/. Signed-off-by: Roland McGrath <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2007-10-11i386: move xenThomas Gleixner1-0/+111
Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>