* KVM: Another fix for tsc deadline timer without irqchip_in_kernel()
@ 2011-10-03 19:11 Marcelo Tosatti
0 siblings, 0 replies; only message in thread
From: Marcelo Tosatti @ 2011-10-03 19:11 UTC (permalink / raw)
To: kvm
get/set MSR functions not prepared to deal with non existance
of in kernel irqchip.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 92390dc..54abb40 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -963,6 +963,8 @@ void kvm_free_lapic(struct kvm_vcpu *vcpu)
u64 kvm_get_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu)
{
struct kvm_lapic *apic = vcpu->arch.apic;
+ if (!apic)
+ return 0;
if (apic_lvtt_oneshot(apic) || apic_lvtt_period(apic))
return 0;
@@ -973,6 +975,8 @@ u64 kvm_get_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu)
void kvm_set_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu, u64 data)
{
struct kvm_lapic *apic = vcpu->arch.apic;
+ if (!apic)
+ return;
if (apic_lvtt_oneshot(apic) || apic_lvtt_period(apic))
return;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-03 19:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 19:11 KVM: Another fix for tsc deadline timer without irqchip_in_kernel() Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).