From patchwork Mon Jan 9 08:55:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 712522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3txpy92Dw6z9s65 for ; Mon, 9 Jan 2017 20:00:01 +1100 (AEDT) Received: from localhost ([::1]:37854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQVo7-0005rM-0m for incoming@patchwork.ozlabs.org; Mon, 09 Jan 2017 03:59:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQVkJ-0003D2-Qu for qemu-devel@nongnu.org; Mon, 09 Jan 2017 03:56:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQVkI-0001oY-Ts for qemu-devel@nongnu.org; Mon, 09 Jan 2017 03:56:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51570) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cQVkI-0001np-OB for qemu-devel@nongnu.org; Mon, 09 Jan 2017 03:56:02 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CF11361B86 for ; Mon, 9 Jan 2017 08:56:02 +0000 (UTC) Received: from pxdev.xzpeter.org (vpn1-4-230.pek2.redhat.com [10.72.4.230]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v098ttfo014891; Mon, 9 Jan 2017 03:56:01 -0500 From: Peter Xu To: qemu-devel@nongnu.org Date: Mon, 9 Jan 2017 16:55:53 +0800 Message-Id: <1483952153-7221-4-git-send-email-peterx@redhat.com> In-Reply-To: <1483952153-7221-1-git-send-email-peterx@redhat.com> References: <1483952153-7221-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 09 Jan 2017 08:56:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] x86: ioapic: fix fail migration when irqchip=split X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , peterx@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Peter Xu --- hw/intc/ioapic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index d1254f8..9047b89 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -439,6 +439,11 @@ static void ioapic_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); k->realize = ioapic_realize; + /* + * If APIC is in kernel, we need to update the kernel cache after + * migration, otherwise first 24 gsi routes will be invalid. + */ + k->post_load = ioapic_update_kvm_routes; dc->reset = ioapic_reset_common; dc->props = ioapic_properties; }