1. 21 1月, 2015 3 次提交
    • B
      kvm: Fix CR3_PCID_INVD type on 32-bit · cfaa790a
      Borislav Petkov 提交于
      arch/x86/kvm/emulate.c: In function ‘check_cr_write’:
      arch/x86/kvm/emulate.c:3552:4: warning: left shift count >= width of type
          rsvd = CR3_L_MODE_RESERVED_BITS & ~CR3_PCID_INVD;
      
      happens because sizeof(UL) on 32-bit is 4 bytes but we shift it 63 bits
      to the left.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      cfaa790a
    • M
      KVM: x86: workaround SuSE's 2.6.16 pvclock vs masterclock issue · 54750f2c
      Marcelo Tosatti 提交于
      SuSE's 2.6.16 kernel fails to boot if the delta between tsc_timestamp
      and rdtsc is larger than a given threshold:
      
       * If we get more than the below threshold into the future, we rerequest
       * the real time from the host again which has only little offset then
       * that we need to adjust using the TSC.
       *
       * For now that threshold is 1/5th of a jiffie. That should be good
       * enough accuracy for completely broken systems, but also give us swing
       * to not call out to the host all the time.
       */
      #define PVCLOCK_DELTA_MAX ((1000000000ULL / HZ) / 5)
      
      Disable masterclock support (which increases said delta) in case the
      boot vcpu does not use MSR_KVM_SYSTEM_TIME_NEW.
      
      Upstreams kernels which support pvclock vsyscalls (and therefore make
      use of PVCLOCK_STABLE_BIT) use MSR_KVM_SYSTEM_TIME_NEW.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      54750f2c
    • F
      KVM: fix "Should it be static?" warnings from sparse · 69b0049a
      Fengguang Wu 提交于
      arch/x86/kvm/x86.c:495:5: sparse: symbol 'kvm_read_nested_guest_page' was not declared. Should it be static?
      arch/x86/kvm/x86.c:646:5: sparse: symbol '__kvm_set_xcr' was not declared. Should it be static?
      arch/x86/kvm/x86.c:1183:15: sparse: symbol 'max_tsc_khz' was not declared. Should it be static?
      arch/x86/kvm/x86.c:1237:6: sparse: symbol 'kvm_track_tsc_matching' was not declared. Should it be static?
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      69b0049a
  2. 19 1月, 2015 2 次提交
  3. 09 1月, 2015 23 次提交
  4. 04 1月, 2015 1 次提交
    • D
      x86, um: actually mark system call tables readonly · b485342b
      Daniel Borkmann 提交于
      Commit a074335a ("x86, um: Mark system call tables readonly") was
      supposed to mark the sys_call_table in UML as RO by adding the const,
      but it doesn't have the desired effect as it's nevertheless being placed
      into the data section since __cacheline_aligned enforces sys_call_table
      being placed into .data..cacheline_aligned instead. We need to use
      the ____cacheline_aligned version instead to fix this issue.
      
      Before:
      
      $ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
                       U sys_writev
      0000000000000000 D sys_call_table
      0000000000000000 D syscall_table_size
      
      After:
      
      $ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
                       U sys_writev
      0000000000000000 R sys_call_table
      0000000000000000 D syscall_table_size
      
      Fixes: a074335a ("x86, um: Mark system call tables readonly")
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      b485342b
  5. 28 12月, 2014 2 次提交
  6. 18 12月, 2014 5 次提交
  7. 16 12月, 2014 4 次提交