1. 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
  2. 05 8月, 2011 4 次提交
  3. 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
  4. 19 7月, 2011 14 次提交
  5. 12 7月, 2011 1 次提交
  6. 30 6月, 2011 1 次提交
  7. 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
  8. 16 6月, 2011 2 次提交
  9. 09 6月, 2011 1 次提交
  10. 06 6月, 2011 1 次提交
  11. 04 6月, 2011 1 次提交
  12. 21 5月, 2011 9 次提交
  13. 19 5月, 2011 3 次提交