From: Linus Torvalds Date: Thu, 13 Dec 2012 22:29:16 +0000 (-0800) Subject: Merge tag 'stable/for-linus-3.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: v3.8-rc1~122 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=896ea17d3da5f44b2625c9cda9874d7dfe447393;p=karo-tx-linux.git Merge tag 'stable/for-linus-3.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen Pull Xen updates from Konrad Rzeszutek Wilk: - Add necessary infrastructure to make balloon driver work under ARM. - Add /dev/xen/privcmd interfaces to work with ARM and PVH. - Improve Xen PCIBack wild-card parsing. - Add Xen ACPI PAD (Processor Aggregator) support - so can offline/ online sockets depending on the power consumption. - PVHVM + kexec = use an E820_RESV region for the shared region so we don't overwrite said region during kexec reboot. - Cleanups, compile fixes. Fix up some trivial conflicts due to the balloon driver now working on ARM, and there were changes next to the previous work-arounds that are now gone. * tag 'stable/for-linus-3.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen/PVonHVM: fix compile warning in init_hvm_pv_info xen: arm: implement remap interfaces needed for privcmd mappings. xen: correctly use xen_pfn_t in remap_domain_mfn_range. xen: arm: enable balloon driver xen: balloon: allow PVMMU interfaces to be compiled out xen: privcmd: support autotranslated physmap guests. xen: add pages parameter to xen_remap_domain_mfn_range xen/acpi: Move the xen_running_on_version_or_later function. xen/xenbus: Remove duplicate inclusion of asm/xen/hypervisor.h xen/acpi: Fix compile error by missing decleration for xen_domain. xen/acpi: revert pad config check in xen_check_mwait xen/acpi: ACPI PAD driver xen-pciback: reject out of range inputs xen-pciback: simplify and tighten parsing of device IDs xen PVonHVM: use E820_Reserved area for shared_info --- 896ea17d3da5f44b2625c9cda9874d7dfe447393 diff --cc arch/arm/xen/enlighten.c index f57609275449,f28fc1ac8760..7a32976fa2a3 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@@ -148,32 -247,3 +247,14 @@@ static int __init xen_init_events(void return 0; } postcore_initcall(xen_init_events); + - /* XXX: only until balloon is properly working */ - int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) - { - *pages = alloc_pages(highmem ? GFP_HIGHUSER : GFP_KERNEL, - get_order(nr_pages)); - if (*pages == NULL) - return -ENOMEM; - return 0; - } - EXPORT_SYMBOL_GPL(alloc_xenballooned_pages); - - void free_xenballooned_pages(int nr_pages, struct page **pages) - { - kfree(*pages); - *pages = NULL; - } - EXPORT_SYMBOL_GPL(free_xenballooned_pages); - +/* In the hypervisor.S file. */ +EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op); +EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op); +EXPORT_SYMBOL_GPL(HYPERVISOR_xen_version); +EXPORT_SYMBOL_GPL(HYPERVISOR_console_io); +EXPORT_SYMBOL_GPL(HYPERVISOR_sched_op); +EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op); +EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op); +EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op); +EXPORT_SYMBOL_GPL(privcmd_call); diff --cc arch/x86/xen/Kconfig index 9a6775c9ddca,c31ee77e1ec1..131dacd2748a --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig @@@ -6,8 -6,9 +6,9 @@@ config XE bool "Xen guest support" select PARAVIRT select PARAVIRT_CLOCK + select XEN_HAVE_PVMMU depends on X86_64 || (X86_32 && X86_PAE && !X86_VISWS) - depends on X86_CMPXCHG && X86_TSC + depends on X86_TSC help This is the Linux Xen port. Enabling this will allow the kernel to boot in a paravirtualized environment under the diff --cc drivers/xen/Makefile index 74354708c6c4,3ee2b91ca4e0..fb213cf81a7b --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@@ -1,9 -1,8 +1,9 @@@ ifneq ($(CONFIG_ARM),y) - obj-y += manage.o balloon.o + obj-y += manage.o obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o endif +obj-$(CONFIG_X86) += fallback.o - obj-y += grant-table.o features.o events.o + obj-y += grant-table.o features.o events.o balloon.o obj-y += xenbus/ nostackp := $(call cc-option, -fno-stack-protector) diff --cc drivers/xen/privcmd.c index 71f5c459b088,b9d08987a5a5..0bbbccbb1f12 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c @@@ -367,9 -412,15 +411,16 @@@ static long privcmd_ioctl_mmap_batch(vo ((m.addr + (nr_pages << PAGE_SHIFT)) != vma->vm_end) || !privcmd_enforce_singleshot_mapping(vma)) { up_write(&mm->mmap_sem); + ret = -EINVAL; goto out; } + if (xen_feature(XENFEAT_auto_translated_physmap)) { + ret = alloc_empty_pages(vma, m.num); + if (ret < 0) { + up_write(&mm->mmap_sem); + goto out; + } + } state.domain = m.dom; state.vma = vma;