From: Konrad Rzeszutek Wilk Date: Wed, 19 Oct 2011 19:43:13 +0000 (-0400) Subject: Merge branch 'stable/bug.fixes-3.2.rebased' of git://oss.oracle.com/git/kwilk/xen... X-Git-Tag: v2.6.39-400.9.0~854^2~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a81fb81ed5193bb517b5d482b20ace225f60aac0;p=users%2Fjedix%2Flinux-maple.git Merge branch 'stable/bug.fixes-3.2.rebased' of git://oss.oracle.com/git/kwilk/xen into uek2-merge * 'stable/bug.fixes-3.2.rebased' of git://oss.oracle.com/git/kwilk/xen: xen/irq: If we fail during msi_capability_init return proper error code. xen: remove XEN_PLATFORM_PCI config option xen: XEN_PVHVM depends on PCI xen/p2m/debugfs: Make type_name more obvious. xen/p2m/debugfs: Fix potential pointer exception. xen/enlighten: Fix compile warnings and set cx to known value. xen/xenbus: Remove the unnecessary check. xen/events: Don't check the info for NULL as it is already done. xen/pci: Use 'acpi_gsi_to_irq' value unconditionally. xen/pci: Remove 'xen_allocate_pirq_gsi'. xen/pci: Retire unnecessary #ifdef CONFIG_ACPI xen/pci: Move the allocation of IRQs when there are no IOAPIC's to the end xen/pci: Squash pci_xen_initial_domain and xen_setup_pirqs together. xen/pci: Use the xen_register_pirq for HVM and initial domain users xen/pci: In xen_register_pirq bind the GSI to the IRQ after the hypercall. xen/pci: Provide #ifdef CONFIG_ACPI to easy code squashing. xen/pci: Update comments and fix empty spaces. xen/pci: Shuffle code around. Conflicts: arch/x86/pci/xen.c drivers/xen/Makefile --- a81fb81ed5193bb517b5d482b20ace225f60aac0 diff --cc arch/x86/xen/Kconfig index 814ccb324fbd,e061f550a28a..0623670e17ea --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig @@@ -25,19 -25,15 +25,18 @@@ config XEN_PRIVILEGED_GUES config XEN_PVHVM def_bool y - depends on XEN - depends on X86_LOCAL_APIC + depends on XEN && PCI && X86_LOCAL_APIC config XEN_MAX_DOMAIN_MEMORY - int - default 128 + int "Maximum allowed size of a domain in gigabytes" + default 8 if X86_32 + default 32 if X86_64 depends on XEN help - This only affects the sizing of some bss arrays, the unused - portions of which are freed. + The pseudo-physical to machine address array is sized + according to the maximum possible memory size of a Xen + domain. This array uses 1 page per gigabyte, so there's no + need to be too stingy here. config XEN_SAVE_RESTORE bool diff --cc drivers/xen/Makefile index 72bbb27d7a68,7c5c64fe52a2..974fffdf22b2 --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@@ -14,11 -14,9 +14,11 @@@ obj-$(CONFIG_XEN_GNTDEV) += xen-gntdev obj-$(CONFIG_XEN_GRANT_DEV_ALLOC) += xen-gntalloc.o obj-$(CONFIG_XENFS) += xenfs/ obj-$(CONFIG_XEN_SYS_HYPERVISOR) += sys-hypervisor.o - obj-$(CONFIG_XEN_PLATFORM_PCI) += xen-platform-pci.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 +obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback/ xen-evtchn-y := evtchn.o xen-gntdev-y := gntdev.o diff --cc drivers/xen/events.c index 7523719bf8a4,2774006f32da..c1be9de5dbc0 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@@ -710,10 -711,10 +711,10 @@@ int xen_bind_pirq_msi_to_irq(struct pci { int irq, ret; - spin_lock(&irq_mapping_update_lock); + mutex_lock(&irq_mapping_update_lock); irq = xen_allocate_irq_dynamic(); - if (irq == -1) + if (irq < 0) goto out; irq_set_chip_and_handler_name(irq, &xen_pirq_chip, handle_edge_irq, @@@ -724,12 -725,12 +725,12 @@@ if (ret < 0) goto error_irq; out: - spin_unlock(&irq_mapping_update_lock); + mutex_unlock(&irq_mapping_update_lock); return irq; error_irq: - spin_unlock(&irq_mapping_update_lock); + mutex_unlock(&irq_mapping_update_lock); xen_free_irq(irq); - return -1; + return ret; } #endif @@@ -776,10 -777,10 +777,10 @@@ int xen_irq_from_pirq(unsigned pirq struct irq_info *info; - spin_lock(&irq_mapping_update_lock); + mutex_lock(&irq_mapping_update_lock); list_for_each_entry(info, &xen_irq_list_head, list) { - if (info == NULL || info->type != IRQT_PIRQ) + if (info->type != IRQT_PIRQ) continue; irq = info->irq; if (info->u.pirq.pirq == pirq) diff --cc drivers/xen/xenbus/xenbus_probe_backend.c index 60adf919d78d,c8db5008ce5f..32417b5064fd --- a/drivers/xen/xenbus/xenbus_probe_backend.c +++ b/drivers/xen/xenbus/xenbus_probe_backend.c @@@ -104,12 -104,7 +104,10 @@@ static int xenbus_uevent_backend(struc xdev = to_xenbus_device(dev); bus = container_of(xdev->dev.bus, struct xen_bus_type, bus); - if (xdev == NULL) - return -ENODEV; + if (add_uevent_var(env, "MODALIAS=xen-backend:%s", xdev->devicetype)) + return -ENOMEM; + /* stuff we want to pass to /sbin/hotplug */ if (add_uevent_var(env, "XENBUS_TYPE=%s", xdev->devicetype)) return -ENOMEM;