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 /arch/x86/include | |
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 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index da0a8ce3a139..bd57639fd5db 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -655,6 +655,13 @@ u8 kvm_get_guest_memory_type(struct kvm_vcpu *vcpu, gfn_t gfn); | |||
655 | 655 | ||
656 | extern bool tdp_enabled; | 656 | extern bool tdp_enabled; |
657 | 657 | ||
658 | /* control of guest tsc rate supported? */ | ||
659 | extern bool kvm_has_tsc_control; | ||
660 | /* minimum supported tsc_khz for guests */ | ||
661 | extern u32 kvm_min_guest_tsc_khz; | ||
662 | /* maximum supported tsc_khz for guests */ | ||
663 | extern u32 kvm_max_guest_tsc_khz; | ||
664 | |||
658 | enum emulation_result { | 665 | enum emulation_result { |
659 | EMULATE_DONE, /* no further processing */ | 666 | EMULATE_DONE, /* no further processing */ |
660 | EMULATE_DO_MMIO, /* kvm_run filled with mmio request */ | 667 | EMULATE_DO_MMIO, /* kvm_run filled with mmio request */ |