diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-03-25 11:44:51 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-11 15:57:06 +0400 |
commit | 92a1f12d2598f429bd8639e21d89305e787115c5 (patch) | |
tree | 48a6b7d6c50b5583b5163185dd097db100a471c6 /include/linux/kvm.h | |
parent | 857e40999e35906baa367a79137019912cfb5434 (diff) | |
download | linux-92a1f12d2598f429bd8639e21d89305e787115c5.tar.xz |
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.h | 5 |
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 |