1. 03 12月, 2010 1 次提交
  2. 23 11月, 2010 4 次提交
    • J
      xen: use default_idle · bc15fde7
      Jeremy Fitzhardinge 提交于
      We just need the idle loop to drop into safe_halt, which default_idle()
      is perfectly capable of doing.  There's no need to duplicate it.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      bc15fde7
    • J
      xen: clean up "extra" memory handling some more · c2d08791
      Jeremy Fitzhardinge 提交于
      Make sure that extra_pages is added for all E820_RAM regions beyond
      mem_end - completely excluded regions as well as the remains of partially
      included regions.
      
      Also makes sure the extra region is not unnecessarily high, and simplifies
      the logic to decide which regions should be added.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      c2d08791
    • K
      xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs. · 12334715
      Konrad Rzeszutek Wilk 提交于
      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: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      12334715
    • K
      xen: set IO permission early (before early_cpu_init()) · ec35a69c
      Konrad Rzeszutek Wilk 提交于
      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: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      ec35a69c
  3. 20 11月, 2010 4 次提交
  4. 17 11月, 2010 2 次提交
  5. 13 11月, 2010 1 次提交
  6. 11 11月, 2010 2 次提交
    • I
      xen: do not release any memory under 1M in domain 0 · 9ec23a7f
      Ian Campbell 提交于
      We already deliberately setup a 1-1 P2M for the region up to 1M in
      order to allow code which assumes this region is already mapped to
      work without having to convert everything to ioremap.
      
      Domain 0 should not return any apparently unused memory regions
      (reserved or otherwise) in this region to Xen since the e820 may not
      accurately reflect what the BIOS has stashed in this region.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      9ec23a7f
    • I
      xen: events: do not unmask event channels on resume · 6903591f
      Ian Campbell 提交于
      The IRQ core code will take care of disabling and reenabling
      interrupts over suspend resume automatically, therefore we do not need
      to do this in the Xen event channel code.
      
      The only exception is those event channels marked IRQF_NO_SUSPEND
      which the IRQ core ignores. We must unmask these ourselves, taking
      care to obey the current IRQ_DISABLED status. Failure check for
      IRQ_DISABLED leads to enabling polled only event channels, such as
      that associated with the pv spinlocks, which must never be enabled:
      
      [   21.970432] ------------[ cut here ]------------
      [   21.970432] kernel BUG at arch/x86/xen/spinlock.c:343!
      [   21.970432] invalid opcode: 0000 [#1] SMP
      [   21.970432] last sysfs file: /sys/devices/virtual/net/lo/operstate
      [   21.970432] Modules linked in:
      [   21.970432]
      [   21.970432] Pid: 0, comm: swapper Not tainted (2.6.32.24-x86_32p-xen-01034-g787c727 #34)
      [   21.970432] EIP: 0061:[<c102e209>] EFLAGS: 00010046 CPU: 3
      [   21.970432] EIP is at dummy_handler+0x3/0x7
      [   21.970432] EAX: 0000021c EBX: dfc16880 ECX: 0000001a EDX: 00000000
      [   21.970432] ESI: dfc02c00 EDI: 00000001 EBP: dfc47e10 ESP: dfc47e10
      [   21.970432]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0069
      [   21.970432] Process swapper (pid: 0, ti=dfc46000 task=dfc39440 task.ti=dfc46000)
      [   21.970432] Stack:
      [   21.970432]  dfc47e30 c10a39f0 0000021c 00000000 00000000 dfc16880 0000021c 00000001
      [   21.970432] <0> dfc47e40 c10a4f08 0000021c 00000000 dfc47e78 c12240a7 c1839284 c1839284
      [   21.970432] <0> 00000200 00000000 00000000 f5720000 c1f3d028 c1f3d02c 00000180 dfc47e90
      [   21.970432] Call Trace:
      [   21.970432]  [<c10a39f0>] ? handle_IRQ_event+0x5f/0x122
      [   21.970432]  [<c10a4f08>] ? handle_percpu_irq+0x2f/0x55
      [   21.970432]  [<c12240a7>] ? __xen_evtchn_do_upcall+0xdb/0x15f
      [   21.970432]  [<c122481e>] ? xen_evtchn_do_upcall+0x20/0x30
      [   21.970432]  [<c1030d47>] ? xen_do_upcall+0x7/0xc
      [   21.970432]  [<c102007b>] ? apic_reg_read+0xd3/0x22d
      [   21.970432]  [<c1002227>] ? hypercall_page+0x227/0x1005
      [   21.970432]  [<c102d30b>] ? xen_force_evtchn_callback+0xf/0x14
      [   21.970432]  [<c102da7c>] ? check_events+0x8/0xc
      [   21.970432]  [<c102da3b>] ? xen_irq_enable_direct_end+0x0/0x1
      [   21.970432]  [<c105e485>] ? finish_task_switch+0x62/0xba
      [   21.970432]  [<c14e3f84>] ? schedule+0x808/0x89d
      [   21.970432]  [<c1084dc5>] ? hrtimer_start_expires+0x1a/0x22
      [   21.970432]  [<c1085154>] ? tick_nohz_restart_sched_tick+0x15a/0x162
      [   21.970432]  [<c102f43a>] ? cpu_idle+0x6d/0x6f
      [   21.970432]  [<c14db29e>] ? cpu_bringup_and_idle+0xd/0xf
      [   21.970432] Code: 5d 0f 95 c0 0f b6 c0 c3 55 66 83 78 02 00 89 e5 5d 0f 95 \
      c0 0f b6 c0 c3 55 b2 01 86 10 31 c0 84 d2 89 e5 0f 94 c0 5d c3 55 89 e5 <0f> 0b \
      eb fe 55 80 3d 4c ce 84 c1 00 89 e5 57 56 89 c6 53 74 15
      [   21.970432] EIP: [<c102e209>] dummy_handler+0x3/0x7 SS:ESP 0069:dfc47e10
      [   21.970432] ---[ end trace c0b71f7e12cf3011 ]---
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      6903591f
  7. 30 10月, 2010 1 次提交
  8. 29 10月, 2010 25 次提交