diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-03-25 04:44:51 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-11 07:57:06 -0400 |
commit | 92a1f12d2598f429bd8639e21d89305e787115c5 (patch) | |
tree | 48a6b7d6c50b5583b5163185dd097db100a471c6 /include/linux/kvm.h | |
parent | 857e40999e35906baa367a79137019912cfb5434 (diff) |
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 { | |||
541 | #define KVM_CAP_PPC_GET_PVINFO 57 | 541 | #define KVM_CAP_PPC_GET_PVINFO 57 |
542 | #define KVM_CAP_PPC_IRQ_LEVEL 58 | 542 | #define KVM_CAP_PPC_IRQ_LEVEL 58 |
543 | #define KVM_CAP_ASYNC_PF 59 | 543 | #define KVM_CAP_ASYNC_PF 59 |
544 | #define KVM_CAP_TSC_CONTROL 60 | ||
545 | #define KVM_CAP_GET_TSC_KHZ 61 | ||
544 | 546 | ||
545 | #ifdef KVM_CAP_IRQ_ROUTING | 547 | #ifdef KVM_CAP_IRQ_ROUTING |
546 | 548 | ||
@@ -677,6 +679,9 @@ struct kvm_clock_data { | |||
677 | #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) | 679 | #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) |
678 | /* Available with KVM_CAP_PPC_GET_PVINFO */ | 680 | /* Available with KVM_CAP_PPC_GET_PVINFO */ |
679 | #define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo) | 681 | #define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo) |
682 | /* Available with KVM_CAP_TSC_CONTROL */ | ||
683 | #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) | ||
684 | #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) | ||
680 | 685 | ||
681 | /* | 686 | /* |
682 | * ioctls for vcpu fds | 687 | * ioctls for vcpu fds |