Merge tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Apr 2012 00:54:53 +0000 (17:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Apr 2012 00:54:53 +0000 (17:54 -0700)
Pull xen fixes from Konrad Rzeszutek Wilk:
 "Two fixes for regressions:
   * one is a workaround that will be removed in v3.5 with proper fix in
     the tip/x86 tree,
   * the other is to fix drivers to load on PV (a previous patch made
     them only load in PVonHVM mode).

  The rest are just minor fixes in the various drivers and some cleanup
  in the core code."

* tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
  xen/pciback: fix XEN_PCI_OP_enable_msix result
  xen/smp: Remove unnecessary call to smp_processor_id()
  xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'
  xen: only check xen_platform_pci_unplug if hvm

arch/x86/xen/mmu.c
arch/x86/xen/smp.c
drivers/block/xen-blkfront.c
drivers/net/xen-netfront.c
drivers/pci/xen-pcifront.c
drivers/xen/xen-pciback/pciback_ops.c

index 988828b479ed29660363f87adda4c6c62707441b..b8e279479a6b31984a7e715c52eec4283e38e007 100644 (file)
@@ -1859,6 +1859,7 @@ pgd_t * __init xen_setup_kernel_pagetable(pgd_t *pgd,
 #endif /* CONFIG_X86_64 */
 
 static unsigned char dummy_mapping[PAGE_SIZE] __page_aligned_bss;
+static unsigned char fake_ioapic_mapping[PAGE_SIZE] __page_aligned_bss;
 
 static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
 {
@@ -1899,7 +1900,7 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot)
                 * We just don't map the IO APIC - all access is via
                 * hypercalls.  Keep the address in the pte for reference.
                 */
-               pte = pfn_pte(PFN_DOWN(__pa(dummy_mapping)), PAGE_KERNEL);
+               pte = pfn_pte(PFN_DOWN(__pa(fake_ioapic_mapping)), PAGE_KERNEL);
                break;
 #endif
 
@@ -2064,6 +2065,7 @@ void __init xen_init_mmu_ops(void)
        pv_mmu_ops = xen_mmu_ops;
 
        memset(dummy_mapping, 0xff, PAGE_SIZE);
+       memset(fake_ioapic_mapping, 0xfd, PAGE_SIZE);
 }
 
 /* Protected by xen_reservation_lock. */
index 02900e8ce26cecba1e02bab8d4f2fdb48888d823..5fac6919b957fa88a9b9cc130007671ffbc00d13 100644 (file)
@@ -59,7 +59,7 @@ static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id)
 
 static void __cpuinit cpu_bringup(void)
 {
-       int cpu = smp_processor_id();
+       int cpu;
 
        cpu_init();
        touch_softlockup_watchdog();
index d5e1ab95674044361920140550b0c6b34f9be9b3..98cbeba8cd5358ca026b2e4b692a4aa55704c739 100644 (file)
@@ -1475,7 +1475,7 @@ static int __init xlblk_init(void)
        if (!xen_domain())
                return -ENODEV;
 
-       if (!xen_platform_pci_unplug)
+       if (xen_hvm_domain() && !xen_platform_pci_unplug)
                return -ENODEV;
 
        if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
index 663b32c2e93185f60b391b2706cbc847e4c8ffd2..0ebbb1906c308ba69ff0cff0125a84562e85116d 100644 (file)
@@ -1965,7 +1965,7 @@ static int __init netif_init(void)
        if (xen_initial_domain())
                return 0;
 
-       if (!xen_platform_pci_unplug)
+       if (xen_hvm_domain() && !xen_platform_pci_unplug)
                return -ENODEV;
 
        printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");
index fd00ff02ab4d0c51cf7b6eabe6b2a5ce9880fb12..d6cc62cb4cf7465fe22cb643fbde7a3f79f88a29 100644 (file)
@@ -290,6 +290,7 @@ static int pci_frontend_enable_msix(struct pci_dev *dev,
                } else {
                        printk(KERN_DEBUG "enable msix get value %x\n",
                                op.value);
+                       err = op.value;
                }
        } else {
                dev_err(&dev->dev, "enable msix get err %x\n", err);
index 63616d7453e6d51989babcfaa643b807edbb1fc4..97f5d264c31ee6f464b92e5b6a2656bff6f00b7f 100644 (file)
@@ -234,7 +234,7 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev,
        if (dev_data)
                dev_data->ack_intr = 0;
 
-       return result;
+       return result > 0 ? 0 : result;
 }
 
 static