From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAkj-0004n3-TR for qemu-devel@nongnu.org; Tue, 30 Oct 2012 08:17:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTAkd-00049F-VH for qemu-devel@nongnu.org; Tue, 30 Oct 2012 08:17:05 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:48008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTAkd-000497-Oi for qemu-devel@nongnu.org; Tue, 30 Oct 2012 08:16:59 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so127493pad.4 for ; Tue, 30 Oct 2012 05:16:59 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 30 Oct 2012 13:16:32 +0100 Message-Id: <1351599394-24876-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1351599394-24876-1-git-send-email-pbonzini@redhat.com> References: <1351599394-24876-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] apic: always update the in-kernel status after loading List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jan.kiszka@siemens.com, mtosatti@redhat.com, avi@redhat.com, kvm@vger.kernel.org The LAPIC is loaded separately from the rest of the VCPU state. Thus, when restoring the CPU the dummy post-reset state is passed to the in-kernel APIC. This can cause MSI injection to fail if attempted during the restore of another device, because the LAPIC believes it's not enabled. Signed-off-by: Paolo Bonzini --- hw/apic_common.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/apic_common.c b/hw/apic_common.c index f373ba8..1ef52b2 100644 --- a/hw/apic_common.c +++ b/hw/apic_common.c @@ -362,6 +362,7 @@ static int apic_dispatch_post_load(void *opaque, int version_id) if (info->post_load) { info->post_load(s); } + cpu_put_apic_state(DEVICE(s)); return 0; } -- 1.7.1