summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2011-08-01 14:59:44 -0700
committerBryan Cantrill <bryan@joyent.com>2011-08-01 14:59:44 -0700
commit1c0b3b8f7bfb63054f9681143bf58ec3e3e77ecd (patch)
tree48ff059490e2fd29ebf38b4d4ee9510336543b45
parentf0707d07a4288a781a2192ad77c94b97251a9bb5 (diff)
downloadillumos-kvm-1c0b3b8f7bfb63054f9681143bf58ec3e3e77ecd.tar.gz
HVM-326 support (or remove) KVM timer migration
-rw-r--r--kvm.c6
-rw-r--r--kvm_host.h2
-rw-r--r--kvm_i8254.c18
-rw-r--r--kvm_irq.c7
-rw-r--r--kvm_irq.h3
-rw-r--r--kvm_lapic.c18
-rw-r--r--kvm_vmx.c1
-rw-r--r--kvm_x86.c4
8 files changed, 0 insertions, 59 deletions
diff --git a/kvm.c b/kvm.c
index ae46640..149acf7 100644
--- a/kvm.c
+++ b/kvm.c
@@ -449,12 +449,6 @@ kvm_ctx_restore(void *arg)
kvm_arch_vcpu_load(vcpu, cpu);
}
-void
-kvm_migrate_timers(struct kvm_vcpu *vcpu)
-{
- set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests);
-}
-
#ifdef XXX_KVM_DECLARATION
#define pfn_valid(pfn) ((pfn < physmax) && (pfn != PFN_INVALID))
#else
diff --git a/kvm_host.h b/kvm_host.h
index 62d809d..9476232 100644
--- a/kvm_host.h
+++ b/kvm_host.h
@@ -27,7 +27,6 @@
* vcpu->requests bit members
*/
#define KVM_REQ_TLB_FLUSH 0
-#define KVM_REQ_MIGRATE_TIMER 1
#define KVM_REQ_REPORT_TPR_ACCESS 2
#define KVM_REQ_MMU_RELOAD 3
#define KVM_REQ_TRIPLE_FAULT 4
@@ -450,7 +449,6 @@ extern void kvm_free_irq_source_id(struct kvm *, int);
extern void kvm_guest_enter(void);
extern void kvm_guest_exit(void);
-extern void kvm_migrate_timers(struct kvm_vcpu *);
#ifndef KVM_ARCH_HAS_UNALIAS_INSTANTIATION
#define unalias_gfn_instantiation unalias_gfn
diff --git a/kvm_i8254.c b/kvm_i8254.c
index 0375874..57dfe30 100644
--- a/kvm_i8254.c
+++ b/kvm_i8254.c
@@ -798,21 +798,3 @@ kvm_free_pit(struct kvm *kvmp)
kmem_free(kvmp->arch.vpit, sizeof (struct kvm_pit));
kvmp->arch.vpit = NULL;
}
-
-void
-__kvm_migrate_pit_timer(struct kvm_vcpu *vcpu)
-{
-#ifdef XXX
- struct kvm_pit *pit = vcpu->kvm->arch.vpit;
- struct hrtimer *timer;
-
- if (!kvm_vcpu_is_bsp(vcpu) || !pit)
- return;
-
- timer = &pit->pit_state.pit_timer.timer;
- if (hrtimer_cancel_p(timer))
- kvm_hrtimer_start_expires(timer, HRTIMER_MODE_ABS);
-#else
- XXX_KVM_PROBE;
-#endif
-}
diff --git a/kvm_irq.c b/kvm_irq.c
index 1e8eb8f..a6c71aa 100644
--- a/kvm_irq.c
+++ b/kvm_irq.c
@@ -108,10 +108,3 @@ kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu)
kvm_inject_pit_timer_irqs(vcpu);
/* TODO: PIT, RTC etc. */
}
-
-void
-__kvm_migrate_timers(struct kvm_vcpu *vcpu)
-{
- __kvm_migrate_apic_timer(vcpu);
- __kvm_migrate_pit_timer(vcpu);
-}
diff --git a/kvm_irq.h b/kvm_irq.h
index 09b8023..25a0412 100644
--- a/kvm_irq.h
+++ b/kvm_irq.h
@@ -87,9 +87,6 @@ extern void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu);
extern void kvm_inject_pending_timer_irqs(struct kvm_vcpu *);
extern void kvm_inject_apic_timer_irqs(struct kvm_vcpu *);
extern void kvm_apic_nmi_wd_deliver(struct kvm_vcpu *);
-extern void __kvm_migrate_apic_timer(struct kvm_vcpu *);
-extern void __kvm_migrate_pit_timer(struct kvm_vcpu *);
-extern void __kvm_migrate_timers(struct kvm_vcpu *);
extern int pit_has_pending_timer(struct kvm_vcpu *);
extern int apic_has_pending_timer(struct kvm_vcpu *);
diff --git a/kvm_lapic.c b/kvm_lapic.c
index 2376802..d991287 100644
--- a/kvm_lapic.c
+++ b/kvm_lapic.c
@@ -1208,24 +1208,6 @@ kvm_apic_post_state_restore(struct kvm_vcpu *vcpu)
}
void
-__kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)
-{
-#ifdef XXX
- struct kvm_lapic *apic = vcpu->arch.apic;
- struct hrtimer *timer;
-
- if (!apic)
- return;
-
- timer = &apic->lapic_timer.timer;
- if (hrtimer_cancel_p(timer))
- kvm_hrtimer_start_expires(timer, HRTIMER_MODE_ABS);
-#else
- XXX_KVM_PROBE;
-#endif
-}
-
-void
kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu)
{
uint32_t data;
diff --git a/kvm_vmx.c b/kvm_vmx.c
index 9579b99..fa09406 100644
--- a/kvm_vmx.c
+++ b/kvm_vmx.c
@@ -826,7 +826,6 @@ vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
if (vcpu->cpu != cpu) {
vcpu_clear(vmx);
- kvm_migrate_timers(vcpu);
set_bit(KVM_REQ_TLB_FLUSH, &vcpu->requests);
}
diff --git a/kvm_x86.c b/kvm_x86.c
index 5ed4774..e3fefe3 100644
--- a/kvm_x86.c
+++ b/kvm_x86.c
@@ -3428,10 +3428,6 @@ vcpu_enter_guest(struct kvm_vcpu *vcpu)
goto out;
if (vcpu->requests) {
- if (test_and_clear_bit(KVM_REQ_MIGRATE_TIMER,
- &vcpu->requests)) {
- __kvm_migrate_timers(vcpu);
- }
if (test_and_clear_bit(KVM_REQ_KVMCLOCK_UPDATE,
&vcpu->requests)) {
kvm_write_guest_time(vcpu);