1. 24 3月, 2009 3 次提交
    • J
      KVM: VMX: Allow single-stepping when uninterruptible · 55934c0b
      Jan Kiszka 提交于
      When single-stepping over STI and MOV SS, we must clear the
      corresponding interruptibility bits in the guest state. Otherwise
      vmentry fails as it then expects bit 14 (BS) in pending debug exceptions
      being set, but that's not correct for the guest debugging case.
      
      Note that clearing those bits is safe as we check for interruptibility
      based on the original state and do not inject interrupts or NMIs if
      guest interruptibility was blocked.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      55934c0b
    • J
      KVM: New guest debug interface · d0bfb940
      Jan Kiszka 提交于
      This rips out the support for KVM_DEBUG_GUEST and introduces a new IOCTL
      instead: KVM_SET_GUEST_DEBUG. The IOCTL payload consists of a generic
      part, controlling the "main switch" and the single-step feature. The
      arch specific part adds an x86 interface for intercepting both types of
      debug exceptions separately and re-injecting them when the host was not
      interested. Moveover, the foundation for guest debugging via debug
      registers is layed.
      
      To signal breakpoint events properly back to userland, an arch-specific
      data block is now returned along KVM_EXIT_DEBUG. For x86, the arch block
      contains the PC, the debug exception, and relevant debug registers to
      tell debug events properly apart.
      
      The availability of this new interface is signaled by
      KVM_CAP_SET_GUEST_DEBUG. Empty stubs for not yet supported archs are
      provided.
      
      Note that both SVM and VTX are supported, but only the latter was tested
      yet. Based on the experience with all those VTX corner case, I would be
      fairly surprised if SVM will work out of the box.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d0bfb940
    • J
      KVM: VMX: Support for injecting software exceptions · 8ab2d2e2
      Jan Kiszka 提交于
      VMX differentiates between processor and software generated exceptions
      when injecting them into the guest. Extend vmx_queue_exception
      accordingly (and refactor related constants) so that we can use this
      service reliably for the new guest debugging framework.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      8ab2d2e2
  2. 15 2月, 2009 3 次提交
  3. 31 12月, 2008 20 次提交
  4. 23 11月, 2008 1 次提交
    • A
      KVM: VMX: Fix interrupt loss during race with NMI · bd2b3ca7
      Avi Kivity 提交于
      If an interrupt cannot be injected for some reason (say, page fault
      when fetching the IDT descriptor), the interrupt is marked for
      reinjection.  However, if an NMI is queued at this time, the NMI
      will be injected instead and the NMI will be lost.
      
      Fix by deferring the NMI injection until the interrupt has been
      injected successfully.
      
      Analyzed by Jan Kiszka.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      bd2b3ca7
  5. 12 11月, 2008 1 次提交
    • S
      KVM: VMX: Set IGMT bit in EPT entry · 928d4bf7
      Sheng Yang 提交于
      There is a potential issue that, when guest using pagetable without vmexit when
      EPT enabled, guest would use PAT/PCD/PWT bits to index PAT msr for it's memory,
      which would be inconsistent with host side and would cause host MCE due to
      inconsistent cache attribute.
      
      The patch set IGMT bit in EPT entry to ignore guest PAT and use WB as default
      memory type to protect host (notice that all memory mapped by KVM should be WB).
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      928d4bf7
  6. 15 10月, 2008 12 次提交