1. 03 1月, 2009 34 次提交
  2. 01 1月, 2009 1 次提交
  3. 31 12月, 2008 5 次提交
    • E
      x86: KVM guest: kvm_get_tsc_khz: return khz, not lpj · e93353c9
      Eduardo Habkost 提交于
      kvm_get_tsc_khz() currently returns the previously-calculated preset_lpj
      value, but it is in loops-per-jiffy, not kHz. The current code works
      correctly only when HZ=1000.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      e93353c9
    • G
      x86: KVM guest: sign kvmclock as paravirt · 423cd25a
      Glauber Costa 提交于
      Currently, we only set the KVM paravirt signature in case
      of CONFIG_KVM_GUEST. However, it is possible to have it turned
      off, while CONFIG_KVM_CLOCK is turned on. This is also a paravirt
      case, and should be shown accordingly.
      Signed-off-by: NGlauber Costa <glommer@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      423cd25a
    • E
      x86: disable VMX on all CPUs on reboot · d176720d
      Eduardo Habkost 提交于
      On emergency_restart, we may need to use an NMI to disable virtualization
      on all CPUs. We do that using nmi_shootdown_cpus() if VMX is enabled.
      
      Note: With this patch, we will run the NMI stuff only when the CPU where
      emergency_restart() was called has VMX enabled. This should work on most
      cases because KVM enables VMX on all CPUs, but we may miss the small
      window where KVM is doing that. Also, I don't know if all code using
      VMX out there always enable VMX on all CPUs like KVM does. We have two
      other alternatives for that:
      
      a) Have an API that all code that enables VMX on any CPU should use
         to tell the kernel core that it is going to enable VMX on the CPUs.
      b) Always call nmi_shootdown_cpus() if the CPU supports VMX. This is
         a bit intrusive and more risky, as it would run nmi_shootdown_cpus()
         on emergency_reboot() even on systems where virtualization is never
         enabled.
      
      Finding a proper point to hook the nmi_shootdown_cpus() call isn't
      trivial, as the non-emergency machine_restart() (that doesn't need the
      NMI tricks) uses machine_emergency_restart() directly.
      
      The solution to make this work without adding a new function or argument
      to machine_ops was setting a 'reboot_emergency' flag that tells if
      native_machine_emergency_restart() needs to do the virt cleanup or not.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d176720d
    • E
      kdump: forcibly disable VMX and SVM on machine_crash_shutdown() · 2340b62f
      Eduardo Habkost 提交于
      We need to disable virtualization extensions on all CPUs before booting
      the kdump kernel, otherwise the kdump kernel booting will fail, and
      rebooting after the kdump kernel did its task may also fail.
      
      We do it using cpu_emergency_vmxoff() and cpu_emergency_svm_disable(),
      that should always work, because those functions check if the CPUs
      support SVM or VMX before doing their tasks.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      2340b62f
    • S
      x86: Export some definition of MTRR · 932d27a7
      Sheng Yang 提交于
      For KVM can reuse the type define, and need them to support shadow MTRR.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      932d27a7