1. 24 3月, 2009 3 次提交
    • 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
    • A
      KVM: SVM: Only allow setting of EFER_SVME when CPUID SVM is set · d8017474
      Alexander Graf 提交于
      Userspace has to tell the kernel module somehow that nested SVM should be used.
      The easiest way that doesn't break anything I could think of is to implement
      
      if (cpuid & svm)
          allow write to efer
      else
          deny write to efer
      
      Old userspaces mask the SVM capability bit, so they don't break.
      In order to find out that the SVM capability is set, I had to split the
      kvm_emulate_cpuid into a finding and an emulating part.
      
      (introduced in v6)
      Acked-by: NJoerg Roedel <joro@8bytes.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d8017474
    • A
      KVM: SVM: Implement hsave · b286d5d8
      Alexander Graf 提交于
      Implement the hsave MSR, that gives the VCPU a GPA to save the
      old guest state in.
      
      v2 allows userspace to save/restore hsave
      v4 dummys out the hsave MSR, so we use a host page
      v6 remembers the guest's hsave and exports the MSR
      Acked-by: NJoerg Roedel <joro@8bytes.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      b286d5d8
  2. 15 2月, 2009 3 次提交
    • M
      KVM: x86: disable kvmclock on non constant TSC hosts · abe6655d
      Marcelo Tosatti 提交于
      This is better.
      
      Currently, this code path is posing us big troubles,
      and we won't have a decent patch in time. So, temporarily
      disable it.
      Signed-off-by: NGlauber Costa <glommer@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      abe6655d
    • S
      KVM: Fix racy in kvm_free_assigned_irq · ba4cef31
      Sheng Yang 提交于
      In the past, kvm_get_kvm() and kvm_put_kvm() was called in assigned device irq
      handler and interrupt_work, in order to prevent cancel_work_sync() in
      kvm_free_assigned_irq got a illegal state when waiting for interrupt_work done.
      But it's tricky and still got two problems:
      
      1. A bug ignored two conditions that cancel_work_sync() would return true result
      in a additional kvm_put_kvm().
      
      2. If interrupt type is MSI, we would got a window between cancel_work_sync()
      and free_irq(), which interrupt would be injected again...
      
      This patch discard the reference count used for irq handler and interrupt_work,
      and ensure the legal state by moving the free function at the very beginning of
      kvm_destroy_vm(). And the patch fix the second bug by disable irq before
      cancel_work_sync(), which may result in nested disable of irq but OK for we are
      going to free it.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      ba4cef31
    • S
      KVM: Add kvm_arch_sync_events to sync with asynchronize events · ad8ba2cd
      Sheng Yang 提交于
      kvm_arch_sync_events is introduced to quiet down all other events may happen
      contemporary with VM destroy process, like IRQ handler and work struct for
      assigned device.
      
      For kvm_arch_sync_events is called at the very beginning of kvm_destroy_vm(), so
      the state of KVM here is legal and can provide a environment to quiet down other
      events.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      ad8ba2cd
  3. 03 1月, 2009 1 次提交
  4. 31 12月, 2008 16 次提交
  5. 28 10月, 2008 1 次提交
  6. 17 10月, 2008 1 次提交
  7. 15 10月, 2008 15 次提交