diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2010-02-19 19:22:25 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-02-21 11:19:52 +0200 |
commit | 1199048ffbe7bb0481d773cd844c5a05e142f363 (patch) | |
tree | d257bb8f4b0ad108d9cd4dfe5b6d120f18466595 /qemu-kvm-x86.c | |
parent | 925f33eb7b528d79516f3544ddf66500a645f1fd (diff) |
Use upstream kvm_pit_in_kernel
Drop private version in favor of recently added upstream service and
track it state directly in KVMState.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'qemu-kvm-x86.c')
-rw-r--r-- | qemu-kvm-x86.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 076925522..41e057974 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -119,13 +119,13 @@ static int kvm_create_pit(kvm_context_t kvm) #ifdef KVM_CAP_PIT int r; - kvm->pit_in_kernel = 0; + kvm_state->pit_in_kernel = 0; if (!kvm->no_pit_creation) { r = kvm_ioctl(kvm_state, KVM_CHECK_EXTENSION, KVM_CAP_PIT); if (r > 0) { r = kvm_vm_ioctl(kvm_state, KVM_CREATE_PIT); if (r >= 0) - kvm->pit_in_kernel = 1; + kvm_state->pit_in_kernel = 1; else { fprintf(stderr, "Create kernel PIC irqchip failed\n"); return r; @@ -311,14 +311,14 @@ int kvm_set_lapic(CPUState *env, struct kvm_lapic_state *s) int kvm_get_pit(kvm_context_t kvm, struct kvm_pit_state *s) { - if (!kvm->pit_in_kernel) + if (!kvm_pit_in_kernel()) return 0; return kvm_vm_ioctl(kvm_state, KVM_GET_PIT, s); } int kvm_set_pit(kvm_context_t kvm, struct kvm_pit_state *s) { - if (!kvm->pit_in_kernel) + if (!kvm_pit_in_kernel()) return 0; return kvm_vm_ioctl(kvm_state, KVM_SET_PIT, s); } @@ -326,14 +326,14 @@ int kvm_set_pit(kvm_context_t kvm, struct kvm_pit_state *s) #ifdef KVM_CAP_PIT_STATE2 int kvm_get_pit2(kvm_context_t kvm, struct kvm_pit_state2 *ps2) { - if (!kvm->pit_in_kernel) + if (!kvm_pit_in_kernel()) return 0; return kvm_vm_ioctl(kvm_state, KVM_GET_PIT2, ps2); } int kvm_set_pit2(kvm_context_t kvm, struct kvm_pit_state2 *ps2) { - if (!kvm->pit_in_kernel) + if (!kvm_pit_in_kernel()) return 0; return kvm_vm_ioctl(kvm_state, KVM_SET_PIT2, ps2); } |