summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-03-25 09:44:51 +0100
committerAvi Kivity <avi@redhat.com>2011-05-11 07:57:06 -0400
commit92a1f12d2598f429bd8639e21d89305e787115c5 (patch)
tree48a6b7d6c50b5583b5163185dd097db100a471c6 /include/linux/kvm.h
parent857e40999e35906baa367a79137019912cfb5434 (diff)
downloadtalos-obmc-linux-92a1f12d2598f429bd8639e21d89305e787115c5.tar.gz
talos-obmc-linux-92a1f12d2598f429bd8639e21d89305e787115c5.zip
KVM: X86: Implement userspace interface to set virtual_tsc_khz
This patch implements two new vm-ioctls to get and set the virtual_tsc_khz if the machine supports tsc-scaling. Setting the tsc-frequency is only possible before userspace creates any vcpu. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index ea2dc1a2e13d..2f63ebeac639 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -541,6 +541,8 @@ struct kvm_ppc_pvinfo {
#define KVM_CAP_PPC_GET_PVINFO 57
#define KVM_CAP_PPC_IRQ_LEVEL 58
#define KVM_CAP_ASYNC_PF 59
+#define KVM_CAP_TSC_CONTROL 60
+#define KVM_CAP_GET_TSC_KHZ 61
#ifdef KVM_CAP_IRQ_ROUTING
@@ -677,6 +679,9 @@ struct kvm_clock_data {
#define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2)
/* Available with KVM_CAP_PPC_GET_PVINFO */
#define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo)
+/* Available with KVM_CAP_TSC_CONTROL */
+#define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2)
+#define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3)
/*
* ioctls for vcpu fds
OpenPOWER on IntegriCloud