@@ -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);
}
Signed-off-by: Juan Quintela <quintela@redhat.com> --- hw/apic.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)