aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-03-25 04:44:51 -0400
committerAvi Kivity <avi@redhat.com>2011-05-11 07:57:06 -0400
commit92a1f12d2598f429bd8639e21d89305e787115c5 (patch)
tree48a6b7d6c50b5583b5163185dd097db100a471c6 /Documentation
parent857e40999e35906baa367a79137019912cfb5434 (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 'Documentation')
-rw-r--r--Documentation/kvm/api.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index 9bef4e4cec50..1b9eaa7e8856 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -1263,6 +1263,29 @@ struct kvm_assigned_msix_entry {
1263 __u16 padding[3]; 1263 __u16 padding[3];
1264}; 1264};
1265 1265
12664.54 KVM_SET_TSC_KHZ
1267
1268Capability: KVM_CAP_TSC_CONTROL
1269Architectures: x86
1270Type: vcpu ioctl
1271Parameters: virtual tsc_khz
1272Returns: 0 on success, -1 on error
1273
1274Specifies the tsc frequency for the virtual machine. The unit of the
1275frequency is KHz.
1276
12774.55 KVM_GET_TSC_KHZ
1278
1279Capability: KVM_CAP_GET_TSC_KHZ
1280Architectures: x86
1281Type: vcpu ioctl
1282Parameters: none
1283Returns: virtual tsc-khz on success, negative value on error
1284
1285Returns the tsc frequency of the guest. The unit of the return value is
1286KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
1287error.
1288
12665. The kvm_run structure 12895. The kvm_run structure
1267 1290
1268Application code obtains a pointer to the kvm_run structure by 1291Application code obtains a pointer to the kvm_run structure by