1. 11 9月, 2014 1 次提交
  2. 29 8月, 2014 4 次提交
  3. 22 8月, 2014 4 次提交
  4. 20 8月, 2014 1 次提交
    • W
      KVM: vmx: fix ept reserved bits for 1-GByte page · a32e8459
      Wanpeng Li 提交于
      EPT misconfig handler in kvm will check which reason lead to EPT
      misconfiguration after vmexit. One of the reasons is that an EPT
      paging-structure entry is configured with settings reserved for
      future functionality. However, the handler can't identify if
      paging-structure entry of reserved bits for 1-GByte page are
      configured, since PDPTE which point to 1-GByte page will reserve
      bits 29:12 instead of bits 7:3 which are reserved for PDPTE that
      references an EPT Page Directory. This patch fix it by reserve
      bits 29:12 for 1-GByte page.
      Signed-off-by: NWanpeng Li <wanpeng.li@linux.intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a32e8459
  5. 19 8月, 2014 2 次提交
  6. 05 8月, 2014 1 次提交
  7. 30 7月, 2014 1 次提交
  8. 24 7月, 2014 2 次提交
  9. 21 7月, 2014 3 次提交
  10. 17 7月, 2014 1 次提交
  11. 11 7月, 2014 2 次提交
    • P
      KVM: x86: return all bits from get_interrupt_shadow · 37ccdcbe
      Paolo Bonzini 提交于
      For the next patch we will need to know the full state of the
      interrupt shadow; we will then set KVM_REQ_EVENT when one bit
      is cleared.
      
      However, right now get_interrupt_shadow only returns the one
      corresponding to the emulated instruction, or an unconditional
      0 if the emulated instruction does not have an interrupt shadow.
      This is confusing and does not allow us to check for cleared
      bits as mentioned above.
      
      Clean the callback up, and modify toggle_interruptibility to
      match the comment above the call.  As a small result, the
      call to set_interrupt_shadow will be skipped in the common
      case where int_shadow == 0 && mask == 0.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      37ccdcbe
    • P
      KVM: vmx: speed up emulation of invalid guest state · 98eb2f8b
      Paolo Bonzini 提交于
      About 25% of the time spent in emulation of invalid guest state
      is wasted in checking whether emulation is required for the next
      instruction.  However, this almost never changes except when a
      segment register (or TR or LDTR) changes, or when there is a mode
      transition (i.e. CR0 changes).
      
      In fact, vmx_set_segment and vmx_set_cr0 already modify
      vmx->emulation_required (except that the former for some reason
      uses |= instead of just an assignment).  So there is no need to
      call guest_state_valid in the emulation loop.
      
      Emulation performance test results indicate 1650-2600 cycles
      for common instructions, versus 2300-3200 before this patch on
      a Sandy Bridge Xeon.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      98eb2f8b
  12. 19 6月, 2014 9 次提交
  13. 22 5月, 2014 2 次提交
    • N
      KVM: vmx: DR7 masking on task switch emulation is wrong · 1f854112
      Nadav Amit 提交于
      The DR7 masking which is done on task switch emulation should be in hex format
      (clearing the local breakpoints enable bits 0,2,4 and 6).
      Signed-off-by: NNadav Amit <namit@cs.technion.ac.il>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1f854112
    • P
      KVM: x86: get CPL from SS.DPL · ae9fedc7
      Paolo Bonzini 提交于
      CS.RPL is not equal to the CPL in the few instructions between
      setting CR0.PE and reloading CS.  And CS.DPL is also not equal
      to the CPL for conforming code segments.
      
      However, SS.DPL *is* always equal to the CPL except for the weird
      case of SYSRET on AMD processors, which sets SS.DPL=SS.RPL from the
      value in the STAR MSR, but force CPL=3 (Intel instead forces
      SS.DPL=SS.RPL=CPL=3).
      
      So this patch:
      
      - modifies SVM to update the CPL from SS.DPL rather than CS.RPL;
      the above case with SYSRET is not broken further, and the way
      to fix it would be to pass the CPL to userspace and back
      
      - modifies VMX to always return the CPL from SS.DPL (except
      forcing it to 0 if we are emulating real mode via vm86 mode;
      in vm86 mode all DPLs have to be 3, but real mode does allow
      privileged instructions).  It also removes the CPL cache,
      which becomes a duplicate of the SS access rights cache.
      
      This fixes doing KVM_IOCTL_SET_SREGS exactly after setting
      CR0.PE=1 but before CS has been reloaded.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ae9fedc7
  14. 08 5月, 2014 1 次提交
    • G
      kvm: x86: emulate monitor and mwait instructions as nop · 87c00572
      Gabriel L. Somlo 提交于
      Treat monitor and mwait instructions as nop, which is architecturally
      correct (but inefficient) behavior. We do this to prevent misbehaving
      guests (e.g. OS X <= 10.7) from crashing after they fail to check for
      monitor/mwait availability via cpuid.
      
      Since mwait-based idle loops relying on these nop-emulated instructions
      would keep the host CPU pegged at 100%, do NOT advertise their presence
      via cpuid, to prevent compliant guests from using them inadvertently.
      Signed-off-by: NGabriel L. Somlo <somlo@cmu.edu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      87c00572
  15. 07 5月, 2014 6 次提交