diff mbox

[1/2] apic: Variable only used when CAP_IRQCHIP is defined

Message ID 2ee6f55c189d839d392d0045dcadcc54180e6705.1253364915.git.quintela@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Juan Quintela Sept. 19, 2009, 12:59 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/apic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/apic.c b/hw/apic.c
index d92d86c..908d293 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -967,9 +967,9 @@  void qemu_kvm_load_lapic(CPUState *env)

 static void apic_pre_save(const void *opaque)
 {
+#ifdef KVM_CAP_IRQCHIP
     APICState *s = (void *)opaque;

-#ifdef KVM_CAP_IRQCHIP
     if (kvm_enabled() && qemu_kvm_irqchip_in_kernel()) {
         kvm_kernel_lapic_save_to_user(s);
     }
@@ -978,9 +978,9 @@  static void apic_pre_save(const void *opaque)

 static int apic_post_load(void *opaque)
 {
+#ifdef KVM_CAP_IRQCHIP
     APICState *s = opaque;

-#ifdef KVM_CAP_IRQCHIP
     if (kvm_enabled() && qemu_kvm_irqchip_in_kernel()) {
         kvm_kernel_lapic_load_from_user(s);
     }