From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTGNw-0006pA-FB for qemu-devel@nongnu.org; Tue, 30 Oct 2012 14:18:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTGNm-0001iB-Vl for qemu-devel@nongnu.org; Tue, 30 Oct 2012 14:17:56 -0400 Received: from mout.web.de ([212.227.17.12]:63999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTGNm-0001h4-KQ for qemu-devel@nongnu.org; Tue, 30 Oct 2012 14:17:46 -0400 Message-ID: <509019C6.7060301@web.de> Date: Tue, 30 Oct 2012 19:17:42 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1351599394-24876-1-git-send-email-pbonzini@redhat.com> <1351599394-24876-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1351599394-24876-4-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig26EE5BB49DB69D9BD466EBC0" Subject: Re: [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: Paolo Bonzini Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig26EE5BB49DB69D9BD466EBC0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2012-10-30 13:16, Paolo Bonzini wrote: > 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. >=20 > This can cause MSI injection to fail if attempted during the restore of= > another device, because the LAPIC believes it's not enabled. >=20 > Signed-off-by: Paolo Bonzini > --- > hw/apic_common.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) >=20 > 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, in= t version_id) > if (info->post_load) { > info->post_load(s); > } > + cpu_put_apic_state(DEVICE(s)); Just implement a post_load handler for the KVM APIC and trigger putting from there. Jan > return 0; > } > =20 >=20 --------------enig26EE5BB49DB69D9BD466EBC0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCQGcYACgkQitSsb3rl5xQ25ACg1Ezfa1kzxSMabzOE+t/4eeeF i3wAoJtP8lrp5Udyg96PzLtDCjFKoUAf =jo40 -----END PGP SIGNATURE----- --------------enig26EE5BB49DB69D9BD466EBC0--