From: Konrad Rzeszutek Wilk Date: Tue, 4 Dec 2012 21:31:31 +0000 (-0500) Subject: Merge branch 'stable/for-linus-3.7.rebased' into uek2-merge X-Git-Tag: v2.6.39-400.9.0~35^2^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a3420cd6b5efa4bfaa01e96a83afed8ba468debe;p=users%2Fjedix%2Flinux-maple.git Merge branch 'stable/for-linus-3.7.rebased' into uek2-merge * stable/for-linus-3.7.rebased: (92 commits) xen/arm: Fix compile errors when drivers are compiled as modules (export more). xen/arm: Fix compile errors when drivers are compiled as modules. xen/generic: Disable fallback build on ARM. xen/hvm: If we fail to fetch an HVM parameter print out which flag it is. xen/hypercall: fix hypercall fallback code for very old hypervisors xen/arm: use the __HVC macro xen/xenbus: fix overflow check in xenbus_file_write() xen-kbdfront: handle backend CLOSED without CLOSING xen-fbfront: handle backend CLOSED without CLOSING xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF x86: remove obsolete comment from asm/xen/hypervisor.h xen: dbgp: Fix warning when CONFIG_PCI is not enabled. USB EHCI/Xen: propagate controller reset information to hypervisor xen: arm: comment on why 64-bit xen_pfn_t is safe even on 32 bit xen: balloon: use correct type for frame_list xen/x86: don't corrupt %eip when returning from a signal handler xen: arm: make p2m operations NOPs xen: balloon: don't include e820.h xen: events: pirq_check_eoi_map is X86 specific xen: XENMEM_translate_gpfn_list was remove ages ago and is unused. ... Conflicts: arch/ia64/include/asm/xen/interface.h arch/x86/include/asm/xen/interface.h arch/x86/xen/Makefile arch/x86/xen/enlighten.c arch/x86/xen/vga.c arch/x86/xen/xen-ops.h drivers/xen/Kconfig drivers/xen/Makefile drivers/xen/swiotlb-xen.c drivers/xen/xen-acpi-processor.c drivers/xen/xen-selfballoon.c include/xen/interface/physdev.h include/xen/interface/platform.h include/xen/interface/xen.h --- a3420cd6b5efa4bfaa01e96a83afed8ba468debe diff --cc arch/x86/xen/enlighten.c index 61110851b925f,0eff77ba7bd79..7c961c35d62c5 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@@ -74,6 -75,6 +75,7 @@@ #include #endif ++ #include "xen-ops.h" #include "mmu.h" #include "smp.h" @@@ -1492,15 -1510,9 +1511,15 @@@ asmlinkage void __init xen_start_kernel xen_start_info->console.domU.mfn = 0; xen_start_info->console.domU.evtchn = 0; + xen_init_apic(); /* Make sure ACS will be enabled */ pci_request_acs(); + - xen_init_apic(); + xen_acpi_sleep_register(); + + /* Avoid searching for BIOS MP tables */ + x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.mpparse.get_smp_config = x86_init_uint_noop; } #ifdef CONFIG_PCI /* PCI BIOS service won't work from a PV guest. */ diff --cc drivers/xen/Makefile index 45a5e37769731,b7fa190222a0e..bd95ebbdd2d6d --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@@ -1,5 -1,11 +1,10 @@@ - obj-y += grant-table.o features.o events.o manage.o balloon.o pcpu.o + ifneq ($(CONFIG_ARM),y) + obj-y += manage.o balloon.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 += xenbus/ -obj-y += tmem.o nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_features.o := $(nostackp) @@@ -15,9 -25,7 +24,8 @@@ obj-$(CONFIG_XEN_GRANT_DEV_ALLOC) += xe obj-$(CONFIG_XENFS) += xenfs/ obj-$(CONFIG_XEN_SYS_HYPERVISOR) += sys-hypervisor.o obj-$(CONFIG_XEN_PVHVM) += platform-pci.o +obj-$(CONFIG_XEN_TMEM) += tmem.o obj-$(CONFIG_SWIOTLB_XEN) += swiotlb-xen.o - obj-$(CONFIG_XEN_DOM0) += pci.o acpi.o obj-$(CONFIG_XEN_MCE_LOG) += mcelog.o obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o obj-$(CONFIG_XEN_ACPI_PROCESSOR) += xen-acpi-processor.o diff --cc drivers/xen/gntdev.c index 5df9fd847b2ee,d9141fe3dfa30..864cf9f103baf --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@@ -193,22 -203,13 +203,14 @@@ static void gntdev_put_map(struct grant atomic_sub(map->count, &pages_mapped); - if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT) + if (map->notify.flags & UNMAP_NOTIFY_SEND_EVENT) { notify_remote_via_evtchn(map->notify.event); evtchn_put(map->notify.event); + } - if (map->pages) { - if (!use_ptemod) - unmap_grant_pages(map, 0, map->count); - - free_xenballooned_pages(map->count, map->pages); - } - kfree(map->pages); - kfree(map->grants); - kfree(map->map_ops); - kfree(map->unmap_ops); - kfree(map); + if (map->pages && !use_ptemod) + unmap_grant_pages(map, 0, map->count); + gntdev_free_map(map); } /* ------------------------------------------------------------------ */ diff --cc include/xen/grant_table.h index f19fff8650e93,962b7df5eabfc..694dcaf266e63 --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h @@@ -187,7 -187,18 +187,19 @@@ int gnttab_map_refs(struct gnttab_map_g struct gnttab_map_grant_ref *kmap_ops, struct page **pages, unsigned int count); int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, - struct page **pages, unsigned int count, bool clear_pte); + struct gnttab_map_grant_ref *kunmap_ops, + struct page **pages, unsigned int count); + /* Perform a batch of grant map/copy operations. Retry every batch slot + * for which the hypervisor returns GNTST_eagain. This is typically due + * to paged out target frames. + * + * Will retry for 1, 2, ... 255 ms, i.e. 256 times during 32 seconds. + * + * Return value in each iand every status field of the batch guaranteed + * to not be GNTST_eagain. + */ + void gnttab_batch_map(struct gnttab_map_grant_ref *batch, unsigned count); + void gnttab_batch_copy(struct gnttab_copy *batch, unsigned count); + #endif /* __ASM_GNTTAB_H__ */ diff --cc include/xen/interface/physdev.h index 9ce788d8cf49c,4c0c241e55128..7795905430451 --- a/include/xen/interface/physdev.h +++ b/include/xen/interface/physdev.h @@@ -227,37 -219,22 +227,51 @@@ struct physdev_get_free_pirq uint32_t pirq; }; +#define XEN_PCI_DEV_EXTFN 0x1 +#define XEN_PCI_DEV_VIRTFN 0x2 +#define XEN_PCI_DEV_PXM 0x4 + +#define PHYSDEVOP_pci_device_add 25 +struct physdev_pci_device_add { + /* IN */ + uint16_t seg; + uint8_t bus; + uint8_t devfn; + uint32_t flags; + struct { + uint8_t bus; + uint8_t devfn; + } physfn; +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + uint32_t optarr[]; +#elif defined(__GNUC__) + uint32_t optarr[0]; +#endif +}; + +#define PHYSDEVOP_pci_device_remove 26 +#define PHYSDEVOP_restore_msi_ext 27 +struct physdev_pci_device { + /* IN */ + uint16_t seg; + uint8_t bus; + uint8_t devfn; +}; + #define PHYSDEVOP_DBGP_RESET_PREPARE 1 + #define PHYSDEVOP_DBGP_RESET_DONE 2 + #define PHYSDEVOP_DBGP_BUS_UNKNOWN 0 + #define PHYSDEVOP_DBGP_BUS_PCI 1 + + #define PHYSDEVOP_dbgp_op 29 + struct physdev_dbgp_op { + /* IN */ + uint8_t op; + uint8_t bus; + union { + struct physdev_pci_device pci; + } u; + }; - /* * Notify that some PIRQ-bound event channels have been unmasked. * ** This command is obsolete since interface version 0x00030202 and is **