From 27a94a7e91118226ba22f65656c9c971e458eb1f Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Tue, 3 Aug 2010 11:39:30 +0300 Subject: Fix apic build with kvm disabled Signed-off-by: Avi Kivity --- hw/apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw') diff --git a/hw/apic.c b/hw/apic.c index cf0b03cbc..fa23afb12 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -964,9 +964,9 @@ static void kvm_kernel_lapic_load_from_user(APICState *s) void kvm_load_lapic(CPUState *env) { +#ifdef KVM_CAP_IRQCHIP APICState *s = DO_UPCAST(APICState, busdev.qdev, env->apic_state); -#ifdef KVM_CAP_IRQCHIP if (kvm_enabled() && kvm_irqchip_in_kernel()) { kvm_kernel_lapic_load_from_user(s); } @@ -975,9 +975,9 @@ void kvm_load_lapic(CPUState *env) void kvm_save_lapic(CPUState *env) { +#ifdef KVM_CAP_IRQCHIP APICState *s = DO_UPCAST(APICState, busdev.qdev, env->apic_state); -#ifdef KVM_CAP_IRQCHIP if (kvm_enabled() && kvm_irqchip_in_kernel()) { kvm_kernel_lapic_save_to_user(s); } -- cgit v1.2.3