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 /Documentation | |
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 'Documentation')
-rw-r--r-- | Documentation/kvm/api.txt | 23 |
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 | ||
1266 | 4.54 KVM_SET_TSC_KHZ | ||
1267 | |||
1268 | Capability: KVM_CAP_TSC_CONTROL | ||
1269 | Architectures: x86 | ||
1270 | Type: vcpu ioctl | ||
1271 | Parameters: virtual tsc_khz | ||
1272 | Returns: 0 on success, -1 on error | ||
1273 | |||
1274 | Specifies the tsc frequency for the virtual machine. The unit of the | ||
1275 | frequency is KHz. | ||
1276 | |||
1277 | 4.55 KVM_GET_TSC_KHZ | ||
1278 | |||
1279 | Capability: KVM_CAP_GET_TSC_KHZ | ||
1280 | Architectures: x86 | ||
1281 | Type: vcpu ioctl | ||
1282 | Parameters: none | ||
1283 | Returns: virtual tsc-khz on success, negative value on error | ||
1284 | |||
1285 | Returns the tsc frequency of the guest. The unit of the return value is | ||
1286 | KHz. If the host has unstable tsc this ioctl returns -EIO instead as an | ||
1287 | error. | ||
1288 | |||
1266 | 5. The kvm_run structure | 1289 | 5. The kvm_run structure |
1267 | 1290 | ||
1268 | Application code obtains a pointer to the kvm_run structure by | 1291 | Application code obtains a pointer to the kvm_run structure by |