1. 02 9月, 2011 1 次提交
  2. 01 9月, 2011 1 次提交
    • D
      xen: use maximum reservation to limit amount of usable RAM · d312ae87
      David Vrabel 提交于
      Use the domain's maximum reservation to limit the amount of extra RAM
      for the memory balloon. This reduces the size of the pages tables and
      the amount of reserved low memory (which defaults to about 1/32 of the
      total RAM).
      
      On a system with 8 GiB of RAM with the domain limited to 1 GiB the
      kernel reports:
      
      Before:
      
      Memory: 627792k/4472000k available
      
      After:
      
      Memory: 549740k/11132224k available
      
      A increase of about 76 MiB (~1.5% of the unused 7 GiB).  The reserved
      low memory is also reduced from 253 MiB to 32 MiB.  The total
      additional usable RAM is 329 MiB.
      
      For dom0, this requires at patch to Xen ('x86: use 'dom0_mem' to limit
      the number of pages for dom0') (c/s 23790)
      
      CC: stable@kernel.org
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      d312ae87
  3. 22 8月, 2011 2 次提交
  4. 17 8月, 2011 1 次提交
    • J
      xen/x86: replace order-based range checking of M2P table by linear one · ccbcdf7c
      Jan Beulich 提交于
      The order-based approach is not only less efficient (requiring a shift
      and a compare, typical generated code looking like this
      
      	mov	eax, [machine_to_phys_order]
      	mov	ecx, eax
      	shr	ebx, cl
      	test	ebx, ebx
      	jnz	...
      
      whereas a direct check requires just a compare, like in
      
      	cmp	ebx, [machine_to_phys_nr]
      	jae	...
      
      ), but also slightly dangerous in the 32-on-64 case - the element
      address calculation can wrap if the next power of two boundary is
      sufficiently far away from the actual upper limit of the table, and
      hence can result in user space addresses being accessed (with it being
      unknown what may actually be mapped there).
      
      Additionally, the elimination of the mistaken use of fls() here (should
      have been __fls()) fixes a latent issue on x86-64 that would trigger
      if the code was run on a system with memory extending beyond the 44-bit
      boundary.
      
      CC: stable@kernel.org
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      [v1: Based on Jeremy's feedback]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      ccbcdf7c
  5. 05 8月, 2011 4 次提交
  6. 26 7月, 2011 1 次提交
    • J
      xen/tracing: fix compile errors when tracing is disabled. · b3c4b982
      Jeremy Fitzhardinge 提交于
      When CONFIG_FUNCTION_TRACER is disabled, compilation fails as follows:
        CC      arch/x86/xen/setup.o
      In file included from arch/x86/include/asm/xen/hypercall.h:42,
                       from arch/x86/xen/setup.c:19:
      include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
      include/trace/events/xen.h:31: warning: its scope is only this definition or declaration, which is probably not what you want
      include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
      include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
      include/trace/events/xen.h:31: warning: 'struct multicall_entry' declared inside parameter list
      [...]
      arch/x86/xen/trace.c:5: error: '__HYPERVISOR_set_trap_table' undeclared here (not in a function)
      arch/x86/xen/trace.c:5: error: array index in initializer not of integer type
      arch/x86/xen/trace.c:5: error: (near initialization for 'xen_hypercall_names')
      arch/x86/xen/trace.c:6: error: '__HYPERVISOR_mmu_update' undeclared here (not in a function)
      arch/x86/xen/trace.c:6: error: array index in initializer not of integer type
      arch/x86/xen/trace.c:6: error: (near initialization for 'xen_hypercall_names')
      
      Fix this by making sure struct multicall_entry has a declaration in
      scope at all times, and don't bother compiling xen/trace.c when tracing
      is disabled.
      Reported-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      b3c4b982
  7. 19 7月, 2011 14 次提交
  8. 12 7月, 2011 1 次提交
  9. 30 6月, 2011 1 次提交
  10. 17 6月, 2011 1 次提交
    • K
      xen/setup: Fix for incorrect xen_extra_mem_start. · acd049c6
      Konrad Rzeszutek Wilk 提交于
      The earlier attempts (24bdb0b6)
      at fixing this problem caused other problems to surface (PV guests
      with no PCI passthrough would have SWIOTLB turned on - which meant
      64MB of precious contingous DMA32 memory being eaten up per guest).
      The problem was: "on xen we add an extra memory region at the end of
      the e820, and on this particular machine this extra memory region
      would start below 4g and cross over the 4g boundary:
      
      [0xfee01000-0x192655000)
      
      Unfortunately e820_end_of_low_ram_pfn does not expect an
      e820 layout like that so it returns 4g, therefore initial_memory_mapping
      will map [0 - 0x100000000), that is a memory range that includes some
      reserved memory regions."
      
      The memory range was the IOAPIC regions, and with the 1-1 mapping
      turned on, it would map them as RAM, not as MMIO regions. This caused
      the hypervisor to complain. Fortunately this is experienced only under
      the initial domain so we guard for it.
      Acked-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      acd049c6
  11. 16 6月, 2011 2 次提交
  12. 09 6月, 2011 1 次提交
  13. 06 6月, 2011 1 次提交
  14. 04 6月, 2011 1 次提交
  15. 21 5月, 2011 8 次提交