1. 22 Nov, 2010 3 commits
    • Jeremy Fitzhardinge's avatar
      Merge branches 'upstream/core', 'upstream/xenfs' and 'upstream/evtchn' into upstream/for-linus · 9b832153
      Jeremy Fitzhardinge authored
      * upstream/core:
        xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs.
        xen: set IO permission early (before early_cpu_init())
        xen: re-enable boot-time ballooning
        xen/balloon: make sure we only include remaining extra ram
        xen/balloon: the balloon_lock is useless
        xen: add extra pages to balloon
        xen/events: use locked set|clear_bit() for cpu_evtchn_mask
        xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore
        xen: implement XENMEM_machphys_mapping
      
      * upstream/xenfs:
        Revert "xen/privcmd: create address space to allow writable mmaps"
        xen/xenfs: update xenfs_mount for new prototype
        xen: fix header export to userspace
        xen: set vma flag VM_PFNMAP in the privcmd mmap file_op
        xen: xenfs: privcmd: check put_user() return code
      
      * upstream/evtchn:
        xen: make evtchn's name less generic
        xen/evtchn: the evtchn device is non-seekable
        xen/evtchn: add missing static
        xen/evtchn: Fix name of Xen event-channel device
        xen/evtchn: don't do unbind_from_irqhandler under spinlock
        xen/evtchn: remove spurious barrier
        xen/evtchn: ports start enabled
        xen/evtchn: dynamically allocate port_user array
        xen/evtchn: track enabled state for each port
      9b832153
    • Konrad Rzeszutek Wilk's avatar
      xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs. · 12334715
      Konrad Rzeszutek Wilk authored
      When we allocate a vector for MSI/MSI-X we save away the PIRQ, and the
      vector value. When we unmap (de-allocate) the MSI/MSI-X vector(s) we
      need to provide the PIRQ and the vector value. What we did instead
      was to provide the GSI (which was zero) and the vector value, and we
      got these unhappy error messages:
      
      (XEN) irq.c:1575: dom0: pirq 0 not mapped
      [    7.733415] unmap irq failed -22
      
      This patches fixes this and we use the PIRQ value instead of the GSI
      value.
      
      CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      12334715
    • Konrad Rzeszutek Wilk's avatar
      xen: set IO permission early (before early_cpu_init()) · ec35a69c
      Konrad Rzeszutek Wilk authored
      This patch is based off "xen dom0: Set up basic IO permissions for dom0."
      by Juan Quintela <quintela@redhat.com>.
      
      On AMD machines when we boot the kernel as Domain 0 we get this nasty:
      
      mapping kernel into physical memory
      Xen: setup ISA identity maps
      about to get started...
      (XEN) traps.c:475:d0 Unhandled general protection fault fault/trap [#13] on VCPU 0 [ec=0000]
      (XEN) domain_crash_sync called from entry.S
      (XEN) Domain 0 (vcpu#0) crashed on cpu#0:
      (XEN) ----[ Xen-4.1-101116  x86_64  debug=y  Not tainted ]----
      (XEN) CPU:    0
      (XEN) RIP:    e033:[<ffffffff8130271b>]
      (XEN) RFLAGS: 0000000000000282   EM: 1   CONTEXT: pv guest
      (XEN) rax: 000000008000c068   rbx: ffffffff8186c680   rcx: 0000000000000068
      (XEN) rdx: 0000000000000cf8   rsi: 000000000000c000   rdi: 0000000000000000
      (XEN) rbp: ffffffff81801e98   rsp: ffffffff81801e50   r8:  ffffffff81801eac
      (XEN) r9:  ffffffff81801ea8   r10: ffffffff81801eb4   r11: 00000000ffffffff
      (XEN) r12: ffffffff8186c694   r13: ffffffff81801f90   r14: ffffffffffffffff
      (XEN) r15: 0000000000000000   cr0: 000000008005003b   cr4: 00000000000006f0
      (XEN) cr3: 0000000221803000   cr2: 0000000000000000
      (XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e02b   cs: e033
      (XEN) Guest stack trace from rsp=ffffffff81801e50:
      
      RIP points to read_pci_config() function.
      
      The issue is that we don't set IO permissions for the Linux kernel early enough.
      
      The call sequence used to be:
      
          xen_start_kernel()
      	x86_init.oem.arch_setup = xen_setup_arch;
              setup_arch:
                 - early_cpu_init
                     - early_init_amd
                        - read_pci_config
                 - x86_init.oem.arch_setup [ xen_arch_setup ]
                     - set IO permissions.
      
      We need to set the IO permissions earlier on, which this patch does.
      Acked-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      ec35a69c
  2. 20 Nov, 2010 4 commits
  3. 19 Nov, 2010 4 commits
  4. 16 Nov, 2010 6 commits
  5. 15 Nov, 2010 23 commits