summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-03 11:39:30 +0300
committerAvi Kivity <avi@redhat.com>2010-08-03 11:39:30 +0300
commit27a94a7e91118226ba22f65656c9c971e458eb1f (patch)
treec604591feea4b7f4a46ba9256a687e7ea8be717f /hw
parent208169071fc514352cd4f93cfe0cc21866fec79a (diff)
Fix apic build with kvm disabled
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/apic.c4
1 files changed, 2 insertions, 2 deletions
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);
}